@gradeui/ui 0.2.0 → 0.4.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/index.d.mts +388 -2
- package/dist/index.d.ts +388 -2
- package/dist/index.js +36 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -36
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import*as c from'react';import {useRef,useEffect}from'react';import*as A from'@radix-ui/react-accordion';import {ChevronDown,Check,X as X$1,ChevronRight,Circle,ChevronUp,ChevronLeft,Menu,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as se from'@radix-ui/react-checkbox';import*as w from'@radix-ui/react-dialog';import*as f from'@radix-ui/react-dropdown-menu';import*as Ie from'@radix-ui/react-label';import*as le from'@radix-ui/react-progress';import*as Y from'@radix-ui/react-radio-group';import*as F from'@radix-ui/react-scroll-area';import*as g from'@radix-ui/react-select';import*as Oe from'@radix-ui/react-separator';import*as _ from'@radix-ui/react-slider';import*as pe from'@radix-ui/react-switch';import*as G from'@radix-ui/react-tabs';import*as K from'@radix-ui/react-tooltip';import Oo from'lenis';import*as W from'@radix-ui/react-popover';function a(...e){return twMerge(clsx(e))}var Vr=A.Root,at=c.forwardRef(({className:e,...t},r)=>c.createElement(A.Item,{ref:r,className:a("border-b",e),...t}));at.displayName="AccordionItem";var it=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(A.Header,{className:"flex"},c.createElement(A.Trigger,{ref:o,className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r},t,c.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));it.displayName=A.Trigger.displayName;var nt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(A.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},c.createElement("div",{className:a("pb-4 pt-0",e)},t)));nt.displayName=A.Content.displayName;var zr=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep",highlight:"border-highlight/30 bg-highlight-soft text-foreground [&>svg]:text-highlight-deep"}},defaultVariants:{variant:"default"}}),st=c.forwardRef(({className:e,variant:t,...r},o)=>c.createElement("div",{ref:o,role:"alert",className:a(zr({variant:t}),e),...r}));st.displayName="Alert";var dt=c.forwardRef(({className:e,...t},r)=>c.createElement("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));dt.displayName="AlertTitle";var lt=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));lt.displayName="AlertDescription";var pt=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-rds-yellow-400 text-rds-gray-900 shadow hover:bg-rds-yellow-500",success:"border-transparent bg-rds-green-500 text-rds-gray-900 shadow hover:bg-rds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-rds-green-500/20 bg-rds-green-500/10 text-rds-green-600 dark:text-rds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-rds-yellow-500/20 bg-rds-yellow-400/10 text-rds-yellow-600 dark:text-rds-yellow-400","success-outline":"border-rds-green-500/50 bg-transparent text-rds-green-600 dark:text-rds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function qr({className:e,variant:t,rounded:r,...o}){return c.createElement("div",{className:a(pt({variant:t,rounded:r}),e),...o})}var mt=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),oe=c.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...i},n)=>c.createElement(o?Slot:"button",{className:a("rds-button",mt({variant:t,size:r,className:e})),ref:n,...i}));oe.displayName="Button";var ut=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));ut.displayName="Card";var ft=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("flex flex-col space-y-1.5 p-6",e),...t}));ft.displayName="CardHeader";var gt=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("font-semibold leading-none tracking-tight",e),...t}));gt.displayName="CardTitle";var ht=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("text-sm text-muted-foreground",e),...t}));ht.displayName="CardDescription";var yt=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("p-6 pt-0",e),...t}));yt.displayName="CardContent";var bt=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{ref:r,className:a("flex items-center p-6 pt-0",e),...t}));bt.displayName="CardFooter";var vt=c.forwardRef(({className:e,...t},r)=>c.createElement(se.Root,{ref:r,className:a("rds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},c.createElement(se.Indicator,{className:a("flex items-center justify-center text-current")},c.createElement(Check,{className:"h-4 w-4"}))));vt.displayName=se.Root.displayName;var eo=w.Root,to=w.Trigger,xt=w.Portal,ro=w.Close,He=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));He.displayName=w.Overlay.displayName;var Tt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(xt,null,c.createElement(He,null),c.createElement(w.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r},t,c.createElement(w.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},c.createElement(X$1,{className:"h-4 w-4"}),c.createElement("span",{className:"sr-only"},"Close")))));Tt.displayName=w.Content.displayName;var Rt=({className:e,...t})=>c.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Rt.displayName="DialogHeader";var St=({className:e,...t})=>c.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});St.displayName="DialogFooter";var wt=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Title,{ref:r,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));wt.displayName=w.Title.displayName;var Pt=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Pt.displayName=w.Description.displayName;var no=f.Root,so=f.Trigger,lo=f.Group,co=f.Portal,po=f.Sub,mo=f.RadioGroup,Ct=c.forwardRef(({className:e,inset:t,children:r,...o},i)=>c.createElement(f.SubTrigger,{ref:i,className:a("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o},r,c.createElement(ChevronRight,{className:"ml-auto"})));Ct.displayName=f.SubTrigger.displayName;var Nt=c.forwardRef(({className:e,...t},r)=>c.createElement(f.SubContent,{ref:r,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Nt.displayName=f.SubContent.displayName;var kt=c.forwardRef(({className:e,sideOffset:t=4,...r},o)=>c.createElement(f.Portal,null,c.createElement(f.Content,{ref:o,sideOffset:t,className:a("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})));kt.displayName=f.Content.displayName;var Mt=c.forwardRef(({className:e,inset:t,...r},o)=>c.createElement(f.Item,{ref:o,className:a("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Mt.displayName=f.Item.displayName;var Lt=c.forwardRef(({className:e,children:t,checked:r,...o},i)=>c.createElement(f.CheckboxItem,{ref:i,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o},c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(f.ItemIndicator,null,c.createElement(Check,{className:"h-4 w-4"}))),t));Lt.displayName=f.CheckboxItem.displayName;var Dt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(f.RadioItem,{ref:o,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(f.ItemIndicator,null,c.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Dt.displayName=f.RadioItem.displayName;var Ht=c.forwardRef(({className:e,inset:t,...r},o)=>c.createElement(f.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ht.displayName=f.Label.displayName;var It=c.forwardRef(({className:e,...t},r)=>c.createElement(f.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));It.displayName=f.Separator.displayName;var Et=({className:e,...t})=>c.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});Et.displayName="DropdownMenuShortcut";var At=c.forwardRef(({className:e,type:t,...r},o)=>c.createElement("input",{type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));At.displayName="Input";var fo=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ft=c.forwardRef(({className:e,...t},r)=>c.createElement(Ie.Root,{ref:r,className:a(fo(),e),...t}));Ft.displayName=Ie.Root.displayName;var Ot=c.forwardRef(({className:e,value:t,...r},o)=>c.createElement(le.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},c.createElement(le.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Ot.displayName=le.Root.displayName;var $t=c.forwardRef(({className:e,...t},r)=>c.createElement(Y.Root,{className:a("grid gap-2",e),...t,ref:r}));$t.displayName=Y.Root.displayName;var Gt=c.forwardRef(({className:e,...t},r)=>c.createElement(Y.Item,{ref:r,className:a("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},c.createElement(Y.Indicator,{className:"flex items-center justify-center"},c.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Gt.displayName=Y.Item.displayName;var Kt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(F.Root,{ref:o,className:a("relative overflow-hidden",e),...r},c.createElement(F.Viewport,{className:"h-full w-full rounded-[inherit]"},t),c.createElement(Ee,null),c.createElement(F.Corner,null)));Kt.displayName=F.Root.displayName;var Ee=c.forwardRef(({className:e,orientation:t="vertical",...r},o)=>c.createElement(F.ScrollAreaScrollbar,{ref:o,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r},c.createElement(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Ee.displayName=F.ScrollAreaScrollbar.displayName;var bo=g.Root,vo=g.Group,xo=g.Value,Bt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(g.Trigger,{ref:o,className:a("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r},t,c.createElement(g.Icon,{asChild:true},c.createElement(ChevronDown,{className:"h-4 w-4 opacity-50"}))));Bt.displayName=g.Trigger.displayName;var Ae=c.forwardRef(({className:e,...t},r)=>c.createElement(g.ScrollUpButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},c.createElement(ChevronUp,{className:"h-4 w-4"})));Ae.displayName=g.ScrollUpButton.displayName;var Fe=c.forwardRef(({className:e,...t},r)=>c.createElement(g.ScrollDownButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},c.createElement(ChevronDown,{className:"h-4 w-4"})));Fe.displayName=g.ScrollDownButton.displayName;var Wt=c.forwardRef(({className:e,children:t,position:r="popper",...o},i)=>c.createElement(g.Portal,null,c.createElement(g.Content,{ref:i,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o},c.createElement(Ae,null),c.createElement(g.Viewport,{className:a("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),c.createElement(Fe,null))));Wt.displayName=g.Content.displayName;var _t=c.forwardRef(({className:e,...t},r)=>c.createElement(g.Label,{ref:r,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));_t.displayName=g.Label.displayName;var Vt=c.forwardRef(({className:e,children:t,...r},o)=>c.createElement(g.Item,{ref:o,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(g.ItemIndicator,null,c.createElement(Check,{className:"h-4 w-4"}))),c.createElement(g.ItemText,null,t)));Vt.displayName=g.Item.displayName;var jt=c.forwardRef(({className:e,...t},r)=>c.createElement(g.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));jt.displayName=g.Separator.displayName;var zt=c.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},i)=>c.createElement(Oe.Root,{ref:i,decorative:r,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));zt.displayName=Oe.Root.displayName;var So=w.Root,wo=w.Trigger,Po=w.Close,Yt=w.Portal,$e=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Overlay,{className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));$e.displayName=w.Overlay.displayName;var Co=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),qt=c.forwardRef(({side:e="right",className:t,children:r,...o},i)=>c.createElement(Yt,null,c.createElement($e,null),c.createElement(w.Content,{ref:i,className:a(Co({side:e}),t),...o},r,c.createElement(w.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},c.createElement(X$1,{className:"h-4 w-4"}),c.createElement("span",{className:"sr-only"},"Close")))));qt.displayName=w.Content.displayName;var Jt=({className:e,...t})=>c.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jt.displayName="SheetHeader";var Xt=({className:e,...t})=>c.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xt.displayName="SheetFooter";var Qt=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Title,{ref:r,className:a("text-lg font-semibold text-foreground",e),...t}));Qt.displayName=w.Title.displayName;var Zt=c.forwardRef(({className:e,...t},r)=>c.createElement(w.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Zt.displayName=w.Description.displayName;function No({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var er=c.forwardRef(({className:e,...t},r)=>c.createElement(_.Root,{ref:r,className:a("relative flex w-full touch-none select-none items-center",e),...t},c.createElement(_.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},c.createElement(_.Range,{className:"absolute h-full bg-primary"})),c.createElement(_.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));er.displayName=_.Root.displayName;var tr=c.forwardRef(({className:e,...t},r)=>c.createElement(pe.Root,{className:a("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r},c.createElement(pe.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));tr.displayName=pe.Root.displayName;var rr=c.forwardRef(({className:e,...t},r)=>c.createElement("div",{className:"relative w-full overflow-auto"},c.createElement("table",{ref:r,className:a("w-full caption-bottom text-sm",e),...t})));rr.displayName="Table";var or=c.forwardRef(({className:e,...t},r)=>c.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));or.displayName="TableHeader";var ar=c.forwardRef(({className:e,...t},r)=>c.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));ar.displayName="TableBody";var ir=c.forwardRef(({className:e,...t},r)=>c.createElement("tfoot",{ref:r,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ir.displayName="TableFooter";var nr=c.forwardRef(({className:e,...t},r)=>c.createElement("tr",{ref:r,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));nr.displayName="TableRow";var sr=c.forwardRef(({className:e,...t},r)=>c.createElement("th",{ref:r,className:a("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));sr.displayName="TableHead";var dr=c.forwardRef(({className:e,...t},r)=>c.createElement("td",{ref:r,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));dr.displayName="TableCell";var lr=c.forwardRef(({className:e,...t},r)=>c.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));lr.displayName="TableCaption";var ko=G.Root,cr=c.forwardRef(({className:e,...t},r)=>c.createElement(G.List,{ref:r,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));cr.displayName=G.List.displayName;var pr=c.forwardRef(({className:e,...t},r)=>c.createElement(G.Trigger,{ref:r,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",e),...t}));pr.displayName=G.Trigger.displayName;var mr=c.forwardRef(({className:e,...t},r)=>c.createElement(G.Content,{ref:r,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mr.displayName=G.Content.displayName;var ur=c.forwardRef(({className:e,...t},r)=>c.createElement("textarea",{className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ur.displayName="Textarea";var Ge=K.Provider,Ke=K.Root,Ue=K.Trigger,we=c.forwardRef(({className:e,sideOffset:t=4,...r},o)=>c.createElement(K.Portal,null,c.createElement(K.Content,{ref:o,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...r})));we.displayName=K.Content.displayName;var gr=c.createContext(null);function hr(){let e=c.useContext(gr);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var Do=({href:e,className:t,children:r})=>c.createElement("a",{href:e,className:t},r),yr=c.forwardRef(({header:e,collapsedHeader:t,sections:r,items:o,footer:i,collapsed:n,onCollapsedChange:s,collapsible:u=true,defaultCollapsed:d=false,activeItem:y,className:b,linkComponent:N=Do},T)=>{let[E,Z]=c.useState(d),l=n??E,C=()=>{let H=!l;Z(H),s?.(H);};return c.createElement(Ge,{delayDuration:0},c.createElement(gr.Provider,{value:{collapsed:l,activeItem:y,LinkComponent:N}},c.createElement("aside",{ref:T,className:a("flex h-full flex-col transition-[width] duration-300 ease-in-out","bg-white dark:bg-[#141414] border-r border-rds-gray-200 dark:border-[#1a1a1a]",l?"w-16":"w-64",b)},c.createElement("div",{className:a("flex items-center border-b border-rds-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",l?"justify-center px-2":"justify-between px-3")},l&&t||e,u&&c.createElement("button",{onClick:C,className:a("rounded-md h-5 w-5 flex items-center justify-center","text-rds-gray-400 dark:text-rds-gray-500","hover:text-rds-gray-600 dark:hover:text-rds-gray-300 transition-colors","bg-white dark:bg-[#141414] border border-rds-gray-200 dark:border-rds-gray-700 shadow-sm",l&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":l?"Expand sidebar":"Collapse sidebar"},l?c.createElement(ChevronRight,{className:"h-3 w-3"}):c.createElement(ChevronLeft,{className:"h-3 w-3"}))),c.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&c.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(H=>c.createElement(Be,{key:H.id,item:H}))),r?.map(H=>c.createElement(Ho,{key:H.id,section:H}))),i&&c.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},i))))});yr.displayName="SideMenu";function Ho({section:e}){let{collapsed:t}=hr(),[r,o]=c.useState(e.defaultExpanded??true);return t?c.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(i=>c.createElement(Be,{key:i.id,item:i}))):c.createElement("div",{className:"px-2 mb-1"},c.createElement("button",{onClick:()=>o(!r),className:a("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm font-medium","text-rds-gray-700 dark:text-rds-gray-300","hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900","hover:text-rds-gray-900 dark:hover:text-white transition-colors")},e.icon&&c.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),c.createElement("span",{className:"flex-1 text-left"},e.title),r?c.createElement(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):c.createElement(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&c.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},c.createElement("div",{className:"absolute left-[1.1rem] top-0 bottom-0 w-px bg-rds-gray-200 dark:bg-rds-gray-700"}),e.items.map(i=>c.createElement(Be,{key:i.id,item:i,nested:true}))))}function Be({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:i}=hr(),n=o===e.id,s=a("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",r?"justify-center px-2 py-2.5":"px-2 py-1.5",n?t?"bg-rds-gray-100 dark:bg-[#1a1a1a] text-rds-gray-900 dark:text-white":"bg-rds-green-50 dark:bg-rds-green-950 text-rds-green-700 dark:text-rds-green-400":"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900 hover:text-rds-gray-900 dark:hover:text-white",e.disabled&&"opacity-50 pointer-events-none"),u=c.createElement(c.Fragment,null,e.icon&&c.createElement("span",{className:a("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&c.createElement("span",null,e.label),!r&&e.badge&&c.createElement("span",{className:"ml-auto text-xs bg-rds-gray-100 dark:bg-rds-gray-800 px-1.5 py-0.5 rounded"},e.badge)),d=e.href?c.createElement(i,{href:e.href,className:s},u):c.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:a(s,"w-full")},u);return r?c.createElement(Ke,null,c.createElement(Ue,{asChild:true},d),c.createElement(we,{side:"right",sideOffset:8},e.label)):d}var Eo=({href:e,className:t,children:r})=>c.createElement("a",{href:e,className:t},r),br=c.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:i,className:n,linkComponent:s=Eo},u)=>c.createElement("header",{ref:u,className:a("sticky top-0 z-30 flex h-12 items-center gap-3","border-b border-rds-gray-200 dark:border-[#1a1a1a]","bg-white dark:bg-[#141414] px-4",n)},t&&c.createElement("button",{onClick:r,className:"lg:hidden rounded-md p-1.5 text-rds-gray-600 hover:bg-rds-gray-100 dark:text-rds-gray-400 dark:hover:bg-rds-gray-800","aria-label":"Toggle menu"},c.createElement(Menu,{className:"h-4 w-4"})),e.length>0&&c.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((d,y)=>c.createElement(c.Fragment,{key:y},y>0&&c.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),d.href?c.createElement(s,{href:d.href,className:"text-rds-gray-600 dark:text-rds-gray-400 hover:text-rds-gray-900 dark:hover:text-white transition-colors text-sm"},d.label):c.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},d.label)))),o,c.createElement("div",{className:"flex-1"}),i&&c.createElement("div",{className:"flex items-center gap-1.5"},i)));br.displayName="TopMenu";var vr=c.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:o,avatarClassName:i,children:n,className:s},u)=>{let[d,y]=c.useState(false),b=c.useRef(null);return c.useEffect(()=>{let N=T=>{b.current&&!b.current.contains(T.target)&&y(false);};return d&&document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N);}},[d]),c.createElement("div",{ref:u,className:a("relative",s)},c.createElement("div",{ref:b},c.createElement("button",{onClick:()=>y(!d),className:"flex items-center gap-1.5 rounded-full p-0.5 hover:ring-2 hover:ring-rds-green-500 hover:ring-offset-2 dark:hover:ring-offset-[#141414] transition-all","aria-label":"Account menu"},c.createElement("div",{className:a("h-8 w-8 rounded-full overflow-hidden flex items-center justify-center",i||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?c.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o)),d&&c.createElement("div",{className:"absolute right-0 mt-2 w-64 rounded-lg border border-rds-gray-200 dark:border-[#1a1a1a] bg-white dark:bg-[#141414] shadow-lg overflow-hidden z-50"},(e||t)&&c.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},c.createElement("div",{className:"flex items-center gap-3"},c.createElement("div",{className:a("h-10 w-10 rounded-full overflow-hidden flex items-center justify-center",i||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?c.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o),c.createElement("div",{className:"flex-1 min-w-0"},e&&c.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&c.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),n)))});vr.displayName="TopMenuUser";var xr=c.forwardRef(({icon:e,children:t,onClick:r,href:o,variant:i="default",className:n},s)=>c.createElement(o?"a":"button",{ref:s,onClick:r,href:o,className:a("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",{default:"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-[#1a1a1a]",danger:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950/20",success:"text-rds-green-600 dark:text-rds-green-400 hover:bg-rds-green-50 dark:hover:bg-rds-green-950/20"}[i],n)},e&&c.createElement("span",{className:"h-4 w-4"},e),c.createElement("span",null,t)));xr.displayName="TopMenuUserItem";var Tr=c.forwardRef(({children:e,className:t},r)=>c.createElement("div",{ref:r,className:a("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));Tr.displayName="TopMenuUserSection";var We=c.createContext(null);function _e(){let e=c.useContext(We);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Rr=c.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:i,className:n,tabsClassName:s},u)=>{let[d,y]=c.useState(r||e[0]?.id||""),b=t??d,N=T=>{y(T),o?.(T);};return c.createElement(We.Provider,{value:{activeTab:b,setActiveTab:N}},c.createElement("div",{ref:u,className:a("space-y-6",n)},c.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},c.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",s),"aria-label":"Tabs"},e.map(T=>{let E=b===T.id;return c.createElement("button",{key:T.id,onClick:()=>!T.disabled&&N(T.id),disabled:T.disabled,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",E?"text-primary":"text-muted-foreground hover:text-foreground",T.disabled&&"opacity-50 cursor-not-allowed")},T.icon&&c.createElement("span",{className:"h-4 w-4"},T.icon),T.label,E&&c.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),i&&c.createElement("div",null,i)))});Rr.displayName="SimpleTabs";var Sr=c.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:i}=_e();return i!==e?null:c.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});Sr.displayName="SimpleTabsPanel";var wr=c.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:i},n)=>{let[s,u]=c.useState(t||""),d=e??s,y=b=>{u(b),r?.(b);};return c.createElement(We.Provider,{value:{activeTab:d,setActiveTab:y}},c.createElement("div",{ref:n,className:a("space-y-6",i)},o))});wr.displayName="SimpleTabsRoot";var Pr=c.forwardRef(({children:e,className:t},r)=>c.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},c.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Pr.displayName="SimpleTabsList";var Cr=c.forwardRef(({value:e,children:t,icon:r,disabled:o,className:i},n)=>{let{activeTab:s,setActiveTab:u}=_e(),d=s===e;return c.createElement("button",{ref:n,role:"tab",id:`tab-${e}`,"aria-selected":d,"aria-controls":`panel-${e}`,onClick:()=>!o&&u(e),disabled:o,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",d?"text-primary":"text-muted-foreground hover:text-foreground",o&&"opacity-50 cursor-not-allowed",i)},r&&c.createElement("span",{className:"h-4 w-4"},r),t,d&&c.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});Cr.displayName="SimpleTabsTrigger";var Nr=c.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:i}=_e();return i!==e?null:c.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});Nr.displayName="SimpleTabsContent";function $o({children:e}){let t=useRef(null);return useEffect(()=>{let r=new Oo({duration:1.2,easing:i=>Math.min(1,1.001-Math.pow(2,-10*i)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(i){r.raf(i),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var J=[50,100,200,300,400,500,600,700,800,900,950],kr=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Go=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Pe({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let i=0;i<J.length;i++){let n=kr[i],s=Go[i]*t;o[J[i]]=`${n.toFixed(4)} ${s.toFixed(4)} ${r.toFixed(2)}`;}return o}function Mr(){let e={};for(let t=0;t<J.length;t++){let r=kr[t];e[J[t]]=`${r.toFixed(4)} 0 0`;}return e}var Ve={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},ue="1 0 0",Lr="0 0 0";function ie(e,t){let[,r,o]=e.split(/\s+/).map(b=>b.trim()),i=Number(r),n=o;if(t==="light"){let N=Math.min(i*.22,.045),T=.38,E=i;return {soft:`${.965.toFixed(3)} ${N.toFixed(3)} ${n}`,deep:`${T.toFixed(3)} ${E.toFixed(3)} ${n}`}}let s=.22,u=Math.min(i*.45,.075),d=.82,y=i*.9;return {soft:`${s.toFixed(3)} ${u.toFixed(3)} ${n}`,deep:`${d.toFixed(3)} ${y.toFixed(3)} ${n}`}}var Ce={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Ko=["superLight","light","dark","superDark"],Uo={muted:.6,default:1,vibrant:1.3};function Bo(e,t,r){let o=t.primary*r,i=t.accent*r,n=(o+i)/2*.8,s=u=>(u%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*n).toFixed(4)} ${s(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*n).toFixed(4)} ${s(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*i).toFixed(4)} ${e.accent.toFixed(2)}`}}var p=e=>({source:"neutral",step:e}),O=e=>({source:"primary",step:e}),X=e=>({source:"accent",step:e}),fe=e=>({source:"pure",value:e}),Wo={superLight:{background:p(50),foreground:p(800),card:fe(ue),cardForeground:p(800),popover:fe(ue),popoverForeground:p(800),primary:O(600),primaryForeground:O(50),secondary:p(100),secondaryForeground:p(700),muted:p(100),mutedForeground:p(500),accent:X(600),accentForeground:X(50),border:p(200),input:p(200),ring:O(500)},light:{background:p(50),foreground:p(950),card:fe(ue),cardForeground:p(950),popover:fe(ue),popoverForeground:p(950),primary:O(500),primaryForeground:O(50),secondary:p(100),secondaryForeground:p(700),muted:p(100),mutedForeground:p(500),accent:X(500),accentForeground:X(50),border:p(200),input:p(200),ring:O(500)},dark:{background:p(950),foreground:p(50),card:p(900),cardForeground:p(50),popover:p(900),popoverForeground:p(50),primary:O(400),primaryForeground:O(950),secondary:p(800),secondaryForeground:p(200),muted:p(800),mutedForeground:p(400),accent:X(400),accentForeground:X(950),border:p(800),input:p(800),ring:O(400)},superDark:{background:fe(Lr),foreground:p(100),card:p(950),cardForeground:p(100),popover:p(950),popoverForeground:p(100),primary:O(300),primaryForeground:O(950),secondary:p(900),secondaryForeground:p(300),muted:p(900),mutedForeground:p(500),accent:X(300),accentForeground:X(950),border:p(900),input:p(900),ring:O(300)}};function D(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function _o(e,t){let r=Wo[t],o=t==="superLight"||t==="light",i=o?Ve.light:Ve.dark;return {background:D(r.background,e),foreground:D(r.foreground,e),card:D(r.card,e),cardForeground:D(r.cardForeground,e),popover:D(r.popover,e),popoverForeground:D(r.popoverForeground,e),primary:D(r.primary,e),primaryForeground:D(r.primaryForeground,e),secondary:D(r.secondary,e),secondaryForeground:D(r.secondaryForeground,e),muted:D(r.muted,e),mutedForeground:D(r.mutedForeground,e),accent:D(r.accent,e),accentForeground:D(r.accentForeground,e),border:D(r.border,e),input:D(r.input,e),ring:D(r.ring,e),destructive:i.destructive,destructiveForeground:i.destructiveFg,success:i.success,warning:i.warning,info:i.info,highlight:i.highlight,...(()=>{let n=o?"light":"dark",s=ie(i.destructive,n),u=ie(i.success,n),d=ie(i.warning,n),y=ie(i.info,n),b=ie(i.highlight,n);return {destructiveSoft:s.soft,destructiveDeep:s.deep,successSoft:u.soft,successDeep:u.deep,warningSoft:d.soft,warningDeep:d.deep,infoSoft:y.soft,infoDeep:y.deep,highlightSoft:b.soft,highlightDeep:b.deep}})()}}var V={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Vo={compact:.85,default:1,spacious:1.18};function jo(e){let t=Vo[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:Ce[e.body],fontMono:Ce[e.mono],fontDisplay:Ce[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(V.display),h1:r(V.h1),h2:r(V.h2),h3:r(V.h3),h4:r(V.h4),h5:r(V.h5),h6:r(V.h6),body:r(V.body),bodySm:r(V.bodySm)}}}var zo={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Yo(e){let t=zo[e.style],r=o=>`${o.toFixed(3)}rem`;return {base:r(t),sm:r(Math.max(0,t-.25)),md:r(t),lg:r(t+.25),xl:r(t+.5),"2xl":r(t+1),full:"9999px"}}var qo={tight:.85,default:1,roomy:1.2};function Jo(e){return {baseUnit:"1rem",densityFactor:qo[e.density]}}var Xo={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function Qo(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=i=>`${Math.round(i*r)}ms`;return {shadows:Xo[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function te(e){let t=Uo[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,i=(e.chroma?.primary??1)*t,n=(e.chroma?.accent??1)*t,s=r?Mr():Pe({hue:e.hues.neutral,chromaScale:o}),u=Pe({hue:e.hues.primary,chromaScale:i}),d=Pe({hue:e.hues.accent,chromaScale:n}),y={neutral:s,primary:u,accent:d},b=Bo(e.hues,{primary:i,accent:n},t),N=Object.fromEntries(Ko.map(H=>[H,_o(y,H)])),T=jo(e.typography),E=Yo(e.radius),Z=Jo(e.spacing),l=Qo(e.effects),C={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:y,colors:N,chart:b,typography:T,radius:E,spacing:Z,effects:l,components:C}}var ge={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},je={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Ne=[ge,je];function Zo(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Ye(e,t){let r=e.colors[t];return {...Zo(r),...ze("neutral",e.ramps.neutral),...ze("primary",e.ramps.primary),...ze("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--rds-radius-sm":e.radius.sm,"--rds-radius-md":e.radius.md,"--rds-radius-lg":e.radius.lg,"--rds-radius-xl":e.radius.xl,"--rds-radius-2xl":e.radius["2xl"],"--rds-radius-full":e.radius.full,"--rds-density":String(e.spacing.densityFactor),"--rds-shadow-sm":e.effects.shadows.sm,"--rds-shadow-md":e.effects.shadows.md,"--rds-shadow-lg":e.effects.shadows.lg,"--rds-shadow-xl":e.effects.shadows.xl,"--rds-shadow-2xl":e.effects.shadows["2xl"],"--rds-shadow-inner":e.effects.shadows.inner,"--rds-transition-fast":e.effects.motion.fast,"--rds-transition-base":e.effects.motion.base,"--rds-transition-slow":e.effects.motion.slow,"--rds-transition-slower":e.effects.motion.slower,"--rds-border-width":e.effects.borderWidth}}function ze(e,t){let r={};for(let o of J)r[`--ramp-${e}-${o}`]=t[o];return r}function ke(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Ye(e,t);for(let[i,n]of Object.entries(o))r.style.setProperty(i,n);r.setAttribute("data-ramp-theme",e.id),r.setAttribute("data-mode",t),r.setAttribute("data-button-shape",e.components.buttonShape??"default"),r.setAttribute("data-input-style",e.components.inputStyle??"outlined"),r.setAttribute("data-card-style",e.components.cardStyle??"flat");}function he(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let o=r.match(/\d+/g);if(!o||o.length<3)return "";let[i,n,s]=o.slice(0,3).map(Number);return "#"+[i,n,s].map(u=>Math.max(0,Math.min(255,u)).toString(16).padStart(2,"0")).join("").toUpperCase()}function ea(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,i]=t.map(Number),n=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(i)}`,s=he(e);return {oklch:n,hex:s}}function qe(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let i of J){let{oklch:n,hex:s}=ea(t[i]);o.push(`| ${i} | \`${n}\` | \`${s||"\u2014"}\` |`);}return o.join(`
|
|
2
|
-
`)}function
|
|
3
|
-
`)}function
|
|
1
|
+
import*as h from'react';import {useRef,useEffect}from'react';import*as Z from'@radix-ui/react-accordion';import {ChevronDown,Check,X,ChevronRight,Circle,ChevronUp,ChevronLeft,Menu,Pause,Play,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import {getDefaultClassNames,DayPicker}from'react-day-picker';import*as Fe from'@radix-ui/react-checkbox';import {format}from'date-fns';import*as oe from'@radix-ui/react-popover';import*as I from'@radix-ui/react-dialog';import*as v from'@radix-ui/react-dropdown-menu';import*as Pt from'@radix-ui/react-label';import*as Ge from'@radix-ui/react-progress';import*as ge from'@radix-ui/react-radio-group';import*as ee from'@radix-ui/react-scroll-area';import*as x from'@radix-ui/react-select';import*as Nt from'@radix-ui/react-separator';import*as ce from'@radix-ui/react-slider';import*as Ke from'@radix-ui/react-switch';import*as ae from'@radix-ui/react-tabs';import*as ne from'@radix-ui/react-tooltip';import*as H from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,EffectPass}from'postprocessing';import vn from'lenis';function a(...e){return twMerge(clsx(e))}var Qo=Z.Root,rr=h.forwardRef(({className:e,...t},r)=>h.createElement(Z.Item,{ref:r,className:a("border-b",e),...t}));rr.displayName="AccordionItem";var or=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(Z.Header,{className:"flex"},h.createElement(Z.Trigger,{ref:o,className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r},t,h.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));or.displayName=Z.Trigger.displayName;var ar=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(Z.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},h.createElement("div",{className:a("pb-4 pt-0",e)},t)));ar.displayName=Z.Content.displayName;var ea=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep",highlight:"border-highlight/30 bg-highlight-soft text-foreground [&>svg]:text-highlight-deep"}},defaultVariants:{variant:"default"}}),nr=h.forwardRef(({className:e,variant:t,...r},o)=>h.createElement("div",{ref:o,role:"alert",className:a(ea({variant:t}),e),...r}));nr.displayName="Alert";var ir=h.forwardRef(({className:e,...t},r)=>h.createElement("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));ir.displayName="AlertTitle";var sr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));sr.displayName="AlertDescription";var lr=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-rds-yellow-400 text-rds-gray-900 shadow hover:bg-rds-yellow-500",success:"border-transparent bg-rds-green-500 text-rds-gray-900 shadow hover:bg-rds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-rds-green-500/20 bg-rds-green-500/10 text-rds-green-600 dark:text-rds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-rds-yellow-500/20 bg-rds-yellow-400/10 text-rds-yellow-600 dark:text-rds-yellow-400","success-outline":"border-rds-green-500/50 bg-transparent text-rds-green-600 dark:text-rds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function ra({className:e,variant:t,rounded:r,...o}){return h.createElement("div",{className:a(lr({variant:t,rounded:r}),e),...o})}var Ae=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),j=h.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...n},i)=>h.createElement(o?Slot:"button",{className:a("rds-button",Ae({variant:t,size:r,className:e})),ref:i,...n}));j.displayName="Button";function Ze({className:e,classNames:t,showOutsideDays:r=true,captionLayout:o="label",buttonVariant:n="ghost",formatters:i,components:s,...m}){let d=getDefaultClassNames();return h.createElement(DayPicker,{showOutsideDays:r,className:a("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:o,formatters:{formatMonthDropdown:p=>p.toLocaleString("default",{month:"short"}),...i},classNames:{root:a("w-fit",d.root),months:a("relative flex flex-col gap-4 md:flex-row",d.months),month:a("flex w-full flex-col gap-4",d.month),nav:a("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",d.nav),button_previous:a(Ae({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_previous),button_next:a(Ae({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_next),month_caption:a("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",d.month_caption),dropdowns:a("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",d.dropdowns),dropdown_root:a("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",d.dropdown_root),dropdown:a("bg-popover absolute inset-0 opacity-0",d.dropdown),caption_label:a("select-none font-medium",o==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",d.caption_label),table:"w-full border-collapse",weekdays:a("flex",d.weekdays),weekday:a("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",d.weekday),week:a("mt-2 flex w-full",d.week),week_number_header:a("w-[--cell-size] select-none",d.week_number_header),week_number:a("text-muted-foreground select-none text-[0.8rem]",d.week_number),day:a("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",d.day),range_start:a("bg-accent rounded-l-md",d.range_start),range_middle:a("rounded-none",d.range_middle),range_end:a("bg-accent rounded-r-md",d.range_end),today:a("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",d.today),outside:a("text-muted-foreground aria-selected:text-muted-foreground",d.outside),disabled:a("text-muted-foreground opacity-50",d.disabled),hidden:a("invisible",d.hidden),...t},components:{Root:({className:p,rootRef:f,...u})=>h.createElement("div",{"data-slot":"calendar",ref:f,className:a(p),...u}),Chevron:({className:p,orientation:f,...u})=>f==="left"?h.createElement(ChevronLeftIcon,{className:a("size-4",p),...u}):f==="right"?h.createElement(ChevronRightIcon,{className:a("size-4",p),...u}):h.createElement(ChevronDownIcon,{className:a("size-4",p),...u}),DayButton:pr,WeekNumber:({children:p,...f})=>h.createElement("td",{...f},h.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},p)),...s},...m})}function pr({className:e,day:t,modifiers:r,...o}){let n=getDefaultClassNames(),i=h.useRef(null);return h.useEffect(()=>{r.focused&&i.current?.focus();},[r.focused]),h.createElement(j,{ref:i,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:a("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...o})}var mr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));mr.displayName="Card";var ur=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("flex flex-col space-y-1.5 p-6",e),...t}));ur.displayName="CardHeader";var fr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("font-semibold leading-none tracking-tight",e),...t}));fr.displayName="CardTitle";var gr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var hr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("p-6 pt-0",e),...t}));hr.displayName="CardContent";var yr=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{ref:r,className:a("flex items-center p-6 pt-0",e),...t}));yr.displayName="CardFooter";var br=h.forwardRef(({className:e,...t},r)=>h.createElement(Fe.Root,{ref:r,className:a("rds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},h.createElement(Fe.Indicator,{className:a("flex items-center justify-center text-current")},h.createElement(Check,{className:"h-4 w-4"}))));br.displayName=Fe.Root.displayName;var Me=oe.Root,Le=oe.Trigger,ca=oe.Anchor,Re=h.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},n)=>h.createElement(oe.Portal,null,h.createElement(oe.Content,{ref:n,align:t,sideOffset:r,className:a("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",e),...o})));Re.displayName=oe.Content.displayName;var pa="PPP",ma="LLL dd, y";function ua({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:n,contentClassName:i,align:s="start",side:m,format:d=pa,captionLayout:p,icon:f,"aria-label":u}){return h.createElement(Me,null,h.createElement(Le,{asChild:true},h.createElement(j,{type:"button",variant:"outline",disabled:o,"aria-label":u??(e?void 0:r),"data-empty":!e,className:a("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},f??h.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,d):h.createElement("span",null,r))),h.createElement(Re,{className:a("w-auto p-0",i),align:s,side:m},h.createElement(Ze,{mode:"single",selected:e,onSelect:t,captionLayout:p,initialFocus:true})))}function fa({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:n,contentClassName:i,align:s="start",side:m,format:d=ma,captionLayout:p,icon:f,numberOfMonths:u=2,"aria-label":g}){let R=!!e?.from;return h.createElement(Me,null,h.createElement(Le,{asChild:true},h.createElement(j,{type:"button",variant:"outline",disabled:o,"aria-label":g??(R?void 0:r),"data-empty":!R,className:a("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},f??h.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?h.createElement(h.Fragment,null,format(e.from,d)," \u2013"," ",format(e.to,d)):format(e.from,d):h.createElement("span",null,r))),h.createElement(Re,{className:a("w-auto p-0",i),align:s,side:m},h.createElement(Ze,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:u,captionLayout:p,initialFocus:true})))}var ha=I.Root,ya=I.Trigger,xr=I.Portal,ba=I.Close,Tt=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Tt.displayName=I.Overlay.displayName;var Rr=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(xr,null,h.createElement(Tt,null),h.createElement(I.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r},t,h.createElement(I.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},h.createElement(X,{className:"h-4 w-4"}),h.createElement("span",{className:"sr-only"},"Close")))));Rr.displayName=I.Content.displayName;var Tr=({className:e,...t})=>h.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Tr.displayName="DialogHeader";var Pr=({className:e,...t})=>h.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Pr.displayName="DialogFooter";var wr=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Title,{ref:r,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));wr.displayName=I.Title.displayName;var Sr=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Sr.displayName=I.Description.displayName;var Ta=v.Root,Pa=v.Trigger,wa=v.Group,Sa=v.Portal,Ca=v.Sub,Na=v.RadioGroup,Cr=h.forwardRef(({className:e,inset:t,children:r,...o},n)=>h.createElement(v.SubTrigger,{ref:n,className:a("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o},r,h.createElement(ChevronRight,{className:"ml-auto"})));Cr.displayName=v.SubTrigger.displayName;var Nr=h.forwardRef(({className:e,...t},r)=>h.createElement(v.SubContent,{ref:r,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Nr.displayName=v.SubContent.displayName;var kr=h.forwardRef(({className:e,sideOffset:t=4,...r},o)=>h.createElement(v.Portal,null,h.createElement(v.Content,{ref:o,sideOffset:t,className:a("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})));kr.displayName=v.Content.displayName;var Mr=h.forwardRef(({className:e,inset:t,...r},o)=>h.createElement(v.Item,{ref:o,className:a("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Mr.displayName=v.Item.displayName;var Lr=h.forwardRef(({className:e,children:t,checked:r,...o},n)=>h.createElement(v.CheckboxItem,{ref:n,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o},h.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h.createElement(v.ItemIndicator,null,h.createElement(Check,{className:"h-4 w-4"}))),t));Lr.displayName=v.CheckboxItem.displayName;var Dr=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(v.RadioItem,{ref:o,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},h.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h.createElement(v.ItemIndicator,null,h.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Dr.displayName=v.RadioItem.displayName;var Er=h.forwardRef(({className:e,inset:t,...r},o)=>h.createElement(v.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Er.displayName=v.Label.displayName;var Hr=h.forwardRef(({className:e,...t},r)=>h.createElement(v.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));Hr.displayName=v.Separator.displayName;var Ir=({className:e,...t})=>h.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});Ir.displayName="DropdownMenuShortcut";var Ar=h.forwardRef(({className:e,type:t,...r},o)=>h.createElement("input",{type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));Ar.displayName="Input";var Ma=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fr=h.forwardRef(({className:e,...t},r)=>h.createElement(Pt.Root,{ref:r,className:a(Ma(),e),...t}));Fr.displayName=Pt.Root.displayName;var Or=h.forwardRef(({className:e,value:t,...r},o)=>h.createElement(Ge.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},h.createElement(Ge.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Or.displayName=Ge.Root.displayName;var $r=h.forwardRef(({className:e,...t},r)=>h.createElement(ge.Root,{className:a("grid gap-2",e),...t,ref:r}));$r.displayName=ge.Root.displayName;var Gr=h.forwardRef(({className:e,...t},r)=>h.createElement(ge.Item,{ref:r,className:a("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},h.createElement(ge.Indicator,{className:"flex items-center justify-center"},h.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Gr.displayName=ge.Item.displayName;var Br=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(ee.Root,{ref:o,className:a("relative overflow-hidden",e),...r},h.createElement(ee.Viewport,{className:"h-full w-full rounded-[inherit]"},t),h.createElement(wt,null),h.createElement(ee.Corner,null)));Br.displayName=ee.Root.displayName;var wt=h.forwardRef(({className:e,orientation:t="vertical",...r},o)=>h.createElement(ee.ScrollAreaScrollbar,{ref:o,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r},h.createElement(ee.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));wt.displayName=ee.ScrollAreaScrollbar.displayName;var Ha=x.Root,Ia=x.Group,Aa=x.Value,_r=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(x.Trigger,{ref:o,className:a("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r},t,h.createElement(x.Icon,{asChild:true},h.createElement(ChevronDown,{className:"h-4 w-4 opacity-50"}))));_r.displayName=x.Trigger.displayName;var St=h.forwardRef(({className:e,...t},r)=>h.createElement(x.ScrollUpButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},h.createElement(ChevronUp,{className:"h-4 w-4"})));St.displayName=x.ScrollUpButton.displayName;var Ct=h.forwardRef(({className:e,...t},r)=>h.createElement(x.ScrollDownButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},h.createElement(ChevronDown,{className:"h-4 w-4"})));Ct.displayName=x.ScrollDownButton.displayName;var Ur=h.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>h.createElement(x.Portal,null,h.createElement(x.Content,{ref:n,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o},h.createElement(St,null),h.createElement(x.Viewport,{className:a("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),h.createElement(Ct,null))));Ur.displayName=x.Content.displayName;var Wr=h.forwardRef(({className:e,...t},r)=>h.createElement(x.Label,{ref:r,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wr.displayName=x.Label.displayName;var Vr=h.forwardRef(({className:e,children:t,...r},o)=>h.createElement(x.Item,{ref:o,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},h.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h.createElement(x.ItemIndicator,null,h.createElement(Check,{className:"h-4 w-4"}))),h.createElement(x.ItemText,null,t)));Vr.displayName=x.Item.displayName;var zr=h.forwardRef(({className:e,...t},r)=>h.createElement(x.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));zr.displayName=x.Separator.displayName;var jr=h.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>h.createElement(Nt.Root,{ref:n,decorative:r,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));jr.displayName=Nt.Root.displayName;var $a=I.Root,Ga=I.Trigger,Ba=I.Close,qr=I.Portal,kt=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Overlay,{className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));kt.displayName=I.Overlay.displayName;var Ka=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Yr=h.forwardRef(({side:e="right",className:t,children:r,...o},n)=>h.createElement(qr,null,h.createElement(kt,null),h.createElement(I.Content,{ref:n,className:a(Ka({side:e}),t),...o},r,h.createElement(I.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},h.createElement(X,{className:"h-4 w-4"}),h.createElement("span",{className:"sr-only"},"Close")))));Yr.displayName=I.Content.displayName;var Jr=({className:e,...t})=>h.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jr.displayName="SheetHeader";var Xr=({className:e,...t})=>h.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xr.displayName="SheetFooter";var Qr=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Title,{ref:r,className:a("text-lg font-semibold text-foreground",e),...t}));Qr.displayName=I.Title.displayName;var Zr=h.forwardRef(({className:e,...t},r)=>h.createElement(I.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Zr.displayName=I.Description.displayName;function _a({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var eo=h.forwardRef(({className:e,...t},r)=>h.createElement(ce.Root,{ref:r,className:a("relative flex w-full touch-none select-none items-center",e),...t},h.createElement(ce.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},h.createElement(ce.Range,{className:"absolute h-full bg-primary"})),h.createElement(ce.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));eo.displayName=ce.Root.displayName;var to=h.forwardRef(({className:e,...t},r)=>h.createElement(Ke.Root,{className:a("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r},h.createElement(Ke.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));to.displayName=Ke.Root.displayName;var ro=h.forwardRef(({className:e,...t},r)=>h.createElement("div",{className:"relative w-full overflow-auto"},h.createElement("table",{ref:r,className:a("w-full caption-bottom text-sm",e),...t})));ro.displayName="Table";var oo=h.forwardRef(({className:e,...t},r)=>h.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));oo.displayName="TableHeader";var ao=h.forwardRef(({className:e,...t},r)=>h.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));ao.displayName="TableBody";var no=h.forwardRef(({className:e,...t},r)=>h.createElement("tfoot",{ref:r,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));no.displayName="TableFooter";var io=h.forwardRef(({className:e,...t},r)=>h.createElement("tr",{ref:r,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));io.displayName="TableRow";var so=h.forwardRef(({className:e,...t},r)=>h.createElement("th",{ref:r,className:a("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));so.displayName="TableHead";var lo=h.forwardRef(({className:e,...t},r)=>h.createElement("td",{ref:r,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));lo.displayName="TableCell";var co=h.forwardRef(({className:e,...t},r)=>h.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));co.displayName="TableCaption";var Ua=ae.Root,po=h.forwardRef(({className:e,...t},r)=>h.createElement(ae.List,{ref:r,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));po.displayName=ae.List.displayName;var mo=h.forwardRef(({className:e,...t},r)=>h.createElement(ae.Trigger,{ref:r,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",e),...t}));mo.displayName=ae.Trigger.displayName;var uo=h.forwardRef(({className:e,...t},r)=>h.createElement(ae.Content,{ref:r,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));uo.displayName=ae.Content.displayName;var fo=h.forwardRef(({className:e,...t},r)=>h.createElement("textarea",{className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));fo.displayName="Textarea";var Mt=ne.Provider,Lt=ne.Root,Dt=ne.Trigger,nt=h.forwardRef(({className:e,sideOffset:t=4,...r},o)=>h.createElement(ne.Portal,null,h.createElement(ne.Content,{ref:o,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...r})));nt.displayName=ne.Content.displayName;var ho=h.createContext(null);function yo(){let e=h.useContext(ho);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var za=({href:e,className:t,children:r})=>h.createElement("a",{href:e,className:t},r),bo=h.forwardRef(({header:e,collapsedHeader:t,sections:r,items:o,footer:n,collapsed:i,onCollapsedChange:s,collapsible:m=true,defaultCollapsed:d=false,activeItem:p,className:f,linkComponent:u=za},g)=>{let[R,T]=h.useState(d),l=i??R,c=()=>{let P=!l;T(P),s?.(P);};return h.createElement(Mt,{delayDuration:0},h.createElement(ho.Provider,{value:{collapsed:l,activeItem:p,LinkComponent:u}},h.createElement("aside",{ref:g,className:a("flex h-full flex-col transition-[width] duration-300 ease-in-out","bg-white dark:bg-[#141414] border-r border-rds-gray-200 dark:border-[#1a1a1a]",l?"w-16":"w-64",f)},h.createElement("div",{className:a("flex items-center border-b border-rds-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",l?"justify-center px-2":"justify-between px-3")},l&&t||e,m&&h.createElement("button",{onClick:c,className:a("rounded-md h-5 w-5 flex items-center justify-center","text-rds-gray-400 dark:text-rds-gray-500","hover:text-rds-gray-600 dark:hover:text-rds-gray-300 transition-colors","bg-white dark:bg-[#141414] border border-rds-gray-200 dark:border-rds-gray-700 shadow-sm",l&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":l?"Expand sidebar":"Collapse sidebar"},l?h.createElement(ChevronRight,{className:"h-3 w-3"}):h.createElement(ChevronLeft,{className:"h-3 w-3"}))),h.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&h.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(P=>h.createElement(Et,{key:P.id,item:P}))),r?.map(P=>h.createElement(ja,{key:P.id,section:P}))),n&&h.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},n))))});bo.displayName="SideMenu";function ja({section:e}){let{collapsed:t}=yo(),[r,o]=h.useState(e.defaultExpanded??true);return t?h.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(n=>h.createElement(Et,{key:n.id,item:n}))):h.createElement("div",{className:"px-2 mb-1"},h.createElement("button",{onClick:()=>o(!r),className:a("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm font-medium","text-rds-gray-700 dark:text-rds-gray-300","hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900","hover:text-rds-gray-900 dark:hover:text-white transition-colors")},e.icon&&h.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),h.createElement("span",{className:"flex-1 text-left"},e.title),r?h.createElement(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):h.createElement(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&h.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},h.createElement("div",{className:"absolute left-[1.1rem] top-0 bottom-0 w-px bg-rds-gray-200 dark:bg-rds-gray-700"}),e.items.map(n=>h.createElement(Et,{key:n.id,item:n,nested:true}))))}function Et({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:n}=yo(),i=o===e.id,s=a("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",r?"justify-center px-2 py-2.5":"px-2 py-1.5",i?t?"bg-rds-gray-100 dark:bg-[#1a1a1a] text-rds-gray-900 dark:text-white":"bg-rds-green-50 dark:bg-rds-green-950 text-rds-green-700 dark:text-rds-green-400":"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900 hover:text-rds-gray-900 dark:hover:text-white",e.disabled&&"opacity-50 pointer-events-none"),m=h.createElement(h.Fragment,null,e.icon&&h.createElement("span",{className:a("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&h.createElement("span",null,e.label),!r&&e.badge&&h.createElement("span",{className:"ml-auto text-xs bg-rds-gray-100 dark:bg-rds-gray-800 px-1.5 py-0.5 rounded"},e.badge)),d=e.href?h.createElement(n,{href:e.href,className:s},m):h.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:a(s,"w-full")},m);return r?h.createElement(Lt,null,h.createElement(Dt,{asChild:true},d),h.createElement(nt,{side:"right",sideOffset:8},e.label)):d}var Ya=({href:e,className:t,children:r})=>h.createElement("a",{href:e,className:t},r),vo=h.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:n,className:i,linkComponent:s=Ya},m)=>h.createElement("header",{ref:m,className:a("sticky top-0 z-30 flex h-12 items-center gap-3","border-b border-rds-gray-200 dark:border-[#1a1a1a]","bg-white dark:bg-[#141414] px-4",i)},t&&h.createElement("button",{onClick:r,className:"lg:hidden rounded-md p-1.5 text-rds-gray-600 hover:bg-rds-gray-100 dark:text-rds-gray-400 dark:hover:bg-rds-gray-800","aria-label":"Toggle menu"},h.createElement(Menu,{className:"h-4 w-4"})),e.length>0&&h.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((d,p)=>h.createElement(h.Fragment,{key:p},p>0&&h.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),d.href?h.createElement(s,{href:d.href,className:"text-rds-gray-600 dark:text-rds-gray-400 hover:text-rds-gray-900 dark:hover:text-white transition-colors text-sm"},d.label):h.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},d.label)))),o,h.createElement("div",{className:"flex-1"}),n&&h.createElement("div",{className:"flex items-center gap-1.5"},n)));vo.displayName="TopMenu";var xo=h.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:o,avatarClassName:n,children:i,className:s},m)=>{let[d,p]=h.useState(false),f=h.useRef(null);return h.useEffect(()=>{let u=g=>{f.current&&!f.current.contains(g.target)&&p(false);};return d&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u);}},[d]),h.createElement("div",{ref:m,className:a("relative",s)},h.createElement("div",{ref:f},h.createElement("button",{onClick:()=>p(!d),className:"flex items-center gap-1.5 rounded-full p-0.5 hover:ring-2 hover:ring-rds-green-500 hover:ring-offset-2 dark:hover:ring-offset-[#141414] transition-all","aria-label":"Account menu"},h.createElement("div",{className:a("h-8 w-8 rounded-full overflow-hidden flex items-center justify-center",n||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?h.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o)),d&&h.createElement("div",{className:"absolute right-0 mt-2 w-64 rounded-lg border border-rds-gray-200 dark:border-[#1a1a1a] bg-white dark:bg-[#141414] shadow-lg overflow-hidden z-50"},(e||t)&&h.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},h.createElement("div",{className:"flex items-center gap-3"},h.createElement("div",{className:a("h-10 w-10 rounded-full overflow-hidden flex items-center justify-center",n||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?h.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o),h.createElement("div",{className:"flex-1 min-w-0"},e&&h.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&h.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),i)))});xo.displayName="TopMenuUser";var Ro=h.forwardRef(({icon:e,children:t,onClick:r,href:o,variant:n="default",className:i},s)=>h.createElement(o?"a":"button",{ref:s,onClick:r,href:o,className:a("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",{default:"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-[#1a1a1a]",danger:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950/20",success:"text-rds-green-600 dark:text-rds-green-400 hover:bg-rds-green-50 dark:hover:bg-rds-green-950/20"}[n],i)},e&&h.createElement("span",{className:"h-4 w-4"},e),h.createElement("span",null,t)));Ro.displayName="TopMenuUserItem";var To=h.forwardRef(({children:e,className:t},r)=>h.createElement("div",{ref:r,className:a("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));To.displayName="TopMenuUserSection";var Ht=h.createContext(null);function It(){let e=h.useContext(Ht);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Po=h.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:n,className:i,tabsClassName:s},m)=>{let[d,p]=h.useState(r||e[0]?.id||""),f=t??d,u=g=>{p(g),o?.(g);};return h.createElement(Ht.Provider,{value:{activeTab:f,setActiveTab:u}},h.createElement("div",{ref:m,className:a("space-y-6",i)},h.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},h.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",s),"aria-label":"Tabs"},e.map(g=>{let R=f===g.id;return h.createElement("button",{key:g.id,onClick:()=>!g.disabled&&u(g.id),disabled:g.disabled,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",R?"text-primary":"text-muted-foreground hover:text-foreground",g.disabled&&"opacity-50 cursor-not-allowed")},g.icon&&h.createElement("span",{className:"h-4 w-4"},g.icon),g.label,R&&h.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),n&&h.createElement("div",null,n)))});Po.displayName="SimpleTabs";var wo=h.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:n}=It();return n!==e?null:h.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});wo.displayName="SimpleTabsPanel";var So=h.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:n},i)=>{let[s,m]=h.useState(t||""),d=e??s,p=f=>{m(f),r?.(f);};return h.createElement(Ht.Provider,{value:{activeTab:d,setActiveTab:p}},h.createElement("div",{ref:i,className:a("space-y-6",n)},o))});So.displayName="SimpleTabsRoot";var Co=h.forwardRef(({children:e,className:t},r)=>h.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},h.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Co.displayName="SimpleTabsList";var No=h.forwardRef(({value:e,children:t,icon:r,disabled:o,className:n},i)=>{let{activeTab:s,setActiveTab:m}=It(),d=s===e;return h.createElement("button",{ref:i,role:"tab",id:`tab-${e}`,"aria-selected":d,"aria-controls":`panel-${e}`,onClick:()=>!o&&m(e),disabled:o,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",d?"text-primary":"text-muted-foreground hover:text-foreground",o&&"opacity-50 cursor-not-allowed",n)},r&&h.createElement("span",{className:"h-4 w-4"},r),t,d&&h.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});No.displayName="SimpleTabsTrigger";var ko=h.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:n}=It();return n!==e?null:h.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});ko.displayName="SimpleTabsContent";var Ja={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Xa={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},se=h.forwardRef(({className:e,aspect:t="video",radius:r="lg",border:o=false,loading:n=false,onVisibilityChange:i,fallback:s,style:m,children:d,...p},f)=>{let u=h.useRef(null);return h.useImperativeHandle(f,()=>u.current),h.useEffect(()=>{if(!i||!u.current)return;let g=u.current,R=new IntersectionObserver(([T])=>i(T.isIntersecting),{threshold:.05});return R.observe(g),()=>R.disconnect()},[i]),h.createElement("div",{ref:u,"data-gds-part":"media-surface",className:a("rds-media-surface relative w-full overflow-hidden bg-muted",Ja[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${Xa[r]})`,...m},...p},d,n&&h.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},s))});se.displayName="MediaSurface";function Pe(){let[e,t]=h.useState(false);return h.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>t(n.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Mo=h.forwardRef(({src:e,controls:t=true,autoPlay:r=false,loop:o=false,muted:n,pauseOffscreen:i=true,aspect:s="video",radius:m="lg",border:d=false,poster:p,label:f,className:u,style:g,playbackRate:R=1,objectFit:T="cover"},l)=>{let c=h.useRef(null),P=Pe(),[M,L]=h.useState(!!p);h.useImperativeHandle(l,()=>c.current);let k=n??r,$=r&&!P;h.useEffect(()=>{c.current&&(c.current.playbackRate=R);},[R]),h.useEffect(()=>{L(!!p);},[p]);let W=h.useCallback(le=>{!i||!c.current||(le&&$?c.current.play().catch(()=>{}):c.current.pause());},[i,$]);return h.createElement(se,{aspect:s,radius:m,border:d,"aria-label":f,className:u,style:g,onVisibilityChange:i?W:void 0},h.createElement("video",{ref:c,src:e,controls:t,autoPlay:$,loop:o,muted:k,playsInline:true,preload:$?"auto":"metadata",onPlaying:()=>L(false),className:a("w-full h-full",T==="cover"&&"object-cover",T==="contain"&&"object-contain",T==="fill"&&"object-fill")},"Your browser does not support the video tag."),p&&M&&h.createElement("img",{src:p,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:a("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",T==="cover"&&"object-cover",T==="contain"&&"object-contain",T==="fill"&&"object-fill")}))});Mo.displayName="VideoPlayer";var Lo=h.forwardRef(({src:e,controls:t=false,autoPlay:r=true,loop:o=true,pauseOffscreen:n=true,aspect:i="square",radius:s="lg",border:m=false,poster:d,label:p,className:f,style:u,stateMachines:g,artboard:R,fit:T="contain",stateMachineInputs:l},c)=>{let P=Pe(),[M,L]=h.useState(null),[k,$]=h.useState(null);return h.useEffect(()=>{let W=false;return import('@rive-app/react-canvas').then(le=>{W||L(le);}).catch(()=>{W||$("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{W=true;}},[]),h.createElement(se,{ref:c,aspect:i,radius:s,border:m,"aria-label":p,className:f,style:u},k?h.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},k):M&&e?h.createElement(en,{Mod:M,src:e,stateMachines:g,artboard:R,fit:T,stateMachineInputs:l,autoPlay:r&&!P,loop:o,pauseOffscreen:n,controls:t,poster:d}):d&&h.createElement("img",{src:d,alt:"",className:"w-full h-full object-contain"}))});Lo.displayName="RivePlayer";function en({Mod:e,src:t,stateMachines:r,artboard:o,fit:n,autoPlay:i,loop:s,pauseOffscreen:m,controls:d,poster:p}){let{useRive:f,Layout:u,Fit:g,Alignment:R,EventType:T}=e,l={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:c,RiveComponent:P}=f({src:t,stateMachines:r,artboard:o,autoplay:i,layout:new u({fit:l[n],alignment:R.Center})}),[M,L]=h.useState(i);h.useEffect(()=>{if(!c||!s)return;let $=()=>{c.play();};return c.on(T.Stop,$),()=>{c.off(T.Stop,$);}},[c,s,T]),h.useEffect(()=>{if(!m||!c)return;let $=c.canvas;if(!$)return;let W=new IntersectionObserver(([le])=>{le.isIntersecting&&i?c.play():c.pause();},{threshold:.05});return W.observe($),()=>W.disconnect()},[c,m,i]);let k=()=>{c&&(M?(c.pause(),L(false)):(c.play(),L(true)));};return h.createElement(h.Fragment,null,h.createElement(P,{className:"w-full h-full"}),!c&&p&&h.createElement("img",{src:p,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),d&&h.createElement("div",{className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},h.createElement(j,{size:"icon",variant:"secondary",onClick:k},M?h.createElement(Pause,{className:"h-4 w-4"}):h.createElement(Play,{className:"h-4 w-4"}))))}var Eo=({renderer:e,scene:t,camera:r,preset:o,width:n,height:i})=>{let s=new EffectComposer(e);s.setSize(n,i),s.addPass(new RenderPass(t,r));let m=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),d=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});d.blendMode.opacity.value=0;let p=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});p.blendMode.opacity.value=0;let f=new VignetteEffect({darkness:0,offset:.5}),u=new ChromaticAberrationEffect({offset:new H.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new H.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,s.addPass(new EffectPass(r,m)),s.addPass(new EffectPass(r,d,p,f)),s.addPass(new EffectPass(r,u)),s.addPass(new EffectPass(r,g));function R(T){let l=T.effects;m.intensity=l.bloom?.intensity??0,m.luminanceMaterial&&l.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=l.bloom.luminanceThreshold),d.blendMode.opacity.value=l.noise?.intensity??0,p.density=l.scanlines?.density??1.25,p.blendMode.opacity.value=l.scanlines?.opacity??0,f.darkness=l.vignette?.darkness??0,f.offset=l.vignette?.offset??.5;let c=l.chromatic?.offset??0;u.offset?.set(c,c),l.glitch?(g.minStrength=l.glitch.strength?.[0]??0,g.maxStrength=l.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return R(o),{composer:s,setPreset:R,resize:(T,l)=>s.setSize(T,l),dispose:()=>{s.dispose();}}};var De=3e3,Ft=400,pn=80,Ho=({width:e,height:t,palette:r})=>{let o=new H.Scene;o.background=new H.Color(r.background);let n=new H.PerspectiveCamera(70,e/t,.1,Ft*2);n.position.z=0;let i=new Float32Array(De*6),s=new Float32Array(De*6),m=new Float32Array(De),d=new H.Color(r.primary),p=new H.Color(r.accent);function f(c,P){let M=Math.random()*Math.PI*2,L=pn*Math.pow(Math.random(),.6),k=Math.cos(M)*L,$=Math.sin(M)*L,W=P?-Math.random()*Ft:-Ft;m[c]=W,i[c*6+0]=k,i[c*6+1]=$,i[c*6+2]=W,i[c*6+3]=k,i[c*6+4]=$,i[c*6+5]=W-2,s[c*6+0]=d.r,s[c*6+1]=d.g,s[c*6+2]=d.b,s[c*6+3]=p.r,s[c*6+4]=p.g,s[c*6+5]=p.b;}for(let c=0;c<De;c++)f(c,true);let u=new H.BufferGeometry;u.setAttribute("position",new H.BufferAttribute(i,3)),u.setAttribute("color",new H.BufferAttribute(s,3));let g=new H.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:H.AdditiveBlending}),R=new H.LineSegments(u,g);o.add(R);let T=60,l=6;return {scene:o,camera:n,update:(c,P)=>{let M=u.attributes.position.array;for(let L=0;L<De;L++){let k=L*6;M[k+2]+=T*P,M[k+5]=M[k+2]-l,M[k+2]>5&&f(L,false);}u.attributes.position.needsUpdate=true;},resize:(c,P)=>{let M=n;M.aspect=c/P,M.updateProjectionMatrix();},setPalette:c=>{o.background=new H.Color(c.background);let P=new H.Color(c.primary),M=new H.Color(c.accent),L=u.attributes.color.array;for(let k=0;k<De;k++)L[k*6+0]=P.r,L[k*6+1]=P.g,L[k*6+2]=P.b,L[k*6+3]=M.r,L[k*6+4]=M.g,L[k*6+5]=M.b;u.attributes.color.needsUpdate=true;},dispose:()=>{u.dispose(),g.dispose();}}};var st={space:Ho},Ue=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"}],We=Object.fromEntries(Ue.map(e=>[e.id,e]));var Ve={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},dt="vhs";var fn={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},lt=h.forwardRef(({preset:e,postPreset:t,palette:r,createScene:o,controls:n=false,autoPlay:i=true,pauseOffscreen:s=true,aspect:m="video",radius:d="lg",border:p=false,poster:f,label:u,className:g,style:R,maxDpr:T},l)=>{let c=h.useRef(null),[P,M]=h.useState(i),[L,k]=h.useState(false),$=Pe(),W=h.useMemo(()=>({...fn,...r}),[r]),le=h.useMemo(()=>o||(e&&st[e]?st[e]:null),[o,e]),Yt=h.useMemo(()=>{if(t)return t;if(e){let V=We[e];if(V?.defaultPostPreset)return V.defaultPostPreset}return dt},[t,e]);h.useEffect(()=>{let V=c.current;if(!V||!le)return;let vt=V.clientWidth||1,xt=V.clientHeight||1,z=new H.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),jo=T??Math.min(window.devicePixelRatio||1,2);z.setPixelRatio(jo),z.setSize(vt,xt),z.setClearColor(new H.Color(W.background),1),z.domElement.dataset.gdsPart="shader-canvas",z.domElement.style.width="100%",z.domElement.style.height="100%",z.domElement.style.display="block",V.appendChild(z.domElement);let Ne=le({renderer:z,width:vt,height:xt,palette:W}),qo=Ve[Yt]??Ve[dt],Xe=Eo({renderer:z,scene:Ne.scene,camera:Ne.camera,preset:qo,width:vt,height:xt}),Jt=new H.Clock,Xt=0,Ie=i&&!$,Qt=true,Zt=()=>{if(Xt=requestAnimationFrame(Zt),!Ie||s&&!Qt)return;let Q=Jt.getDelta(),me=Jt.getElapsedTime();Ne.update?.(me,Q),Xe.composer.render(Q);};Zt(),Ie&&k(true);let er=new ResizeObserver(([Q])=>{let me=Math.max(1,Math.floor(Q.contentRect.width)),Rt=Math.max(1,Math.floor(Q.contentRect.height));z.setSize(me,Rt),Xe.resize(me,Rt),Ne.resize?.(me,Rt);});er.observe(V);let tr=new IntersectionObserver(([Q])=>{Qt=Q.isIntersecting;},{threshold:.05});return tr.observe(V),bt.current={toggle:()=>{Ie=!Ie,M(Ie);},setPalette:Q=>{z.setClearColor(new H.Color(Q.background),1),Ne.setPalette?.(Q);},setPostPreset:Q=>{let me=Ve[Q];me&&Xe.setPreset(me);}},()=>{cancelAnimationFrame(Xt),er.disconnect(),tr.disconnect(),Xe.dispose(),Ne.dispose?.(),z.dispose(),z.domElement.parentElement===V&&V.removeChild(z.domElement),bt.current=null;}},[le,Yt,W,i,$,s,T]);let bt=h.useRef(null),zo=()=>bt.current?.toggle();return h.createElement(se,{ref:V=>{c.current=V,typeof l=="function"?l(V):l&&(l.current=V);},aspect:m,radius:d,border:p,"aria-label":u,className:g,style:R,"data-gds-part":"three-scene"},!L&&f&&h.createElement("img",{src:f,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),n&&h.createElement("div",{"data-gds-part":"scene-controls",className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},h.createElement(j,{size:"icon",variant:"secondary",onClick:zo},P?h.createElement(Pause,{className:"h-4 w-4"}):h.createElement(Play,{className:"h-4 w-4"}))))});lt.displayName="ThreeScene";var ct=h.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:n,aspect:i="video",radius:s="lg",label:m,hideLabel:d=false,onClick:p},f)=>{let u=We[e],[g,R]=h.useState(false),T=t==="always"||t==="hover"&&g;return h.createElement("div",{ref:f,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>R(true),onMouseLeave:()=>R(false),onClick:p,className:a("group cursor-pointer flex flex-col gap-2",n)},T?h.createElement(lt,{preset:e,postPreset:r,palette:o,aspect:i,radius:s,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):h.createElement(se,{aspect:i,radius:s,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?h.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):h.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!d&&h.createElement("div",{className:"flex items-baseline justify-between text-xs"},h.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??u?.label??e),u?.tags?.[0]&&h.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});ct.displayName="ShaderPresetPreview";function hn({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:s=3,className:m}){let d=h.useMemo(()=>r?.length?Ue.filter(f=>r.some(u=>f.tags.includes(u))):Ue,[r]);return h.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:a("grid grid-cols-2 gap-3",s===2?"md:grid-cols-2":s===4?"md:grid-cols-4":"md:grid-cols-3",m)},d.map(f=>{let u=e===f.id;return h.createElement("div",{key:f.id,className:"relative",role:"radio","aria-checked":u},h.createElement(ct,{preset:f.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(f.id),className:a("transition-all",u&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),u&&h.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},h.createElement(Check,{className:"h-3.5 w-3.5"})))}))}function xn({children:e}){let t=useRef(null);return useEffect(()=>{let r=new vn({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(n){r.raf(n),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var be=[50,100,200,300,400,500,600,700,800,900,950],Io=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Rn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function pt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<be.length;n++){let i=Io[n],s=Rn[n]*t;o[be[n]]=`${i.toFixed(4)} ${s.toFixed(4)} ${r.toFixed(2)}`;}return o}function Ao(){let e={};for(let t=0;t<be.length;t++){let r=Io[t];e[be[t]]=`${r.toFixed(4)} 0 0`;}return e}var Ot={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},ze="1 0 0",Fo="0 0 0";function Ee(e,t){let[,r,o]=e.split(/\s+/).map(f=>f.trim()),n=Number(r),i=o;if(t==="light"){let u=Math.min(n*.22,.045),g=.38,R=n;return {soft:`${.965.toFixed(3)} ${u.toFixed(3)} ${i}`,deep:`${g.toFixed(3)} ${R.toFixed(3)} ${i}`}}let s=.22,m=Math.min(n*.45,.075),d=.82,p=n*.9;return {soft:`${s.toFixed(3)} ${m.toFixed(3)} ${i}`,deep:`${d.toFixed(3)} ${p.toFixed(3)} ${i}`}}var mt={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Tn=["superLight","light","dark","superDark"],Pn={muted:.6,default:1,vibrant:1.3};function wn(e,t,r){let o=t.primary*r,n=t.accent*r,i=(o+n)/2*.8,s=m=>(m%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${s(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${s(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var y=e=>({source:"neutral",step:e}),te=e=>({source:"primary",step:e}),ve=e=>({source:"accent",step:e}),je=e=>({source:"pure",value:e}),Sn={superLight:{background:y(50),foreground:y(800),card:je(ze),cardForeground:y(800),popover:je(ze),popoverForeground:y(800),primary:te(600),primaryForeground:te(50),secondary:y(100),secondaryForeground:y(700),muted:y(100),mutedForeground:y(500),accent:ve(600),accentForeground:ve(50),border:y(200),input:y(200),ring:te(500)},light:{background:y(50),foreground:y(950),card:je(ze),cardForeground:y(950),popover:je(ze),popoverForeground:y(950),primary:te(500),primaryForeground:te(50),secondary:y(100),secondaryForeground:y(700),muted:y(100),mutedForeground:y(500),accent:ve(500),accentForeground:ve(50),border:y(200),input:y(200),ring:te(500)},dark:{background:y(950),foreground:y(50),card:y(900),cardForeground:y(50),popover:y(900),popoverForeground:y(50),primary:te(400),primaryForeground:te(950),secondary:y(800),secondaryForeground:y(200),muted:y(800),mutedForeground:y(400),accent:ve(400),accentForeground:ve(950),border:y(800),input:y(800),ring:te(400)},superDark:{background:je(Fo),foreground:y(100),card:y(950),cardForeground:y(100),popover:y(950),popoverForeground:y(100),primary:te(300),primaryForeground:te(950),secondary:y(900),secondaryForeground:y(300),muted:y(900),mutedForeground:y(500),accent:ve(300),accentForeground:ve(950),border:y(900),input:y(900),ring:te(300)}};function U(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Cn(e,t){let r=Sn[t],o=t==="superLight"||t==="light",n=o?Ot.light:Ot.dark;return {background:U(r.background,e),foreground:U(r.foreground,e),card:U(r.card,e),cardForeground:U(r.cardForeground,e),popover:U(r.popover,e),popoverForeground:U(r.popoverForeground,e),primary:U(r.primary,e),primaryForeground:U(r.primaryForeground,e),secondary:U(r.secondary,e),secondaryForeground:U(r.secondaryForeground,e),muted:U(r.muted,e),mutedForeground:U(r.mutedForeground,e),accent:U(r.accent,e),accentForeground:U(r.accentForeground,e),border:U(r.border,e),input:U(r.input,e),ring:U(r.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let i=o?"light":"dark",s=Ee(n.destructive,i),m=Ee(n.success,i),d=Ee(n.warning,i),p=Ee(n.info,i),f=Ee(n.highlight,i);return {destructiveSoft:s.soft,destructiveDeep:s.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:d.soft,warningDeep:d.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:f.soft,highlightDeep:f.deep}})()}}var pe={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Nn={compact:.85,default:1,spacious:1.18};function kn(e){let t=Nn[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:mt[e.body],fontMono:mt[e.mono],fontDisplay:mt[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(pe.display),h1:r(pe.h1),h2:r(pe.h2),h3:r(pe.h3),h4:r(pe.h4),h5:r(pe.h5),h6:r(pe.h6),body:r(pe.body),bodySm:r(pe.bodySm)}}}var Mn={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Ln(e){let t=Mn[e.style],r=o=>`${o.toFixed(3)}rem`;return {base:r(t),sm:r(Math.max(0,t-.25)),md:r(t),lg:r(t+.25),xl:r(t+.5),"2xl":r(t+1),full:"9999px"}}var Dn={tight:.85,default:1,roomy:1.2};function En(e){return {baseUnit:"1rem",densityFactor:Dn[e.density]}}var Hn={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function In(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:Hn[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Se(e){let t=Pn[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,i=(e.chroma?.accent??1)*t,s=r?Ao():pt({hue:e.hues.neutral,chromaScale:o}),m=pt({hue:e.hues.primary,chromaScale:n}),d=pt({hue:e.hues.accent,chromaScale:i}),p={neutral:s,primary:m,accent:d},f=wn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Tn.map(P=>[P,Cn(p,P)])),g=kn(e.typography),R=Ln(e.radius),T=En(e.spacing),l=In(e.effects),c={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:p,colors:u,chart:f,typography:g,radius:R,spacing:T,effects:l,components:c}}var qe={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},$t={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},ut=[qe,$t];function An(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Bt(e,t){let r=e.colors[t];return {...An(r),...Gt("neutral",e.ramps.neutral),...Gt("primary",e.ramps.primary),...Gt("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--rds-radius-sm":e.radius.sm,"--rds-radius-md":e.radius.md,"--rds-radius-lg":e.radius.lg,"--rds-radius-xl":e.radius.xl,"--rds-radius-2xl":e.radius["2xl"],"--rds-radius-full":e.radius.full,"--rds-density":String(e.spacing.densityFactor),"--rds-shadow-sm":e.effects.shadows.sm,"--rds-shadow-md":e.effects.shadows.md,"--rds-shadow-lg":e.effects.shadows.lg,"--rds-shadow-xl":e.effects.shadows.xl,"--rds-shadow-2xl":e.effects.shadows["2xl"],"--rds-shadow-inner":e.effects.shadows.inner,"--rds-transition-fast":e.effects.motion.fast,"--rds-transition-base":e.effects.motion.base,"--rds-transition-slow":e.effects.motion.slow,"--rds-transition-slower":e.effects.motion.slower,"--rds-border-width":e.effects.borderWidth}}function Gt(e,t){let r={};for(let o of be)r[`--ramp-${e}-${o}`]=t[o];return r}function ft(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Bt(e,t);for(let[n,i]of Object.entries(o))r.style.setProperty(n,i);r.setAttribute("data-ramp-theme",e.id),r.setAttribute("data-mode",t),r.setAttribute("data-button-shape",e.components.buttonShape??"default"),r.setAttribute("data-input-style",e.components.inputStyle??"outlined"),r.setAttribute("data-card-style",e.components.cardStyle??"flat");}function Ye(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let o=r.match(/\d+/g);if(!o||o.length<3)return "";let[n,i,s]=o.slice(0,3).map(Number);return "#"+[n,i,s].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function Fn(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,n]=t.map(Number),i=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(n)}`,s=Ye(e);return {oklch:i,hex:s}}function Kt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of be){let{oklch:i,hex:s}=Fn(t[n]);o.push(`| ${n} | \`${i}\` | \`${s||"\u2014"}\` |`);}return o.join(`
|
|
2
|
+
`)}function Oo(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let n=Ye(o.light)||"\u2014",i=Ye(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${n}\` (\`${o.light}\`) | \`${i}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
3
|
+
`)}function $o(e){return JSON.stringify(e.input,null,2)}function Go(e){let{input:t,ramps:r,colors:o,chart:n,typography:i,radius:s,spacing:m,effects:d,components:p}=e,f=t.intensity??"default",u=l=>({token:l,usage:On[l]??"",light:o.light[l],dark:o.dark[l]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(u),R=["destructive","destructiveForeground","success","warning","info","highlight"].map(u),T=[1,2,3,4,5].map(l=>{let c=n[l];return {slot:l,triplet:c,hex:Ye(c)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
4
4
|
|
|
5
5
|
> **Portable theme spec.** Paste this entire file into a fresh LLM prompt along with your design brief. The model will have everything it needs to produce UI that matches this exact theme \u2014 colors, typography, spacing, shapes, and the "feel" we're after.
|
|
6
6
|
|
|
@@ -10,11 +10,11 @@ import*as c from'react';import {useRef,useEffect}from'react';import*as A from'@r
|
|
|
10
10
|
- **ID**: \`${t.id}\`
|
|
11
11
|
${t.description?`- **Description**: ${t.description}
|
|
12
12
|
`:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
|
|
13
|
-
- **Intensity**: \`${
|
|
13
|
+
- **Intensity**: \`${f}\` ${f==="muted"?"(quieter chroma across the board)":f==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
|
|
14
14
|
- **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
|
|
15
15
|
- **Spacing density**: \`${t.spacing.density}\`
|
|
16
16
|
- **Radius style**: \`${t.radius.style}\` (base \`${s.base}\`)
|
|
17
|
-
- **Button shape**: \`${
|
|
17
|
+
- **Button shape**: \`${p.buttonShape}\` \xB7 **Input style**: \`${p.inputStyle}\` \xB7 **Card style**: \`${p.cardStyle}\`
|
|
18
18
|
- **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
|
|
19
19
|
|
|
20
20
|
## How themes work
|
|
@@ -30,30 +30,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
|
|
|
30
30
|
## Full ThemeInput (round-trippable)
|
|
31
31
|
|
|
32
32
|
\`\`\`json
|
|
33
|
-
${
|
|
33
|
+
${$o(e)}
|
|
34
34
|
\`\`\`
|
|
35
35
|
|
|
36
36
|
## Color ramps
|
|
37
37
|
|
|
38
38
|
Three 11-stop OKLCH ramps, generated from the input hues + chromas + global intensity. Every color elsewhere in the theme resolves back to one of these stops.
|
|
39
39
|
|
|
40
|
-
${
|
|
40
|
+
${Kt("Neutral",r.neutral,t.hues.neutral)}
|
|
41
41
|
|
|
42
|
-
${
|
|
42
|
+
${Kt("Primary",r.primary,t.hues.primary)}
|
|
43
43
|
|
|
44
|
-
${
|
|
44
|
+
${Kt("Accent",r.accent,t.hues.accent)}
|
|
45
45
|
|
|
46
46
|
## Semantic tokens (hue-derived)
|
|
47
47
|
|
|
48
48
|
Purpose-based tokens drawn from the ramps. Two values per token \u2014 the generator produces them for all four brightness modes, but only light + dark are shown here for brevity.
|
|
49
49
|
|
|
50
|
-
${
|
|
50
|
+
${Oo("Core semantic tokens",g)}
|
|
51
51
|
|
|
52
52
|
## Fixed semantic tokens (not hue-derived)
|
|
53
53
|
|
|
54
54
|
Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
|
|
55
55
|
|
|
56
|
-
${
|
|
56
|
+
${Oo("Status colors",R)}
|
|
57
57
|
|
|
58
58
|
## Chart palette
|
|
59
59
|
|
|
@@ -61,31 +61,31 @@ ${Dr("Status colors",E)}
|
|
|
61
61
|
|
|
62
62
|
| Slot | OKLCH | Hex |
|
|
63
63
|
|------|-------|-----|
|
|
64
|
-
${
|
|
64
|
+
${T.map(l=>`| \`--chart-${l.slot}\` | \`${l.triplet}\` | \`${l.hex}\` |`).join(`
|
|
65
65
|
`)}
|
|
66
66
|
|
|
67
67
|
## Typography
|
|
68
68
|
|
|
69
|
-
- **Display font**: \`${
|
|
70
|
-
- **Body font**: \`${
|
|
71
|
-
- **Mono font**: \`${
|
|
72
|
-
- **Heading weight**: \`${
|
|
73
|
-
- **Body weight**: \`${
|
|
74
|
-
- **Heading letter-spacing**: \`${
|
|
69
|
+
- **Display font**: \`${i.fontDisplay}\`
|
|
70
|
+
- **Body font**: \`${i.fontSans}\`
|
|
71
|
+
- **Mono font**: \`${i.fontMono}\`
|
|
72
|
+
- **Heading weight**: \`${i.headingWeight}\`
|
|
73
|
+
- **Body weight**: \`${i.bodyWeight}\`
|
|
74
|
+
- **Heading letter-spacing**: \`${i.headingTracking}\`
|
|
75
75
|
|
|
76
76
|
### Type scale
|
|
77
77
|
|
|
78
78
|
| Step | Size |
|
|
79
79
|
|------|------|
|
|
80
|
-
| \`text-display\` | \`${
|
|
81
|
-
| \`text-h1\` | \`${
|
|
82
|
-
| \`text-h2\` | \`${
|
|
83
|
-
| \`text-h3\` | \`${
|
|
84
|
-
| \`text-h4\` | \`${
|
|
85
|
-
| \`text-h5\` | \`${
|
|
86
|
-
| \`text-h6\` | \`${
|
|
87
|
-
| body | \`${
|
|
88
|
-
| body-sm | \`${
|
|
80
|
+
| \`text-display\` | \`${i.scale.display}\` |
|
|
81
|
+
| \`text-h1\` | \`${i.scale.h1}\` |
|
|
82
|
+
| \`text-h2\` | \`${i.scale.h2}\` |
|
|
83
|
+
| \`text-h3\` | \`${i.scale.h3}\` |
|
|
84
|
+
| \`text-h4\` | \`${i.scale.h4}\` |
|
|
85
|
+
| \`text-h5\` | \`${i.scale.h5}\` |
|
|
86
|
+
| \`text-h6\` | \`${i.scale.h6}\` |
|
|
87
|
+
| body | \`${i.scale.body}\` |
|
|
88
|
+
| body-sm | \`${i.scale.bodySm}\` |
|
|
89
89
|
|
|
90
90
|
## Radius, spacing, effects
|
|
91
91
|
|
|
@@ -103,8 +103,8 @@ ${Z.map(l=>`| \`--chart-${l.slot}\` | \`${l.triplet}\` | \`${l.hex}\` |`).join(`
|
|
|
103
103
|
|
|
104
104
|
### Spacing
|
|
105
105
|
|
|
106
|
-
- **Density factor**: \`${
|
|
107
|
-
- **Base unit**: \`${
|
|
106
|
+
- **Density factor**: \`${m.densityFactor}\` (applied as \`var(--rds-density)\` on components that opt in)
|
|
107
|
+
- **Base unit**: \`${m.baseUnit}\`
|
|
108
108
|
|
|
109
109
|
### Motion
|
|
110
110
|
|
|
@@ -182,7 +182,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
|
|
|
182
182
|
|
|
183
183
|
When generating UI in the ${e.name} theme, match this character:
|
|
184
184
|
|
|
185
|
-
${
|
|
185
|
+
${$n(e)}
|
|
186
186
|
|
|
187
187
|
## Instructions for the generating LLM
|
|
188
188
|
|
|
@@ -201,7 +201,7 @@ To recreate this theme in code:
|
|
|
201
201
|
\`\`\`ts
|
|
202
202
|
import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
|
|
203
203
|
|
|
204
|
-
const input: ThemeInput = ${
|
|
204
|
+
const input: ThemeInput = ${$o(e).replace(/\n/g,`
|
|
205
205
|
`)};
|
|
206
206
|
|
|
207
207
|
const theme = generateTheme(input);
|
|
@@ -210,11 +210,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
210
210
|
|
|
211
211
|
---
|
|
212
212
|
*Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
|
|
213
|
-
`}var
|
|
214
|
-
`)}function
|
|
213
|
+
`}var On={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function $n(e){let t=[],{input:r,components:o}=e;r.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):r.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),r.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):r.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),r.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):r.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):r.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=r.typography.display;return n==="fraunces"||n==="instrumentSerif"||n==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(n==="geist"||n==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),o.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):o.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):o.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),o.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
|
|
214
|
+
`)}function _t(e){if(typeof window>"u"||typeof document>"u")return;let t=Go(e),r=new Blob([t],{type:"text/markdown;charset=utf-8"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download=`ramp-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o);}var de=Object.fromEntries(ut.map(e=>[e.id,Se(e)])),He=qe.id;function Ce(e){if(e in de)return de[e];let t=Wt(e);if(t)return Se(t)}function Ut(){return [...Object.values(de),..._o()]}var Bo="ramp-user-themes";function gt(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Bo);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function Ko(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Bo,JSON.stringify(e));}catch{}}function _o(){return Object.values(gt()).map(Se)}function Wt(e){return gt()[e]}function ht(e){let t=gt();return t[e.id]=e,Ko(t),Se(e)}function Vt(e){if(e in de)return;let t=gt();delete t[e],Ko(t);}function Gn(e,t,r){let o=de[e]?.input??Wt(e);if(!o)return;let n={...o,id:t,name:r};return ht(n),n}var zt="ramp-theme",yt="ramp-mode",Wo=["superLight","light","dark","superDark"],Uo=new Set(["dark","superDark"]),Bn=`
|
|
215
215
|
(function() {
|
|
216
216
|
try {
|
|
217
|
-
var mode = localStorage.getItem('${
|
|
217
|
+
var mode = localStorage.getItem('${yt}');
|
|
218
218
|
var valid = ['superLight','light','dark','superDark'];
|
|
219
219
|
if (!mode || valid.indexOf(mode) === -1) {
|
|
220
220
|
mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
@@ -223,9 +223,9 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
223
223
|
document.documentElement.classList.add('dark');
|
|
224
224
|
}
|
|
225
225
|
document.documentElement.setAttribute('data-mode', mode);
|
|
226
|
-
var themeId = localStorage.getItem('${
|
|
226
|
+
var themeId = localStorage.getItem('${zt}');
|
|
227
227
|
if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);
|
|
228
228
|
} catch(e) {}
|
|
229
229
|
})();
|
|
230
|
-
`,
|
|
230
|
+
`,jt=h.createContext(null);function Kn({children:e,defaultTheme:t=He,defaultMode:r="light"}){let[o,n]=h.useState(t),[i,s]=h.useState(r),[m,d]=h.useState(0);h.useEffect(()=>{try{let l=localStorage.getItem(zt);l&&Ce(l)&&n(l);let c=localStorage.getItem(yt);if(c&&Wo.includes(c))s(c);else if(typeof window<"u"){let P=window.matchMedia("(prefers-color-scheme: dark)").matches;s(P?"dark":"light");}}catch{}},[]),h.useEffect(()=>{let l=Ce(o)??Ce(He);l&&(ft(l,i),typeof document<"u"&&document.documentElement.classList.toggle("dark",Uo.has(i)));},[o,i,m]),h.useEffect(()=>{if(typeof window>"u")return;let l=window.matchMedia("(prefers-color-scheme: dark)"),c=P=>{try{if(localStorage.getItem(yt))return}catch{return}s(P.matches?"dark":"light");};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[]);let p=h.useCallback(l=>{n(l);try{localStorage.setItem(zt,l);}catch{}},[]),f=h.useCallback(l=>{s(l);try{localStorage.setItem(yt,l);}catch{}},[]),u=h.useCallback(l=>{ht(l),d(c=>c+1),p(l.id);},[p]),g=h.useCallback(l=>{l in de||(Vt(l),d(c=>c+1),n(c=>c===l?He:c));},[]),R=h.useCallback(()=>{d(l=>l+1);},[]),T=h.useMemo(()=>{let l=Ce(o)??Ce(He);return {theme:l,themeId:l.id,mode:i,isDark:Uo.has(i),setThemeId:p,setMode:f,themes:Ut(),saveAndActivate:u,deleteTheme:g,refresh:R}},[o,i,m,p,f,u,g,R]);return h.createElement(jt.Provider,{value:T},e)}function qt(){let e=h.useContext(jt);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Je(){return h.useContext(jt)}function zn({className:e}){let t=Je();if(!t)return null;let{theme:r,themes:o,setThemeId:n,deleteTheme:i}=t;return h.createElement(Me,null,h.createElement(Le,{asChild:true},h.createElement(j,{variant:"ghost",size:"sm",className:a("gap-2",e),"aria-label":"Switch theme"},h.createElement(Palette,{className:"h-4 w-4"}),h.createElement("span",{className:"hidden sm:inline"},r.name))),h.createElement(Re,{className:"w-80 p-2",align:"end"},h.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},h.createElement("div",null,h.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),h.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),h.createElement("button",{type:"button",onClick:()=>_t(r),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},h.createElement(Download,{className:"h-3 w-3"}),".md")),h.createElement("div",{className:"flex flex-col gap-0.5"},o.map(s=>{let m=s.id===r.id,d=s.id in de,p=s.ramps.primary[500],f=s.ramps.accent[500],u=s.ramps.neutral[500];return h.createElement("div",{key:s.id,className:a("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},h.createElement("button",{type:"button",onClick:()=>n(s.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},h.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},h.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),h.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${f})`},"aria-hidden":true}),h.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${u})`},"aria-hidden":true})),h.createElement("div",{className:"min-w-0 flex-1"},h.createElement("div",{className:"flex items-center gap-2"},h.createElement("span",{className:"text-sm font-medium truncate text-foreground"},s.name),s.tagline&&h.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},s.tagline)),s.description&&h.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},s.description))),m&&h.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!d&&!m&&h.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),i(s.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${s.name}`},h.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var Vo=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Xn({className:e,variant:t="icons"}){let r=Je();if(!r)return null;let{mode:o,setMode:n}=r;return t==="labeled"?h.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:a("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Vo.map(({mode:i,label:s,icon:m})=>{let d=o===i;return h.createElement("button",{key:i,type:"button",role:"radio","aria-checked":d,onClick:()=>n(i),className:a("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",d?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},h.createElement(m,{className:"h-4 w-4"}),h.createElement("span",null,s))})):h.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:a("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Vo.map(({mode:i,icon:s,tooltip:m})=>{let d=o===i;return h.createElement("button",{key:i,type:"button",role:"radio","aria-checked":d,"aria-label":m,title:m,onClick:()=>n(i),className:a("flex h-7 w-7 items-center justify-center rounded transition-colors",d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},h.createElement(s,{className:"h-3.5 w-3.5"}))}))}function ei(){let{isDark:e,setMode:t}=qt();return React.createElement(j,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}export{Wo as ALL_MODES,Qo as Accordion,ar as AccordionContent,rr as AccordionItem,or as AccordionTrigger,nr as Alert,sr as AlertDescription,ir as AlertTitle,ut as BUILT_IN_INPUTS,ra as Badge,j as Button,Ze as Calendar,pr as CalendarDayButton,mr as Card,hr as CardContent,gr as CardDescription,yr as CardFooter,ur as CardHeader,fr as CardTitle,br as Checkbox,ua as DatePicker,fa as DateRangePicker,ha as Dialog,ba as DialogClose,Rr as DialogContent,Sr as DialogDescription,Pr as DialogFooter,Tr as DialogHeader,Tt as DialogOverlay,xr as DialogPortal,wr as DialogTitle,ya as DialogTrigger,Ta as DropdownMenu,Lr as DropdownMenuCheckboxItem,kr as DropdownMenuContent,wa as DropdownMenuGroup,Mr as DropdownMenuItem,Er as DropdownMenuLabel,Sa as DropdownMenuPortal,Na as DropdownMenuRadioGroup,Dr as DropdownMenuRadioItem,Hr as DropdownMenuSeparator,Ir as DropdownMenuShortcut,Ca as DropdownMenuSub,Nr as DropdownMenuSubContent,Cr as DropdownMenuSubTrigger,Pa as DropdownMenuTrigger,Bn as GRADE_PRE_HYDRATION_SCRIPT,Xn as GradeModeSwitcher,Kn as GradeThemeProvider,zn as GradeThemeSwitcher,Ar as Input,Fr as Label,xn as LenisProvider,se as MediaSurface,Me as Popover,ca as PopoverAnchor,Re as PopoverContent,Le as PopoverTrigger,Or as Progress,$r as RadioGroup,Gr as RadioGroupItem,Lo as RivePlayer,Br as ScrollArea,wt as ScrollBar,Ha as Select,Ur as SelectContent,Ia as SelectGroup,Vr as SelectItem,Wr as SelectLabel,Ct as SelectScrollDownButton,St as SelectScrollUpButton,zr as SelectSeparator,_r as SelectTrigger,Aa as SelectValue,jr as Separator,hn as ShaderPresetPicker,ct as ShaderPresetPreview,$a as Sheet,Ba as SheetClose,Yr as SheetContent,Zr as SheetDescription,Xr as SheetFooter,Jr as SheetHeader,kt as SheetOverlay,qr as SheetPortal,Qr as SheetTitle,Ga as SheetTrigger,bo as SideMenu,Po as SimpleTabs,ko as SimpleTabsContent,Co as SimpleTabsList,wo as SimpleTabsPanel,So as SimpleTabsRoot,No as SimpleTabsTrigger,_a as Skeleton,eo as Slider,to as Switch,ro as Table,ao as TableBody,co as TableCaption,lo as TableCell,no as TableFooter,so as TableHead,oo as TableHeader,io as TableRow,Ua as Tabs,uo as TabsContent,po as TabsList,mo as TabsTrigger,fo as Textarea,ei as ThemeToggle,lt as ThreeScene,Lt as Tooltip,nt as TooltipContent,Mt as TooltipProvider,Dt as TooltipTrigger,vo as TopMenu,xo as TopMenuUser,Ro as TopMenuUserItem,To as TopMenuUserSection,Mo as VideoPlayer,ft as applyThemeToRoot,lr as badgeVariants,de as builtInThemes,Ae as buttonVariants,qe as calmInput,a as cn,dt as defaultPostPreset,He as defaultThemeId,Vt as deleteUserTheme,Gn as duplicateTheme,$t as energyInput,Se as generateTheme,Ce as getTheme,Ut as listThemes,_o as listUserThemes,Wt as loadUserThemeInput,Ve as postPresets,ht as saveUserTheme,st as sceneRegistry,We as shaderPresetById,Ue as shaderPresets,Bt as themeToCSSVars,qt as useGradeTheme,Je as useMaybeGradeTheme,Pe as usePrefersReducedMotion};//# sourceMappingURL=index.mjs.map
|
|
231
231
|
//# sourceMappingURL=index.mjs.map
|