@gradeui/ui 0.4.0 → 0.5.1
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 +55 -3
- package/dist/index.d.ts +55 -3
- package/dist/index.js +237 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +237 -36
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,207 @@
|
|
|
1
|
-
'use strict';var h=require('react'),Z=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),reactDayPicker=require('react-day-picker'),Fe=require('@radix-ui/react-checkbox'),dateFns=require('date-fns'),oe=require('@radix-ui/react-popover'),I=require('@radix-ui/react-dialog'),v=require('@radix-ui/react-dropdown-menu'),Pt=require('@radix-ui/react-label'),Ge=require('@radix-ui/react-progress'),ge=require('@radix-ui/react-radio-group'),ee=require('@radix-ui/react-scroll-area'),x=require('@radix-ui/react-select'),Nt=require('@radix-ui/react-separator'),ce=require('@radix-ui/react-slider'),Ke=require('@radix-ui/react-switch'),ae=require('@radix-ui/react-tabs'),ne=require('@radix-ui/react-tooltip'),H=require('three'),postprocessing=require('postprocessing'),vn=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var h__namespace=/*#__PURE__*/_interopNamespace(h);var Z__namespace=/*#__PURE__*/_interopNamespace(Z);var Fe__namespace=/*#__PURE__*/_interopNamespace(Fe);var oe__namespace=/*#__PURE__*/_interopNamespace(oe);var I__namespace=/*#__PURE__*/_interopNamespace(I);var v__namespace=/*#__PURE__*/_interopNamespace(v);var Pt__namespace=/*#__PURE__*/_interopNamespace(Pt);var Ge__namespace=/*#__PURE__*/_interopNamespace(Ge);var ge__namespace=/*#__PURE__*/_interopNamespace(ge);var ee__namespace=/*#__PURE__*/_interopNamespace(ee);var x__namespace=/*#__PURE__*/_interopNamespace(x);var Nt__namespace=/*#__PURE__*/_interopNamespace(Nt);var ce__namespace=/*#__PURE__*/_interopNamespace(ce);var Ke__namespace=/*#__PURE__*/_interopNamespace(Ke);var ae__namespace=/*#__PURE__*/_interopNamespace(ae);var ne__namespace=/*#__PURE__*/_interopNamespace(ne);var H__namespace=/*#__PURE__*/_interopNamespace(H);var vn__default=/*#__PURE__*/_interopDefault(vn);function a(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Qo=Z__namespace.Root,rr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(Z__namespace.Item,{ref:r,className:a("border-b",e),...t}));rr.displayName="AccordionItem";var or=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(Z__namespace.Header,{className:"flex"},h__namespace.createElement(Z__namespace.Trigger,{ref:o,className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r},t,h__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));or.displayName=Z__namespace.Trigger.displayName;var ar=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(Z__namespace.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},h__namespace.createElement("div",{className:a("pb-4 pt-0",e)},t)));ar.displayName=Z__namespace.Content.displayName;var ea=classVarianceAuthority.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep",highlight:"border-highlight/30 bg-highlight-soft text-foreground [&>svg]:text-highlight-deep"}},defaultVariants:{variant:"default"}}),nr=h__namespace.forwardRef(({className:e,variant:t,...r},o)=>h__namespace.createElement("div",{ref:o,role:"alert",className:a(ea({variant:t}),e),...r}));nr.displayName="Alert";var ir=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));ir.displayName="AlertTitle";var sr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));sr.displayName="AlertDescription";var lr=classVarianceAuthority.cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-rds-yellow-400 text-rds-gray-900 shadow hover:bg-rds-yellow-500",success:"border-transparent bg-rds-green-500 text-rds-gray-900 shadow hover:bg-rds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-rds-green-500/20 bg-rds-green-500/10 text-rds-green-600 dark:text-rds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-rds-yellow-500/20 bg-rds-yellow-400/10 text-rds-yellow-600 dark:text-rds-yellow-400","success-outline":"border-rds-green-500/50 bg-transparent text-rds-green-600 dark:text-rds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function ra({className:e,variant:t,rounded:r,...o}){return h__namespace.createElement("div",{className:a(lr({variant:t,rounded:r}),e),...o})}var Ae=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),j=h__namespace.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...n},i)=>h__namespace.createElement(o?reactSlot.Slot:"button",{className:a("rds-button",Ae({variant:t,size:r,className:e})),ref:i,...n}));j.displayName="Button";function Ze({className:e,classNames:t,showOutsideDays:r=true,captionLayout:o="label",buttonVariant:n="ghost",formatters:i,components:s,...m}){let d=reactDayPicker.getDefaultClassNames();return h__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:r,className:a("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:o,formatters:{formatMonthDropdown:p=>p.toLocaleString("default",{month:"short"}),...i},classNames:{root:a("w-fit",d.root),months:a("relative flex flex-col gap-4 md:flex-row",d.months),month:a("flex w-full flex-col gap-4",d.month),nav:a("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",d.nav),button_previous:a(Ae({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_previous),button_next:a(Ae({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_next),month_caption:a("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",d.month_caption),dropdowns:a("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",d.dropdowns),dropdown_root:a("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",d.dropdown_root),dropdown:a("bg-popover absolute inset-0 opacity-0",d.dropdown),caption_label:a("select-none font-medium",o==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",d.caption_label),table:"w-full border-collapse",weekdays:a("flex",d.weekdays),weekday:a("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",d.weekday),week:a("mt-2 flex w-full",d.week),week_number_header:a("w-[--cell-size] select-none",d.week_number_header),week_number:a("text-muted-foreground select-none text-[0.8rem]",d.week_number),day:a("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",d.day),range_start:a("bg-accent rounded-l-md",d.range_start),range_middle:a("rounded-none",d.range_middle),range_end:a("bg-accent rounded-r-md",d.range_end),today:a("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",d.today),outside:a("text-muted-foreground aria-selected:text-muted-foreground",d.outside),disabled:a("text-muted-foreground opacity-50",d.disabled),hidden:a("invisible",d.hidden),...t},components:{Root:({className:p,rootRef:f,...u})=>h__namespace.createElement("div",{"data-slot":"calendar",ref:f,className:a(p),...u}),Chevron:({className:p,orientation:f,...u})=>f==="left"?h__namespace.createElement(lucideReact.ChevronLeftIcon,{className:a("size-4",p),...u}):f==="right"?h__namespace.createElement(lucideReact.ChevronRightIcon,{className:a("size-4",p),...u}):h__namespace.createElement(lucideReact.ChevronDownIcon,{className:a("size-4",p),...u}),DayButton:pr,WeekNumber:({children:p,...f})=>h__namespace.createElement("td",{...f},h__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},p)),...s},...m})}function pr({className:e,day:t,modifiers:r,...o}){let n=reactDayPicker.getDefaultClassNames(),i=h__namespace.useRef(null);return h__namespace.useEffect(()=>{r.focused&&i.current?.focus();},[r.focused]),h__namespace.createElement(j,{ref:i,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:a("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...o})}var mr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));mr.displayName="Card";var ur=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("flex flex-col space-y-1.5 p-6",e),...t}));ur.displayName="CardHeader";var fr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("font-semibold leading-none tracking-tight",e),...t}));fr.displayName="CardTitle";var gr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var hr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("p-6 pt-0",e),...t}));hr.displayName="CardContent";var yr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{ref:r,className:a("flex items-center p-6 pt-0",e),...t}));yr.displayName="CardFooter";var br=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(Fe__namespace.Root,{ref:r,className:a("rds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},h__namespace.createElement(Fe__namespace.Indicator,{className:a("flex items-center justify-center text-current")},h__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));br.displayName=Fe__namespace.Root.displayName;var Me=oe__namespace.Root,Le=oe__namespace.Trigger,ca=oe__namespace.Anchor,Re=h__namespace.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},n)=>h__namespace.createElement(oe__namespace.Portal,null,h__namespace.createElement(oe__namespace.Content,{ref:n,align:t,sideOffset:r,className:a("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...o})));Re.displayName=oe__namespace.Content.displayName;var pa="PPP",ma="LLL dd, y";function ua({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:n,contentClassName:i,align:s="start",side:m,format:d=pa,captionLayout:p,icon:f,"aria-label":u}){return h__namespace.createElement(Me,null,h__namespace.createElement(Le,{asChild:true},h__namespace.createElement(j,{type:"button",variant:"outline",disabled:o,"aria-label":u??(e?void 0:r),"data-empty":!e,className:a("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},f??h__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,d):h__namespace.createElement("span",null,r))),h__namespace.createElement(Re,{className:a("w-auto p-0",i),align:s,side:m},h__namespace.createElement(Ze,{mode:"single",selected:e,onSelect:t,captionLayout:p,initialFocus:true})))}function fa({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:n,contentClassName:i,align:s="start",side:m,format:d=ma,captionLayout:p,icon:f,numberOfMonths:u=2,"aria-label":g}){let R=!!e?.from;return h__namespace.createElement(Me,null,h__namespace.createElement(Le,{asChild:true},h__namespace.createElement(j,{type:"button",variant:"outline",disabled:o,"aria-label":g??(R?void 0:r),"data-empty":!R,className:a("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},f??h__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?h__namespace.createElement(h__namespace.Fragment,null,dateFns.format(e.from,d)," \u2013"," ",dateFns.format(e.to,d)):dateFns.format(e.from,d):h__namespace.createElement("span",null,r))),h__namespace.createElement(Re,{className:a("w-auto p-0",i),align:s,side:m},h__namespace.createElement(Ze,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:u,captionLayout:p,initialFocus:true})))}var ha=I__namespace.Root,ya=I__namespace.Trigger,xr=I__namespace.Portal,ba=I__namespace.Close,Tt=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Tt.displayName=I__namespace.Overlay.displayName;var Rr=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(xr,null,h__namespace.createElement(Tt,null),h__namespace.createElement(I__namespace.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r},t,h__namespace.createElement(I__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},h__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),h__namespace.createElement("span",{className:"sr-only"},"Close")))));Rr.displayName=I__namespace.Content.displayName;var Tr=({className:e,...t})=>h__namespace.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Tr.displayName="DialogHeader";var Pr=({className:e,...t})=>h__namespace.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Pr.displayName="DialogFooter";var wr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Title,{ref:r,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));wr.displayName=I__namespace.Title.displayName;var Sr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Sr.displayName=I__namespace.Description.displayName;var Ta=v__namespace.Root,Pa=v__namespace.Trigger,wa=v__namespace.Group,Sa=v__namespace.Portal,Ca=v__namespace.Sub,Na=v__namespace.RadioGroup,Cr=h__namespace.forwardRef(({className:e,inset:t,children:r,...o},n)=>h__namespace.createElement(v__namespace.SubTrigger,{ref:n,className:a("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o},r,h__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"})));Cr.displayName=v__namespace.SubTrigger.displayName;var Nr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(v__namespace.SubContent,{ref:r,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Nr.displayName=v__namespace.SubContent.displayName;var kr=h__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>h__namespace.createElement(v__namespace.Portal,null,h__namespace.createElement(v__namespace.Content,{ref:o,sideOffset:t,className:a("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})));kr.displayName=v__namespace.Content.displayName;var Mr=h__namespace.forwardRef(({className:e,inset:t,...r},o)=>h__namespace.createElement(v__namespace.Item,{ref:o,className:a("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Mr.displayName=v__namespace.Item.displayName;var Lr=h__namespace.forwardRef(({className:e,children:t,checked:r,...o},n)=>h__namespace.createElement(v__namespace.CheckboxItem,{ref:n,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o},h__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h__namespace.createElement(v__namespace.ItemIndicator,null,h__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),t));Lr.displayName=v__namespace.CheckboxItem.displayName;var Dr=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(v__namespace.RadioItem,{ref:o,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},h__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h__namespace.createElement(v__namespace.ItemIndicator,null,h__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t));Dr.displayName=v__namespace.RadioItem.displayName;var Er=h__namespace.forwardRef(({className:e,inset:t,...r},o)=>h__namespace.createElement(v__namespace.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Er.displayName=v__namespace.Label.displayName;var Hr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(v__namespace.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));Hr.displayName=v__namespace.Separator.displayName;var Ir=({className:e,...t})=>h__namespace.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});Ir.displayName="DropdownMenuShortcut";var Ar=h__namespace.forwardRef(({className:e,type:t,...r},o)=>h__namespace.createElement("input",{type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));Ar.displayName="Input";var Ma=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(Pt__namespace.Root,{ref:r,className:a(Ma(),e),...t}));Fr.displayName=Pt__namespace.Root.displayName;var Or=h__namespace.forwardRef(({className:e,value:t,...r},o)=>h__namespace.createElement(Ge__namespace.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},h__namespace.createElement(Ge__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Or.displayName=Ge__namespace.Root.displayName;var $r=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ge__namespace.Root,{className:a("grid gap-2",e),...t,ref:r}));$r.displayName=ge__namespace.Root.displayName;var Gr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ge__namespace.Item,{ref:r,className:a("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},h__namespace.createElement(ge__namespace.Indicator,{className:"flex items-center justify-center"},h__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Gr.displayName=ge__namespace.Item.displayName;var Br=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(ee__namespace.Root,{ref:o,className:a("relative overflow-hidden",e),...r},h__namespace.createElement(ee__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),h__namespace.createElement(wt,null),h__namespace.createElement(ee__namespace.Corner,null)));Br.displayName=ee__namespace.Root.displayName;var wt=h__namespace.forwardRef(({className:e,orientation:t="vertical",...r},o)=>h__namespace.createElement(ee__namespace.ScrollAreaScrollbar,{ref:o,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r},h__namespace.createElement(ee__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));wt.displayName=ee__namespace.ScrollAreaScrollbar.displayName;var Ha=x__namespace.Root,Ia=x__namespace.Group,Aa=x__namespace.Value,_r=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(x__namespace.Trigger,{ref:o,className:a("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r},t,h__namespace.createElement(x__namespace.Icon,{asChild:true},h__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 opacity-50"}))));_r.displayName=x__namespace.Trigger.displayName;var St=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(x__namespace.ScrollUpButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},h__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));St.displayName=x__namespace.ScrollUpButton.displayName;var Ct=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(x__namespace.ScrollDownButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},h__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Ct.displayName=x__namespace.ScrollDownButton.displayName;var Ur=h__namespace.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>h__namespace.createElement(x__namespace.Portal,null,h__namespace.createElement(x__namespace.Content,{ref:n,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o},h__namespace.createElement(St,null),h__namespace.createElement(x__namespace.Viewport,{className:a("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),h__namespace.createElement(Ct,null))));Ur.displayName=x__namespace.Content.displayName;var Wr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(x__namespace.Label,{ref:r,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wr.displayName=x__namespace.Label.displayName;var Vr=h__namespace.forwardRef(({className:e,children:t,...r},o)=>h__namespace.createElement(x__namespace.Item,{ref:o,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},h__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},h__namespace.createElement(x__namespace.ItemIndicator,null,h__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),h__namespace.createElement(x__namespace.ItemText,null,t)));Vr.displayName=x__namespace.Item.displayName;var zr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(x__namespace.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));zr.displayName=x__namespace.Separator.displayName;var jr=h__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>h__namespace.createElement(Nt__namespace.Root,{ref:n,decorative:r,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));jr.displayName=Nt__namespace.Root.displayName;var $a=I__namespace.Root,Ga=I__namespace.Trigger,Ba=I__namespace.Close,qr=I__namespace.Portal,kt=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Overlay,{className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));kt.displayName=I__namespace.Overlay.displayName;var Ka=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Yr=h__namespace.forwardRef(({side:e="right",className:t,children:r,...o},n)=>h__namespace.createElement(qr,null,h__namespace.createElement(kt,null),h__namespace.createElement(I__namespace.Content,{ref:n,className:a(Ka({side:e}),t),...o},r,h__namespace.createElement(I__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},h__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),h__namespace.createElement("span",{className:"sr-only"},"Close")))));Yr.displayName=I__namespace.Content.displayName;var Jr=({className:e,...t})=>h__namespace.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jr.displayName="SheetHeader";var Xr=({className:e,...t})=>h__namespace.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xr.displayName="SheetFooter";var Qr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Title,{ref:r,className:a("text-lg font-semibold text-foreground",e),...t}));Qr.displayName=I__namespace.Title.displayName;var Zr=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(I__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Zr.displayName=I__namespace.Description.displayName;function _a({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var eo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ce__namespace.Root,{ref:r,className:a("relative flex w-full touch-none select-none items-center",e),...t},h__namespace.createElement(ce__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},h__namespace.createElement(ce__namespace.Range,{className:"absolute h-full bg-primary"})),h__namespace.createElement(ce__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));eo.displayName=ce__namespace.Root.displayName;var to=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(Ke__namespace.Root,{className:a("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r},h__namespace.createElement(Ke__namespace.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));to.displayName=Ke__namespace.Root.displayName;var ro=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("div",{className:"relative w-full overflow-auto"},h__namespace.createElement("table",{ref:r,className:a("w-full caption-bottom text-sm",e),...t})));ro.displayName="Table";var oo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));oo.displayName="TableHeader";var ao=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));ao.displayName="TableBody";var no=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("tfoot",{ref:r,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));no.displayName="TableFooter";var io=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("tr",{ref:r,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));io.displayName="TableRow";var so=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("th",{ref:r,className:a("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));so.displayName="TableHead";var lo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("td",{ref:r,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));lo.displayName="TableCell";var co=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));co.displayName="TableCaption";var Ua=ae__namespace.Root,po=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ae__namespace.List,{ref:r,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));po.displayName=ae__namespace.List.displayName;var mo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ae__namespace.Trigger,{ref:r,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",e),...t}));mo.displayName=ae__namespace.Trigger.displayName;var uo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement(ae__namespace.Content,{ref:r,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));uo.displayName=ae__namespace.Content.displayName;var fo=h__namespace.forwardRef(({className:e,...t},r)=>h__namespace.createElement("textarea",{className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));fo.displayName="Textarea";var Mt=ne__namespace.Provider,Lt=ne__namespace.Root,Dt=ne__namespace.Trigger,nt=h__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>h__namespace.createElement(ne__namespace.Portal,null,h__namespace.createElement(ne__namespace.Content,{ref:o,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})));nt.displayName=ne__namespace.Content.displayName;var ho=h__namespace.createContext(null);function yo(){let e=h__namespace.useContext(ho);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var za=({href:e,className:t,children:r})=>h__namespace.createElement("a",{href:e,className:t},r),bo=h__namespace.forwardRef(({header:e,collapsedHeader:t,sections:r,items:o,footer:n,collapsed:i,onCollapsedChange:s,collapsible:m=true,defaultCollapsed:d=false,activeItem:p,className:f,linkComponent:u=za},g)=>{let[R,T]=h__namespace.useState(d),l=i??R,c=()=>{let P=!l;T(P),s?.(P);};return h__namespace.createElement(Mt,{delayDuration:0},h__namespace.createElement(ho.Provider,{value:{collapsed:l,activeItem:p,LinkComponent:u}},h__namespace.createElement("aside",{ref:g,className:a("flex h-full flex-col transition-[width] duration-300 ease-in-out","bg-white dark:bg-[#141414] border-r border-rds-gray-200 dark:border-[#1a1a1a]",l?"w-16":"w-64",f)},h__namespace.createElement("div",{className:a("flex items-center border-b border-rds-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",l?"justify-center px-2":"justify-between px-3")},l&&t||e,m&&h__namespace.createElement("button",{onClick:c,className:a("rounded-md h-5 w-5 flex items-center justify-center","text-rds-gray-400 dark:text-rds-gray-500","hover:text-rds-gray-600 dark:hover:text-rds-gray-300 transition-colors","bg-white dark:bg-[#141414] border border-rds-gray-200 dark:border-rds-gray-700 shadow-sm",l&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":l?"Expand sidebar":"Collapse sidebar"},l?h__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):h__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"}))),h__namespace.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&h__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(P=>h__namespace.createElement(Et,{key:P.id,item:P}))),r?.map(P=>h__namespace.createElement(ja,{key:P.id,section:P}))),n&&h__namespace.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},n))))});bo.displayName="SideMenu";function ja({section:e}){let{collapsed:t}=yo(),[r,o]=h__namespace.useState(e.defaultExpanded??true);return t?h__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(n=>h__namespace.createElement(Et,{key:n.id,item:n}))):h__namespace.createElement("div",{className:"px-2 mb-1"},h__namespace.createElement("button",{onClick:()=>o(!r),className:a("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm font-medium","text-rds-gray-700 dark:text-rds-gray-300","hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900","hover:text-rds-gray-900 dark:hover:text-white transition-colors")},e.icon&&h__namespace.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),h__namespace.createElement("span",{className:"flex-1 text-left"},e.title),r?h__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):h__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&h__namespace.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},h__namespace.createElement("div",{className:"absolute left-[1.1rem] top-0 bottom-0 w-px bg-rds-gray-200 dark:bg-rds-gray-700"}),e.items.map(n=>h__namespace.createElement(Et,{key:n.id,item:n,nested:true}))))}function Et({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:n}=yo(),i=o===e.id,s=a("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",r?"justify-center px-2 py-2.5":"px-2 py-1.5",i?t?"bg-rds-gray-100 dark:bg-[#1a1a1a] text-rds-gray-900 dark:text-white":"bg-rds-green-50 dark:bg-rds-green-950 text-rds-green-700 dark:text-rds-green-400":"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-rds-gray-900 hover:text-rds-gray-900 dark:hover:text-white",e.disabled&&"opacity-50 pointer-events-none"),m=h__namespace.createElement(h__namespace.Fragment,null,e.icon&&h__namespace.createElement("span",{className:a("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&h__namespace.createElement("span",null,e.label),!r&&e.badge&&h__namespace.createElement("span",{className:"ml-auto text-xs bg-rds-gray-100 dark:bg-rds-gray-800 px-1.5 py-0.5 rounded"},e.badge)),d=e.href?h__namespace.createElement(n,{href:e.href,className:s},m):h__namespace.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:a(s,"w-full")},m);return r?h__namespace.createElement(Lt,null,h__namespace.createElement(Dt,{asChild:true},d),h__namespace.createElement(nt,{side:"right",sideOffset:8},e.label)):d}var Ya=({href:e,className:t,children:r})=>h__namespace.createElement("a",{href:e,className:t},r),vo=h__namespace.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:n,className:i,linkComponent:s=Ya},m)=>h__namespace.createElement("header",{ref:m,className:a("sticky top-0 z-30 flex h-12 items-center gap-3","border-b border-rds-gray-200 dark:border-[#1a1a1a]","bg-white dark:bg-[#141414] px-4",i)},t&&h__namespace.createElement("button",{onClick:r,className:"lg:hidden rounded-md p-1.5 text-rds-gray-600 hover:bg-rds-gray-100 dark:text-rds-gray-400 dark:hover:bg-rds-gray-800","aria-label":"Toggle menu"},h__namespace.createElement(lucideReact.Menu,{className:"h-4 w-4"})),e.length>0&&h__namespace.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((d,p)=>h__namespace.createElement(h__namespace.Fragment,{key:p},p>0&&h__namespace.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),d.href?h__namespace.createElement(s,{href:d.href,className:"text-rds-gray-600 dark:text-rds-gray-400 hover:text-rds-gray-900 dark:hover:text-white transition-colors text-sm"},d.label):h__namespace.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},d.label)))),o,h__namespace.createElement("div",{className:"flex-1"}),n&&h__namespace.createElement("div",{className:"flex items-center gap-1.5"},n)));vo.displayName="TopMenu";var xo=h__namespace.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:o,avatarClassName:n,children:i,className:s},m)=>{let[d,p]=h__namespace.useState(false),f=h__namespace.useRef(null);return h__namespace.useEffect(()=>{let u=g=>{f.current&&!f.current.contains(g.target)&&p(false);};return d&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u);}},[d]),h__namespace.createElement("div",{ref:m,className:a("relative",s)},h__namespace.createElement("div",{ref:f},h__namespace.createElement("button",{onClick:()=>p(!d),className:"flex items-center gap-1.5 rounded-full p-0.5 hover:ring-2 hover:ring-rds-green-500 hover:ring-offset-2 dark:hover:ring-offset-[#141414] transition-all","aria-label":"Account menu"},h__namespace.createElement("div",{className:a("h-8 w-8 rounded-full overflow-hidden flex items-center justify-center",n||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?h__namespace.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o)),d&&h__namespace.createElement("div",{className:"absolute right-0 mt-2 w-64 rounded-lg border border-rds-gray-200 dark:border-[#1a1a1a] bg-white dark:bg-[#141414] shadow-lg overflow-hidden z-50"},(e||t)&&h__namespace.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},h__namespace.createElement("div",{className:"flex items-center gap-3"},h__namespace.createElement("div",{className:a("h-10 w-10 rounded-full overflow-hidden flex items-center justify-center",n||"bg-gradient-to-br from-rds-yellow-400 to-rds-yellow-600")},r?h__namespace.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o),h__namespace.createElement("div",{className:"flex-1 min-w-0"},e&&h__namespace.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&h__namespace.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),i)))});xo.displayName="TopMenuUser";var Ro=h__namespace.forwardRef(({icon:e,children:t,onClick:r,href:o,variant:n="default",className:i},s)=>h__namespace.createElement(o?"a":"button",{ref:s,onClick:r,href:o,className:a("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",{default:"text-rds-gray-700 dark:text-rds-gray-300 hover:bg-rds-gray-50 dark:hover:bg-[#1a1a1a]",danger:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950/20",success:"text-rds-green-600 dark:text-rds-green-400 hover:bg-rds-green-50 dark:hover:bg-rds-green-950/20"}[n],i)},e&&h__namespace.createElement("span",{className:"h-4 w-4"},e),h__namespace.createElement("span",null,t)));Ro.displayName="TopMenuUserItem";var To=h__namespace.forwardRef(({children:e,className:t},r)=>h__namespace.createElement("div",{ref:r,className:a("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));To.displayName="TopMenuUserSection";var Ht=h__namespace.createContext(null);function It(){let e=h__namespace.useContext(Ht);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Po=h__namespace.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:n,className:i,tabsClassName:s},m)=>{let[d,p]=h__namespace.useState(r||e[0]?.id||""),f=t??d,u=g=>{p(g),o?.(g);};return h__namespace.createElement(Ht.Provider,{value:{activeTab:f,setActiveTab:u}},h__namespace.createElement("div",{ref:m,className:a("space-y-6",i)},h__namespace.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},h__namespace.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",s),"aria-label":"Tabs"},e.map(g=>{let R=f===g.id;return h__namespace.createElement("button",{key:g.id,onClick:()=>!g.disabled&&u(g.id),disabled:g.disabled,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",R?"text-primary":"text-muted-foreground hover:text-foreground",g.disabled&&"opacity-50 cursor-not-allowed")},g.icon&&h__namespace.createElement("span",{className:"h-4 w-4"},g.icon),g.label,R&&h__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),n&&h__namespace.createElement("div",null,n)))});Po.displayName="SimpleTabs";var wo=h__namespace.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:n}=It();return n!==e?null:h__namespace.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});wo.displayName="SimpleTabsPanel";var So=h__namespace.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:n},i)=>{let[s,m]=h__namespace.useState(t||""),d=e??s,p=f=>{m(f),r?.(f);};return h__namespace.createElement(Ht.Provider,{value:{activeTab:d,setActiveTab:p}},h__namespace.createElement("div",{ref:i,className:a("space-y-6",n)},o))});So.displayName="SimpleTabsRoot";var Co=h__namespace.forwardRef(({children:e,className:t},r)=>h__namespace.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},h__namespace.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Co.displayName="SimpleTabsList";var No=h__namespace.forwardRef(({value:e,children:t,icon:r,disabled:o,className:n},i)=>{let{activeTab:s,setActiveTab:m}=It(),d=s===e;return h__namespace.createElement("button",{ref:i,role:"tab",id:`tab-${e}`,"aria-selected":d,"aria-controls":`panel-${e}`,onClick:()=>!o&&m(e),disabled:o,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",d?"text-primary":"text-muted-foreground hover:text-foreground",o&&"opacity-50 cursor-not-allowed",n)},r&&h__namespace.createElement("span",{className:"h-4 w-4"},r),t,d&&h__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});No.displayName="SimpleTabsTrigger";var ko=h__namespace.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:n}=It();return n!==e?null:h__namespace.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});ko.displayName="SimpleTabsContent";var Ja={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Xa={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},se=h__namespace.forwardRef(({className:e,aspect:t="video",radius:r="lg",border:o=false,loading:n=false,onVisibilityChange:i,fallback:s,style:m,children:d,...p},f)=>{let u=h__namespace.useRef(null);return h__namespace.useImperativeHandle(f,()=>u.current),h__namespace.useEffect(()=>{if(!i||!u.current)return;let g=u.current,R=new IntersectionObserver(([T])=>i(T.isIntersecting),{threshold:.05});return R.observe(g),()=>R.disconnect()},[i]),h__namespace.createElement("div",{ref:u,"data-gds-part":"media-surface",className:a("rds-media-surface relative w-full overflow-hidden bg-muted",Ja[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${Xa[r]})`,...m},...p},d,n&&h__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},s))});se.displayName="MediaSurface";function Pe(){let[e,t]=h__namespace.useState(false);return h__namespace.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>t(n.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Mo=h__namespace.forwardRef(({src:e,controls:t=true,autoPlay:r=false,loop:o=false,muted:n,pauseOffscreen:i=true,aspect:s="video",radius:m="lg",border:d=false,poster:p,label:f,className:u,style:g,playbackRate:R=1,objectFit:T="cover"},l)=>{let c=h__namespace.useRef(null),P=Pe(),[M,L]=h__namespace.useState(!!p);h__namespace.useImperativeHandle(l,()=>c.current);let k=n??r,$=r&&!P;h__namespace.useEffect(()=>{c.current&&(c.current.playbackRate=R);},[R]),h__namespace.useEffect(()=>{L(!!p);},[p]);let W=h__namespace.useCallback(le=>{!i||!c.current||(le&&$?c.current.play().catch(()=>{}):c.current.pause());},[i,$]);return h__namespace.createElement(se,{aspect:s,radius:m,border:d,"aria-label":f,className:u,style:g,onVisibilityChange:i?W:void 0},h__namespace.createElement("video",{ref:c,src:e,controls:t,autoPlay:$,loop:o,muted:k,playsInline:true,preload:$?"auto":"metadata",onPlaying:()=>L(false),className:a("w-full h-full",T==="cover"&&"object-cover",T==="contain"&&"object-contain",T==="fill"&&"object-fill")},"Your browser does not support the video tag."),p&&M&&h__namespace.createElement("img",{src:p,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:a("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",T==="cover"&&"object-cover",T==="contain"&&"object-contain",T==="fill"&&"object-fill")}))});Mo.displayName="VideoPlayer";var Lo=h__namespace.forwardRef(({src:e,controls:t=false,autoPlay:r=true,loop:o=true,pauseOffscreen:n=true,aspect:i="square",radius:s="lg",border:m=false,poster:d,label:p,className:f,style:u,stateMachines:g,artboard:R,fit:T="contain",stateMachineInputs:l},c)=>{let P=Pe(),[M,L]=h__namespace.useState(null),[k,$]=h__namespace.useState(null);return h__namespace.useEffect(()=>{let W=false;return import('@rive-app/react-canvas').then(le=>{W||L(le);}).catch(()=>{W||$("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{W=true;}},[]),h__namespace.createElement(se,{ref:c,aspect:i,radius:s,border:m,"aria-label":p,className:f,style:u},k?h__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},k):M&&e?h__namespace.createElement(en,{Mod:M,src:e,stateMachines:g,artboard:R,fit:T,stateMachineInputs:l,autoPlay:r&&!P,loop:o,pauseOffscreen:n,controls:t,poster:d}):d&&h__namespace.createElement("img",{src:d,alt:"",className:"w-full h-full object-contain"}))});Lo.displayName="RivePlayer";function en({Mod:e,src:t,stateMachines:r,artboard:o,fit:n,autoPlay:i,loop:s,pauseOffscreen:m,controls:d,poster:p}){let{useRive:f,Layout:u,Fit:g,Alignment:R,EventType:T}=e,l={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:c,RiveComponent:P}=f({src:t,stateMachines:r,artboard:o,autoplay:i,layout:new u({fit:l[n],alignment:R.Center})}),[M,L]=h__namespace.useState(i);h__namespace.useEffect(()=>{if(!c||!s)return;let $=()=>{c.play();};return c.on(T.Stop,$),()=>{c.off(T.Stop,$);}},[c,s,T]),h__namespace.useEffect(()=>{if(!m||!c)return;let $=c.canvas;if(!$)return;let W=new IntersectionObserver(([le])=>{le.isIntersecting&&i?c.play():c.pause();},{threshold:.05});return W.observe($),()=>W.disconnect()},[c,m,i]);let k=()=>{c&&(M?(c.pause(),L(false)):(c.play(),L(true)));};return h__namespace.createElement(h__namespace.Fragment,null,h__namespace.createElement(P,{className:"w-full h-full"}),!c&&p&&h__namespace.createElement("img",{src:p,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),d&&h__namespace.createElement("div",{className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},h__namespace.createElement(j,{size:"icon",variant:"secondary",onClick:k},M?h__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):h__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var Eo=({renderer:e,scene:t,camera:r,preset:o,width:n,height:i})=>{let s=new postprocessing.EffectComposer(e);s.setSize(n,i),s.addPass(new postprocessing.RenderPass(t,r));let m=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),d=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});d.blendMode.opacity.value=0;let p=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});p.blendMode.opacity.value=0;let f=new postprocessing.VignetteEffect({darkness:0,offset:.5}),u=new postprocessing.ChromaticAberrationEffect({offset:new H__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new postprocessing.GlitchEffect({chromaticAberrationOffset:new H__namespace.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,s.addPass(new postprocessing.EffectPass(r,m)),s.addPass(new postprocessing.EffectPass(r,d,p,f)),s.addPass(new postprocessing.EffectPass(r,u)),s.addPass(new postprocessing.EffectPass(r,g));function R(T){let l=T.effects;m.intensity=l.bloom?.intensity??0,m.luminanceMaterial&&l.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=l.bloom.luminanceThreshold),d.blendMode.opacity.value=l.noise?.intensity??0,p.density=l.scanlines?.density??1.25,p.blendMode.opacity.value=l.scanlines?.opacity??0,f.darkness=l.vignette?.darkness??0,f.offset=l.vignette?.offset??.5;let c=l.chromatic?.offset??0;u.offset?.set(c,c),l.glitch?(g.minStrength=l.glitch.strength?.[0]??0,g.maxStrength=l.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return R(o),{composer:s,setPreset:R,resize:(T,l)=>s.setSize(T,l),dispose:()=>{s.dispose();}}};var De=3e3,Ft=400,pn=80,Ho=({width:e,height:t,palette:r})=>{let o=new H__namespace.Scene;o.background=new H__namespace.Color(r.background);let n=new H__namespace.PerspectiveCamera(70,e/t,.1,Ft*2);n.position.z=0;let i=new Float32Array(De*6),s=new Float32Array(De*6),m=new Float32Array(De),d=new H__namespace.Color(r.primary),p=new H__namespace.Color(r.accent);function f(c,P){let M=Math.random()*Math.PI*2,L=pn*Math.pow(Math.random(),.6),k=Math.cos(M)*L,$=Math.sin(M)*L,W=P?-Math.random()*Ft:-Ft;m[c]=W,i[c*6+0]=k,i[c*6+1]=$,i[c*6+2]=W,i[c*6+3]=k,i[c*6+4]=$,i[c*6+5]=W-2,s[c*6+0]=d.r,s[c*6+1]=d.g,s[c*6+2]=d.b,s[c*6+3]=p.r,s[c*6+4]=p.g,s[c*6+5]=p.b;}for(let c=0;c<De;c++)f(c,true);let u=new H__namespace.BufferGeometry;u.setAttribute("position",new H__namespace.BufferAttribute(i,3)),u.setAttribute("color",new H__namespace.BufferAttribute(s,3));let g=new H__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:H__namespace.AdditiveBlending}),R=new H__namespace.LineSegments(u,g);o.add(R);let T=60,l=6;return {scene:o,camera:n,update:(c,P)=>{let M=u.attributes.position.array;for(let L=0;L<De;L++){let k=L*6;M[k+2]+=T*P,M[k+5]=M[k+2]-l,M[k+2]>5&&f(L,false);}u.attributes.position.needsUpdate=true;},resize:(c,P)=>{let M=n;M.aspect=c/P,M.updateProjectionMatrix();},setPalette:c=>{o.background=new H__namespace.Color(c.background);let P=new H__namespace.Color(c.primary),M=new H__namespace.Color(c.accent),L=u.attributes.color.array;for(let k=0;k<De;k++)L[k*6+0]=P.r,L[k*6+1]=P.g,L[k*6+2]=P.b,L[k*6+3]=M.r,L[k*6+4]=M.g,L[k*6+5]=M.b;u.attributes.color.needsUpdate=true;},dispose:()=>{u.dispose(),g.dispose();}}};var st={space:Ho},Ue=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"}],We=Object.fromEntries(Ue.map(e=>[e.id,e]));var Ve={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},dt="vhs";var fn={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},lt=h__namespace.forwardRef(({preset:e,postPreset:t,palette:r,createScene:o,controls:n=false,autoPlay:i=true,pauseOffscreen:s=true,aspect:m="video",radius:d="lg",border:p=false,poster:f,label:u,className:g,style:R,maxDpr:T},l)=>{let c=h__namespace.useRef(null),[P,M]=h__namespace.useState(i),[L,k]=h__namespace.useState(false),$=Pe(),W=h__namespace.useMemo(()=>({...fn,...r}),[r]),le=h__namespace.useMemo(()=>o||(e&&st[e]?st[e]:null),[o,e]),Yt=h__namespace.useMemo(()=>{if(t)return t;if(e){let V=We[e];if(V?.defaultPostPreset)return V.defaultPostPreset}return dt},[t,e]);h__namespace.useEffect(()=>{let V=c.current;if(!V||!le)return;let vt=V.clientWidth||1,xt=V.clientHeight||1,z=new H__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),jo=T??Math.min(window.devicePixelRatio||1,2);z.setPixelRatio(jo),z.setSize(vt,xt),z.setClearColor(new H__namespace.Color(W.background),1),z.domElement.dataset.gdsPart="shader-canvas",z.domElement.style.width="100%",z.domElement.style.height="100%",z.domElement.style.display="block",V.appendChild(z.domElement);let Ne=le({renderer:z,width:vt,height:xt,palette:W}),qo=Ve[Yt]??Ve[dt],Xe=Eo({renderer:z,scene:Ne.scene,camera:Ne.camera,preset:qo,width:vt,height:xt}),Jt=new H__namespace.Clock,Xt=0,Ie=i&&!$,Qt=true,Zt=()=>{if(Xt=requestAnimationFrame(Zt),!Ie||s&&!Qt)return;let Q=Jt.getDelta(),me=Jt.getElapsedTime();Ne.update?.(me,Q),Xe.composer.render(Q);};Zt(),Ie&&k(true);let er=new ResizeObserver(([Q])=>{let me=Math.max(1,Math.floor(Q.contentRect.width)),Rt=Math.max(1,Math.floor(Q.contentRect.height));z.setSize(me,Rt),Xe.resize(me,Rt),Ne.resize?.(me,Rt);});er.observe(V);let tr=new IntersectionObserver(([Q])=>{Qt=Q.isIntersecting;},{threshold:.05});return tr.observe(V),bt.current={toggle:()=>{Ie=!Ie,M(Ie);},setPalette:Q=>{z.setClearColor(new H__namespace.Color(Q.background),1),Ne.setPalette?.(Q);},setPostPreset:Q=>{let me=Ve[Q];me&&Xe.setPreset(me);}},()=>{cancelAnimationFrame(Xt),er.disconnect(),tr.disconnect(),Xe.dispose(),Ne.dispose?.(),z.dispose(),z.domElement.parentElement===V&&V.removeChild(z.domElement),bt.current=null;}},[le,Yt,W,i,$,s,T]);let bt=h__namespace.useRef(null),zo=()=>bt.current?.toggle();return h__namespace.createElement(se,{ref:V=>{c.current=V,typeof l=="function"?l(V):l&&(l.current=V);},aspect:m,radius:d,border:p,"aria-label":u,className:g,style:R,"data-gds-part":"three-scene"},!L&&f&&h__namespace.createElement("img",{src:f,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),n&&h__namespace.createElement("div",{"data-gds-part":"scene-controls",className:a("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},h__namespace.createElement(j,{size:"icon",variant:"secondary",onClick:zo},P?h__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):h__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});lt.displayName="ThreeScene";var ct=h__namespace.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:n,aspect:i="video",radius:s="lg",label:m,hideLabel:d=false,onClick:p},f)=>{let u=We[e],[g,R]=h__namespace.useState(false),T=t==="always"||t==="hover"&&g;return h__namespace.createElement("div",{ref:f,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>R(true),onMouseLeave:()=>R(false),onClick:p,className:a("group cursor-pointer flex flex-col gap-2",n)},T?h__namespace.createElement(lt,{preset:e,postPreset:r,palette:o,aspect:i,radius:s,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):h__namespace.createElement(se,{aspect:i,radius:s,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?h__namespace.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):h__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!d&&h__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},h__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??u?.label??e),u?.tags?.[0]&&h__namespace.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});ct.displayName="ShaderPresetPreview";function hn({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:s=3,className:m}){let d=h__namespace.useMemo(()=>r?.length?Ue.filter(f=>r.some(u=>f.tags.includes(u))):Ue,[r]);return h__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:a("grid grid-cols-2 gap-3",s===2?"md:grid-cols-2":s===4?"md:grid-cols-4":"md:grid-cols-3",m)},d.map(f=>{let u=e===f.id;return h__namespace.createElement("div",{key:f.id,className:"relative",role:"radio","aria-checked":u},h__namespace.createElement(ct,{preset:f.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(f.id),className:a("transition-all",u&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),u&&h__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},h__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function xn({children:e}){let t=h.useRef(null);return h.useEffect(()=>{let r=new vn__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(n){r.raf(n),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}var be=[50,100,200,300,400,500,600,700,800,900,950],Io=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Rn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function pt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<be.length;n++){let i=Io[n],s=Rn[n]*t;o[be[n]]=`${i.toFixed(4)} ${s.toFixed(4)} ${r.toFixed(2)}`;}return o}function Ao(){let e={};for(let t=0;t<be.length;t++){let r=Io[t];e[be[t]]=`${r.toFixed(4)} 0 0`;}return e}var Ot={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},ze="1 0 0",Fo="0 0 0";function Ee(e,t){let[,r,o]=e.split(/\s+/).map(f=>f.trim()),n=Number(r),i=o;if(t==="light"){let u=Math.min(n*.22,.045),g=.38,R=n;return {soft:`${.965.toFixed(3)} ${u.toFixed(3)} ${i}`,deep:`${g.toFixed(3)} ${R.toFixed(3)} ${i}`}}let s=.22,m=Math.min(n*.45,.075),d=.82,p=n*.9;return {soft:`${s.toFixed(3)} ${m.toFixed(3)} ${i}`,deep:`${d.toFixed(3)} ${p.toFixed(3)} ${i}`}}var mt={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Tn=["superLight","light","dark","superDark"],Pn={muted:.6,default:1,vibrant:1.3};function wn(e,t,r){let o=t.primary*r,n=t.accent*r,i=(o+n)/2*.8,s=m=>(m%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*i).toFixed(4)} ${s(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*i).toFixed(4)} ${s(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var y=e=>({source:"neutral",step:e}),te=e=>({source:"primary",step:e}),ve=e=>({source:"accent",step:e}),je=e=>({source:"pure",value:e}),Sn={superLight:{background:y(50),foreground:y(800),card:je(ze),cardForeground:y(800),popover:je(ze),popoverForeground:y(800),primary:te(600),primaryForeground:te(50),secondary:y(100),secondaryForeground:y(700),muted:y(100),mutedForeground:y(500),accent:ve(600),accentForeground:ve(50),border:y(200),input:y(200),ring:te(500)},light:{background:y(50),foreground:y(950),card:je(ze),cardForeground:y(950),popover:je(ze),popoverForeground:y(950),primary:te(500),primaryForeground:te(50),secondary:y(100),secondaryForeground:y(700),muted:y(100),mutedForeground:y(500),accent:ve(500),accentForeground:ve(50),border:y(200),input:y(200),ring:te(500)},dark:{background:y(950),foreground:y(50),card:y(900),cardForeground:y(50),popover:y(900),popoverForeground:y(50),primary:te(400),primaryForeground:te(950),secondary:y(800),secondaryForeground:y(200),muted:y(800),mutedForeground:y(400),accent:ve(400),accentForeground:ve(950),border:y(800),input:y(800),ring:te(400)},superDark:{background:je(Fo),foreground:y(100),card:y(950),cardForeground:y(100),popover:y(950),popoverForeground:y(100),primary:te(300),primaryForeground:te(950),secondary:y(900),secondaryForeground:y(300),muted:y(900),mutedForeground:y(500),accent:ve(300),accentForeground:ve(950),border:y(900),input:y(900),ring:te(300)}};function U(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Cn(e,t){let r=Sn[t],o=t==="superLight"||t==="light",n=o?Ot.light:Ot.dark;return {background:U(r.background,e),foreground:U(r.foreground,e),card:U(r.card,e),cardForeground:U(r.cardForeground,e),popover:U(r.popover,e),popoverForeground:U(r.popoverForeground,e),primary:U(r.primary,e),primaryForeground:U(r.primaryForeground,e),secondary:U(r.secondary,e),secondaryForeground:U(r.secondaryForeground,e),muted:U(r.muted,e),mutedForeground:U(r.mutedForeground,e),accent:U(r.accent,e),accentForeground:U(r.accentForeground,e),border:U(r.border,e),input:U(r.input,e),ring:U(r.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let i=o?"light":"dark",s=Ee(n.destructive,i),m=Ee(n.success,i),d=Ee(n.warning,i),p=Ee(n.info,i),f=Ee(n.highlight,i);return {destructiveSoft:s.soft,destructiveDeep:s.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:d.soft,warningDeep:d.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:f.soft,highlightDeep:f.deep}})()}}var pe={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Nn={compact:.85,default:1,spacious:1.18};function kn(e){let t=Nn[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:mt[e.body],fontMono:mt[e.mono],fontDisplay:mt[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:r(pe.display),h1:r(pe.h1),h2:r(pe.h2),h3:r(pe.h3),h4:r(pe.h4),h5:r(pe.h5),h6:r(pe.h6),body:r(pe.body),bodySm:r(pe.bodySm)}}}var Mn={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Ln(e){let t=Mn[e.style],r=o=>`${o.toFixed(3)}rem`;return {base:r(t),sm:r(Math.max(0,t-.25)),md:r(t),lg:r(t+.25),xl:r(t+.5),"2xl":r(t+1),full:"9999px"}}var Dn={tight:.85,default:1,roomy:1.2};function En(e){return {baseUnit:"1rem",densityFactor:Dn[e.density]}}var Hn={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function In(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:Hn[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Se(e){let t=Pn[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,i=(e.chroma?.accent??1)*t,s=r?Ao():pt({hue:e.hues.neutral,chromaScale:o}),m=pt({hue:e.hues.primary,chromaScale:n}),d=pt({hue:e.hues.accent,chromaScale:i}),p={neutral:s,primary:m,accent:d},f=wn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Tn.map(P=>[P,Cn(p,P)])),g=kn(e.typography),R=Ln(e.radius),T=En(e.spacing),l=In(e.effects),c={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:p,colors:u,chart:f,typography:g,radius:R,spacing:T,effects:l,components:c}}var qe={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},$t={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},ut=[qe,$t];function An(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Bt(e,t){let r=e.colors[t];return {...An(r),...Gt("neutral",e.ramps.neutral),...Gt("primary",e.ramps.primary),...Gt("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--rds-radius-sm":e.radius.sm,"--rds-radius-md":e.radius.md,"--rds-radius-lg":e.radius.lg,"--rds-radius-xl":e.radius.xl,"--rds-radius-2xl":e.radius["2xl"],"--rds-radius-full":e.radius.full,"--rds-density":String(e.spacing.densityFactor),"--rds-shadow-sm":e.effects.shadows.sm,"--rds-shadow-md":e.effects.shadows.md,"--rds-shadow-lg":e.effects.shadows.lg,"--rds-shadow-xl":e.effects.shadows.xl,"--rds-shadow-2xl":e.effects.shadows["2xl"],"--rds-shadow-inner":e.effects.shadows.inner,"--rds-transition-fast":e.effects.motion.fast,"--rds-transition-base":e.effects.motion.base,"--rds-transition-slow":e.effects.motion.slow,"--rds-transition-slower":e.effects.motion.slower,"--rds-border-width":e.effects.borderWidth}}function Gt(e,t){let r={};for(let o of be)r[`--ramp-${e}-${o}`]=t[o];return r}function ft(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Bt(e,t);for(let[n,i]of Object.entries(o))r.style.setProperty(n,i);r.setAttribute("data-ramp-theme",e.id),r.setAttribute("data-mode",t),r.setAttribute("data-button-shape",e.components.buttonShape??"default"),r.setAttribute("data-input-style",e.components.inputStyle??"outlined"),r.setAttribute("data-card-style",e.components.cardStyle??"flat");}function Ye(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let o=r.match(/\d+/g);if(!o||o.length<3)return "";let[n,i,s]=o.slice(0,3).map(Number);return "#"+[n,i,s].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function Fn(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,n]=t.map(Number),i=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(n)}`,s=Ye(e);return {oklch:i,hex:s}}function Kt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of be){let{oklch:i,hex:s}=Fn(t[n]);o.push(`| ${n} | \`${i}\` | \`${s||"\u2014"}\` |`);}return o.join(`
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use strict';var y=require('react'),ae=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),reactDayPicker=require('react-day-picker'),_e=require('@radix-ui/react-checkbox'),dateFns=require('date-fns'),de=require('@radix-ui/react-popover'),F=require('@radix-ui/react-dialog'),x=require('@radix-ui/react-dropdown-menu'),It=require('@radix-ui/react-label'),Ve=require('@radix-ui/react-progress'),xe=require('@radix-ui/react-radio-group'),ne=require('@radix-ui/react-scroll-area'),R=require('@radix-ui/react-select'),Gt=require('@radix-ui/react-separator'),ge=require('@radix-ui/react-slider'),je=require('@radix-ui/react-switch'),ce=require('@radix-ui/react-tabs'),le=require('@radix-ui/react-tooltip'),I=require('three'),postprocessing=require('postprocessing'),Wn=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var y__namespace=/*#__PURE__*/_interopNamespace(y);var ae__namespace=/*#__PURE__*/_interopNamespace(ae);var _e__namespace=/*#__PURE__*/_interopNamespace(_e);var de__namespace=/*#__PURE__*/_interopNamespace(de);var F__namespace=/*#__PURE__*/_interopNamespace(F);var x__namespace=/*#__PURE__*/_interopNamespace(x);var It__namespace=/*#__PURE__*/_interopNamespace(It);var Ve__namespace=/*#__PURE__*/_interopNamespace(Ve);var xe__namespace=/*#__PURE__*/_interopNamespace(xe);var ne__namespace=/*#__PURE__*/_interopNamespace(ne);var R__namespace=/*#__PURE__*/_interopNamespace(R);var Gt__namespace=/*#__PURE__*/_interopNamespace(Gt);var ge__namespace=/*#__PURE__*/_interopNamespace(ge);var je__namespace=/*#__PURE__*/_interopNamespace(je);var ce__namespace=/*#__PURE__*/_interopNamespace(ce);var le__namespace=/*#__PURE__*/_interopNamespace(le);var I__namespace=/*#__PURE__*/_interopNamespace(I);var Wn__default=/*#__PURE__*/_interopDefault(Wn);function a(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var va=ae__namespace.Root,hr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ae__namespace.Item,{ref:r,className:a("border-b",e),...t}));hr.displayName="AccordionItem";var yr=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(ae__namespace.Header,{className:"flex"},y__namespace.createElement(ae__namespace.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__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));yr.displayName=ae__namespace.Trigger.displayName;var vr=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(ae__namespace.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},y__namespace.createElement("div",{className:a("pb-4 pt-0",e)},t)));vr.displayName=ae__namespace.Content.displayName;var xa=classVarianceAuthority.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"}}),br=y__namespace.forwardRef(({className:e,variant:t,...r},o)=>y__namespace.createElement("div",{ref:o,role:"alert",className:a(xa({variant:t}),e),...r}));br.displayName="Alert";var xr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));xr.displayName="AlertTitle";var Rr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));Rr.displayName="AlertDescription";var wr=classVarianceAuthority.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 Ta({className:e,variant:t,rounded:r,...o}){return y__namespace.createElement("div",{className:a(wr({variant:t,rounded:r}),e),...o})}var Ue=classVarianceAuthority.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__namespace.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...n},i)=>y__namespace.createElement(o?reactSlot.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=reactDayPicker.getDefaultClassNames();return y__namespace.createElement(reactDayPicker.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__namespace.createElement("div",{"data-slot":"calendar",ref:c,className:a(p),...u}),Chevron:({className:p,orientation:c,...u})=>c==="left"?y__namespace.createElement(lucideReact.ChevronLeftIcon,{className:a("size-4",p),...u}):c==="right"?y__namespace.createElement(lucideReact.ChevronRightIcon,{className:a("size-4",p),...u}):y__namespace.createElement(lucideReact.ChevronDownIcon,{className:a("size-4",p),...u}),DayButton:Sr,WeekNumber:({children:p,...c})=>y__namespace.createElement("td",{...c},y__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},p)),...d},...l})}function Sr({className:e,day:t,modifiers:r,...o}){let n=reactDayPicker.getDefaultClassNames(),i=y__namespace.useRef(null);return y__namespace.useEffect(()=>{r.focused&&i.current?.focus();},[r.focused]),y__namespace.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 Cr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));Cr.displayName="Card";var Nr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("flex flex-col space-y-1.5 p-6",e),...t}));Nr.displayName="CardHeader";var kr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("font-semibold leading-none tracking-tight",e),...t}));kr.displayName="CardTitle";var Mr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Mr.displayName="CardDescription";var Er=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("p-6 pt-0",e),...t}));Er.displayName="CardContent";var Hr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("flex items-center p-6 pt-0",e),...t}));Hr.displayName="CardFooter";var Lr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(_e__namespace.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__namespace.createElement(_e__namespace.Indicator,{className:a("flex items-center justify-center text-current")},y__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));Lr.displayName=_e__namespace.Root.displayName;var De=de__namespace.Root,Ie=de__namespace.Trigger,Ea=de__namespace.Anchor,Ne=y__namespace.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},n)=>y__namespace.createElement(de__namespace.Portal,null,y__namespace.createElement(de__namespace.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})));Ne.displayName=de__namespace.Content.displayName;var Ha="PPP",La="LLL dd, y";function Da({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=Ha,captionLayout:p,icon:c,"aria-label":u}){return y__namespace.createElement(De,null,y__namespace.createElement(Ie,{asChild:true},y__namespace.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__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,s):y__namespace.createElement("span",null,r))),y__namespace.createElement(Ne,{className:a("w-auto p-0",i),align:d,side:l},y__namespace.createElement(lt,{mode:"single",selected:e,onSelect:t,captionLayout:p,initialFocus:true})))}function Ia({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=La,captionLayout:p,icon:c,numberOfMonths:u=2,"aria-label":g}){let h=!!e?.from;return y__namespace.createElement(De,null,y__namespace.createElement(Ie,{asChild:true},y__namespace.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__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?y__namespace.createElement(y__namespace.Fragment,null,dateFns.format(e.from,s)," \u2013"," ",dateFns.format(e.to,s)):dateFns.format(e.from,s):y__namespace.createElement("span",null,r))),y__namespace.createElement(Ne,{className:a("w-auto p-0",i),align:d,side:l},y__namespace.createElement(lt,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:u,captionLayout:p,initialFocus:true})))}var Fa=F__namespace.Root,Oa=F__namespace.Trigger,Ir=F__namespace.Portal,Ga=F__namespace.Close,Dt=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.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}));Dt.displayName=F__namespace.Overlay.displayName;var Ar=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(Ir,null,y__namespace.createElement(Dt,null),y__namespace.createElement(F__namespace.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__namespace.createElement(F__namespace.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__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),y__namespace.createElement("span",{className:"sr-only"},"Close")))));Ar.displayName=F__namespace.Content.displayName;var Fr=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Fr.displayName="DialogHeader";var Or=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Or.displayName="DialogFooter";var Gr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Title,{ref:r,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Gr.displayName=F__namespace.Title.displayName;var $r=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));$r.displayName=F__namespace.Description.displayName;var _a=x__namespace.Root,Ka=x__namespace.Trigger,za=x__namespace.Group,Va=x__namespace.Portal,Wa=x__namespace.Sub,ja=x__namespace.RadioGroup,Br=y__namespace.forwardRef(({className:e,inset:t,children:r,...o},n)=>y__namespace.createElement(x__namespace.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__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"})));Br.displayName=x__namespace.SubTrigger.displayName;var Ur=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(x__namespace.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}));Ur.displayName=x__namespace.SubContent.displayName;var _r=y__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>y__namespace.createElement(x__namespace.Portal,null,y__namespace.createElement(x__namespace.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})));_r.displayName=x__namespace.Content.displayName;var Kr=y__namespace.forwardRef(({className:e,inset:t,...r},o)=>y__namespace.createElement(x__namespace.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}));Kr.displayName=x__namespace.Item.displayName;var zr=y__namespace.forwardRef(({className:e,children:t,checked:r,...o},n)=>y__namespace.createElement(x__namespace.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__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y__namespace.createElement(x__namespace.ItemIndicator,null,y__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),t));zr.displayName=x__namespace.CheckboxItem.displayName;var Vr=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(x__namespace.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__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y__namespace.createElement(x__namespace.ItemIndicator,null,y__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t));Vr.displayName=x__namespace.RadioItem.displayName;var Wr=y__namespace.forwardRef(({className:e,inset:t,...r},o)=>y__namespace.createElement(x__namespace.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Wr.displayName=x__namespace.Label.displayName;var jr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(x__namespace.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));jr.displayName=x__namespace.Separator.displayName;var qr=({className:e,...t})=>y__namespace.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});qr.displayName="DropdownMenuShortcut";var Yr=y__namespace.forwardRef(({className:e,type:t,...r},o)=>y__namespace.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}));Yr.displayName="Input";var Ya=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Xr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(It__namespace.Root,{ref:r,className:a(Ya(),e),...t}));Xr.displayName=It__namespace.Root.displayName;var Zr=y__namespace.forwardRef(({className:e,value:t,...r},o)=>y__namespace.createElement(Ve__namespace.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},y__namespace.createElement(Ve__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Zr.displayName=Ve__namespace.Root.displayName;var Jr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(xe__namespace.Root,{className:a("grid gap-2",e),...t,ref:r}));Jr.displayName=xe__namespace.Root.displayName;var Qr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(xe__namespace.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__namespace.createElement(xe__namespace.Indicator,{className:"flex items-center justify-center"},y__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Qr.displayName=xe__namespace.Item.displayName;var eo=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(ne__namespace.Root,{ref:o,className:a("relative overflow-hidden",e),...r},y__namespace.createElement(ne__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),y__namespace.createElement(At,null),y__namespace.createElement(ne__namespace.Corner,null)));eo.displayName=ne__namespace.Root.displayName;var At=y__namespace.forwardRef(({className:e,orientation:t="vertical",...r},o)=>y__namespace.createElement(ne__namespace.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__namespace.createElement(ne__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));At.displayName=ne__namespace.ScrollAreaScrollbar.displayName;var Qa=R__namespace.Root,en=R__namespace.Group,tn=R__namespace.Value,ro=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(R__namespace.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__namespace.createElement(R__namespace.Icon,{asChild:true},y__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 opacity-50"}))));ro.displayName=R__namespace.Trigger.displayName;var Ft=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(R__namespace.ScrollUpButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},y__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));Ft.displayName=R__namespace.ScrollUpButton.displayName;var Ot=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(R__namespace.ScrollDownButton,{ref:r,className:a("flex cursor-default items-center justify-center py-1",e),...t},y__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Ot.displayName=R__namespace.ScrollDownButton.displayName;var oo=y__namespace.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>y__namespace.createElement(R__namespace.Portal,null,y__namespace.createElement(R__namespace.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__namespace.createElement(Ft,null),y__namespace.createElement(R__namespace.Viewport,{className:a("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),y__namespace.createElement(Ot,null))));oo.displayName=R__namespace.Content.displayName;var ao=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(R__namespace.Label,{ref:r,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ao.displayName=R__namespace.Label.displayName;var no=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(R__namespace.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__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},y__namespace.createElement(R__namespace.ItemIndicator,null,y__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),y__namespace.createElement(R__namespace.ItemText,null,t)));no.displayName=R__namespace.Item.displayName;var io=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(R__namespace.Separator,{ref:r,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));io.displayName=R__namespace.Separator.displayName;var so=y__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>y__namespace.createElement(Gt__namespace.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}));so.displayName=Gt__namespace.Root.displayName;var an=F__namespace.Root,nn=F__namespace.Trigger,sn=F__namespace.Close,co=F__namespace.Portal,$t=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.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}));$t.displayName=F__namespace.Overlay.displayName;var dn=classVarianceAuthority.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"}}),lo=y__namespace.forwardRef(({side:e="right",className:t,children:r,...o},n)=>y__namespace.createElement(co,null,y__namespace.createElement($t,null),y__namespace.createElement(F__namespace.Content,{ref:n,className:a(dn({side:e}),t),...o},r,y__namespace.createElement(F__namespace.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__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),y__namespace.createElement("span",{className:"sr-only"},"Close")))));lo.displayName=F__namespace.Content.displayName;var po=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});po.displayName="SheetHeader";var mo=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mo.displayName="SheetFooter";var uo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Title,{ref:r,className:a("text-lg font-semibold text-foreground",e),...t}));uo.displayName=F__namespace.Title.displayName;var fo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));fo.displayName=F__namespace.Description.displayName;function cn({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var go=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ge__namespace.Root,{ref:r,className:a("relative flex w-full touch-none select-none items-center",e),...t},y__namespace.createElement(ge__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},y__namespace.createElement(ge__namespace.Range,{className:"absolute h-full bg-primary"})),y__namespace.createElement(ge__namespace.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"})));go.displayName=ge__namespace.Root.displayName;var ho=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(je__namespace.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__namespace.createElement(je__namespace.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")})));ho.displayName=je__namespace.Root.displayName;var yo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{className:"relative w-full overflow-auto"},y__namespace.createElement("table",{ref:r,className:a("w-full caption-bottom text-sm",e),...t})));yo.displayName="Table";var vo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));vo.displayName="TableHeader";var bo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));bo.displayName="TableBody";var xo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("tfoot",{ref:r,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));xo.displayName="TableFooter";var Ro=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("tr",{ref:r,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ro.displayName="TableRow";var To=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.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}));To.displayName="TableHead";var wo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("td",{ref:r,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));wo.displayName="TableCell";var Po=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));Po.displayName="TableCaption";var ln=ce__namespace.Root,So=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ce__namespace.List,{ref:r,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));So.displayName=ce__namespace.List.displayName;var Co=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ce__namespace.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}));Co.displayName=ce__namespace.Trigger.displayName;var No=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ce__namespace.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}));No.displayName=ce__namespace.Content.displayName;var ko=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.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}));ko.displayName="Textarea";var Bt=le__namespace.Provider,Ut=le__namespace.Root,_t=le__namespace.Trigger,ht=y__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>y__namespace.createElement(le__namespace.Portal,null,y__namespace.createElement(le__namespace.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__namespace.Content.displayName;var Eo=y__namespace.createContext(null);function Ho(){let e=y__namespace.useContext(Eo);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var un=({href:e,className:t,children:r})=>y__namespace.createElement("a",{href:e,className:t},r),Lo=y__namespace.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=un},g)=>{let[h,T]=y__namespace.useState(s),f=i??h,m=()=>{let w=!f;T(w),d?.(w);};return y__namespace.createElement(Bt,{delayDuration:0},y__namespace.createElement(Eo.Provider,{value:{collapsed:f,activeItem:p,LinkComponent:u}},y__namespace.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__namespace.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__namespace.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__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):y__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"}))),y__namespace.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&y__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(w=>y__namespace.createElement(Kt,{key:w.id,item:w}))),r?.map(w=>y__namespace.createElement(fn,{key:w.id,section:w}))),n&&y__namespace.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},n))))});Lo.displayName="SideMenu";function fn({section:e}){let{collapsed:t}=Ho(),[r,o]=y__namespace.useState(e.defaultExpanded??true);return t?y__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(n=>y__namespace.createElement(Kt,{key:n.id,item:n}))):y__namespace.createElement("div",{className:"px-2 mb-1"},y__namespace.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__namespace.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),y__namespace.createElement("span",{className:"flex-1 text-left"},e.title),r?y__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):y__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&y__namespace.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},y__namespace.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__namespace.createElement(Kt,{key:n.id,item:n,nested:true}))))}function Kt({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:n}=Ho(),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__namespace.createElement(y__namespace.Fragment,null,e.icon&&y__namespace.createElement("span",{className:a("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&y__namespace.createElement("span",null,e.label),!r&&e.badge&&y__namespace.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__namespace.createElement(n,{href:e.href,className:d},l):y__namespace.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:a(d,"w-full")},l);return r?y__namespace.createElement(Ut,null,y__namespace.createElement(_t,{asChild:true},s),y__namespace.createElement(ht,{side:"right",sideOffset:8},e.label)):s}var hn=({href:e,className:t,children:r})=>y__namespace.createElement("a",{href:e,className:t},r),Do=y__namespace.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:n,className:i,linkComponent:d=hn},l)=>y__namespace.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__namespace.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__namespace.createElement(lucideReact.Menu,{className:"h-4 w-4"})),e.length>0&&y__namespace.createElement("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb"},e.map((s,p)=>y__namespace.createElement(y__namespace.Fragment,{key:p},p>0&&y__namespace.createElement("span",{className:"text-rds-gray-400 dark:text-rds-gray-500 text-xs"},"/"),s.href?y__namespace.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__namespace.createElement("span",{className:"text-rds-gray-900 dark:text-white font-medium text-sm"},s.label)))),o,y__namespace.createElement("div",{className:"flex-1"}),n&&y__namespace.createElement("div",{className:"flex items-center gap-1.5"},n)));Do.displayName="TopMenu";var Io=y__namespace.forwardRef(({name:e,email:t,avatarUrl:r,avatarContent:o,avatarClassName:n,children:i,className:d},l)=>{let[s,p]=y__namespace.useState(false),c=y__namespace.useRef(null);return y__namespace.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__namespace.createElement("div",{ref:l,className:a("relative",d)},y__namespace.createElement("div",{ref:c},y__namespace.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__namespace.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__namespace.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o)),s&&y__namespace.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__namespace.createElement("div",{className:"px-4 py-3 border-b border-rds-gray-200 dark:border-[#1a1a1a]"},y__namespace.createElement("div",{className:"flex items-center gap-3"},y__namespace.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__namespace.createElement("img",{src:r,alt:e||"User",className:"h-full w-full object-cover"}):o),y__namespace.createElement("div",{className:"flex-1 min-w-0"},e&&y__namespace.createElement("p",{className:"text-sm font-medium text-rds-gray-900 dark:text-white truncate"},e),t&&y__namespace.createElement("p",{className:"text-xs text-rds-gray-500 dark:text-rds-gray-400 truncate"},t)))),i)))});Io.displayName="TopMenuUser";var Ao=y__namespace.forwardRef(({icon:e,children:t,onClick:r,href:o,variant:n="default",className:i},d)=>y__namespace.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__namespace.createElement("span",{className:"h-4 w-4"},e),y__namespace.createElement("span",null,t)));Ao.displayName="TopMenuUserItem";var Fo=y__namespace.forwardRef(({children:e,className:t},r)=>y__namespace.createElement("div",{ref:r,className:a("py-1 border-t border-rds-gray-200 dark:border-[#1a1a1a] first:border-t-0",t)},e));Fo.displayName="TopMenuUserSection";var zt=y__namespace.createContext(null);function Vt(){let e=y__namespace.useContext(zt);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Oo=y__namespace.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:n,className:i,tabsClassName:d},l)=>{let[s,p]=y__namespace.useState(r||e[0]?.id||""),c=t??s,u=g=>{p(g),o?.(g);};return y__namespace.createElement(zt.Provider,{value:{activeTab:c,setActiveTab:u}},y__namespace.createElement("div",{ref:l,className:a("space-y-6",i)},y__namespace.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},y__namespace.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__namespace.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__namespace.createElement("span",{className:"h-4 w-4"},g.icon),g.label,h&&y__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),n&&y__namespace.createElement("div",null,n)))});Oo.displayName="SimpleTabs";var Go=y__namespace.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:n}=Vt();return n!==e?null:y__namespace.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});Go.displayName="SimpleTabsPanel";var $o=y__namespace.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:n},i)=>{let[d,l]=y__namespace.useState(t||""),s=e??d,p=c=>{l(c),r?.(c);};return y__namespace.createElement(zt.Provider,{value:{activeTab:s,setActiveTab:p}},y__namespace.createElement("div",{ref:i,className:a("space-y-6",n)},o))});$o.displayName="SimpleTabsRoot";var Bo=y__namespace.forwardRef(({children:e,className:t},r)=>y__namespace.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},y__namespace.createElement("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Bo.displayName="SimpleTabsList";var Uo=y__namespace.forwardRef(({value:e,children:t,icon:r,disabled:o,className:n},i)=>{let{activeTab:d,setActiveTab:l}=Vt(),s=d===e;return y__namespace.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__namespace.createElement("span",{className:"h-4 w-4"},r),t,s&&y__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});Uo.displayName="SimpleTabsTrigger";var _o=y__namespace.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:n}=Vt();return n!==e?null:y__namespace.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});_o.displayName="SimpleTabsContent";var yn={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},vn={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)"},ue=y__namespace.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__namespace.useRef(null);return y__namespace.useImperativeHandle(c,()=>u.current),y__namespace.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__namespace.createElement("div",{ref:u,"data-gds-part":"media-surface",className:a("rds-media-surface relative w-full overflow-hidden bg-muted",yn[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${vn[r]})`,...l},...p},s,n&&y__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},d))});ue.displayName="MediaSurface";function Me(){let[e,t]=y__namespace.useState(false);return y__namespace.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 Ko=y__namespace.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__namespace.useRef(null),w=Me(),[N,E]=y__namespace.useState(!!p);y__namespace.useImperativeHandle(f,()=>m.current);let M=n??r,K=r&&!w;y__namespace.useEffect(()=>{m.current&&(m.current.playbackRate=h);},[h]),y__namespace.useEffect(()=>{E(!!p);},[p]);let J=y__namespace.useCallback(ye=>{!i||!m.current||(ye&&K?m.current.play().catch(()=>{}):m.current.pause());},[i,K]);return y__namespace.createElement(ue,{aspect:d,radius:l,border:s,"aria-label":c,className:u,style:g,onVisibilityChange:i?J:void 0},y__namespace.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&&N&&y__namespace.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")}))});Ko.displayName="VideoPlayer";var zo=y__namespace.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=Me(),[N,E]=y__namespace.useState(null),[M,K]=y__namespace.useState(null);return y__namespace.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__namespace.createElement(ue,{ref:m,aspect:i,radius:d,border:l,"aria-label":p,className:c,style:u},M?y__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},M):N&&e?y__namespace.createElement(Rn,{Mod:N,src:e,stateMachines:g,artboard:h,fit:T,stateMachineInputs:f,autoPlay:r&&!w,loop:o,pauseOffscreen:n,controls:t,poster:s}):s&&y__namespace.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});zo.displayName="RivePlayer";function Rn({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})}),[N,E]=y__namespace.useState(i);y__namespace.useEffect(()=>{if(!m||!d)return;let K=()=>{m.play();};return m.on(T.Stop,K),()=>{m.off(T.Stop,K);}},[m,d,T]),y__namespace.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&&(N?(m.pause(),E(false)):(m.play(),E(true)));};return y__namespace.createElement(y__namespace.Fragment,null,y__namespace.createElement(w,{className:"w-full h-full"}),!m&&p&&y__namespace.createElement("img",{src:p,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&y__namespace.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__namespace.createElement(X,{size:"icon",variant:"secondary",onClick:M},N?y__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):y__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var Wo=({renderer:e,scene:t,camera:r,preset:o,width:n,height:i})=>{let d=new postprocessing.EffectComposer(e);d.setSize(n,i),d.addPass(new postprocessing.RenderPass(t,r));let l=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),s=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let p=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});p.blendMode.opacity.value=0;let c=new postprocessing.VignetteEffect({darkness:0,offset:.5}),u=new postprocessing.ChromaticAberrationEffect({offset:new I__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new postprocessing.GlitchEffect({chromaticAberrationOffset:new I__namespace.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,d.addPass(new postprocessing.EffectPass(r,l)),d.addPass(new postprocessing.EffectPass(r,s,p,c)),d.addPass(new postprocessing.EffectPass(r,u)),d.addPass(new postprocessing.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,jt=400,Hn=80,jo=({width:e,height:t,palette:r})=>{let o=new I__namespace.Scene;o.background=new I__namespace.Color(r.background);let n=new I__namespace.PerspectiveCamera(70,e/t,.1,jt*2);n.position.z=0;let i=new Float32Array(Ae*6),d=new Float32Array(Ae*6),l=new Float32Array(Ae),s=new I__namespace.Color(r.primary),p=new I__namespace.Color(r.accent);function c(m,w){let N=Math.random()*Math.PI*2,E=Hn*Math.pow(Math.random(),.6),M=Math.cos(N)*E,K=Math.sin(N)*E,J=w?-Math.random()*jt:-jt;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 I__namespace.BufferGeometry;u.setAttribute("position",new I__namespace.BufferAttribute(i,3)),u.setAttribute("color",new I__namespace.BufferAttribute(d,3));let g=new I__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:I__namespace.AdditiveBlending}),h=new I__namespace.LineSegments(u,g);o.add(h);let T=60,f=6;return {scene:o,camera:n,update:(m,w)=>{let N=u.attributes.position.array;for(let E=0;E<Ae;E++){let M=E*6;N[M+2]+=T*w,N[M+5]=N[M+2]-f,N[M+2]>5&&c(E,false);}u.attributes.position.needsUpdate=true;},resize:(m,w)=>{let N=n;N.aspect=m/w,N.updateProjectionMatrix();},setPalette:m=>{o.background=new I__namespace.Color(m.background);let w=new I__namespace.Color(m.primary),N=new I__namespace.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]=N.r,E[M*6+4]=N.g,E[M*6+5]=N.b;u.attributes.color.needsUpdate=true;},dispose:()=>{u.dispose(),g.dispose();}}};var Ln=`
|
|
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
|
+
`,Dn=`
|
|
40
|
+
varying vec2 vUv;
|
|
41
|
+
void main() {
|
|
42
|
+
vUv = uv;
|
|
43
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
44
|
+
}
|
|
45
|
+
`,qo=({width:e,height:t,palette:r})=>{let o=new I__namespace.Scene,n=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new I__namespace.Vector2(e,t)},uBackground:{value:new I__namespace.Color(r.background)},uPrimary:{value:new I__namespace.Color(r.primary)},uSecondary:{value:new I__namespace.Color(r.secondary)},uAccent:{value:new I__namespace.Color(r.accent)}},d=new I__namespace.ShaderMaterial({uniforms:i,vertexShader:Dn,fragmentShader:Ln,depthTest:false,depthWrite:false}),l=new I__namespace.PlaneGeometry(2,2),s=new I__namespace.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 In=`
|
|
46
|
+
varying vec2 vUv;
|
|
47
|
+
void main() {
|
|
48
|
+
vUv = uv;
|
|
49
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
50
|
+
}
|
|
51
|
+
`,An=`
|
|
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
|
+
`,Yo=({width:e,height:t,palette:r})=>{let o=new I__namespace.Scene,n=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new I__namespace.Vector2(e,t)},uBackground:{value:new I__namespace.Color(r.background)},uPrimary:{value:new I__namespace.Color(r.primary)},uSecondary:{value:new I__namespace.Color(r.secondary)},uAccent:{value:new I__namespace.Color(r.accent)}},d=new I__namespace.ShaderMaterial({uniforms:i,vertexShader:In,fragmentShader:An,depthTest:false,depthWrite:false}),l=new I__namespace.PlaneGeometry(2,2),s=new I__namespace.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 Fn=`
|
|
109
|
+
varying vec2 vUv;
|
|
110
|
+
void main() {
|
|
111
|
+
vUv = uv;
|
|
112
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
113
|
+
}
|
|
114
|
+
`,On=`
|
|
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
|
+
`,Xo=({palette:e})=>{let t=new I__namespace.Scene,r=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),o={uTime:{value:0},uBackground:{value:new I__namespace.Color(e.background)},uPrimary:{value:new I__namespace.Color(e.primary)},uSecondary:{value:new I__namespace.Color(e.secondary)},uAccent:{value:new I__namespace.Color(e.accent)}},n=new I__namespace.ShaderMaterial({uniforms:o,vertexShader:Fn,fragmentShader:On,depthTest:false,depthWrite:false}),i=new I__namespace.PlaneGeometry(2,2),d=new I__namespace.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:jo,plasma:qo,voronoi:Yo,synthwave:Xo},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 Zo=`
|
|
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
|
+
`,Gn=`
|
|
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 $n(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 qt(e){return ({renderer:t,width:r,height:o,palette:n})=>{let i=`${Zo}
|
|
202
|
+
${e}`;$n(t,i);let d=new I__namespace.Scene,l=new I__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new I__namespace.Vector2(r,o)},uMouse:{value:new I__namespace.Vector2(.5,.5)},uPrimary:{value:new I__namespace.Color(n.primary)},uSecondary:{value:new I__namespace.Color(n.secondary)},uAccent:{value:new I__namespace.Color(n.accent)},uBackground:{value:new I__namespace.Color(n.background)}},p=new I__namespace.ShaderMaterial({uniforms:s,vertexShader:Gn,fragmentShader:i,depthTest:false,depthWrite:false}),c=new I__namespace.PlaneGeometry(2,2),u=new I__namespace.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 Qe={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"};function bt(e,t,r){if(typeof document>"u")return r;let o=document.createElement("span");if(o.style.color="",o.style.color=e,o.style.color==="")return r;o.style.display="none",t.appendChild(o);let n=getComputedStyle(o).color;return t.removeChild(o),n||r}function Jo(e,t){return {primary:bt(e.primary,t,Qe.primary),secondary:bt(e.secondary,t,Qe.secondary),accent:bt(e.accent,t,Qe.accent),background:bt(e.background,t,Qe.background)}}var xt=y__namespace.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 N=y__namespace.useRef(null),[E,M]=y__namespace.useState(l),[K,J]=y__namespace.useState(false),ye=Me(),Mt=y__namespace.useMemo(()=>({...Qe,...n}),[n]),Et=y__namespace.useMemo(()=>i||(t?qt(t):e&&Ye[e]?Ye[e]:null),[i,t,e]),sr=y__namespace.useMemo(()=>{if(o)return o;if(e){let A=Ze[e];if(A?.defaultPostPreset)return A.defaultPostPreset}return vt},[o,e]);y__namespace.useEffect(()=>{let A=N.current;if(!A||!Et)return;let nt=A.clientWidth||1,it=A.clientHeight||1,Lt=Jo(Mt,A),$=new I__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),ma=m??Math.min(window.devicePixelRatio||1,2);$.setPixelRatio(ma),$.setSize(nt,it),$.setClearColor(new I__namespace.Color(Lt.background),1),$.domElement.dataset.gdsPart="shader-canvas",$.domElement.style.width="100%",$.domElement.style.height="100%",$.domElement.style.display="block",A.appendChild($.domElement);let pe;try{pe=Et({renderer:$,width:nt,height:it,palette:Lt});}catch(D){if(D instanceof Fe)r?.(D),pe=Ye.space({renderer:$,width:nt,height:it,palette:Lt});else throw $.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),D}let ua=Je[sr]??Je[vt],st=Wo({renderer:$,scene:pe.scene,camera:pe.camera,preset:ua,width:nt,height:it}),dr=new I__namespace.Clock,cr=0,$e=l&&!ye,lr=true,pr=()=>{if(cr=requestAnimationFrame(pr),!$e||s&&!lr)return;let D=dr.getDelta(),te=dr.getElapsedTime();pe.update?.(te,D),st.composer.render(D);};pr(),$e&&J(true);let mr=new ResizeObserver(([D])=>{let te=Math.max(1,Math.floor(D.contentRect.width)),Be=Math.max(1,Math.floor(D.contentRect.height));$.setSize(te,Be),st.resize(te,Be),pe.resize?.(te,Be);});mr.observe(A);let ur=new IntersectionObserver(([D])=>{lr=D.isIntersecting;},{threshold:.05});ur.observe(A);let fr=new MutationObserver(()=>{if(!N.current)return;let D=Jo(Mt,N.current);$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);});fr.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let gr=pe,dt=gr.setMouse?D=>{let te=A.getBoundingClientRect(),Be=(D.clientX-te.left)/te.width,fa=1-(D.clientY-te.top)/te.height;gr.setMouse(Be,fa);}:null;return dt&&A.addEventListener("pointermove",dt),Ht.current={toggle:()=>{$e=!$e,M($e);},setPalette:D=>{$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);},setPostPreset:D=>{let te=Je[D];te&&st.setPreset(te);}},()=>{cancelAnimationFrame(cr),mr.disconnect(),ur.disconnect(),fr.disconnect(),dt&&A.removeEventListener("pointermove",dt),st.dispose(),pe.dispose?.(),$.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),Ht.current=null;}},[Et,sr,Mt,l,ye,s,m,r]);let Ht=y__namespace.useRef(null),pa=()=>Ht.current?.toggle();return y__namespace.createElement(ue,{ref:A=>{N.current=A,typeof w=="function"?w(A):w&&(w.current=A);},aspect:p,radius:c,border:u,"aria-label":h,className:T,style:f,"data-gds-part":"three-scene"},!K&&g&&y__namespace.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&y__namespace.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__namespace.createElement(X,{size:"icon",variant:"secondary",onClick:pa},E?y__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):y__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});xt.displayName="ThreeScene";var Rt=y__namespace.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__namespace.useState(false),T=t==="always"||t==="hover"&&g;return y__namespace.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__namespace.createElement(xt,{preset:e,postPreset:r,palette:o,aspect:i,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:u?.poster,maxDpr:1}):y__namespace.createElement(ue,{aspect:i,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},u?.poster?y__namespace.createElement("img",{src:u.poster,alt:u.label,className:"w-full h-full object-cover"}):y__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},u?.label??e)),!s&&y__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},y__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},l??u?.label??e),u?.tags?.[0]&&y__namespace.createElement("span",{className:"text-muted-foreground"},u.tags[0])))});Rt.displayName="ShaderPresetPreview";function Kn({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:n,palette:i,columns:d=3,className:l}){let s=y__namespace.useMemo(()=>r?.length?Xe.filter(c=>r.some(u=>c.tags.includes(u))):Xe,[r]);return y__namespace.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__namespace.createElement("div",{key:c.id,className:"relative",role:"radio","aria-checked":u},y__namespace.createElement(Rt,{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__namespace.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__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function jn({children:e}){let t=y.useRef(null);return y.useEffect(()=>{let r=new Wn__default.default({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 Pe=[50,100,200,300,400,500,600,700,800,900,950],Qo=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],qn=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Tt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<Pe.length;n++){let i=Qo[n],d=qn[n]*t;o[Pe[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function ea(){let e={};for(let t=0;t<Pe.length;t++){let r=Qo[t];e[Pe[t]]=`${r.toFixed(4)} 0 0`;}return e}var Yt={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"}},et="1 0 0",ta="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 wt={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 Yn=["superLight","light","dark","superDark"],Xn={muted:.6,default:1,vibrant:1.3};function Zn(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}),Se=e=>({source:"accent",step:e}),tt=e=>({source:"pure",value:e}),Jn={superLight:{background:v(50),foreground:v(800),card:tt(et),cardForeground:v(800),popover:tt(et),popoverForeground:v(800),primary:ie(600),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(600),accentForeground:Se(50),border:v(200),input:v(200),ring:ie(500)},light:{background:v(50),foreground:v(950),card:tt(et),cardForeground:v(950),popover:tt(et),popoverForeground:v(950),primary:ie(500),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Se(500),accentForeground:Se(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:Se(400),accentForeground:Se(950),border:v(800),input:v(800),ring:ie(400)},superDark:{background:tt(ta),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:Se(300),accentForeground:Se(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 Qn(e,t){let r=Jn[t],o=t==="superLight"||t==="light",n=o?Yt.light:Yt.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},ei={compact:.85,default:1,spacious:1.18};function ti(e){let t=ei[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:wt[e.body],fontMono:wt[e.mono],fontDisplay:wt[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 ri={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function oi(e){let t=ri[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 ai={tight:.85,default:1,roomy:1.2};function ni(e){return {baseUnit:"1rem",densityFactor:ai[e.density]}}var ii={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 si(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:ii[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function Ee(e){let t=Xn[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?ea():Tt({hue:e.hues.neutral,chromaScale:o}),l=Tt({hue:e.hues.primary,chromaScale:n}),s=Tt({hue:e.hues.accent,chromaScale:i}),p={neutral:d,primary:l,accent:s},c=Zn(e.hues,{primary:n,accent:i},t),u=Object.fromEntries(Yn.map(w=>[w,Qn(p,w)])),g=ti(e.typography),h=oi(e.radius),T=ni(e.spacing),f=si(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 rt={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"}},Xt={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"}},Pt=[rt,Xt];function di(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 Jt(e,t){let r=e.colors[t];return {...di(r),...Zt("neutral",e.ramps.neutral),...Zt("primary",e.ramps.primary),...Zt("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 Zt(e,t){let r={};for(let o of Pe)r[`--ramp-${e}-${o}`]=t[o];return r}function St(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Jt(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 ot(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 ci(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=ot(e);return {oklch:i,hex:d}}function Qt(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Pe){let{oklch:i,hex:d}=ci(t[n]);o.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
203
|
+
`)}function ra(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let n=ot(o.light)||"\u2014",i=ot(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${n}\` (\`${o.light}\`) | \`${i}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
204
|
+
`)}function oa(e){return JSON.stringify(e.input,null,2)}function aa(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:li[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:ot(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,10 +211,10 @@
|
|
|
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
|
-
- **Radius style**: \`${t.radius.style}\` (base \`${
|
|
217
|
+
- **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
|
|
17
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
|
|
|
@@ -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
|
+
${oa(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
|
+
${Qt("Neutral",r.neutral,t.hues.neutral)}
|
|
41
242
|
|
|
42
|
-
${
|
|
243
|
+
${Qt("Primary",r.primary,t.hues.primary)}
|
|
43
244
|
|
|
44
|
-
${
|
|
245
|
+
${Qt("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
|
+
${ra("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
|
+
${ra("Status colors",h)}
|
|
57
258
|
|
|
58
259
|
## Chart palette
|
|
59
260
|
|
|
@@ -61,7 +262,7 @@ ${Oo("Status colors",R)}
|
|
|
61
262
|
|
|
62
263
|
| Slot | OKLCH | Hex |
|
|
63
264
|
|------|-------|-----|
|
|
64
|
-
${T.map(
|
|
265
|
+
${T.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
|
|
65
266
|
`)}
|
|
66
267
|
|
|
67
268
|
## Typography
|
|
@@ -93,27 +294,27 @@ ${T.map(l=>`| \`--chart-${l.slot}\` | \`${l.triplet}\` | \`${l.hex}\` |`).join(`
|
|
|
93
294
|
|
|
94
295
|
| Step | Value |
|
|
95
296
|
|------|-------|
|
|
96
|
-
| \`--radius\` (base) | \`${
|
|
97
|
-
| \`--rds-radius-sm\` | \`${
|
|
98
|
-
| \`--rds-radius-md\` | \`${
|
|
99
|
-
| \`--rds-radius-lg\` | \`${
|
|
100
|
-
| \`--rds-radius-xl\` | \`${
|
|
101
|
-
| \`--rds-radius-2xl\` | \`${
|
|
102
|
-
| \`--rds-radius-full\` | \`${
|
|
297
|
+
| \`--radius\` (base) | \`${d.base}\` |
|
|
298
|
+
| \`--rds-radius-sm\` | \`${d.sm}\` |
|
|
299
|
+
| \`--rds-radius-md\` | \`${d.md}\` |
|
|
300
|
+
| \`--rds-radius-lg\` | \`${d.lg}\` |
|
|
301
|
+
| \`--rds-radius-xl\` | \`${d.xl}\` |
|
|
302
|
+
| \`--rds-radius-2xl\` | \`${d["2xl"]}\` |
|
|
303
|
+
| \`--rds-radius-full\` | \`${d.full}\` |
|
|
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
|
|
|
111
312
|
| Var | Duration |
|
|
112
313
|
|-----|----------|
|
|
113
|
-
| \`--rds-transition-fast\` | \`${
|
|
114
|
-
| \`--rds-transition-base\` | \`${
|
|
115
|
-
| \`--rds-transition-slow\` | \`${
|
|
116
|
-
| \`--rds-transition-slower\` | \`${
|
|
314
|
+
| \`--rds-transition-fast\` | \`${s.motion.fast}\` |
|
|
315
|
+
| \`--rds-transition-base\` | \`${s.motion.base}\` |
|
|
316
|
+
| \`--rds-transition-slow\` | \`${s.motion.slow}\` |
|
|
317
|
+
| \`--rds-transition-slower\` | \`${s.motion.slower}\` |
|
|
117
318
|
|
|
118
319
|
### Shadows
|
|
119
320
|
|
|
@@ -121,10 +322,10 @@ All shadows are applied via Tailwind's \`shadow-*\` utilities mapped to these va
|
|
|
121
322
|
|
|
122
323
|
| Var | Value |
|
|
123
324
|
|-----|-------|
|
|
124
|
-
| \`--rds-shadow-sm\` | \`${
|
|
125
|
-
| \`--rds-shadow-md\` | \`${
|
|
126
|
-
| \`--rds-shadow-lg\` | \`${
|
|
127
|
-
| \`--rds-shadow-xl\` | \`${
|
|
325
|
+
| \`--rds-shadow-sm\` | \`${s.shadows.sm}\` |
|
|
326
|
+
| \`--rds-shadow-md\` | \`${s.shadows.md}\` |
|
|
327
|
+
| \`--rds-shadow-lg\` | \`${s.shadows.lg}\` |
|
|
328
|
+
| \`--rds-shadow-xl\` | \`${s.shadows.xl}\` |
|
|
128
329
|
|
|
129
330
|
## CSS variable conventions
|
|
130
331
|
|
|
@@ -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
|
+
${pi(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 = ${oa(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 li={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 pi(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 er(e){if(typeof window>"u"||typeof document>"u")return;let t=aa(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 fe=Object.fromEntries(Pt.map(e=>[e.id,Ee(e)])),Ge=rt.id;function He(e){if(e in fe)return fe[e];let t=rr(e);if(t)return Ee(t)}function tr(){return [...Object.values(fe),...sa()]}var na="ramp-user-themes";function Ct(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(na);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function ia(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(na,JSON.stringify(e));}catch{}}function sa(){return Object.values(Ct()).map(Ee)}function rr(e){return Ct()[e]}function Nt(e){let t=Ct();return t[e.id]=e,ia(t),Ee(e)}function or(e){if(e in fe)return;let t=Ct();delete t[e],ia(t);}function mi(e,t,r){let o=fe[e]?.input??rr(e);if(!o)return;let n={...o,id:t,name:r};return Nt(n),n}var ar="ramp-theme",kt="ramp-mode",ca=["superLight","light","dark","superDark"],da=new Set(["dark","superDark"]),ui=`
|
|
215
416
|
(function() {
|
|
216
417
|
try {
|
|
217
|
-
var mode = localStorage.getItem('${
|
|
418
|
+
var mode = localStorage.getItem('${kt}');
|
|
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('${ar}');
|
|
227
428
|
if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);
|
|
228
429
|
} catch(e) {}
|
|
229
430
|
})();
|
|
230
|
-
`,jt=h__namespace.createContext(null);function Kn({children:e,defaultTheme:t=He,defaultMode:r="light"}){let[o,n]=h__namespace.useState(t),[i,s]=h__namespace.useState(r),[m,d]=h__namespace.useState(0);h__namespace.useEffect(()=>{try{let l=localStorage.getItem(zt);l&&Ce(l)&&n(l);let c=localStorage.getItem(yt);if(c&&Wo.includes(c))s(c);else if(typeof window<"u"){let P=window.matchMedia("(prefers-color-scheme: dark)").matches;s(P?"dark":"light");}}catch{}},[]),h__namespace.useEffect(()=>{let l=Ce(o)??Ce(He);l&&(ft(l,i),typeof document<"u"&&document.documentElement.classList.toggle("dark",Uo.has(i)));},[o,i,m]),h__namespace.useEffect(()=>{if(typeof window>"u")return;let l=window.matchMedia("(prefers-color-scheme: dark)"),c=P=>{try{if(localStorage.getItem(yt))return}catch{return}s(P.matches?"dark":"light");};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[]);let p=h__namespace.useCallback(l=>{n(l);try{localStorage.setItem(zt,l);}catch{}},[]),f=h__namespace.useCallback(l=>{s(l);try{localStorage.setItem(yt,l);}catch{}},[]),u=h__namespace.useCallback(l=>{ht(l),d(c=>c+1),p(l.id);},[p]),g=h__namespace.useCallback(l=>{l in de||(Vt(l),d(c=>c+1),n(c=>c===l?He:c));},[]),R=h__namespace.useCallback(()=>{d(l=>l+1);},[]),T=h__namespace.useMemo(()=>{let l=Ce(o)??Ce(He);return {theme:l,themeId:l.id,mode:i,isDark:Uo.has(i),setThemeId:p,setMode:f,themes:Ut(),saveAndActivate:u,deleteTheme:g,refresh:R}},[o,i,m,p,f,u,g,R]);return h__namespace.createElement(jt.Provider,{value:T},e)}function qt(){let e=h__namespace.useContext(jt);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Je(){return h__namespace.useContext(jt)}function zn({className:e}){let t=Je();if(!t)return null;let{theme:r,themes:o,setThemeId:n,deleteTheme:i}=t;return h__namespace.createElement(Me,null,h__namespace.createElement(Le,{asChild:true},h__namespace.createElement(j,{variant:"ghost",size:"sm",className:a("gap-2",e),"aria-label":"Switch theme"},h__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),h__namespace.createElement("span",{className:"hidden sm:inline"},r.name))),h__namespace.createElement(Re,{className:"w-80 p-2",align:"end"},h__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},h__namespace.createElement("div",null,h__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),h__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),h__namespace.createElement("button",{type:"button",onClick:()=>_t(r),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},h__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),h__namespace.createElement("div",{className:"flex flex-col gap-0.5"},o.map(s=>{let m=s.id===r.id,d=s.id in de,p=s.ramps.primary[500],f=s.ramps.accent[500],u=s.ramps.neutral[500];return h__namespace.createElement("div",{key:s.id,className:a("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},h__namespace.createElement("button",{type:"button",onClick:()=>n(s.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},h__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},h__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),h__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${f})`},"aria-hidden":true}),h__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${u})`},"aria-hidden":true})),h__namespace.createElement("div",{className:"min-w-0 flex-1"},h__namespace.createElement("div",{className:"flex items-center gap-2"},h__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},s.name),s.tagline&&h__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},s.tagline)),s.description&&h__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},s.description))),m&&h__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!d&&!m&&h__namespace.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),i(s.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${s.name}`},h__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var Vo=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Xn({className:e,variant:t="icons"}){let r=Je();if(!r)return null;let{mode:o,setMode:n}=r;return t==="labeled"?h__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:a("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Vo.map(({mode:i,label:s,icon:m})=>{let d=o===i;return h__namespace.createElement("button",{key:i,type:"button",role:"radio","aria-checked":d,onClick:()=>n(i),className:a("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",d?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},h__namespace.createElement(m,{className:"h-4 w-4"}),h__namespace.createElement("span",null,s))})):h__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:a("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Vo.map(({mode:i,icon:s,tooltip:m})=>{let d=o===i;return h__namespace.createElement("button",{key:i,type:"button",role:"radio","aria-checked":d,"aria-label":m,title:m,onClick:()=>n(i),className:a("flex h-7 w-7 items-center justify-center rounded transition-colors",d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},h__namespace.createElement(s,{className:"h-3.5 w-3.5"}))}))}function ei(){let{isDark:e,setMode:t}=qt();return React.createElement(j,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}exports.ALL_MODES=Wo;exports.Accordion=Qo;exports.AccordionContent=ar;exports.AccordionItem=rr;exports.AccordionTrigger=or;exports.Alert=nr;exports.AlertDescription=sr;exports.AlertTitle=ir;exports.BUILT_IN_INPUTS=ut;exports.Badge=ra;exports.Button=j;exports.Calendar=Ze;exports.CalendarDayButton=pr;exports.Card=mr;exports.CardContent=hr;exports.CardDescription=gr;exports.CardFooter=yr;exports.CardHeader=ur;exports.CardTitle=fr;exports.Checkbox=br;exports.DatePicker=ua;exports.DateRangePicker=fa;exports.Dialog=ha;exports.DialogClose=ba;exports.DialogContent=Rr;exports.DialogDescription=Sr;exports.DialogFooter=Pr;exports.DialogHeader=Tr;exports.DialogOverlay=Tt;exports.DialogPortal=xr;exports.DialogTitle=wr;exports.DialogTrigger=ya;exports.DropdownMenu=Ta;exports.DropdownMenuCheckboxItem=Lr;exports.DropdownMenuContent=kr;exports.DropdownMenuGroup=wa;exports.DropdownMenuItem=Mr;exports.DropdownMenuLabel=Er;exports.DropdownMenuPortal=Sa;exports.DropdownMenuRadioGroup=Na;exports.DropdownMenuRadioItem=Dr;exports.DropdownMenuSeparator=Hr;exports.DropdownMenuShortcut=Ir;exports.DropdownMenuSub=Ca;exports.DropdownMenuSubContent=Nr;exports.DropdownMenuSubTrigger=Cr;exports.DropdownMenuTrigger=Pa;exports.GRADE_PRE_HYDRATION_SCRIPT=Bn;exports.GradeModeSwitcher=Xn;exports.GradeThemeProvider=Kn;exports.GradeThemeSwitcher=zn;exports.Input=Ar;exports.Label=Fr;exports.LenisProvider=xn;exports.MediaSurface=se;exports.Popover=Me;exports.PopoverAnchor=ca;exports.PopoverContent=Re;exports.PopoverTrigger=Le;exports.Progress=Or;exports.RadioGroup=$r;exports.RadioGroupItem=Gr;exports.RivePlayer=Lo;exports.ScrollArea=Br;exports.ScrollBar=wt;exports.Select=Ha;exports.SelectContent=Ur;exports.SelectGroup=Ia;exports.SelectItem=Vr;exports.SelectLabel=Wr;exports.SelectScrollDownButton=Ct;exports.SelectScrollUpButton=St;exports.SelectSeparator=zr;exports.SelectTrigger=_r;exports.SelectValue=Aa;exports.Separator=jr;exports.ShaderPresetPicker=hn;exports.ShaderPresetPreview=ct;exports.Sheet=$a;exports.SheetClose=Ba;exports.SheetContent=Yr;exports.SheetDescription=Zr;exports.SheetFooter=Xr;exports.SheetHeader=Jr;exports.SheetOverlay=kt;exports.SheetPortal=qr;exports.SheetTitle=Qr;exports.SheetTrigger=Ga;exports.SideMenu=bo;exports.SimpleTabs=Po;exports.SimpleTabsContent=ko;exports.SimpleTabsList=Co;exports.SimpleTabsPanel=wo;exports.SimpleTabsRoot=So;exports.SimpleTabsTrigger=No;exports.Skeleton=_a;exports.Slider=eo;exports.Switch=to;exports.Table=ro;exports.TableBody=ao;exports.TableCaption=co;exports.TableCell=lo;exports.TableFooter=no;exports.TableHead=so;exports.TableHeader=oo;exports.TableRow=io;exports.Tabs=Ua;exports.TabsContent=uo;exports.TabsList=po;exports.TabsTrigger=mo;exports.Textarea=fo;exports.ThemeToggle=ei;exports.ThreeScene=lt;exports.Tooltip=Lt;exports.TooltipContent=nt;exports.TooltipProvider=Mt;exports.TooltipTrigger=Dt;exports.TopMenu=vo;exports.TopMenuUser=xo;exports.TopMenuUserItem=Ro;exports.TopMenuUserSection=To;exports.VideoPlayer=Mo;exports.applyThemeToRoot=ft;exports.badgeVariants=lr;exports.builtInThemes=de;exports.buttonVariants=Ae;exports.calmInput=qe;exports.cn=a;exports.defaultPostPreset=dt;exports.defaultThemeId=He;exports.deleteUserTheme=Vt;exports.duplicateTheme=Gn;exports.energyInput=$t;exports.generateTheme=Se;exports.getTheme=Ce;exports.listThemes=Ut;exports.listUserThemes=_o;exports.loadUserThemeInput=Wt;exports.postPresets=Ve;exports.saveUserTheme=ht;exports.sceneRegistry=st;exports.shaderPresetById=We;exports.shaderPresets=Ue;exports.themeToCSSVars=Bt;exports.useGradeTheme=qt;exports.useMaybeGradeTheme=Je;exports.usePrefersReducedMotion=Pe;//# sourceMappingURL=index.js.map
|
|
431
|
+
`,nr=y__namespace.createContext(null);function fi({children:e,defaultTheme:t=Ge,defaultMode:r="light"}){let[o,n]=y__namespace.useState(t),[i,d]=y__namespace.useState(r),[l,s]=y__namespace.useState(0);y__namespace.useEffect(()=>{try{let f=localStorage.getItem(ar);f&&He(f)&&n(f);let m=localStorage.getItem(kt);if(m&&ca.includes(m))d(m);else if(typeof window<"u"){let w=window.matchMedia("(prefers-color-scheme: dark)").matches;d(w?"dark":"light");}}catch{}},[]),y__namespace.useEffect(()=>{let f=He(o)??He(Ge);f&&(St(f,i),typeof document<"u"&&document.documentElement.classList.toggle("dark",da.has(i)));},[o,i,l]),y__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),m=w=>{try{if(localStorage.getItem(kt))return}catch{return}d(w.matches?"dark":"light");};return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[]);let p=y__namespace.useCallback(f=>{n(f);try{localStorage.setItem(ar,f);}catch{}},[]),c=y__namespace.useCallback(f=>{d(f);try{localStorage.setItem(kt,f);}catch{}},[]),u=y__namespace.useCallback(f=>{Nt(f),s(m=>m+1),p(f.id);},[p]),g=y__namespace.useCallback(f=>{f in fe||(or(f),s(m=>m+1),n(m=>m===f?Ge:m));},[]),h=y__namespace.useCallback(()=>{s(f=>f+1);},[]),T=y__namespace.useMemo(()=>{let f=He(o)??He(Ge);return {theme:f,themeId:f.id,mode:i,isDark:da.has(i),setThemeId:p,setMode:c,themes:tr(),saveAndActivate:u,deleteTheme:g,refresh:h}},[o,i,l,p,c,u,g,h]);return y__namespace.createElement(nr.Provider,{value:T},e)}function ir(){let e=y__namespace.useContext(nr);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function at(){return y__namespace.useContext(nr)}function bi({className:e}){let t=at();if(!t)return null;let{theme:r,themes:o,setThemeId:n,deleteTheme:i}=t;return y__namespace.createElement(De,null,y__namespace.createElement(Ie,{asChild:true},y__namespace.createElement(X,{variant:"ghost",size:"sm",className:a("gap-2",e),"aria-label":"Switch theme"},y__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),y__namespace.createElement("span",{className:"hidden sm:inline"},r.name))),y__namespace.createElement(Ne,{className:"w-80 p-2",align:"end"},y__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},y__namespace.createElement("div",null,y__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),y__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),y__namespace.createElement("button",{type:"button",onClick:()=>er(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__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),y__namespace.createElement("div",{className:"flex flex-col gap-0.5"},o.map(d=>{let l=d.id===r.id,s=d.id in fe,p=d.ramps.primary[500],c=d.ramps.accent[500],u=d.ramps.neutral[500];return y__namespace.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__namespace.createElement("button",{type:"button",onClick:()=>n(d.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},y__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},y__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),y__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),y__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${u})`},"aria-hidden":true})),y__namespace.createElement("div",{className:"min-w-0 flex-1"},y__namespace.createElement("div",{className:"flex items-center gap-2"},y__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},d.name),d.tagline&&y__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},d.tagline)),d.description&&y__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},d.description))),l&&y__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!l&&y__namespace.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__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var la=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Pi({className:e,variant:t="icons"}){let r=at();if(!r)return null;let{mode:o,setMode:n}=r;return t==="labeled"?y__namespace.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)},la.map(({mode:i,label:d,icon:l})=>{let s=o===i;return y__namespace.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__namespace.createElement(l,{className:"h-4 w-4"}),y__namespace.createElement("span",null,d))})):y__namespace.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)},la.map(({mode:i,icon:d,tooltip:l})=>{let s=o===i;return y__namespace.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__namespace.createElement(d,{className:"h-3.5 w-3.5"}))}))}function Ni(){let{isDark:e,setMode:t}=ir();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(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}exports.ALL_MODES=ca;exports.Accordion=va;exports.AccordionContent=vr;exports.AccordionItem=hr;exports.AccordionTrigger=yr;exports.Alert=br;exports.AlertDescription=Rr;exports.AlertTitle=xr;exports.BUILT_IN_INPUTS=Pt;exports.Badge=Ta;exports.Button=X;exports.Calendar=lt;exports.CalendarDayButton=Sr;exports.Card=Cr;exports.CardContent=Er;exports.CardDescription=Mr;exports.CardFooter=Hr;exports.CardHeader=Nr;exports.CardTitle=kr;exports.Checkbox=Lr;exports.DatePicker=Da;exports.DateRangePicker=Ia;exports.Dialog=Fa;exports.DialogClose=Ga;exports.DialogContent=Ar;exports.DialogDescription=$r;exports.DialogFooter=Or;exports.DialogHeader=Fr;exports.DialogOverlay=Dt;exports.DialogPortal=Ir;exports.DialogTitle=Gr;exports.DialogTrigger=Oa;exports.DropdownMenu=_a;exports.DropdownMenuCheckboxItem=zr;exports.DropdownMenuContent=_r;exports.DropdownMenuGroup=za;exports.DropdownMenuItem=Kr;exports.DropdownMenuLabel=Wr;exports.DropdownMenuPortal=Va;exports.DropdownMenuRadioGroup=ja;exports.DropdownMenuRadioItem=Vr;exports.DropdownMenuSeparator=jr;exports.DropdownMenuShortcut=qr;exports.DropdownMenuSub=Wa;exports.DropdownMenuSubContent=Ur;exports.DropdownMenuSubTrigger=Br;exports.DropdownMenuTrigger=Ka;exports.FRAGMENT_HEADER=Zo;exports.GRADE_PRE_HYDRATION_SCRIPT=ui;exports.GradeModeSwitcher=Pi;exports.GradeThemeProvider=fi;exports.GradeThemeSwitcher=bi;exports.Input=Yr;exports.Label=Xr;exports.LenisProvider=jn;exports.MediaSurface=ue;exports.Popover=De;exports.PopoverAnchor=Ea;exports.PopoverContent=Ne;exports.PopoverTrigger=Ie;exports.Progress=Zr;exports.RadioGroup=Jr;exports.RadioGroupItem=Qr;exports.RivePlayer=zo;exports.ScrollArea=eo;exports.ScrollBar=At;exports.Select=Qa;exports.SelectContent=oo;exports.SelectGroup=en;exports.SelectItem=no;exports.SelectLabel=ao;exports.SelectScrollDownButton=Ot;exports.SelectScrollUpButton=Ft;exports.SelectSeparator=io;exports.SelectTrigger=ro;exports.SelectValue=tn;exports.Separator=so;exports.ShaderCompileError=Fe;exports.ShaderPresetPicker=Kn;exports.ShaderPresetPreview=Rt;exports.Sheet=an;exports.SheetClose=sn;exports.SheetContent=lo;exports.SheetDescription=fo;exports.SheetFooter=mo;exports.SheetHeader=po;exports.SheetOverlay=$t;exports.SheetPortal=co;exports.SheetTitle=uo;exports.SheetTrigger=nn;exports.SideMenu=Lo;exports.SimpleTabs=Oo;exports.SimpleTabsContent=_o;exports.SimpleTabsList=Bo;exports.SimpleTabsPanel=Go;exports.SimpleTabsRoot=$o;exports.SimpleTabsTrigger=Uo;exports.Skeleton=cn;exports.Slider=go;exports.Switch=ho;exports.Table=yo;exports.TableBody=bo;exports.TableCaption=Po;exports.TableCell=wo;exports.TableFooter=xo;exports.TableHead=To;exports.TableHeader=vo;exports.TableRow=Ro;exports.Tabs=ln;exports.TabsContent=No;exports.TabsList=So;exports.TabsTrigger=Co;exports.Textarea=ko;exports.ThemeToggle=Ni;exports.ThreeScene=xt;exports.Tooltip=Ut;exports.TooltipContent=ht;exports.TooltipProvider=Bt;exports.TooltipTrigger=_t;exports.TopMenu=Do;exports.TopMenuUser=Io;exports.TopMenuUserItem=Ao;exports.TopMenuUserSection=Fo;exports.VideoPlayer=Ko;exports.applyThemeToRoot=St;exports.badgeVariants=wr;exports.buildFragmentShaderScene=qt;exports.builtInThemes=fe;exports.buttonVariants=Ue;exports.calmInput=rt;exports.cn=a;exports.defaultPostPreset=vt;exports.defaultThemeId=Ge;exports.deleteUserTheme=or;exports.duplicateTheme=mi;exports.energyInput=Xt;exports.generateTheme=Ee;exports.getTheme=He;exports.listThemes=tr;exports.listUserThemes=sa;exports.loadUserThemeInput=rr;exports.postPresets=Je;exports.saveUserTheme=Nt;exports.sceneRegistry=Ye;exports.shaderPresetById=Ze;exports.shaderPresets=Xe;exports.themeToCSSVars=Jt;exports.useGradeTheme=ir;exports.useMaybeGradeTheme=at;exports.usePrefersReducedMotion=Me;//# sourceMappingURL=index.js.map
|
|
231
432
|
//# sourceMappingURL=index.js.map
|