@gradeui/ui 0.3.0 → 0.5.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 +362 -1
- package/dist/index.d.ts +362 -1
- package/dist/index.js +224 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +224 -23
- 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,207 @@
|
|
|
1
|
-
import*as p from'react';import {useRef,useEffect}from'react';import*as O from'@radix-ui/react-accordion';import {ChevronDown,Check,X as X$1,ChevronRight,Circle,ChevronUp,ChevronLeft,Menu,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 ue from'@radix-ui/react-checkbox';import {format}from'date-fns';import*as B from'@radix-ui/react-popover';import*as P from'@radix-ui/react-dialog';import*as g from'@radix-ui/react-dropdown-menu';import*as _e from'@radix-ui/react-label';import*as he from'@radix-ui/react-progress';import*as X from'@radix-ui/react-radio-group';import*as $ from'@radix-ui/react-scroll-area';import*as y from'@radix-ui/react-select';import*as ze from'@radix-ui/react-separator';import*as j from'@radix-ui/react-slider';import*as be from'@radix-ui/react-switch';import*as U from'@radix-ui/react-tabs';import*as W from'@radix-ui/react-tooltip';import Zo from'lenis';function o(...e){return twMerge(clsx(e))}var Qr=O.Root,pt=p.forwardRef(({className:e,...t},r)=>p.createElement(O.Item,{ref:r,className:o("border-b",e),...t}));pt.displayName="AccordionItem";var mt=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(O.Header,{className:"flex"},p.createElement(O.Trigger,{ref:a,className:o("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r},t,p.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));mt.displayName=O.Trigger.displayName;var ut=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(O.Content,{ref:a,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},p.createElement("div",{className:o("pb-4 pt-0",e)},t)));ut.displayName=O.Content.displayName;var eo=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"}}),ft=p.forwardRef(({className:e,variant:t,...r},a)=>p.createElement("div",{ref:a,role:"alert",className:o(eo({variant:t}),e),...r}));ft.displayName="Alert";var gt=p.forwardRef(({className:e,...t},r)=>p.createElement("h5",{ref:r,className:o("mb-1 font-medium leading-none tracking-tight",e),...t}));gt.displayName="AlertTitle";var ht=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("text-sm [&_p]:leading-relaxed",e),...t}));ht.displayName="AlertDescription";var bt=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 ro({className:e,variant:t,rounded:r,...a}){return p.createElement("div",{className:o(bt({variant:t,rounded:r}),e),...a})}var me=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"}}),_=p.forwardRef(({className:e,variant:t,size:r,asChild:a=false,...n},i)=>p.createElement(a?Slot:"button",{className:o("rds-button",me({variant:t,size:r,className:e})),ref:i,...n}));_.displayName="Button";function Ce({className:e,classNames:t,showOutsideDays:r=true,captionLayout:a="label",buttonVariant:n="ghost",formatters:i,components:d,...c}){let s=getDefaultClassNames();return p.createElement(DayPicker,{showOutsideDays:r,className:o("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:a,formatters:{formatMonthDropdown:m=>m.toLocaleString("default",{month:"short"}),...i},classNames:{root:o("w-fit",s.root),months:o("relative flex flex-col gap-4 md:flex-row",s.months),month:o("flex w-full flex-col gap-4",s.month),nav:o("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:o(me({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:o(me({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:o("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:o("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:o("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:o("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:o("select-none font-medium",a==="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",s.caption_label),table:"w-full border-collapse",weekdays:o("flex",s.weekdays),weekday:o("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:o("mt-2 flex w-full",s.week),week_number_header:o("w-[--cell-size] select-none",s.week_number_header),week_number:o("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:o("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",s.day),range_start:o("bg-accent rounded-l-md",s.range_start),range_middle:o("rounded-none",s.range_middle),range_end:o("bg-accent rounded-r-md",s.range_end),today:o("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:o("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:o("text-muted-foreground opacity-50",s.disabled),hidden:o("invisible",s.hidden),...t},components:{Root:({className:m,rootRef:h,...v})=>p.createElement("div",{"data-slot":"calendar",ref:h,className:o(m),...v}),Chevron:({className:m,orientation:h,...v})=>h==="left"?p.createElement(ChevronLeftIcon,{className:o("size-4",m),...v}):h==="right"?p.createElement(ChevronRightIcon,{className:o("size-4",m),...v}):p.createElement(ChevronDownIcon,{className:o("size-4",m),...v}),DayButton:xt,WeekNumber:({children:m,...h})=>p.createElement("td",{...h},p.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},m)),...d},...c})}function xt({className:e,day:t,modifiers:r,...a}){let n=getDefaultClassNames(),i=p.useRef(null);return p.useEffect(()=>{r.focused&&i.current?.focus();},[r.focused]),p.createElement(_,{ref:i,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"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:o("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),...a})}var Rt=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));Rt.displayName="Card";var Tt=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("flex flex-col space-y-1.5 p-6",e),...t}));Tt.displayName="CardHeader";var wt=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("font-semibold leading-none tracking-tight",e),...t}));wt.displayName="CardTitle";var St=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("text-sm text-muted-foreground",e),...t}));St.displayName="CardDescription";var Pt=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("p-6 pt-0",e),...t}));Pt.displayName="CardContent";var Ct=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{ref:r,className:o("flex items-center p-6 pt-0",e),...t}));Ct.displayName="CardFooter";var Nt=p.forwardRef(({className:e,...t},r)=>p.createElement(ue.Root,{ref:r,className:o("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},p.createElement(ue.Indicator,{className:o("flex items-center justify-center text-current")},p.createElement(Check,{className:"h-4 w-4"}))));Nt.displayName=ue.Root.displayName;var de=B.Root,le=B.Trigger,po=B.Anchor,oe=p.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>p.createElement(B.Portal,null,p.createElement(B.Content,{ref:n,align:t,sideOffset:r,className:o("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),...a})));oe.displayName=B.Content.displayName;var mo="PPP",uo="LLL dd, y";function fo({value:e,onChange:t,placeholder:r="Pick a date",disabled:a,className:n,contentClassName:i,align:d="start",side:c,format:s=mo,captionLayout:m,icon:h,"aria-label":v}){return p.createElement(de,null,p.createElement(le,{asChild:true},p.createElement(_,{type:"button",variant:"outline",disabled:a,"aria-label":v??(e?void 0:r),"data-empty":!e,className:o("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},h??p.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):p.createElement("span",null,r))),p.createElement(oe,{className:o("w-auto p-0",i),align:d,side:c},p.createElement(Ce,{mode:"single",selected:e,onSelect:t,captionLayout:m,initialFocus:true})))}function go({value:e,onChange:t,placeholder:r="Pick a date range",disabled:a,className:n,contentClassName:i,align:d="start",side:c,format:s=uo,captionLayout:m,icon:h,numberOfMonths:v=2,"aria-label":x}){let I=!!e?.from;return p.createElement(de,null,p.createElement(le,{asChild:true},p.createElement(_,{type:"button",variant:"outline",disabled:a,"aria-label":x??(I?void 0:r),"data-empty":!I,className:o("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},h??p.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?p.createElement(p.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):p.createElement("span",null,r))),p.createElement(oe,{className:o("w-auto p-0",i),align:d,side:c},p.createElement(Ce,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:v,captionLayout:m,initialFocus:true})))}var yo=P.Root,bo=P.Trigger,Mt=P.Portal,vo=P.Close,Ke=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Overlay,{ref:r,className:o("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}));Ke.displayName=P.Overlay.displayName;var Lt=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(Mt,null,p.createElement(Ke,null),p.createElement(P.Content,{ref:a,className:o("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,p.createElement(P.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"},p.createElement(X$1,{className:"h-4 w-4"}),p.createElement("span",{className:"sr-only"},"Close")))));Lt.displayName=P.Content.displayName;var Dt=({className:e,...t})=>p.createElement("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Dt.displayName="DialogHeader";var Ht=({className:e,...t})=>p.createElement("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ht.displayName="DialogFooter";var It=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));It.displayName=P.Title.displayName;var Et=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));Et.displayName=P.Description.displayName;var wo=g.Root,So=g.Trigger,Po=g.Group,Co=g.Portal,No=g.Sub,ko=g.RadioGroup,At=p.forwardRef(({className:e,inset:t,children:r,...a},n)=>p.createElement(g.SubTrigger,{ref:n,className:o("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),...a},r,p.createElement(ChevronRight,{className:"ml-auto"})));At.displayName=g.SubTrigger.displayName;var Ft=p.forwardRef(({className:e,...t},r)=>p.createElement(g.SubContent,{ref:r,className:o("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}));Ft.displayName=g.SubContent.displayName;var Ot=p.forwardRef(({className:e,sideOffset:t=4,...r},a)=>p.createElement(g.Portal,null,p.createElement(g.Content,{ref:a,sideOffset:t,className:o("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})));Ot.displayName=g.Content.displayName;var $t=p.forwardRef(({className:e,inset:t,...r},a)=>p.createElement(g.Item,{ref:a,className:o("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}));$t.displayName=g.Item.displayName;var Gt=p.forwardRef(({className:e,children:t,checked:r,...a},n)=>p.createElement(g.CheckboxItem,{ref:n,className:o("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,...a},p.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},p.createElement(g.ItemIndicator,null,p.createElement(Check,{className:"h-4 w-4"}))),t));Gt.displayName=g.CheckboxItem.displayName;var Kt=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(g.RadioItem,{ref:a,className:o("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},p.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},p.createElement(g.ItemIndicator,null,p.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Kt.displayName=g.RadioItem.displayName;var _t=p.forwardRef(({className:e,inset:t,...r},a)=>p.createElement(g.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));_t.displayName=g.Label.displayName;var Bt=p.forwardRef(({className:e,...t},r)=>p.createElement(g.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));Bt.displayName=g.Separator.displayName;var Ut=({className:e,...t})=>p.createElement("span",{className:o("ml-auto text-xs tracking-widest opacity-60",e),...t});Ut.displayName="DropdownMenuShortcut";var Wt=p.forwardRef(({className:e,type:t,...r},a)=>p.createElement("input",{type:t,className:o("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:a,...r}));Wt.displayName="Input";var Lo=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),zt=p.forwardRef(({className:e,...t},r)=>p.createElement(_e.Root,{ref:r,className:o(Lo(),e),...t}));zt.displayName=_e.Root.displayName;var Vt=p.forwardRef(({className:e,value:t,...r},a)=>p.createElement(he.Root,{ref:a,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},p.createElement(he.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Vt.displayName=he.Root.displayName;var jt=p.forwardRef(({className:e,...t},r)=>p.createElement(X.Root,{className:o("grid gap-2",e),...t,ref:r}));jt.displayName=X.Root.displayName;var qt=p.forwardRef(({className:e,...t},r)=>p.createElement(X.Item,{ref:r,className:o("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},p.createElement(X.Indicator,{className:"flex items-center justify-center"},p.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));qt.displayName=X.Item.displayName;var Yt=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement($.Root,{ref:a,className:o("relative overflow-hidden",e),...r},p.createElement($.Viewport,{className:"h-full w-full rounded-[inherit]"},t),p.createElement(Be,null),p.createElement($.Corner,null)));Yt.displayName=$.Root.displayName;var Be=p.forwardRef(({className:e,orientation:t="vertical",...r},a)=>p.createElement($.ScrollAreaScrollbar,{ref:a,orientation:t,className:o("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},p.createElement($.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Be.displayName=$.ScrollAreaScrollbar.displayName;var Eo=y.Root,Ao=y.Group,Fo=y.Value,Xt=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(y.Trigger,{ref:a,className:o("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,p.createElement(y.Icon,{asChild:true},p.createElement(ChevronDown,{className:"h-4 w-4 opacity-50"}))));Xt.displayName=y.Trigger.displayName;var Ue=p.forwardRef(({className:e,...t},r)=>p.createElement(y.ScrollUpButton,{ref:r,className:o("flex cursor-default items-center justify-center py-1",e),...t},p.createElement(ChevronUp,{className:"h-4 w-4"})));Ue.displayName=y.ScrollUpButton.displayName;var We=p.forwardRef(({className:e,...t},r)=>p.createElement(y.ScrollDownButton,{ref:r,className:o("flex cursor-default items-center justify-center py-1",e),...t},p.createElement(ChevronDown,{className:"h-4 w-4"})));We.displayName=y.ScrollDownButton.displayName;var Qt=p.forwardRef(({className:e,children:t,position:r="popper",...a},n)=>p.createElement(y.Portal,null,p.createElement(y.Content,{ref:n,className:o("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,...a},p.createElement(Ue,null),p.createElement(y.Viewport,{className:o("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),p.createElement(We,null))));Qt.displayName=y.Content.displayName;var Zt=p.forwardRef(({className:e,...t},r)=>p.createElement(y.Label,{ref:r,className:o("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Zt.displayName=y.Label.displayName;var er=p.forwardRef(({className:e,children:t,...r},a)=>p.createElement(y.Item,{ref:a,className:o("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},p.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},p.createElement(y.ItemIndicator,null,p.createElement(Check,{className:"h-4 w-4"}))),p.createElement(y.ItemText,null,t)));er.displayName=y.Item.displayName;var tr=p.forwardRef(({className:e,...t},r)=>p.createElement(y.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));tr.displayName=y.Separator.displayName;var rr=p.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...a},n)=>p.createElement(ze.Root,{ref:n,decorative:r,orientation:t,className:o("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));rr.displayName=ze.Root.displayName;var Go=P.Root,Ko=P.Trigger,_o=P.Close,or=P.Portal,Ve=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Overlay,{className:o("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}));Ve.displayName=P.Overlay.displayName;var Bo=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"}}),ar=p.forwardRef(({side:e="right",className:t,children:r,...a},n)=>p.createElement(or,null,p.createElement(Ve,null),p.createElement(P.Content,{ref:n,className:o(Bo({side:e}),t),...a},r,p.createElement(P.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"},p.createElement(X$1,{className:"h-4 w-4"}),p.createElement("span",{className:"sr-only"},"Close")))));ar.displayName=P.Content.displayName;var nr=({className:e,...t})=>p.createElement("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});nr.displayName="SheetHeader";var ir=({className:e,...t})=>p.createElement("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ir.displayName="SheetFooter";var sr=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Title,{ref:r,className:o("text-lg font-semibold text-foreground",e),...t}));sr.displayName=P.Title.displayName;var dr=p.forwardRef(({className:e,...t},r)=>p.createElement(P.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));dr.displayName=P.Description.displayName;function Uo({className:e,...t}){return React.createElement("div",{className:o("animate-pulse rounded-md bg-muted",e),...t})}var lr=p.forwardRef(({className:e,...t},r)=>p.createElement(j.Root,{ref:r,className:o("relative flex w-full touch-none select-none items-center",e),...t},p.createElement(j.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},p.createElement(j.Range,{className:"absolute h-full bg-primary"})),p.createElement(j.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"})));lr.displayName=j.Root.displayName;var cr=p.forwardRef(({className:e,...t},r)=>p.createElement(be.Root,{className:o("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},p.createElement(be.Thumb,{className:o("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")})));cr.displayName=be.Root.displayName;var pr=p.forwardRef(({className:e,...t},r)=>p.createElement("div",{className:"relative w-full overflow-auto"},p.createElement("table",{ref:r,className:o("w-full caption-bottom text-sm",e),...t})));pr.displayName="Table";var mr=p.forwardRef(({className:e,...t},r)=>p.createElement("thead",{ref:r,className:o("[&_tr]:border-b",e),...t}));mr.displayName="TableHeader";var ur=p.forwardRef(({className:e,...t},r)=>p.createElement("tbody",{ref:r,className:o("[&_tr:last-child]:border-0",e),...t}));ur.displayName="TableBody";var fr=p.forwardRef(({className:e,...t},r)=>p.createElement("tfoot",{ref:r,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));fr.displayName="TableFooter";var gr=p.forwardRef(({className:e,...t},r)=>p.createElement("tr",{ref:r,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));gr.displayName="TableRow";var hr=p.forwardRef(({className:e,...t},r)=>p.createElement("th",{ref:r,className:o("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}));hr.displayName="TableHead";var yr=p.forwardRef(({className:e,...t},r)=>p.createElement("td",{ref:r,className:o("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));yr.displayName="TableCell";var br=p.forwardRef(({className:e,...t},r)=>p.createElement("caption",{ref:r,className:o("mt-4 text-sm text-muted-foreground",e),...t}));br.displayName="TableCaption";var Wo=U.Root,vr=p.forwardRef(({className:e,...t},r)=>p.createElement(U.List,{ref:r,className:o("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));vr.displayName=U.List.displayName;var xr=p.forwardRef(({className:e,...t},r)=>p.createElement(U.Trigger,{ref:r,className:o("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}));xr.displayName=U.Trigger.displayName;var Rr=p.forwardRef(({className:e,...t},r)=>p.createElement(U.Content,{ref:r,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Rr.displayName=U.Content.displayName;var Tr=p.forwardRef(({className:e,...t},r)=>p.createElement("textarea",{className:o("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}));Tr.displayName="Textarea";var je=W.Provider,qe=W.Root,Ye=W.Trigger,He=p.forwardRef(({className:e,sideOffset:t=4,...r},a)=>p.createElement(W.Portal,null,p.createElement(W.Content,{ref:a,sideOffset:t,className:o("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})));He.displayName=W.Content.displayName;var Sr=p.createContext(null);function Pr(){let e=p.useContext(Sr);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var jo=({href:e,className:t,children:r})=>p.createElement("a",{href:e,className:t},r),Cr=p.forwardRef(({header:e,collapsedHeader:t,sections:r,items:a,footer:n,collapsed:i,onCollapsedChange:d,collapsible:c=true,defaultCollapsed:s=false,activeItem:m,className:h,linkComponent:v=jo},x)=>{let[I,re]=p.useState(s),l=i??I,N=()=>{let E=!l;re(E),d?.(E);};return p.createElement(je,{delayDuration:0},p.createElement(Sr.Provider,{value:{collapsed:l,activeItem:m,LinkComponent:v}},p.createElement("aside",{ref:x,className:o("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",h)},p.createElement("div",{className:o("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,c&&p.createElement("button",{onClick:N,className:o("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?p.createElement(ChevronRight,{className:"h-3 w-3"}):p.createElement(ChevronLeft,{className:"h-3 w-3"}))),p.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},a&&a.length>0&&p.createElement("div",{className:"px-2 mb-1 space-y-0.5"},a.map(E=>p.createElement(Je,{key:E.id,item:E}))),r?.map(E=>p.createElement(qo,{key:E.id,section:E}))),n&&p.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},n))))});Cr.displayName="SideMenu";function qo({section:e}){let{collapsed:t}=Pr(),[r,a]=p.useState(e.defaultExpanded??true);return t?p.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(n=>p.createElement(Je,{key:n.id,item:n}))):p.createElement("div",{className:"px-2 mb-1"},p.createElement("button",{onClick:()=>a(!r),className:o("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&&p.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),p.createElement("span",{className:"flex-1 text-left"},e.title),r?p.createElement(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):p.createElement(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&p.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},p.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=>p.createElement(Je,{key:n.id,item:n,nested:true}))))}function Je({item:e,nested:t=false}){let{collapsed:r,activeItem:a,LinkComponent:n}=Pr(),i=a===e.id,d=o("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"),c=p.createElement(p.Fragment,null,e.icon&&p.createElement("span",{className:o("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&p.createElement("span",null,e.label),!r&&e.badge&&p.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)),s=e.href?p.createElement(n,{href:e.href,className:d},c):p.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:o(d,"w-full")},c);return r?p.createElement(qe,null,p.createElement(Ye,{asChild:true},s),p.createElement(He,{side:"right",sideOffset:8},e.label)):s}var Jo=({href:e,className:t,children:r})=>p.createElement("a",{href:e,className:t},r),Nr=p.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:a,rightContent:n,className:i,linkComponent:d=Jo},c)=>p.createElement("header",{ref:c,className:o("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&&p.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"},p.createElement(Menu,{className:"h-4 w-4"})),e.length>0&&p.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((s,m)=>p.createElement(p.Fragment,{key:m},m>0&&p.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),s.href?p.createElement(d,{href:s.href,className:"text-rds-gray-600 dark:text-rds-gray-400 hover:text-rds-gray-900 dark:hover:text-white transition-colors text-sm"},s.label):p.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},s.label)))),a,p.createElement("div",{className:"flex-1"}),n&&p.createElement("div",{className:"flex items-center gap-1.5"},n)));Nr.displayName="TopMenu";var kr=p.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:a,avatarClassName:n,children:i,className:d},c)=>{let[s,m]=p.useState(false),h=p.useRef(null);return p.useEffect(()=>{let v=x=>{h.current&&!h.current.contains(x.target)&&m(false);};return s&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v);}},[s]),p.createElement("div",{ref:c,className:o("relative",d)},p.createElement("div",{ref:h},p.createElement("button",{onClick:()=>m(!s),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"},p.createElement("div",{className:o("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?p.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):a)),s&&p.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)&&p.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},p.createElement("div",{className:"flex items-center gap-3"},p.createElement("div",{className:o("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?p.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):a),p.createElement("div",{className:"flex-1 min-w-0"},e&&p.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&p.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),i)))});kr.displayName="TopMenuUser";var Mr=p.forwardRef(({icon:e,children:t,onClick:r,href:a,variant:n="default",className:i},d)=>p.createElement(a?"a":"button",{ref:d,onClick:r,href:a,className:o("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&&p.createElement("span",{className:"h-4 w-4"},e),p.createElement("span",null,t)));Mr.displayName="TopMenuUserItem";var Lr=p.forwardRef(({children:e,className:t},r)=>p.createElement("div",{ref:r,className:o("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));Lr.displayName="TopMenuUserSection";var Xe=p.createContext(null);function Qe(){let e=p.useContext(Xe);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Dr=p.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:a,children:n,className:i,tabsClassName:d},c)=>{let[s,m]=p.useState(r||e[0]?.id||""),h=t??s,v=x=>{m(x),a?.(x);};return p.createElement(Xe.Provider,{value:{activeTab:h,setActiveTab:v}},p.createElement("div",{ref:c,className:o("space-y-6",i)},p.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},p.createElement("nav",{className:o("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",d),"aria-label":"Tabs"},e.map(x=>{let I=h===x.id;return p.createElement("button",{key:x.id,onClick:()=>!x.disabled&&v(x.id),disabled:x.disabled,className:o("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",I?"text-primary":"text-muted-foreground hover:text-foreground",x.disabled&&"opacity-50 cursor-not-allowed")},x.icon&&p.createElement("span",{className:"h-4 w-4"},x.icon),x.label,I&&p.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),n&&p.createElement("div",null,n)))});Dr.displayName="SimpleTabs";var Hr=p.forwardRef(({id:e,children:t,className:r},a)=>{let{activeTab:n}=Qe();return n!==e?null:p.createElement("div",{ref:a,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});Hr.displayName="SimpleTabsPanel";var Ir=p.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:a,className:n},i)=>{let[d,c]=p.useState(t||""),s=e??d,m=h=>{c(h),r?.(h);};return p.createElement(Xe.Provider,{value:{activeTab:s,setActiveTab:m}},p.createElement("div",{ref:i,className:o("space-y-6",n)},a))});Ir.displayName="SimpleTabsRoot";var Er=p.forwardRef(({children:e,className:t},r)=>p.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},p.createElement("nav",{className:o("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Er.displayName="SimpleTabsList";var Ar=p.forwardRef(({value:e,children:t,icon:r,disabled:a,className:n},i)=>{let{activeTab:d,setActiveTab:c}=Qe(),s=d===e;return p.createElement("button",{ref:i,role:"tab",id:`tab-${e}`,"aria-selected":s,"aria-controls":`panel-${e}`,onClick:()=>!a&&c(e),disabled:a,className:o("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",s?"text-primary":"text-muted-foreground hover:text-foreground",a&&"opacity-50 cursor-not-allowed",n)},r&&p.createElement("span",{className:"h-4 w-4"},r),t,s&&p.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});Ar.displayName="SimpleTabsTrigger";var Fr=p.forwardRef(({value:e,children:t,className:r},a)=>{let{activeTab:n}=Qe();return n!==e?null:p.createElement("div",{ref:a,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});Fr.displayName="SimpleTabsContent";function ea({children:e}){let t=useRef(null);return useEffect(()=>{let r=new Zo({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 a(n){r.raf(n),requestAnimationFrame(a);}return requestAnimationFrame(a),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var Z=[50,100,200,300,400,500,600,700,800,900,950],Or=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],ta=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Ie({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,a={};for(let n=0;n<Z.length;n++){let i=Or[n],d=ta[n]*t;a[Z[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return a}function $r(){let e={};for(let t=0;t<Z.length;t++){let r=Or[t];e[Z[t]]=`${r.toFixed(4)} 0 0`;}return e}var Ze={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"}},xe="1 0 0",Gr="0 0 0";function ce(e,t){let[,r,a]=e.split(/\s+/).map(h=>h.trim()),n=Number(r),i=a;if(t==="light"){let v=Math.min(n*.22,.045),x=.38,I=n;return {soft:`${.965.toFixed(3)} ${v.toFixed(3)} ${i}`,deep:`${x.toFixed(3)} ${I.toFixed(3)} ${i}`}}let d=.22,c=Math.min(n*.45,.075),s=.82,m=n*.9;return {soft:`${d.toFixed(3)} ${c.toFixed(3)} ${i}`,deep:`${s.toFixed(3)} ${m.toFixed(3)} ${i}`}}var Ee={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 ra=["superLight","light","dark","superDark"],oa={muted:.6,default:1,vibrant:1.3};function aa(e,t,r){let a=t.primary*r,n=t.accent*r,i=(a+n)/2*.8,d=c=>(c%360+360)%360;return {1:`0.600 ${(.17*a).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${d(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 u=e=>({source:"neutral",step:e}),G=e=>({source:"primary",step:e}),ee=e=>({source:"accent",step:e}),Re=e=>({source:"pure",value:e}),na={superLight:{background:u(50),foreground:u(800),card:Re(xe),cardForeground:u(800),popover:Re(xe),popoverForeground:u(800),primary:G(600),primaryForeground:G(50),secondary:u(100),secondaryForeground:u(700),muted:u(100),mutedForeground:u(500),accent:ee(600),accentForeground:ee(50),border:u(200),input:u(200),ring:G(500)},light:{background:u(50),foreground:u(950),card:Re(xe),cardForeground:u(950),popover:Re(xe),popoverForeground:u(950),primary:G(500),primaryForeground:G(50),secondary:u(100),secondaryForeground:u(700),muted:u(100),mutedForeground:u(500),accent:ee(500),accentForeground:ee(50),border:u(200),input:u(200),ring:G(500)},dark:{background:u(950),foreground:u(50),card:u(900),cardForeground:u(50),popover:u(900),popoverForeground:u(50),primary:G(400),primaryForeground:G(950),secondary:u(800),secondaryForeground:u(200),muted:u(800),mutedForeground:u(400),accent:ee(400),accentForeground:ee(950),border:u(800),input:u(800),ring:G(400)},superDark:{background:Re(Gr),foreground:u(100),card:u(950),cardForeground:u(100),popover:u(950),popoverForeground:u(100),primary:G(300),primaryForeground:G(950),secondary:u(900),secondaryForeground:u(300),muted:u(900),mutedForeground:u(500),accent:ee(300),accentForeground:ee(950),border:u(900),input:u(900),ring:G(300)}};function H(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function ia(e,t){let r=na[t],a=t==="superLight"||t==="light",n=a?Ze.light:Ze.dark;return {background:H(r.background,e),foreground:H(r.foreground,e),card:H(r.card,e),cardForeground:H(r.cardForeground,e),popover:H(r.popover,e),popoverForeground:H(r.popoverForeground,e),primary:H(r.primary,e),primaryForeground:H(r.primaryForeground,e),secondary:H(r.secondary,e),secondaryForeground:H(r.secondaryForeground,e),muted:H(r.muted,e),mutedForeground:H(r.mutedForeground,e),accent:H(r.accent,e),accentForeground:H(r.accentForeground,e),border:H(r.border,e),input:H(r.input,e),ring:H(r.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let i=a?"light":"dark",d=ce(n.destructive,i),c=ce(n.success,i),s=ce(n.warning,i),m=ce(n.info,i),h=ce(n.highlight,i);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:c.soft,successDeep:c.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:m.soft,infoDeep:m.deep,highlightSoft:h.soft,highlightDeep:h.deep}})()}}var q={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},sa={compact:.85,default:1,spacious:1.18};function da(e){let t=sa[e.scale],r=a=>`${(a*t).toFixed(3)}rem`;return {fontSans:Ee[e.body],fontMono:Ee[e.mono],fontDisplay:Ee[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(q.display),h1:r(q.h1),h2:r(q.h2),h3:r(q.h3),h4:r(q.h4),h5:r(q.h5),h6:r(q.h6),body:r(q.body),bodySm:r(q.bodySm)}}}var la={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function ca(e){let t=la[e.style],r=a=>`${a.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 pa={tight:.85,default:1,roomy:1.2};function ma(e){return {baseUnit:"1rem",densityFactor:pa[e.density]}}var ua={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 fa(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,a=n=>`${Math.round(n*r)}ms`;return {shadows:ua[t],motion:{fast:a(150),base:a(200),slow:a(300),slower:a(500)},borderWidth:e?.borderWidth??"1px"}}function ne(e){let t=oa[e.intensity??"default"],r=e.neutralPureGray??false,a=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,i=(e.chroma?.accent??1)*t,d=r?$r():Ie({hue:e.hues.neutral,chromaScale:a}),c=Ie({hue:e.hues.primary,chromaScale:n}),s=Ie({hue:e.hues.accent,chromaScale:i}),m={neutral:d,primary:c,accent:s},h=aa(e.hues,{primary:n,accent:i},t),v=Object.fromEntries(ra.map(E=>[E,ia(m,E)])),x=da(e.typography),I=ca(e.radius),re=ma(e.spacing),l=fa(e.effects),N={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:m,colors:v,chart:h,typography:x,radius:I,spacing:re,effects:l,components:N}}var Te={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"}},et={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"}},Ae=[Te,et];function ga(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 rt(e,t){let r=e.colors[t];return {...ga(r),...tt("neutral",e.ramps.neutral),...tt("primary",e.ramps.primary),...tt("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 tt(e,t){let r={};for(let a of Z)r[`--ramp-${e}-${a}`]=t[a];return r}function Fe(e,t){if(typeof document>"u")return;let r=document.documentElement,a=rt(e,t);for(let[n,i]of Object.entries(a))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 we(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 a=r.match(/\d+/g);if(!a||a.length<3)return "";let[n,i,d]=a.slice(0,3).map(Number);return "#"+[n,i,d].map(c=>Math.max(0,Math.min(255,c)).toString(16).padStart(2,"0")).join("").toUpperCase()}function ha(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,a,n]=t.map(Number),i=`${r.toFixed(3)} ${a.toFixed(3)} ${Math.round(n)}`,d=we(e);return {oklch:i,hex:d}}function ot(e,t,r){let a=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Z){let{oklch:i,hex:d}=ha(t[n]);a.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return a.join(`
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import*as y from'react';import {useRef,useEffect}from'react';import*as ae from'@radix-ui/react-accordion';import {ChevronDown,Check,X as X$1,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 _e from'@radix-ui/react-checkbox';import {format}from'date-fns';import*as de from'@radix-ui/react-popover';import*as I from'@radix-ui/react-dialog';import*as x from'@radix-ui/react-dropdown-menu';import*as Ht from'@radix-ui/react-label';import*as Ve from'@radix-ui/react-progress';import*as xe from'@radix-ui/react-radio-group';import*as ne from'@radix-ui/react-scroll-area';import*as R from'@radix-ui/react-select';import*as At from'@radix-ui/react-separator';import*as ge from'@radix-ui/react-slider';import*as je from'@radix-ui/react-switch';import*as ce from'@radix-ui/react-tabs';import*as le from'@radix-ui/react-tooltip';import*as D from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,EffectPass}from'postprocessing';import _n from'lenis';function a(...e){return twMerge(clsx(e))}var ua=ae.Root,mr=y.forwardRef(({className:e,...t},r)=>y.createElement(ae.Item,{ref:r,className:a("border-b",e),...t}));mr.displayName="AccordionItem";var ur=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(ae.Header,{className:"flex"},y.createElement(ae.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,y.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));ur.displayName=ae.Trigger.displayName;var fr=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(ae.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},y.createElement("div",{className:a("pb-4 pt-0",e)},t)));fr.displayName=ae.Content.displayName;var ga=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"}}),gr=y.forwardRef(({className:e,variant:t,...r},o)=>y.createElement("div",{ref:o,role:"alert",className:a(ga({variant:t}),e),...r}));gr.displayName="Alert";var hr=y.forwardRef(({className:e,...t},r)=>y.createElement("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));hr.displayName="AlertTitle";var yr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));yr.displayName="AlertDescription";var br=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 ya({className:e,variant:t,rounded:r,...o}){return y.createElement("div",{className:a(br({variant:t,rounded:r}),e),...o})}var Ue=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"}}),X=y.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...n},i)=>y.createElement(o?Slot:"button",{className:a("rds-button",Ue({variant:t,size:r,className:e})),ref:i,...n}));X.displayName="Button";function lt({className:e,classNames:t,showOutsideDays:r=true,captionLayout:o="label",buttonVariant:n="ghost",formatters:i,components:d,...l}){let s=getDefaultClassNames();return y.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",s.root),months:a("relative flex flex-col gap-4 md:flex-row",s.months),month:a("flex w-full flex-col gap-4",s.month),nav:a("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:a(Ue({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:a(Ue({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:a("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:a("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.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",s.dropdown_root),dropdown:a("bg-popover absolute inset-0 opacity-0",s.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",s.caption_label),table:"w-full border-collapse",weekdays:a("flex",s.weekdays),weekday:a("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:a("mt-2 flex w-full",s.week),week_number_header:a("w-[--cell-size] select-none",s.week_number_header),week_number:a("text-muted-foreground select-none text-[0.8rem]",s.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",s.day),range_start:a("bg-accent rounded-l-md",s.range_start),range_middle:a("rounded-none",s.range_middle),range_end:a("bg-accent rounded-r-md",s.range_end),today:a("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:a("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:a("text-muted-foreground opacity-50",s.disabled),hidden:a("invisible",s.hidden),...t},components:{Root:({className:p,rootRef:c,...u})=>y.createElement("div",{"data-slot":"calendar",ref:c,className:a(p),...u}),Chevron:({className:p,orientation:c,...u})=>c==="left"?y.createElement(ChevronLeftIcon,{className:a("size-4",p),...u}):c==="right"?y.createElement(ChevronRightIcon,{className:a("size-4",p),...u}):y.createElement(ChevronDownIcon,{className:a("size-4",p),...u}),DayButton:Rr,WeekNumber:({children:p,...c})=>y.createElement("td",{...c},y.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},p)),...d},...l})}function Rr({className:e,day:t,modifiers:r,...o}){let n=getDefaultClassNames(),i=y.useRef(null);return y.useEffect(()=>{r.focused&&i.current?.focus();},[r.focused]),y.createElement(X,{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 Tr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));Tr.displayName="Card";var wr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("flex flex-col space-y-1.5 p-6",e),...t}));wr.displayName="CardHeader";var Pr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("font-semibold leading-none tracking-tight",e),...t}));Pr.displayName="CardTitle";var Sr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Sr.displayName="CardDescription";var Cr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("p-6 pt-0",e),...t}));Cr.displayName="CardContent";var Nr=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{ref:r,className:a("flex items-center p-6 pt-0",e),...t}));Nr.displayName="CardFooter";var kr=y.forwardRef(({className:e,...t},r)=>y.createElement(_e.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},y.createElement(_e.Indicator,{className:a("flex items-center justify-center text-current")},y.createElement(Check,{className:"h-4 w-4"}))));kr.displayName=_e.Root.displayName;var De=de.Root,Ie=de.Trigger,Sa=de.Anchor,Ce=y.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},n)=>y.createElement(de.Portal,null,y.createElement(de.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})));Ce.displayName=de.Content.displayName;var Ca="PPP",Na="LLL dd, y";function ka({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=Ca,captionLayout:p,icon:c,"aria-label":u}){return y.createElement(De,null,y.createElement(Ie,{asChild:true},y.createElement(X,{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)},c??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):y.createElement("span",null,r))),y.createElement(Ce,{className:a("w-auto p-0",i),align:d,side:l},y.createElement(lt,{mode:"single",selected:e,onSelect:t,captionLayout:p,initialFocus:true})))}function Ma({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=Na,captionLayout:p,icon:c,numberOfMonths:u=2,"aria-label":g}){let h=!!e?.from;return y.createElement(De,null,y.createElement(Ie,{asChild:true},y.createElement(X,{type:"button",variant:"outline",disabled:o,"aria-label":g??(h?void 0:r),"data-empty":!h,className:a("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},c??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?y.createElement(y.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):y.createElement("span",null,r))),y.createElement(Ce,{className:a("w-auto p-0",i),align:d,side:l},y.createElement(lt,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:u,captionLayout:p,initialFocus:true})))}var Ha=I.Root,La=I.Trigger,Er=I.Portal,Da=I.Close,Et=y.forwardRef(({className:e,...t},r)=>y.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}));Et.displayName=I.Overlay.displayName;var Hr=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(Er,null,y.createElement(Et,null),y.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,y.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"},y.createElement(X$1,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));Hr.displayName=I.Content.displayName;var Lr=({className:e,...t})=>y.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Lr.displayName="DialogHeader";var Dr=({className:e,...t})=>y.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dr.displayName="DialogFooter";var Ir=y.forwardRef(({className:e,...t},r)=>y.createElement(I.Title,{ref:r,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Ir.displayName=I.Title.displayName;var Ar=y.forwardRef(({className:e,...t},r)=>y.createElement(I.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Ar.displayName=I.Description.displayName;var Oa=x.Root,Ga=x.Trigger,$a=x.Group,Ba=x.Portal,Ua=x.Sub,_a=x.RadioGroup,Fr=y.forwardRef(({className:e,inset:t,children:r,...o},n)=>y.createElement(x.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,y.createElement(ChevronRight,{className:"ml-auto"})));Fr.displayName=x.SubTrigger.displayName;var Or=y.forwardRef(({className:e,...t},r)=>y.createElement(x.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}));Or.displayName=x.SubContent.displayName;var Gr=y.forwardRef(({className:e,sideOffset:t=4,...r},o)=>y.createElement(x.Portal,null,y.createElement(x.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})));Gr.displayName=x.Content.displayName;var $r=y.forwardRef(({className:e,inset:t,...r},o)=>y.createElement(x.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}));$r.displayName=x.Item.displayName;var Br=y.forwardRef(({className:e,children:t,checked:r,...o},n)=>y.createElement(x.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},y.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y.createElement(x.ItemIndicator,null,y.createElement(Check,{className:"h-4 w-4"}))),t));Br.displayName=x.CheckboxItem.displayName;var Ur=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(x.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},y.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y.createElement(x.ItemIndicator,null,y.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Ur.displayName=x.RadioItem.displayName;var _r=y.forwardRef(({className:e,inset:t,...r},o)=>y.createElement(x.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));_r.displayName=x.Label.displayName;var Kr=y.forwardRef(({className:e,...t},r)=>y.createElement(x.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));Kr.displayName=x.Separator.displayName;var zr=({className:e,...t})=>y.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});zr.displayName="DropdownMenuShortcut";var Vr=y.forwardRef(({className:e,type:t,...r},o)=>y.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}));Vr.displayName="Input";var za=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Wr=y.forwardRef(({className:e,...t},r)=>y.createElement(Ht.Root,{ref:r,className:a(za(),e),...t}));Wr.displayName=Ht.Root.displayName;var jr=y.forwardRef(({className:e,value:t,...r},o)=>y.createElement(Ve.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},y.createElement(Ve.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));jr.displayName=Ve.Root.displayName;var qr=y.forwardRef(({className:e,...t},r)=>y.createElement(xe.Root,{className:a("grid gap-2",e),...t,ref:r}));qr.displayName=xe.Root.displayName;var Yr=y.forwardRef(({className:e,...t},r)=>y.createElement(xe.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},y.createElement(xe.Indicator,{className:"flex items-center justify-center"},y.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Yr.displayName=xe.Item.displayName;var Xr=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(ne.Root,{ref:o,className:a("relative overflow-hidden",e),...r},y.createElement(ne.Viewport,{className:"h-full w-full rounded-[inherit]"},t),y.createElement(Lt,null),y.createElement(ne.Corner,null)));Xr.displayName=ne.Root.displayName;var Lt=y.forwardRef(({className:e,orientation:t="vertical",...r},o)=>y.createElement(ne.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},y.createElement(ne.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Lt.displayName=ne.ScrollAreaScrollbar.displayName;var qa=R.Root,Ya=R.Group,Xa=R.Value,Jr=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(R.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,y.createElement(R.Icon,{asChild:true},y.createElement(ChevronDown,{className:"h-4 w-4 opacity-50"}))));Jr.displayName=R.Trigger.displayName;var Dt=y.forwardRef(({className:e,...t},r)=>y.createElement(R.ScrollUpButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronUp,{className:"h-4 w-4"})));Dt.displayName=R.ScrollUpButton.displayName;var It=y.forwardRef(({className:e,...t},r)=>y.createElement(R.ScrollDownButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronDown,{className:"h-4 w-4"})));It.displayName=R.ScrollDownButton.displayName;var Qr=y.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>y.createElement(R.Portal,null,y.createElement(R.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},y.createElement(Dt,null),y.createElement(R.Viewport,{className:a("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),y.createElement(It,null))));Qr.displayName=R.Content.displayName;var eo=y.forwardRef(({className:e,...t},r)=>y.createElement(R.Label,{ref:r,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));eo.displayName=R.Label.displayName;var to=y.forwardRef(({className:e,children:t,...r},o)=>y.createElement(R.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},y.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y.createElement(R.ItemIndicator,null,y.createElement(Check,{className:"h-4 w-4"}))),y.createElement(R.ItemText,null,t)));to.displayName=R.Item.displayName;var ro=y.forwardRef(({className:e,...t},r)=>y.createElement(R.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));ro.displayName=R.Separator.displayName;var oo=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>y.createElement(At.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}));oo.displayName=At.Root.displayName;var Qa=I.Root,en=I.Trigger,tn=I.Close,ao=I.Portal,Ft=y.forwardRef(({className:e,...t},r)=>y.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}));Ft.displayName=I.Overlay.displayName;var rn=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"}}),no=y.forwardRef(({side:e="right",className:t,children:r,...o},n)=>y.createElement(ao,null,y.createElement(Ft,null),y.createElement(I.Content,{ref:n,className:a(rn({side:e}),t),...o},r,y.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"},y.createElement(X$1,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));no.displayName=I.Content.displayName;var io=({className:e,...t})=>y.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});io.displayName="SheetHeader";var so=({className:e,...t})=>y.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});so.displayName="SheetFooter";var co=y.forwardRef(({className:e,...t},r)=>y.createElement(I.Title,{ref:r,className:a("text-lg font-semibold text-foreground",e),...t}));co.displayName=I.Title.displayName;var lo=y.forwardRef(({className:e,...t},r)=>y.createElement(I.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));lo.displayName=I.Description.displayName;function on({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var po=y.forwardRef(({className:e,...t},r)=>y.createElement(ge.Root,{ref:r,className:a("relative flex w-full touch-none select-none items-center",e),...t},y.createElement(ge.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},y.createElement(ge.Range,{className:"absolute h-full bg-primary"})),y.createElement(ge.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"})));po.displayName=ge.Root.displayName;var mo=y.forwardRef(({className:e,...t},r)=>y.createElement(je.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},y.createElement(je.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")})));mo.displayName=je.Root.displayName;var uo=y.forwardRef(({className:e,...t},r)=>y.createElement("div",{className:"relative w-full overflow-auto"},y.createElement("table",{ref:r,className:a("w-full caption-bottom text-sm",e),...t})));uo.displayName="Table";var fo=y.forwardRef(({className:e,...t},r)=>y.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));fo.displayName="TableHeader";var go=y.forwardRef(({className:e,...t},r)=>y.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));go.displayName="TableBody";var ho=y.forwardRef(({className:e,...t},r)=>y.createElement("tfoot",{ref:r,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ho.displayName="TableFooter";var yo=y.forwardRef(({className:e,...t},r)=>y.createElement("tr",{ref:r,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));yo.displayName="TableRow";var vo=y.forwardRef(({className:e,...t},r)=>y.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}));vo.displayName="TableHead";var bo=y.forwardRef(({className:e,...t},r)=>y.createElement("td",{ref:r,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));bo.displayName="TableCell";var xo=y.forwardRef(({className:e,...t},r)=>y.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));xo.displayName="TableCaption";var an=ce.Root,Ro=y.forwardRef(({className:e,...t},r)=>y.createElement(ce.List,{ref:r,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ro.displayName=ce.List.displayName;var To=y.forwardRef(({className:e,...t},r)=>y.createElement(ce.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}));To.displayName=ce.Trigger.displayName;var wo=y.forwardRef(({className:e,...t},r)=>y.createElement(ce.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}));wo.displayName=ce.Content.displayName;var Po=y.forwardRef(({className:e,...t},r)=>y.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}));Po.displayName="Textarea";var Ot=le.Provider,Gt=le.Root,$t=le.Trigger,ht=y.forwardRef(({className:e,sideOffset:t=4,...r},o)=>y.createElement(le.Portal,null,y.createElement(le.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})));ht.displayName=le.Content.displayName;var Co=y.createContext(null);function No(){let e=y.useContext(Co);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var dn=({href:e,className:t,children:r})=>y.createElement("a",{href:e,className:t},r),ko=y.forwardRef(({header:e,collapsedHeader:t,sections:r,items:o,footer:n,collapsed:i,onCollapsedChange:d,collapsible:l=true,defaultCollapsed:s=false,activeItem:p,className:c,linkComponent:u=dn},g)=>{let[h,T]=y.useState(s),f=i??h,m=()=>{let w=!f;T(w),d?.(w);};return y.createElement(Ot,{delayDuration:0},y.createElement(Co.Provider,{value:{collapsed:f,activeItem:p,LinkComponent:u}},y.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]",f?"w-16":"w-64",c)},y.createElement("div",{className:a("flex items-center border-b border-rds-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",f?"justify-center px-2":"justify-between px-3")},f&&t||e,l&&y.createElement("button",{onClick:m,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",f&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":f?"Expand sidebar":"Collapse sidebar"},f?y.createElement(ChevronRight,{className:"h-3 w-3"}):y.createElement(ChevronLeft,{className:"h-3 w-3"}))),y.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&y.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(w=>y.createElement(Bt,{key:w.id,item:w}))),r?.map(w=>y.createElement(cn,{key:w.id,section:w}))),n&&y.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},n))))});ko.displayName="SideMenu";function cn({section:e}){let{collapsed:t}=No(),[r,o]=y.useState(e.defaultExpanded??true);return t?y.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(n=>y.createElement(Bt,{key:n.id,item:n}))):y.createElement("div",{className:"px-2 mb-1"},y.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&&y.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),y.createElement("span",{className:"flex-1 text-left"},e.title),r?y.createElement(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):y.createElement(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&y.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},y.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=>y.createElement(Bt,{key:n.id,item:n,nested:true}))))}function Bt({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:n}=No(),i=o===e.id,d=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"),l=y.createElement(y.Fragment,null,e.icon&&y.createElement("span",{className:a("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&y.createElement("span",null,e.label),!r&&e.badge&&y.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)),s=e.href?y.createElement(n,{href:e.href,className:d},l):y.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:a(d,"w-full")},l);return r?y.createElement(Gt,null,y.createElement($t,{asChild:true},s),y.createElement(ht,{side:"right",sideOffset:8},e.label)):s}var pn=({href:e,className:t,children:r})=>y.createElement("a",{href:e,className:t},r),Mo=y.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:n,className:i,linkComponent:d=pn},l)=>y.createElement("header",{ref:l,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&&y.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"},y.createElement(Menu,{className:"h-4 w-4"})),e.length>0&&y.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((s,p)=>y.createElement(y.Fragment,{key:p},p>0&&y.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),s.href?y.createElement(d,{href:s.href,className:"text-rds-gray-600 dark:text-rds-gray-400 hover:text-rds-gray-900 dark:hover:text-white transition-colors text-sm"},s.label):y.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},s.label)))),o,y.createElement("div",{className:"flex-1"}),n&&y.createElement("div",{className:"flex items-center gap-1.5"},n)));Mo.displayName="TopMenu";var Eo=y.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:o,avatarClassName:n,children:i,className:d},l)=>{let[s,p]=y.useState(false),c=y.useRef(null);return y.useEffect(()=>{let u=g=>{c.current&&!c.current.contains(g.target)&&p(false);};return s&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u);}},[s]),y.createElement("div",{ref:l,className:a("relative",d)},y.createElement("div",{ref:c},y.createElement("button",{onClick:()=>p(!s),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"},y.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?y.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o)),s&&y.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)&&y.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},y.createElement("div",{className:"flex items-center gap-3"},y.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?y.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o),y.createElement("div",{className:"flex-1 min-w-0"},e&&y.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&y.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),i)))});Eo.displayName="TopMenuUser";var Ho=y.forwardRef(({icon:e,children:t,onClick:r,href:o,variant:n="default",className:i},d)=>y.createElement(o?"a":"button",{ref:d,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&&y.createElement("span",{className:"h-4 w-4"},e),y.createElement("span",null,t)));Ho.displayName="TopMenuUserItem";var Lo=y.forwardRef(({children:e,className:t},r)=>y.createElement("div",{ref:r,className:a("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));Lo.displayName="TopMenuUserSection";var Ut=y.createContext(null);function _t(){let e=y.useContext(Ut);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Do=y.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:n,className:i,tabsClassName:d},l)=>{let[s,p]=y.useState(r||e[0]?.id||""),c=t??s,u=g=>{p(g),o?.(g);};return y.createElement(Ut.Provider,{value:{activeTab:c,setActiveTab:u}},y.createElement("div",{ref:l,className:a("space-y-6",i)},y.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},y.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",d),"aria-label":"Tabs"},e.map(g=>{let h=c===g.id;return y.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",h?"text-primary":"text-muted-foreground hover:text-foreground",g.disabled&&"opacity-50 cursor-not-allowed")},g.icon&&y.createElement("span",{className:"h-4 w-4"},g.icon),g.label,h&&y.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),n&&y.createElement("div",null,n)))});Do.displayName="SimpleTabs";var Io=y.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:n}=_t();return n!==e?null:y.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});Io.displayName="SimpleTabsPanel";var Ao=y.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:n},i)=>{let[d,l]=y.useState(t||""),s=e??d,p=c=>{l(c),r?.(c);};return y.createElement(Ut.Provider,{value:{activeTab:s,setActiveTab:p}},y.createElement("div",{ref:i,className:a("space-y-6",n)},o))});Ao.displayName="SimpleTabsRoot";var Fo=y.forwardRef(({children:e,className:t},r)=>y.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},y.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Fo.displayName="SimpleTabsList";var Oo=y.forwardRef(({value:e,children:t,icon:r,disabled:o,className:n},i)=>{let{activeTab:d,setActiveTab:l}=_t(),s=d===e;return y.createElement("button",{ref:i,role:"tab",id:`tab-${e}`,"aria-selected":s,"aria-controls":`panel-${e}`,onClick:()=>!o&&l(e),disabled:o,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",s?"text-primary":"text-muted-foreground hover:text-foreground",o&&"opacity-50 cursor-not-allowed",n)},r&&y.createElement("span",{className:"h-4 w-4"},r),t,s&&y.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});Oo.displayName="SimpleTabsTrigger";var Go=y.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:n}=_t();return n!==e?null:y.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});Go.displayName="SimpleTabsContent";var mn={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},un={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)"},me=y.forwardRef(({className:e,aspect:t="video",radius:r="lg",border:o=false,loading:n=false,onVisibilityChange:i,fallback:d,style:l,children:s,...p},c)=>{let u=y.useRef(null);return y.useImperativeHandle(c,()=>u.current),y.useEffect(()=>{if(!i||!u.current)return;let g=u.current,h=new IntersectionObserver(([T])=>i(T.isIntersecting),{threshold:.05});return h.observe(g),()=>h.disconnect()},[i]),y.createElement("div",{ref:u,"data-gds-part":"media-surface",className:a("rds-media-surface relative w-full overflow-hidden bg-muted",mn[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${un[r]})`,...l},...p},s,n&&y.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},d))});me.displayName="MediaSurface";function ke(){let[e,t]=y.useState(false);return y.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 $o=y.forwardRef(({src:e,controls:t=true,autoPlay:r=false,loop:o=false,muted:n,pauseOffscreen:i=true,aspect:d="video",radius:l="lg",border:s=false,poster:p,label:c,className:u,style:g,playbackRate:h=1,objectFit:T="cover"},f)=>{let m=y.useRef(null),w=ke(),[k,E]=y.useState(!!p);y.useImperativeHandle(f,()=>m.current);let M=n??r,K=r&&!w;y.useEffect(()=>{m.current&&(m.current.playbackRate=h);},[h]),y.useEffect(()=>{E(!!p);},[p]);let J=y.useCallback(ye=>{!i||!m.current||(ye&&K?m.current.play().catch(()=>{}):m.current.pause());},[i,K]);return y.createElement(me,{aspect:d,radius:l,border:s,"aria-label":c,className:u,style:g,onVisibilityChange:i?J:void 0},y.createElement("video",{ref:m,src:e,controls:t,autoPlay:K,loop:o,muted:M,playsInline:true,preload:K?"auto":"metadata",onPlaying:()=>E(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&&k&&y.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")}))});$o.displayName="VideoPlayer";var Bo=y.forwardRef(({src:e,controls:t=false,autoPlay:r=true,loop:o=true,pauseOffscreen:n=true,aspect:i="square",radius:d="lg",border:l=false,poster:s,label:p,className:c,style:u,stateMachines:g,artboard:h,fit:T="contain",stateMachineInputs:f},m)=>{let w=ke(),[k,E]=y.useState(null),[M,K]=y.useState(null);return y.useEffect(()=>{let J=false;return import('@rive-app/react-canvas').then(ye=>{J||E(ye);}).catch(()=>{J||K("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{J=true;}},[]),y.createElement(me,{ref:m,aspect:i,radius:d,border:l,"aria-label":p,className:c,style:u},M?y.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},M):k&&e?y.createElement(hn,{Mod:k,src:e,stateMachines:g,artboard:h,fit:T,stateMachineInputs:f,autoPlay:r&&!w,loop:o,pauseOffscreen:n,controls:t,poster:s}):s&&y.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});Bo.displayName="RivePlayer";function hn({Mod:e,src:t,stateMachines:r,artboard:o,fit:n,autoPlay:i,loop:d,pauseOffscreen:l,controls:s,poster:p}){let{useRive:c,Layout:u,Fit:g,Alignment:h,EventType:T}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:m,RiveComponent:w}=c({src:t,stateMachines:r,artboard:o,autoplay:i,layout:new u({fit:f[n],alignment:h.Center})}),[k,E]=y.useState(i);y.useEffect(()=>{if(!m||!d)return;let K=()=>{m.play();};return m.on(T.Stop,K),()=>{m.off(T.Stop,K);}},[m,d,T]),y.useEffect(()=>{if(!l||!m)return;let K=m.canvas;if(!K)return;let J=new IntersectionObserver(([ye])=>{ye.isIntersecting&&i?m.play():m.pause();},{threshold:.05});return J.observe(K),()=>J.disconnect()},[m,l,i]);let M=()=>{m&&(k?(m.pause(),E(false)):(m.play(),E(true)));};return y.createElement(y.Fragment,null,y.createElement(w,{className:"w-full h-full"}),!m&&p&&y.createElement("img",{src:p,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&y.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")},y.createElement(X,{size:"icon",variant:"secondary",onClick:M},k?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))}var _o=({renderer:e,scene:t,camera:r,preset:o,width:n,height:i})=>{let d=new EffectComposer(e);d.setSize(n,i),d.addPass(new RenderPass(t,r));let l=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let p=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});p.blendMode.opacity.value=0;let c=new VignetteEffect({darkness:0,offset:.5}),u=new ChromaticAberrationEffect({offset:new D.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new D.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,d.addPass(new EffectPass(r,l)),d.addPass(new EffectPass(r,s,p,c)),d.addPass(new EffectPass(r,u)),d.addPass(new EffectPass(r,g));function h(T){let f=T.effects;l.intensity=f.bloom?.intensity??0,l.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(l.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,p.density=f.scanlines?.density??1.25,p.blendMode.opacity.value=f.scanlines?.opacity??0,c.darkness=f.vignette?.darkness??0,c.offset=f.vignette?.offset??.5;let m=f.chromatic?.offset??0;u.offset?.set(m,m),f.glitch?(g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=f.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return h(o),{composer:d,setPreset:h,resize:(T,f)=>d.setSize(T,f),dispose:()=>{d.dispose();}}};var Ae=3e3,zt=400,Cn=80,Ko=({width:e,height:t,palette:r})=>{let o=new D.Scene;o.background=new D.Color(r.background);let n=new D.PerspectiveCamera(70,e/t,.1,zt*2);n.position.z=0;let i=new Float32Array(Ae*6),d=new Float32Array(Ae*6),l=new Float32Array(Ae),s=new D.Color(r.primary),p=new D.Color(r.accent);function c(m,w){let k=Math.random()*Math.PI*2,E=Cn*Math.pow(Math.random(),.6),M=Math.cos(k)*E,K=Math.sin(k)*E,J=w?-Math.random()*zt:-zt;l[m]=J,i[m*6+0]=M,i[m*6+1]=K,i[m*6+2]=J,i[m*6+3]=M,i[m*6+4]=K,i[m*6+5]=J-2,d[m*6+0]=s.r,d[m*6+1]=s.g,d[m*6+2]=s.b,d[m*6+3]=p.r,d[m*6+4]=p.g,d[m*6+5]=p.b;}for(let m=0;m<Ae;m++)c(m,true);let u=new D.BufferGeometry;u.setAttribute("position",new D.BufferAttribute(i,3)),u.setAttribute("color",new D.BufferAttribute(d,3));let g=new D.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:D.AdditiveBlending}),h=new D.LineSegments(u,g);o.add(h);let T=60,f=6;return {scene:o,camera:n,update:(m,w)=>{let k=u.attributes.position.array;for(let E=0;E<Ae;E++){let M=E*6;k[M+2]+=T*w,k[M+5]=k[M+2]-f,k[M+2]>5&&c(E,false);}u.attributes.position.needsUpdate=true;},resize:(m,w)=>{let k=n;k.aspect=m/w,k.updateProjectionMatrix();},setPalette:m=>{o.background=new D.Color(m.background);let w=new D.Color(m.primary),k=new D.Color(m.accent),E=u.attributes.color.array;for(let M=0;M<Ae;M++)E[M*6+0]=w.r,E[M*6+1]=w.g,E[M*6+2]=w.b,E[M*6+3]=k.r,E[M*6+4]=k.g,E[M*6+5]=k.b;u.attributes.color.needsUpdate=true;},dispose:()=>{u.dispose(),g.dispose();}}};var Nn=`
|
|
2
|
+
precision highp float;
|
|
3
|
+
varying vec2 vUv;
|
|
4
|
+
uniform float uTime;
|
|
5
|
+
uniform vec2 uResolution;
|
|
6
|
+
uniform vec3 uBackground;
|
|
7
|
+
uniform vec3 uPrimary;
|
|
8
|
+
uniform vec3 uSecondary;
|
|
9
|
+
uniform vec3 uAccent;
|
|
10
|
+
|
|
11
|
+
// 3-stop palette ramp driven by a scalar in [0,1].
|
|
12
|
+
vec3 palette(float t) {
|
|
13
|
+
t = clamp(t, 0.0, 1.0);
|
|
14
|
+
vec3 lo = mix(uBackground, uSecondary, smoothstep(0.0, 0.5, t));
|
|
15
|
+
vec3 hi = mix(uSecondary, uPrimary, smoothstep(0.5, 1.0, t));
|
|
16
|
+
return mix(lo, hi, step(0.5, t));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
void main() {
|
|
20
|
+
// Normalise to centre-origin coords, preserving aspect.
|
|
21
|
+
vec2 uv = (vUv - 0.5) * (uResolution.xy / min(uResolution.x, uResolution.y)) * 4.0;
|
|
22
|
+
|
|
23
|
+
float t = uTime * 0.35;
|
|
24
|
+
float v = 0.0;
|
|
25
|
+
v += sin(uv.x * 1.2 + t);
|
|
26
|
+
v += sin(uv.y * 1.6 + t * 1.3);
|
|
27
|
+
v += sin((uv.x + uv.y) * 1.1 + t * 0.7);
|
|
28
|
+
v += sin(length(uv) * 2.4 - t * 0.9);
|
|
29
|
+
v = v * 0.125 + 0.5; // remap from [-4,4] \u2192 [0,1]
|
|
30
|
+
|
|
31
|
+
vec3 col = palette(v);
|
|
32
|
+
|
|
33
|
+
// Subtle accent shimmer along diagonal.
|
|
34
|
+
float shimmer = sin((uv.x - uv.y) * 3.0 + uTime * 1.5) * 0.5 + 0.5;
|
|
35
|
+
col = mix(col, uAccent, shimmer * 0.08);
|
|
36
|
+
|
|
37
|
+
gl_FragColor = vec4(col, 1.0);
|
|
38
|
+
}
|
|
39
|
+
`,kn=`
|
|
40
|
+
varying vec2 vUv;
|
|
41
|
+
void main() {
|
|
42
|
+
vUv = uv;
|
|
43
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
44
|
+
}
|
|
45
|
+
`,zo=({width:e,height:t,palette:r})=>{let o=new D.Scene,n=new D.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new D.Vector2(e,t)},uBackground:{value:new D.Color(r.background)},uPrimary:{value:new D.Color(r.primary)},uSecondary:{value:new D.Color(r.secondary)},uAccent:{value:new D.Color(r.accent)}},d=new D.ShaderMaterial({uniforms:i,vertexShader:kn,fragmentShader:Nn,depthTest:false,depthWrite:false}),l=new D.PlaneGeometry(2,2),s=new D.Mesh(l,d);return o.add(s),{scene:o,camera:n,update:c=>{i.uTime.value=c;},resize:(c,u)=>{i.uResolution.value.set(c,u);},setPalette:c=>{i.uBackground.value.set(c.background),i.uPrimary.value.set(c.primary),i.uSecondary.value.set(c.secondary),i.uAccent.value.set(c.accent);},dispose:()=>{l.dispose(),d.dispose();}}};var Mn=`
|
|
46
|
+
varying vec2 vUv;
|
|
47
|
+
void main() {
|
|
48
|
+
vUv = uv;
|
|
49
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
50
|
+
}
|
|
51
|
+
`,En=`
|
|
52
|
+
precision highp float;
|
|
53
|
+
varying vec2 vUv;
|
|
54
|
+
uniform float uTime;
|
|
55
|
+
uniform vec2 uResolution;
|
|
56
|
+
uniform vec3 uBackground;
|
|
57
|
+
uniform vec3 uPrimary;
|
|
58
|
+
uniform vec3 uSecondary;
|
|
59
|
+
uniform vec3 uAccent;
|
|
60
|
+
|
|
61
|
+
// Cheap 2D hash \u2192 vec2 in [0,1].
|
|
62
|
+
vec2 hash2(vec2 p) {
|
|
63
|
+
p = vec2(
|
|
64
|
+
dot(p, vec2(127.1, 311.7)),
|
|
65
|
+
dot(p, vec2(269.5, 183.3))
|
|
66
|
+
);
|
|
67
|
+
return fract(sin(p) * 43758.5453);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void main() {
|
|
71
|
+
vec2 uv = vUv * (uResolution.xy / min(uResolution.x, uResolution.y)) * 6.0;
|
|
72
|
+
|
|
73
|
+
vec2 ipos = floor(uv);
|
|
74
|
+
vec2 fpos = fract(uv);
|
|
75
|
+
|
|
76
|
+
float minDist = 1e9;
|
|
77
|
+
float secondDist = 1e9;
|
|
78
|
+
vec2 closestCell = vec2(0.0);
|
|
79
|
+
|
|
80
|
+
for (int y = -1; y <= 1; y++) {
|
|
81
|
+
for (int x = -1; x <= 1; x++) {
|
|
82
|
+
vec2 neighbour = vec2(float(x), float(y));
|
|
83
|
+
vec2 seed = hash2(ipos + neighbour);
|
|
84
|
+
// Orbit each seed around its cell centre for gentle motion.
|
|
85
|
+
vec2 offset = 0.5 + 0.5 * sin(uTime * 0.5 + seed * 6.283);
|
|
86
|
+
vec2 diff = neighbour + offset - fpos;
|
|
87
|
+
float d = dot(diff, diff);
|
|
88
|
+
if (d < minDist) {
|
|
89
|
+
secondDist = minDist;
|
|
90
|
+
minDist = d;
|
|
91
|
+
closestCell = ipos + neighbour;
|
|
92
|
+
} else if (d < secondDist) {
|
|
93
|
+
secondDist = d;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
float cellShade = hash2(closestCell).x; // per-cell random 0..1
|
|
99
|
+
float edge = sqrt(secondDist) - sqrt(minDist); // 0 at borders, grows inward
|
|
100
|
+
float edgeGlow = 1.0 - smoothstep(0.0, 0.08, edge);
|
|
101
|
+
|
|
102
|
+
vec3 fill = mix(uBackground, uPrimary, cellShade);
|
|
103
|
+
fill = mix(fill, uSecondary, 0.25 * sin(uTime * 0.3 + cellShade * 6.28) + 0.25);
|
|
104
|
+
vec3 col = mix(fill, uAccent, edgeGlow);
|
|
105
|
+
|
|
106
|
+
gl_FragColor = vec4(col, 1.0);
|
|
107
|
+
}
|
|
108
|
+
`,Vo=({width:e,height:t,palette:r})=>{let o=new D.Scene,n=new D.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new D.Vector2(e,t)},uBackground:{value:new D.Color(r.background)},uPrimary:{value:new D.Color(r.primary)},uSecondary:{value:new D.Color(r.secondary)},uAccent:{value:new D.Color(r.accent)}},d=new D.ShaderMaterial({uniforms:i,vertexShader:Mn,fragmentShader:En,depthTest:false,depthWrite:false}),l=new D.PlaneGeometry(2,2),s=new D.Mesh(l,d);return o.add(s),{scene:o,camera:n,update:c=>{i.uTime.value=c;},resize:(c,u)=>{i.uResolution.value.set(c,u);},setPalette:c=>{i.uBackground.value.set(c.background),i.uPrimary.value.set(c.primary),i.uSecondary.value.set(c.secondary),i.uAccent.value.set(c.accent);},dispose:()=>{l.dispose(),d.dispose();}}};var Hn=`
|
|
109
|
+
varying vec2 vUv;
|
|
110
|
+
void main() {
|
|
111
|
+
vUv = uv;
|
|
112
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
113
|
+
}
|
|
114
|
+
`,Ln=`
|
|
115
|
+
precision highp float;
|
|
116
|
+
varying vec2 vUv;
|
|
117
|
+
uniform float uTime;
|
|
118
|
+
uniform vec3 uBackground;
|
|
119
|
+
uniform vec3 uPrimary;
|
|
120
|
+
uniform vec3 uSecondary;
|
|
121
|
+
uniform vec3 uAccent;
|
|
122
|
+
|
|
123
|
+
// Horizon at y = 0.45 (upper band for sky + sun, lower band for grid).
|
|
124
|
+
const float HORIZON = 0.45;
|
|
125
|
+
|
|
126
|
+
// Perspective-projected grid in the lower half.
|
|
127
|
+
// Returns grid intensity in [0,1].
|
|
128
|
+
float grid(vec2 uv) {
|
|
129
|
+
// Perspective: nearer rows get larger spacing. z grows as we go toward horizon.
|
|
130
|
+
float z = 1.0 / max(uv.y, 0.001); // uv.y \u2208 (0, HORIZON]
|
|
131
|
+
vec2 gpos = vec2(uv.x * z, z - uTime * 2.0); // scroll lines toward camera
|
|
132
|
+
|
|
133
|
+
vec2 g = fract(gpos * vec2(1.0, 0.25));
|
|
134
|
+
vec2 lw = fwidth(gpos * vec2(1.0, 0.25)) * 1.5; // anti-aliased line width
|
|
135
|
+
vec2 lines = smoothstep(vec2(0.0), lw, g)
|
|
136
|
+
- smoothstep(1.0 - lw, vec2(1.0), g);
|
|
137
|
+
// "lines" is ~1 between lines, ~0 on a line \u2192 invert.
|
|
138
|
+
float l = 1.0 - min(lines.x, lines.y);
|
|
139
|
+
|
|
140
|
+
// Fade grid as it approaches horizon (z \u2192 \u221E means very far).
|
|
141
|
+
float fade = clamp(1.0 - z * 0.02, 0.0, 1.0);
|
|
142
|
+
return l * fade;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
void main() {
|
|
146
|
+
vec2 uv = vUv - vec2(0.5, HORIZON);
|
|
147
|
+
|
|
148
|
+
vec3 col;
|
|
149
|
+
|
|
150
|
+
if (vUv.y >= HORIZON) {
|
|
151
|
+
// Sky half.
|
|
152
|
+
float skyT = (vUv.y - HORIZON) / (1.0 - HORIZON);
|
|
153
|
+
col = mix(uBackground, uSecondary, skyT);
|
|
154
|
+
|
|
155
|
+
// Sun disc \u2014 centred above horizon with horizontal bands.
|
|
156
|
+
vec2 sunUv = uv;
|
|
157
|
+
sunUv.y -= 0.05;
|
|
158
|
+
float d = length(sunUv * vec2(1.0, 1.2));
|
|
159
|
+
float disc = smoothstep(0.22, 0.21, d);
|
|
160
|
+
// Horizontal bands across the lower half of the sun.
|
|
161
|
+
float bandY = (sunUv.y - 0.05) * 25.0;
|
|
162
|
+
float bands = step(0.0, sin(bandY));
|
|
163
|
+
float bandMask = smoothstep(0.05, -0.05, sunUv.y); // only bands below sun centre
|
|
164
|
+
disc *= mix(1.0, bands, bandMask);
|
|
165
|
+
col = mix(col, uPrimary, disc);
|
|
166
|
+
|
|
167
|
+
// Horizon glow.
|
|
168
|
+
float glow = smoothstep(0.08, 0.0, vUv.y - HORIZON);
|
|
169
|
+
col = mix(col, uAccent, glow * 0.6);
|
|
170
|
+
} else {
|
|
171
|
+
// Ground half.
|
|
172
|
+
float floorUv = HORIZON - vUv.y; // 0 at horizon, grows down
|
|
173
|
+
float g = grid(vec2(uv.x, floorUv));
|
|
174
|
+
vec3 ground = mix(uBackground * 0.3, uBackground * 0.7, floorUv / HORIZON);
|
|
175
|
+
col = mix(ground, uPrimary, g);
|
|
176
|
+
|
|
177
|
+
// Horizon glow bleeding into ground.
|
|
178
|
+
float glow = smoothstep(0.06, 0.0, floorUv);
|
|
179
|
+
col = mix(col, uAccent, glow * 0.8);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
gl_FragColor = vec4(col, 1.0);
|
|
183
|
+
}
|
|
184
|
+
`,Wo=({palette:e})=>{let t=new D.Scene,r=new D.OrthographicCamera(-1,1,1,-1,0,1),o={uTime:{value:0},uBackground:{value:new D.Color(e.background)},uPrimary:{value:new D.Color(e.primary)},uSecondary:{value:new D.Color(e.secondary)},uAccent:{value:new D.Color(e.accent)}},n=new D.ShaderMaterial({uniforms:o,vertexShader:Hn,fragmentShader:Ln,depthTest:false,depthWrite:false}),i=new D.PlaneGeometry(2,2),d=new D.Mesh(i,n);return t.add(d),{scene:t,camera:r,update:s=>{o.uTime.value=s;},setPalette:s=>{o.uBackground.value.set(s.background),o.uPrimary.value.set(s.primary),o.uSecondary.value.set(s.secondary),o.uAccent.value.set(s.accent);},dispose:()=>{i.dispose(),n.dispose();}}};var Ye={space:Ko,plasma:zo,voronoi:Vo,synthwave:Wo},Xe=[{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"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],Ze=Object.fromEntries(Xe.map(e=>[e.id,e]));var Je={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}}}},vt="vhs";var jo=`
|
|
185
|
+
precision highp float;
|
|
186
|
+
varying vec2 vUv;
|
|
187
|
+
uniform float uTime;
|
|
188
|
+
uniform vec2 uResolution;
|
|
189
|
+
uniform vec2 uMouse;
|
|
190
|
+
uniform vec3 uPrimary;
|
|
191
|
+
uniform vec3 uSecondary;
|
|
192
|
+
uniform vec3 uAccent;
|
|
193
|
+
uniform vec3 uBackground;
|
|
194
|
+
`,Dn=`
|
|
195
|
+
varying vec2 vUv;
|
|
196
|
+
void main() {
|
|
197
|
+
vUv = uv;
|
|
198
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
199
|
+
}
|
|
200
|
+
`,Fe=class extends Error{log;source;constructor(t,r){super(`Fragment shader failed to compile:
|
|
201
|
+
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=r;}};function In(e,t){let r=e.getContext(),o=r.createShader(r.FRAGMENT_SHADER);if(!o)throw new Error("Unable to allocate fragment shader");r.shaderSource(o,t),r.compileShader(o);let n=r.getShaderParameter(o,r.COMPILE_STATUS),i=r.getShaderInfoLog(o)||"";if(r.deleteShader(o),!n)throw new Fe(i,t)}function Vt(e){return ({renderer:t,width:r,height:o,palette:n})=>{let i=`${jo}
|
|
202
|
+
${e}`;In(t,i);let d=new D.Scene,l=new D.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new D.Vector2(r,o)},uMouse:{value:new D.Vector2(.5,.5)},uPrimary:{value:new D.Color(n.primary)},uSecondary:{value:new D.Color(n.secondary)},uAccent:{value:new D.Color(n.accent)},uBackground:{value:new D.Color(n.background)}},p=new D.ShaderMaterial({uniforms:s,vertexShader:Dn,fragmentShader:i,depthTest:false,depthWrite:false}),c=new D.PlaneGeometry(2,2),u=new D.Mesh(c,p);return d.add(u),{scene:d,camera:l,update:h=>{s.uTime.value=h;},resize:(h,T)=>{s.uResolution.value.set(h,T);},setPalette:h=>{s.uPrimary.value.set(h.primary),s.uSecondary.value.set(h.secondary),s.uAccent.value.set(h.accent),s.uBackground.value.set(h.background);},setMouse:(h,T)=>{s.uMouse.value.set(h,T);},dispose:()=>{c.dispose(),p.dispose();}}}}var On={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},bt=y.forwardRef(({preset:e,fragmentShader:t,onShaderError:r,postPreset:o,palette:n,createScene:i,controls:d=false,autoPlay:l=true,pauseOffscreen:s=true,aspect:p="video",radius:c="lg",border:u=false,poster:g,label:h,className:T,style:f,maxDpr:m},w)=>{let k=y.useRef(null),[E,M]=y.useState(l),[K,J]=y.useState(false),ye=ke(),at=y.useMemo(()=>({...On,...n}),[n]),kt=y.useMemo(()=>i||(t?Vt(t):e&&Ye[e]?Ye[e]:null),[i,t,e]),ar=y.useMemo(()=>{if(o)return o;if(e){let O=Ze[e];if(O?.defaultPostPreset)return O.defaultPostPreset}return vt},[o,e]);y.useEffect(()=>{let O=k.current;if(!O||!kt)return;let nt=O.clientWidth||1,it=O.clientHeight||1,G=new D.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),sa=m??Math.min(window.devicePixelRatio||1,2);G.setPixelRatio(sa),G.setSize(nt,it),G.setClearColor(new D.Color(at.background),1),G.domElement.dataset.gdsPart="shader-canvas",G.domElement.style.width="100%",G.domElement.style.height="100%",G.domElement.style.display="block",O.appendChild(G.domElement);let fe;try{fe=kt({renderer:G,width:nt,height:it,palette:at});}catch($){if($ instanceof Fe)r?.($),fe=Ye.space({renderer:G,width:nt,height:it,palette:at});else throw G.dispose(),G.domElement.parentElement===O&&O.removeChild(G.domElement),$}let da=Je[ar]??Je[vt],st=_o({renderer:G,scene:fe.scene,camera:fe.camera,preset:da,width:nt,height:it}),nr=new D.Clock,ir=0,$e=l&&!ye,sr=true,dr=()=>{if(ir=requestAnimationFrame(dr),!$e||s&&!sr)return;let $=nr.getDelta(),te=nr.getElapsedTime();fe.update?.(te,$),st.composer.render($);};dr(),$e&&J(true);let cr=new ResizeObserver(([$])=>{let te=Math.max(1,Math.floor($.contentRect.width)),Be=Math.max(1,Math.floor($.contentRect.height));G.setSize(te,Be),st.resize(te,Be),fe.resize?.(te,Be);});cr.observe(O);let lr=new IntersectionObserver(([$])=>{sr=$.isIntersecting;},{threshold:.05});lr.observe(O);let pr=fe,dt=pr.setMouse?$=>{let te=O.getBoundingClientRect(),Be=($.clientX-te.left)/te.width,ca=1-($.clientY-te.top)/te.height;pr.setMouse(Be,ca);}:null;return dt&&O.addEventListener("pointermove",dt),Mt.current={toggle:()=>{$e=!$e,M($e);},setPalette:$=>{G.setClearColor(new D.Color($.background),1),fe.setPalette?.($);},setPostPreset:$=>{let te=Je[$];te&&st.setPreset(te);}},()=>{cancelAnimationFrame(ir),cr.disconnect(),lr.disconnect(),dt&&O.removeEventListener("pointermove",dt),st.dispose(),fe.dispose?.(),G.dispose(),G.domElement.parentElement===O&&O.removeChild(G.domElement),Mt.current=null;}},[kt,ar,at,l,ye,s,m,r]);let Mt=y.useRef(null),ia=()=>Mt.current?.toggle();return y.createElement(me,{ref:O=>{k.current=O,typeof w=="function"?w(O):w&&(w.current=O);},aspect:p,radius:c,border:u,"aria-label":h,className:T,style:f,"data-gds-part":"three-scene"},!K&&g&&y.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&y.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")},y.createElement(X,{size:"icon",variant:"secondary",onClick:ia},E?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))});bt.displayName="ThreeScene";var xt=y.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:n,aspect:i="video",radius:d="lg",label:l,hideLabel:s=false,onClick:p},c)=>{let u=Ze[e],[g,h]=y.useState(false),T=t==="always"||t==="hover"&&g;return y.createElement("div",{ref:c,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),onClick:p,className:a("group cursor-pointer flex flex-col gap-2",n)},T?y.createElement(bt,{preset:e,postPreset:r,palette:o,aspect:i,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):y.createElement(me,{aspect:i,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?y.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):y.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!s&&y.createElement("div",{className:"flex items-baseline justify-between text-xs"},y.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},l??u?.label??e),u?.tags?.[0]&&y.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});xt.displayName="ShaderPresetPreview";function $n({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:d=3,className:l}){let s=y.useMemo(()=>r?.length?Xe.filter(c=>r.some(u=>c.tags.includes(u))):Xe,[r]);return y.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:a("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",l)},s.map(c=>{let u=e===c.id;return y.createElement("div",{key:c.id,className:"relative",role:"radio","aria-checked":u},y.createElement(xt,{preset:c.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(c.id),className:a("transition-all",u&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),u&&y.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"},y.createElement(Check,{className:"h-3.5 w-3.5"})))}))}function Kn({children:e}){let t=useRef(null);return useEffect(()=>{let r=new _n({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 we=[50,100,200,300,400,500,600,700,800,900,950],qo=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],zn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Rt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<we.length;n++){let i=qo[n],d=zn[n]*t;o[we[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function Yo(){let e={};for(let t=0;t<we.length;t++){let r=qo[t];e[we[t]]=`${r.toFixed(4)} 0 0`;}return e}var Wt={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"}},Qe="1 0 0",Xo="0 0 0";function Oe(e,t){let[,r,o]=e.split(/\s+/).map(c=>c.trim()),n=Number(r),i=o;if(t==="light"){let u=Math.min(n*.22,.045),g=.38,h=n;return {soft:`${.965.toFixed(3)} ${u.toFixed(3)} ${i}`,deep:`${g.toFixed(3)} ${h.toFixed(3)} ${i}`}}let d=.22,l=Math.min(n*.45,.075),s=.82,p=n*.9;return {soft:`${d.toFixed(3)} ${l.toFixed(3)} ${i}`,deep:`${s.toFixed(3)} ${p.toFixed(3)} ${i}`}}var Tt={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 Vn=["superLight","light","dark","superDark"],Wn={muted:.6,default:1,vibrant:1.3};function jn(e,t,r){let o=t.primary*r,n=t.accent*r,i=(o+n)/2*.8,d=l=>(l%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${d(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 v=e=>({source:"neutral",step:e}),ie=e=>({source:"primary",step:e}),Pe=e=>({source:"accent",step:e}),et=e=>({source:"pure",value:e}),qn={superLight:{background:v(50),foreground:v(800),card:et(Qe),cardForeground:v(800),popover:et(Qe),popoverForeground:v(800),primary:ie(600),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Pe(600),accentForeground:Pe(50),border:v(200),input:v(200),ring:ie(500)},light:{background:v(50),foreground:v(950),card:et(Qe),cardForeground:v(950),popover:et(Qe),popoverForeground:v(950),primary:ie(500),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Pe(500),accentForeground:Pe(50),border:v(200),input:v(200),ring:ie(500)},dark:{background:v(950),foreground:v(50),card:v(900),cardForeground:v(50),popover:v(900),popoverForeground:v(50),primary:ie(400),primaryForeground:ie(950),secondary:v(800),secondaryForeground:v(200),muted:v(800),mutedForeground:v(400),accent:Pe(400),accentForeground:Pe(950),border:v(800),input:v(800),ring:ie(400)},superDark:{background:et(Xo),foreground:v(100),card:v(950),cardForeground:v(100),popover:v(950),popoverForeground:v(100),primary:ie(300),primaryForeground:ie(950),secondary:v(900),secondaryForeground:v(300),muted:v(900),mutedForeground:v(500),accent:Pe(300),accentForeground:Pe(950),border:v(900),input:v(900),ring:ie(300)}};function Y(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Yn(e,t){let r=qn[t],o=t==="superLight"||t==="light",n=o?Wt.light:Wt.dark;return {background:Y(r.background,e),foreground:Y(r.foreground,e),card:Y(r.card,e),cardForeground:Y(r.cardForeground,e),popover:Y(r.popover,e),popoverForeground:Y(r.popoverForeground,e),primary:Y(r.primary,e),primaryForeground:Y(r.primaryForeground,e),secondary:Y(r.secondary,e),secondaryForeground:Y(r.secondaryForeground,e),muted:Y(r.muted,e),mutedForeground:Y(r.mutedForeground,e),accent:Y(r.accent,e),accentForeground:Y(r.accentForeground,e),border:Y(r.border,e),input:Y(r.input,e),ring:Y(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",d=Oe(n.destructive,i),l=Oe(n.success,i),s=Oe(n.warning,i),p=Oe(n.info,i),c=Oe(n.highlight,i);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:l.soft,successDeep:l.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:c.soft,highlightDeep:c.deep}})()}}var he={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Xn={compact:.85,default:1,spacious:1.18};function Zn(e){let t=Xn[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:Tt[e.body],fontMono:Tt[e.mono],fontDisplay:Tt[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(he.display),h1:r(he.h1),h2:r(he.h2),h3:r(he.h3),h4:r(he.h4),h5:r(he.h5),h6:r(he.h6),body:r(he.body),bodySm:r(he.bodySm)}}}var Jn={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Qn(e){let t=Jn[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 ei={tight:.85,default:1,roomy:1.2};function ti(e){return {baseUnit:"1rem",densityFactor:ei[e.density]}}var ri={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 oi(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:ri[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Ee(e){let t=Wn[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,d=r?Yo():Rt({hue:e.hues.neutral,chromaScale:o}),l=Rt({hue:e.hues.primary,chromaScale:n}),s=Rt({hue:e.hues.accent,chromaScale:i}),p={neutral:d,primary:l,accent:s},c=jn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Vn.map(w=>[w,Yn(p,w)])),g=Zn(e.typography),h=Qn(e.radius),T=ti(e.spacing),f=oi(e.effects),m={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:c,typography:g,radius:h,spacing:T,effects:f,components:m}}var tt={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"}},jt={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"}},wt=[tt,jt];function ai(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 Yt(e,t){let r=e.colors[t];return {...ai(r),...qt("neutral",e.ramps.neutral),...qt("primary",e.ramps.primary),...qt("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 qt(e,t){let r={};for(let o of we)r[`--ramp-${e}-${o}`]=t[o];return r}function Pt(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Yt(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 rt(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,d]=o.slice(0,3).map(Number);return "#"+[n,i,d].map(l=>Math.max(0,Math.min(255,l)).toString(16).padStart(2,"0")).join("").toUpperCase()}function ni(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)}`,d=rt(e);return {oklch:i,hex:d}}function Xt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of we){let{oklch:i,hex:d}=ni(t[n]);o.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
203
|
+
`)}function Zo(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let n=rt(o.light)||"\u2014",i=rt(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${n}\` (\`${o.light}\`) | \`${i}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
204
|
+
`)}function Jo(e){return JSON.stringify(e.input,null,2)}function Qo(e){let{input:t,ramps:r,colors:o,chart:n,typography:i,radius:d,spacing:l,effects:s,components:p}=e,c=t.intensity??"default",u=f=>({token:f,usage:ii[f]??"",light:o.light[f],dark:o.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(u),h=["destructive","destructiveForeground","success","warning","info","highlight"].map(u),T=[1,2,3,4,5].map(f=>{let m=n[f];return {slot:f,triplet:m,hex:rt(m)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
4
205
|
|
|
5
206
|
> **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
207
|
|
|
@@ -10,11 +211,11 @@ import*as p from'react';import {useRef,useEffect}from'react';import*as O from'@r
|
|
|
10
211
|
- **ID**: \`${t.id}\`
|
|
11
212
|
${t.description?`- **Description**: ${t.description}
|
|
12
213
|
`:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
|
|
13
|
-
- **Intensity**: \`${
|
|
214
|
+
- **Intensity**: \`${c}\` ${c==="muted"?"(quieter chroma across the board)":c==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
|
|
14
215
|
- **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
|
|
15
216
|
- **Spacing density**: \`${t.spacing.density}\`
|
|
16
217
|
- **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
|
|
17
|
-
- **Button shape**: \`${
|
|
218
|
+
- **Button shape**: \`${p.buttonShape}\` \xB7 **Input style**: \`${p.inputStyle}\` \xB7 **Card style**: \`${p.cardStyle}\`
|
|
18
219
|
- **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
|
|
19
220
|
|
|
20
221
|
## How themes work
|
|
@@ -30,30 +231,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
|
|
|
30
231
|
## Full ThemeInput (round-trippable)
|
|
31
232
|
|
|
32
233
|
\`\`\`json
|
|
33
|
-
${
|
|
234
|
+
${Jo(e)}
|
|
34
235
|
\`\`\`
|
|
35
236
|
|
|
36
237
|
## Color ramps
|
|
37
238
|
|
|
38
239
|
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
240
|
|
|
40
|
-
${
|
|
241
|
+
${Xt("Neutral",r.neutral,t.hues.neutral)}
|
|
41
242
|
|
|
42
|
-
${
|
|
243
|
+
${Xt("Primary",r.primary,t.hues.primary)}
|
|
43
244
|
|
|
44
|
-
${
|
|
245
|
+
${Xt("Accent",r.accent,t.hues.accent)}
|
|
45
246
|
|
|
46
247
|
## Semantic tokens (hue-derived)
|
|
47
248
|
|
|
48
249
|
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
250
|
|
|
50
|
-
${
|
|
251
|
+
${Zo("Core semantic tokens",g)}
|
|
51
252
|
|
|
52
253
|
## Fixed semantic tokens (not hue-derived)
|
|
53
254
|
|
|
54
255
|
Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
|
|
55
256
|
|
|
56
|
-
${
|
|
257
|
+
${Zo("Status colors",h)}
|
|
57
258
|
|
|
58
259
|
## Chart palette
|
|
59
260
|
|
|
@@ -61,7 +262,7 @@ ${Kr("Status colors",I)}
|
|
|
61
262
|
|
|
62
263
|
| Slot | OKLCH | Hex |
|
|
63
264
|
|------|-------|-----|
|
|
64
|
-
${
|
|
265
|
+
${T.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
|
|
65
266
|
`)}
|
|
66
267
|
|
|
67
268
|
## Typography
|
|
@@ -103,8 +304,8 @@ ${re.map(l=>`| \`--chart-${l.slot}\` | \`${l.triplet}\` | \`${l.hex}\` |`).join(
|
|
|
103
304
|
|
|
104
305
|
### Spacing
|
|
105
306
|
|
|
106
|
-
- **Density factor**: \`${
|
|
107
|
-
- **Base unit**: \`${
|
|
307
|
+
- **Density factor**: \`${l.densityFactor}\` (applied as \`var(--rds-density)\` on components that opt in)
|
|
308
|
+
- **Base unit**: \`${l.baseUnit}\`
|
|
108
309
|
|
|
109
310
|
### Motion
|
|
110
311
|
|
|
@@ -132,8 +333,8 @@ Every color is stored as a bare \`L C H\` OKLCH triplet and wrapped at call time
|
|
|
132
333
|
|
|
133
334
|
\`\`\`css
|
|
134
335
|
:root {
|
|
135
|
-
--primary: ${
|
|
136
|
-
--background: ${
|
|
336
|
+
--primary: ${o.light.primary};
|
|
337
|
+
--background: ${o.light.background};
|
|
137
338
|
}
|
|
138
339
|
\`\`\`
|
|
139
340
|
|
|
@@ -182,7 +383,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
|
|
|
182
383
|
|
|
183
384
|
When generating UI in the ${e.name} theme, match this character:
|
|
184
385
|
|
|
185
|
-
${
|
|
386
|
+
${si(e)}
|
|
186
387
|
|
|
187
388
|
## Instructions for the generating LLM
|
|
188
389
|
|
|
@@ -201,7 +402,7 @@ To recreate this theme in code:
|
|
|
201
402
|
\`\`\`ts
|
|
202
403
|
import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
|
|
203
404
|
|
|
204
|
-
const input: ThemeInput = ${
|
|
405
|
+
const input: ThemeInput = ${Jo(e).replace(/\n/g,`
|
|
205
406
|
`)};
|
|
206
407
|
|
|
207
408
|
const theme = generateTheme(input);
|
|
@@ -210,11 +411,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
210
411
|
|
|
211
412
|
---
|
|
212
413
|
*Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
|
|
213
|
-
`}var
|
|
214
|
-
`)}function
|
|
414
|
+
`}var ii={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 si(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(`
|
|
415
|
+
`)}function Zt(e){if(typeof window>"u"||typeof document>"u")return;let t=Qo(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 ue=Object.fromEntries(wt.map(e=>[e.id,Ee(e)])),Ge=tt.id;function He(e){if(e in ue)return ue[e];let t=Qt(e);if(t)return Ee(t)}function Jt(){return [...Object.values(ue),...ra()]}var ea="ramp-user-themes";function St(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(ea);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function ta(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(ea,JSON.stringify(e));}catch{}}function ra(){return Object.values(St()).map(Ee)}function Qt(e){return St()[e]}function Ct(e){let t=St();return t[e.id]=e,ta(t),Ee(e)}function er(e){if(e in ue)return;let t=St();delete t[e],ta(t);}function di(e,t,r){let o=ue[e]?.input??Qt(e);if(!o)return;let n={...o,id:t,name:r};return Ct(n),n}var tr="ramp-theme",Nt="ramp-mode",aa=["superLight","light","dark","superDark"],oa=new Set(["dark","superDark"]),ci=`
|
|
215
416
|
(function() {
|
|
216
417
|
try {
|
|
217
|
-
var mode = localStorage.getItem('${
|
|
418
|
+
var mode = localStorage.getItem('${Nt}');
|
|
218
419
|
var valid = ['superLight','light','dark','superDark'];
|
|
219
420
|
if (!mode || valid.indexOf(mode) === -1) {
|
|
220
421
|
mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
@@ -223,9 +424,9 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
223
424
|
document.documentElement.classList.add('dark');
|
|
224
425
|
}
|
|
225
426
|
document.documentElement.setAttribute('data-mode', mode);
|
|
226
|
-
var themeId = localStorage.getItem('${
|
|
427
|
+
var themeId = localStorage.getItem('${tr}');
|
|
227
428
|
if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);
|
|
228
429
|
} catch(e) {}
|
|
229
430
|
})();
|
|
230
|
-
`,
|
|
431
|
+
`,rr=y.createContext(null);function li({children:e,defaultTheme:t=Ge,defaultMode:r="light"}){let[o,n]=y.useState(t),[i,d]=y.useState(r),[l,s]=y.useState(0);y.useEffect(()=>{try{let f=localStorage.getItem(tr);f&&He(f)&&n(f);let m=localStorage.getItem(Nt);if(m&&aa.includes(m))d(m);else if(typeof window<"u"){let w=window.matchMedia("(prefers-color-scheme: dark)").matches;d(w?"dark":"light");}}catch{}},[]),y.useEffect(()=>{let f=He(o)??He(Ge);f&&(Pt(f,i),typeof document<"u"&&document.documentElement.classList.toggle("dark",oa.has(i)));},[o,i,l]),y.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),m=w=>{try{if(localStorage.getItem(Nt))return}catch{return}d(w.matches?"dark":"light");};return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[]);let p=y.useCallback(f=>{n(f);try{localStorage.setItem(tr,f);}catch{}},[]),c=y.useCallback(f=>{d(f);try{localStorage.setItem(Nt,f);}catch{}},[]),u=y.useCallback(f=>{Ct(f),s(m=>m+1),p(f.id);},[p]),g=y.useCallback(f=>{f in ue||(er(f),s(m=>m+1),n(m=>m===f?Ge:m));},[]),h=y.useCallback(()=>{s(f=>f+1);},[]),T=y.useMemo(()=>{let f=He(o)??He(Ge);return {theme:f,themeId:f.id,mode:i,isDark:oa.has(i),setThemeId:p,setMode:c,themes:Jt(),saveAndActivate:u,deleteTheme:g,refresh:h}},[o,i,l,p,c,u,g,h]);return y.createElement(rr.Provider,{value:T},e)}function or(){let e=y.useContext(rr);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function ot(){return y.useContext(rr)}function gi({className:e}){let t=ot();if(!t)return null;let{theme:r,themes:o,setThemeId:n,deleteTheme:i}=t;return y.createElement(De,null,y.createElement(Ie,{asChild:true},y.createElement(X,{variant:"ghost",size:"sm",className:a("gap-2",e),"aria-label":"Switch theme"},y.createElement(Palette,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},r.name))),y.createElement(Ce,{className:"w-80 p-2",align:"end"},y.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},y.createElement("div",null,y.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),y.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),y.createElement("button",{type:"button",onClick:()=>Zt(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"},y.createElement(Download,{className:"h-3 w-3"}),".md")),y.createElement("div",{className:"flex flex-col gap-0.5"},o.map(d=>{let l=d.id===r.id,s=d.id in ue,p=d.ramps.primary[500],c=d.ramps.accent[500],u=d.ramps.neutral[500];return y.createElement("div",{key:d.id,className:a("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",l&&"bg-muted")},y.createElement("button",{type:"button",onClick:()=>n(d.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},y.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${u})`},"aria-hidden":true})),y.createElement("div",{className:"min-w-0 flex-1"},y.createElement("div",{className:"flex items-center gap-2"},y.createElement("span",{className:"text-sm font-medium truncate text-foreground"},d.name),d.tagline&&y.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},d.tagline)),d.description&&y.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},d.description))),l&&y.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!l&&y.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),i(d.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 ${d.name}`},y.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var na=[{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 xi({className:e,variant:t="icons"}){let r=ot();if(!r)return null;let{mode:o,setMode:n}=r;return t==="labeled"?y.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)},na.map(({mode:i,label:d,icon:l})=>{let s=o===i;return y.createElement("button",{key:i,type:"button",role:"radio","aria-checked":s,onClick:()=>n(i),className:a("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},y.createElement(l,{className:"h-4 w-4"}),y.createElement("span",null,d))})):y.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)},na.map(({mode:i,icon:d,tooltip:l})=>{let s=o===i;return y.createElement("button",{key:i,type:"button",role:"radio","aria-checked":s,"aria-label":l,title:l,onClick:()=>n(i),className:a("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},y.createElement(d,{className:"h-3.5 w-3.5"}))}))}function wi(){let{isDark:e,setMode:t}=or();return React.createElement(X,{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{aa as ALL_MODES,ua as Accordion,fr as AccordionContent,mr as AccordionItem,ur as AccordionTrigger,gr as Alert,yr as AlertDescription,hr as AlertTitle,wt as BUILT_IN_INPUTS,ya as Badge,X as Button,lt as Calendar,Rr as CalendarDayButton,Tr as Card,Cr as CardContent,Sr as CardDescription,Nr as CardFooter,wr as CardHeader,Pr as CardTitle,kr as Checkbox,ka as DatePicker,Ma as DateRangePicker,Ha as Dialog,Da as DialogClose,Hr as DialogContent,Ar as DialogDescription,Dr as DialogFooter,Lr as DialogHeader,Et as DialogOverlay,Er as DialogPortal,Ir as DialogTitle,La as DialogTrigger,Oa as DropdownMenu,Br as DropdownMenuCheckboxItem,Gr as DropdownMenuContent,$a as DropdownMenuGroup,$r as DropdownMenuItem,_r as DropdownMenuLabel,Ba as DropdownMenuPortal,_a as DropdownMenuRadioGroup,Ur as DropdownMenuRadioItem,Kr as DropdownMenuSeparator,zr as DropdownMenuShortcut,Ua as DropdownMenuSub,Or as DropdownMenuSubContent,Fr as DropdownMenuSubTrigger,Ga as DropdownMenuTrigger,jo as FRAGMENT_HEADER,ci as GRADE_PRE_HYDRATION_SCRIPT,xi as GradeModeSwitcher,li as GradeThemeProvider,gi as GradeThemeSwitcher,Vr as Input,Wr as Label,Kn as LenisProvider,me as MediaSurface,De as Popover,Sa as PopoverAnchor,Ce as PopoverContent,Ie as PopoverTrigger,jr as Progress,qr as RadioGroup,Yr as RadioGroupItem,Bo as RivePlayer,Xr as ScrollArea,Lt as ScrollBar,qa as Select,Qr as SelectContent,Ya as SelectGroup,to as SelectItem,eo as SelectLabel,It as SelectScrollDownButton,Dt as SelectScrollUpButton,ro as SelectSeparator,Jr as SelectTrigger,Xa as SelectValue,oo as Separator,Fe as ShaderCompileError,$n as ShaderPresetPicker,xt as ShaderPresetPreview,Qa as Sheet,tn as SheetClose,no as SheetContent,lo as SheetDescription,so as SheetFooter,io as SheetHeader,Ft as SheetOverlay,ao as SheetPortal,co as SheetTitle,en as SheetTrigger,ko as SideMenu,Do as SimpleTabs,Go as SimpleTabsContent,Fo as SimpleTabsList,Io as SimpleTabsPanel,Ao as SimpleTabsRoot,Oo as SimpleTabsTrigger,on as Skeleton,po as Slider,mo as Switch,uo as Table,go as TableBody,xo as TableCaption,bo as TableCell,ho as TableFooter,vo as TableHead,fo as TableHeader,yo as TableRow,an as Tabs,wo as TabsContent,Ro as TabsList,To as TabsTrigger,Po as Textarea,wi as ThemeToggle,bt as ThreeScene,Gt as Tooltip,ht as TooltipContent,Ot as TooltipProvider,$t as TooltipTrigger,Mo as TopMenu,Eo as TopMenuUser,Ho as TopMenuUserItem,Lo as TopMenuUserSection,$o as VideoPlayer,Pt as applyThemeToRoot,br as badgeVariants,Vt as buildFragmentShaderScene,ue as builtInThemes,Ue as buttonVariants,tt as calmInput,a as cn,vt as defaultPostPreset,Ge as defaultThemeId,er as deleteUserTheme,di as duplicateTheme,jt as energyInput,Ee as generateTheme,He as getTheme,Jt as listThemes,ra as listUserThemes,Qt as loadUserThemeInput,Je as postPresets,Ct as saveUserTheme,Ye as sceneRegistry,Ze as shaderPresetById,Xe as shaderPresets,Yt as themeToCSSVars,or as useGradeTheme,ot as useMaybeGradeTheme,ke as usePrefersReducedMotion};//# sourceMappingURL=index.mjs.map
|
|
231
432
|
//# sourceMappingURL=index.mjs.map
|