@gradeui/ui 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +261 -94
- package/dist/index.d.ts +261 -94
- package/dist/index.js +240 -240
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +240 -240
- package/dist/index.mjs.map +1 -1
- package/dist/map/google.d.mts +6 -0
- package/dist/map/google.d.ts +6 -0
- package/dist/map/google.js +2 -0
- package/dist/map/google.js.map +1 -0
- package/dist/map/google.mjs +2 -0
- package/dist/map/google.mjs.map +1 -0
- package/dist/map/mapbox.d.mts +6 -0
- package/dist/map/mapbox.d.ts +6 -0
- package/dist/map/mapbox.js +3 -0
- package/dist/map/mapbox.js.map +1 -0
- package/dist/map/mapbox.mjs +3 -0
- package/dist/map/mapbox.mjs.map +1 -0
- package/dist/map/maplibre.d.mts +6 -0
- package/dist/map/maplibre.d.ts +6 -0
- package/dist/map/maplibre.js +3 -0
- package/dist/map/maplibre.js.map +1 -0
- package/dist/map/maplibre.mjs +3 -0
- package/dist/map/maplibre.mjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/types-BxywIwvG.d.mts +160 -0
- package/dist/types-BxywIwvG.d.ts +160 -0
- package/package.json +41 -4
package/dist/index.js
CHANGED
|
@@ -1,4 +1,233 @@
|
|
|
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'),Bt=require('@radix-ui/react-label'),We=require('@radix-ui/react-progress'),Re=require('@radix-ui/react-radio-group'),ne=require('@radix-ui/react-scroll-area'),R=require('@radix-ui/react-select'),zt=require('@radix-ui/react-separator'),ge=require('@radix-ui/react-slider'),qe=require('@radix-ui/react-switch'),le=require('@radix-ui/react-tabs'),ce=require('@radix-ui/react-tooltip'),I=require('three'),postprocessing=require('postprocessing'),Pi=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 Bt__namespace=/*#__PURE__*/_interopNamespace(Bt);var We__namespace=/*#__PURE__*/_interopNamespace(We);var Re__namespace=/*#__PURE__*/_interopNamespace(Re);var ne__namespace=/*#__PURE__*/_interopNamespace(ne);var R__namespace=/*#__PURE__*/_interopNamespace(R);var zt__namespace=/*#__PURE__*/_interopNamespace(zt);var ge__namespace=/*#__PURE__*/_interopNamespace(ge);var qe__namespace=/*#__PURE__*/_interopNamespace(qe);var le__namespace=/*#__PURE__*/_interopNamespace(le);var ce__namespace=/*#__PURE__*/_interopNamespace(ce);var I__namespace=/*#__PURE__*/_interopNamespace(I);var Pi__default=/*#__PURE__*/_interopDefault(Pi);function a(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var $a=ae__namespace.Root,wr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(ae__namespace.Item,{ref:r,className:a("border-b",e),...t}));wr.displayName="AccordionItem";var Pr=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"}))));Pr.displayName=ae__namespace.Trigger.displayName;var Sr=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)));Sr.displayName=ae__namespace.Content.displayName;var Ba=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"}}),Cr=y__namespace.forwardRef(({className:e,variant:t,...r},o)=>y__namespace.createElement("div",{ref:o,role:"alert",className:a(Ba({variant:t}),e),...r}));Cr.displayName="Alert";var Nr=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}));Nr.displayName="AlertTitle";var kr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));kr.displayName="AlertDescription";var Mr=classVarianceAuthority.cva("rds-app-shell min-h-screen w-full bg-background text-foreground",{variants:{nav:{none:"block",top:"grid grid-rows-[auto_1fr]",side:"grid grid-cols-[auto_1fr]"}},defaultVariants:{nav:"none"}}),Er=classVarianceAuthority.cva("rds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Hr=classVarianceAuthority.cva("rds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),Lr=y__namespace.forwardRef(({className:e,nav:t,asChild:r=false,...o},n)=>y__namespace.createElement(r?reactSlot.Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:a(Mr({nav:t,className:e})),...o}));Lr.displayName="AppShell";var Dr=y__namespace.forwardRef(({className:e,placement:t,sticky:r,asChild:o=false,...n},i)=>y__namespace.createElement(o?reactSlot.Slot:"nav",{ref:i,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:a(Er({placement:t,sticky:r,className:e})),...n}));Dr.displayName="AppShellNav";var Ir=y__namespace.forwardRef(({className:e,maxWidth:t,asChild:r=false,...o},n)=>y__namespace.createElement(r?reactSlot.Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:a(Hr({maxWidth:t,className:e})),...o}));Ir.displayName="AppShellMain";var Fr=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 _a({className:e,variant:t,rounded:r,...o}){return y__namespace.createElement("div",{className:a(Fr({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 pt({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,...m})=>y__namespace.createElement("div",{"data-slot":"calendar",ref:c,className:a(p),...m}),Chevron:({className:p,orientation:c,...m})=>c==="left"?y__namespace.createElement(lucideReact.ChevronLeftIcon,{className:a("size-4",p),...m}):c==="right"?y__namespace.createElement(lucideReact.ChevronRightIcon,{className:a("size-4",p),...m}):y__namespace.createElement(lucideReact.ChevronDownIcon,{className:a("size-4",p),...m}),DayButton:Gr,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 Gr({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 $r=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card",className:a("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));$r.displayName="Card";var Vr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card-header",className:a("flex flex-col space-y-1.5 p-6",e),...t}));Vr.displayName="CardHeader";var Br=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card-title",className:a("font-semibold leading-none tracking-tight",e),...t}));Br.displayName="CardTitle";var Ur=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card-description",className:a("text-sm text-muted-foreground",e),...t}));Ur.displayName="CardDescription";var _r=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card-content",className:a("p-6 pt-0",e),...t}));_r.displayName="CardContent";var Kr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("div",{ref:r,"data-gds-part":"card-footer",className:a("flex items-center p-6 pt-0",e),...t}));Kr.displayName="CardFooter";var zr=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"}))));zr.displayName=_e__namespace.Root.displayName;var Ie=de__namespace.Root,Ae=de__namespace.Trigger,Za=de__namespace.Anchor,ke=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})));ke.displayName=de__namespace.Content.displayName;var Ja="PPP",Qa="LLL dd, y";function en({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=Ja,captionLayout:p,icon:c,"aria-label":m}){return y__namespace.createElement(Ie,null,y__namespace.createElement(Ae,{asChild:true},y__namespace.createElement(X,{type:"button",variant:"outline",disabled:o,"aria-label":m??(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(ke,{className:a("w-auto p-0",i),align:d,side:l},y__namespace.createElement(pt,{mode:"single",selected:e,onSelect:t,captionLayout:p,initialFocus:true})))}function tn({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:n,contentClassName:i,align:d="start",side:l,format:s=Qa,captionLayout:p,icon:c,numberOfMonths:m=2,"aria-label":g}){let h=!!e?.from;return y__namespace.createElement(Ie,null,y__namespace.createElement(Ae,{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(ke,{className:a("w-auto p-0",i),align:d,side:l},y__namespace.createElement(pt,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:p,initialFocus:true})))}var on=F__namespace.Root,an=F__namespace.Trigger,jr=F__namespace.Portal,nn=F__namespace.Close,Vt=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}));Vt.displayName=F__namespace.Overlay.displayName;var qr=y__namespace.forwardRef(({className:e,children:t,...r},o)=>y__namespace.createElement(jr,null,y__namespace.createElement(Vt,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")))));qr.displayName=F__namespace.Content.displayName;var Yr=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Yr.displayName="DialogHeader";var Xr=({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});Xr.displayName="DialogFooter";var Zr=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}));Zr.displayName=F__namespace.Title.displayName;var Jr=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Jr.displayName=F__namespace.Description.displayName;var cn=x__namespace.Root,pn=x__namespace.Trigger,mn=x__namespace.Group,un=x__namespace.Portal,fn=x__namespace.Sub,gn=x__namespace.RadioGroup,Qr=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"})));Qr.displayName=x__namespace.SubTrigger.displayName;var eo=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}));eo.displayName=x__namespace.SubContent.displayName;var to=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})));to.displayName=x__namespace.Content.displayName;var ro=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}));ro.displayName=x__namespace.Item.displayName;var oo=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));oo.displayName=x__namespace.CheckboxItem.displayName;var ao=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));ao.displayName=x__namespace.RadioItem.displayName;var no=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}));no.displayName=x__namespace.Label.displayName;var io=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}));io.displayName=x__namespace.Separator.displayName;var so=({className:e,...t})=>y__namespace.createElement("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});so.displayName="DropdownMenuShortcut";var lo=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}));lo.displayName="Input";var yn=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),co=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(Bt__namespace.Root,{ref:r,className:a(yn(),e),...t}));co.displayName=Bt__namespace.Root.displayName;var po=y__namespace.forwardRef(({className:e,value:t,...r},o)=>y__namespace.createElement(We__namespace.Root,{ref:o,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},y__namespace.createElement(We__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));po.displayName=We__namespace.Root.displayName;var mo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(Re__namespace.Root,{className:a("grid gap-2",e),...t,ref:r}));mo.displayName=Re__namespace.Root.displayName;var uo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(Re__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(Re__namespace.Indicator,{className:"flex items-center justify-center"},y__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));uo.displayName=Re__namespace.Item.displayName;var fo=classVarianceAuthority.cva("rds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),go=y__namespace.forwardRef(({className:e,gap:t,align:r,justify:o,wrap:n,asChild:i=false,...d},l)=>y__namespace.createElement(i?reactSlot.Slot:"div",{ref:l,"data-gds-part":"row",className:a(fo({gap:t,align:r,justify:o,wrap:n,className:e})),...d}));go.displayName="Row";var ho=classVarianceAuthority.cva("rds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),yo=y__namespace.forwardRef(({className:e,cols:t,gap:r,align:o,asChild:n=false,...i},d)=>y__namespace.createElement(n?reactSlot.Slot:"div",{ref:d,"data-gds-part":"grid",className:a(ho({cols:t,gap:r,align:o,className:e})),...i}));yo.displayName="Grid";var vo=classVarianceAuthority.cva("rds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),bo=y__namespace.forwardRef(({className:e,direction:t,gap:r,align:o,justify:n,wrap:i,asChild:d=false,...l},s)=>y__namespace.createElement(d?reactSlot.Slot:"div",{ref:s,"data-gds-part":"flex",className:a(vo({direction:t,gap:r,align:o,justify:n,wrap:i,className:e})),...l}));bo.displayName="Flex";var xo=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(Ut,null),y__namespace.createElement(ne__namespace.Corner,null)));xo.displayName=ne__namespace.Root.displayName;var Ut=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"})));Ut.displayName=ne__namespace.ScrollAreaScrollbar.displayName;var Nn=R__namespace.Root,kn=R__namespace.Group,Mn=R__namespace.Value,To=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"}))));To.displayName=R__namespace.Trigger.displayName;var _t=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"})));_t.displayName=R__namespace.ScrollUpButton.displayName;var Kt=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"})));Kt.displayName=R__namespace.ScrollDownButton.displayName;var wo=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(_t,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(Kt,null))));wo.displayName=R__namespace.Content.displayName;var Po=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}));Po.displayName=R__namespace.Label.displayName;var So=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)));So.displayName=R__namespace.Item.displayName;var Co=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}));Co.displayName=R__namespace.Separator.displayName;var No=y__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>y__namespace.createElement(zt__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}));No.displayName=zt__namespace.Root.displayName;var Ln=F__namespace.Root,Dn=F__namespace.Trigger,In=F__namespace.Close,ko=F__namespace.Portal,Wt=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}));Wt.displayName=F__namespace.Overlay.displayName;var An=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"}}),Mo=y__namespace.forwardRef(({side:e="right",className:t,children:r,...o},n)=>y__namespace.createElement(ko,null,y__namespace.createElement(Wt,null),y__namespace.createElement(F__namespace.Content,{ref:n,className:a(An({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")))));Mo.displayName=F__namespace.Content.displayName;var Eo=({className:e,...t})=>y__namespace.createElement("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});Eo.displayName="SheetHeader";var Ho=({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});Ho.displayName="SheetFooter";var Lo=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}));Lo.displayName=F__namespace.Title.displayName;var Do=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(F__namespace.Description,{ref:r,className:a("text-sm text-muted-foreground",e),...t}));Do.displayName=F__namespace.Description.displayName;function Fn({className:e,...t}){return React.createElement("div",{className:a("animate-pulse rounded-md bg-muted",e),...t})}var Io=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"})));Io.displayName=ge__namespace.Root.displayName;var Ao=classVarianceAuthority.cva("rds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{gap:"md",align:"stretch"}}),Fo=y__namespace.forwardRef(({className:e,gap:t,align:r,asChild:o=false,...n},i)=>y__namespace.createElement(o?reactSlot.Slot:"div",{ref:i,"data-gds-part":"stack",className:a(Ao({gap:t,align:r,className:e})),...n}));Fo.displayName="Stack";var Oo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(qe__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(qe__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")})));Oo.displayName=qe__namespace.Root.displayName;var Go=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})));Go.displayName="Table";var $o=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("thead",{ref:r,className:a("[&_tr]:border-b",e),...t}));$o.displayName="TableHeader";var Vo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("tbody",{ref:r,className:a("[&_tr:last-child]:border-0",e),...t}));Vo.displayName="TableBody";var Bo=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}));Bo.displayName="TableFooter";var Uo=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}));Uo.displayName="TableRow";var _o=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}));_o.displayName="TableHead";var Ko=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}));Ko.displayName="TableCell";var zo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement("caption",{ref:r,className:a("mt-4 text-sm text-muted-foreground",e),...t}));zo.displayName="TableCaption";var $n=le__namespace.Root,Wo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(le__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}));Wo.displayName=le__namespace.List.displayName;var jo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(le__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}));jo.displayName=le__namespace.Trigger.displayName;var qo=y__namespace.forwardRef(({className:e,...t},r)=>y__namespace.createElement(le__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}));qo.displayName=le__namespace.Content.displayName;var Yo=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}));Yo.displayName="Textarea";var jt=ce__namespace.Provider,qt=ce__namespace.Root,Yt=ce__namespace.Trigger,Rt=y__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>y__namespace.createElement(ce__namespace.Portal,null,y__namespace.createElement(ce__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})));Rt.displayName=ce__namespace.Content.displayName;var Zo=y__namespace.createContext(null);function Jo(){let e=y__namespace.useContext(Zo);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),Qo=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:m=Un},g)=>{let[h,T]=y__namespace.useState(s),f=i??h,u=()=>{let w=!f;T(w),d?.(w);};return y__namespace.createElement(jt,{delayDuration:0},y__namespace.createElement(Zo.Provider,{value:{collapsed:f,activeItem:p,LinkComponent:m}},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:u,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(Xt,{key:w.id,item:w}))),r?.map(w=>y__namespace.createElement(_n,{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))))});Qo.displayName="SideMenu";function _n({section:e}){let{collapsed:t}=Jo(),[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(Xt,{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(Xt,{key:n.id,item:n,nested:true}))))}function Xt({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:n}=Jo(),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(qt,null,y__namespace.createElement(Yt,{asChild:true},s),y__namespace.createElement(Rt,{side:"right",sideOffset:8},e.label)):s}var zn=({href:e,className:t,children:r})=>y__namespace.createElement("a",{href:e,className:t},r),ea=y__namespace.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:r,leftContent:o,rightContent:n,className:i,linkComponent:d=zn},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)));ea.displayName="TopMenu";var ta=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 m=g=>{c.current&&!c.current.contains(g.target)&&p(false);};return s&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}},[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)))});ta.displayName="TopMenuUser";var ra=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)));ra.displayName="TopMenuUserItem";var oa=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));oa.displayName="TopMenuUserSection";var Zt=y__namespace.createContext(null);function Jt(){let e=y__namespace.useContext(Zt);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var aa=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,m=g=>{p(g),o?.(g);};return y__namespace.createElement(Zt.Provider,{value:{activeTab:c,setActiveTab:m}},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&&m(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)))});aa.displayName="SimpleTabs";var na=y__namespace.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:n}=Jt();return n!==e?null:y__namespace.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});na.displayName="SimpleTabsPanel";var ia=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))});ia.displayName="SimpleTabsRoot";var sa=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)));sa.displayName="SimpleTabsList";var da=y__namespace.forwardRef(({value:e,children:t,icon:r,disabled:o,className:n},i)=>{let{activeTab:d,setActiveTab:l}=Jt(),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"}))});da.displayName="SimpleTabsTrigger";var la=y__namespace.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:n}=Jt();return n!==e?null:y__namespace.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});la.displayName="SimpleTabsContent";var Wn={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},jn={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 m=y__namespace.useRef(null);return y__namespace.useImperativeHandle(c,()=>m.current),y__namespace.useEffect(()=>{if(!i||!m.current)return;let g=m.current,h=new IntersectionObserver(([T])=>i(T.isIntersecting),{threshold:.05});return h.observe(g),()=>h.disconnect()},[i]),y__namespace.createElement("div",{ref:m,"data-gds-part":"media-surface",className:a("rds-media-surface relative w-full overflow-hidden bg-muted",Wn[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${jn[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 Ee(){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 ca=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:m,style:g,playbackRate:h=1,objectFit:T="cover"},f)=>{let u=y__namespace.useRef(null),w=Ee(),[N,E]=y__namespace.useState(!!p);y__namespace.useImperativeHandle(f,()=>u.current);let M=n??r,_=r&&!w;y__namespace.useEffect(()=>{u.current&&(u.current.playbackRate=h);},[h]),y__namespace.useEffect(()=>{E(!!p);},[p]);let J=y__namespace.useCallback(ye=>{!i||!u.current||(ye&&_?u.current.play().catch(()=>{}):u.current.pause());},[i,_]);return y__namespace.createElement(ue,{aspect:d,radius:l,border:s,"aria-label":c,className:m,style:g,onVisibilityChange:i?J:void 0},y__namespace.createElement("video",{ref:u,src:e,controls:t,autoPlay:_,loop:o,muted:M,playsInline:true,preload:_?"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")}))});ca.displayName="VideoPlayer";var pa=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:m,stateMachines:g,artboard:h,fit:T="contain",stateMachineInputs:f},u)=>{let w=Ee(),[N,E]=y__namespace.useState(null),[M,_]=y__namespace.useState(null);return y__namespace.useEffect(()=>{let J=false;return import('@rive-app/react-canvas').then(ye=>{J||E(ye);}).catch(()=>{J||_("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{J=true;}},[]),y__namespace.createElement(ue,{ref:u,aspect:i,radius:d,border:l,"aria-label":p,className:c,style:m},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(Xn,{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"}))});pa.displayName="RivePlayer";function Xn({Mod:e,src:t,stateMachines:r,artboard:o,fit:n,autoPlay:i,loop:d,pauseOffscreen:l,controls:s,poster:p}){let{useRive:c,Layout:m,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:u,RiveComponent:w}=c({src:t,stateMachines:r,artboard:o,autoplay:i,layout:new m({fit:f[n],alignment:h.Center})}),[N,E]=y__namespace.useState(i);y__namespace.useEffect(()=>{if(!u||!d)return;let _=()=>{u.play();};return u.on(T.Stop,_),()=>{u.off(T.Stop,_);}},[u,d,T]),y__namespace.useEffect(()=>{if(!l||!u)return;let _=u.canvas;if(!_)return;let J=new IntersectionObserver(([ye])=>{ye.isIntersecting&&i?u.play():u.pause();},{threshold:.05});return J.observe(_),()=>J.disconnect()},[u,l,i]);let M=()=>{u&&(N?(u.pause(),E(false)):(u.play(),E(true)));};return y__namespace.createElement(y__namespace.Fragment,null,y__namespace.createElement(w,{className:"w-full h-full"}),!u&&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 ua=({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}),m=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,m)),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 u=f.chromatic?.offset??0;m.offset?.set(u,u),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 Fe=3e3,er=400,ii=80,fa=({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,er*2);n.position.z=0;let i=new Float32Array(Fe*6),d=new Float32Array(Fe*6),l=new Float32Array(Fe),s=new I__namespace.Color(r.primary),p=new I__namespace.Color(r.accent);function c(u,w){let N=Math.random()*Math.PI*2,E=ii*Math.pow(Math.random(),.6),M=Math.cos(N)*E,_=Math.sin(N)*E,J=w?-Math.random()*er:-er;l[u]=J,i[u*6+0]=M,i[u*6+1]=_,i[u*6+2]=J,i[u*6+3]=M,i[u*6+4]=_,i[u*6+5]=J-2,d[u*6+0]=s.r,d[u*6+1]=s.g,d[u*6+2]=s.b,d[u*6+3]=p.r,d[u*6+4]=p.g,d[u*6+5]=p.b;}for(let u=0;u<Fe;u++)c(u,true);let m=new I__namespace.BufferGeometry;m.setAttribute("position",new I__namespace.BufferAttribute(i,3)),m.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(m,g);o.add(h);let T=60,f=6;return {scene:o,camera:n,update:(u,w)=>{let N=m.attributes.position.array;for(let E=0;E<Fe;E++){let M=E*6;N[M+2]+=T*w,N[M+5]=N[M+2]-f,N[M+2]>5&&c(E,false);}m.attributes.position.needsUpdate=true;},resize:(u,w)=>{let N=n;N.aspect=u/w,N.updateProjectionMatrix();},setPalette:u=>{o.background=new I__namespace.Color(u.background);let w=new I__namespace.Color(u.primary),N=new I__namespace.Color(u.accent),E=m.attributes.color.array;for(let M=0;M<Fe;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;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),g.dispose();}}};var si=`
|
|
1
|
+
'use strict';var v=require('react'),me=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'),Ce=require('@radix-ui/react-avatar'),reactDayPicker=require('react-day-picker'),ct=require('@radix-ui/react-checkbox'),dateFns=require('date-fns'),ve=require('@radix-ui/react-popover'),B=require('@radix-ui/react-dialog'),x=require('@radix-ui/react-dropdown-menu'),lr=require('@radix-ui/react-label'),ut=require('@radix-ui/react-progress'),De=require('@radix-ui/react-radio-group'),et=require('react-resizable-panels'),ue=require('@radix-ui/react-scroll-area'),T=require('@radix-ui/react-select'),mr=require('@radix-ui/react-separator'),Me=require('@radix-ui/react-slider'),ht=require('@radix-ui/react-switch'),xe=require('@radix-ui/react-tabs'),be=require('@radix-ui/react-tooltip'),hr=require('@radix-ui/react-toggle'),rt=require('@radix-ui/react-toggle-group'),reactDom=require('react-dom'),G=require('three'),postprocessing=require('postprocessing'),fl=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 v__namespace=/*#__PURE__*/_interopNamespace(v);var me__namespace=/*#__PURE__*/_interopNamespace(me);var Ce__namespace=/*#__PURE__*/_interopNamespace(Ce);var ct__namespace=/*#__PURE__*/_interopNamespace(ct);var ve__namespace=/*#__PURE__*/_interopNamespace(ve);var B__namespace=/*#__PURE__*/_interopNamespace(B);var x__namespace=/*#__PURE__*/_interopNamespace(x);var lr__namespace=/*#__PURE__*/_interopNamespace(lr);var ut__namespace=/*#__PURE__*/_interopNamespace(ut);var De__namespace=/*#__PURE__*/_interopNamespace(De);var et__namespace=/*#__PURE__*/_interopNamespace(et);var ue__namespace=/*#__PURE__*/_interopNamespace(ue);var T__namespace=/*#__PURE__*/_interopNamespace(T);var mr__namespace=/*#__PURE__*/_interopNamespace(mr);var Me__namespace=/*#__PURE__*/_interopNamespace(Me);var ht__namespace=/*#__PURE__*/_interopNamespace(ht);var xe__namespace=/*#__PURE__*/_interopNamespace(xe);var be__namespace=/*#__PURE__*/_interopNamespace(be);var hr__namespace=/*#__PURE__*/_interopNamespace(hr);var rt__namespace=/*#__PURE__*/_interopNamespace(rt);var G__namespace=/*#__PURE__*/_interopNamespace(G);var fl__default=/*#__PURE__*/_interopDefault(fl);var Fn=Object.defineProperty;var Lt=(e,t)=>()=>(e&&(t=e(e=0)),t);var sr=(e,t)=>{for(var r in t)Fn(e,r,{get:t[r],enumerable:true});};var Qt,cn,pn=Lt(()=>{Qt="2pMfyvhpuKonkf7h8HzH",cn=()=>Qt!=="YOUR_KEY_HERE"&&Qt.length>0;});var fn={};sr(fn,{createMaplibreAdapter:()=>Si});function wi(){if(typeof document>"u"||document.getElementById(un))return;let e=document.createElement("link");e.id=un,e.rel="stylesheet",e.href=Pi,document.head.appendChild(e);}var Ti,mn,Pi,un,Si,gn=Lt(()=>{pn();Ti={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},mn=(e,t)=>`https://api.maptiler.com/maps/${Ti[e]}/style.json?key=${encodeURIComponent(t)}`,Pi="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",un="gds-maplibre-gl-css";Si=async(e,t,r)=>{wi();let o;try{o=await import('maplibre-gl'),o.default&&(o=o.default);}catch(c){throw r.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let s=t.tilerKey??Qt;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!cn()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??mn(t.appearance,s),d=new o.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&d.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{d.once("load",()=>c());}),r.onLoad(),d.on("error",c=>{let l=String(c?.error?.message??c?.message??"MapLibre error"),m=l.toLowerCase().includes("style");r.onError({code:m?"style-load-failed":"tile-load-failed",message:l,cause:c?.error??c});});let p=new globalThis.Map;return {setCenter:c=>d.setCenter(c),setZoom:c=>d.setZoom(c),setBounds:(c,l)=>d.fitBounds([c,l],{animate:false}),setAppearance:c=>{let l=t.styleUrl??mn(c,s);d.setStyle(l,{diff:false});},setInteractive:c=>{let l=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of l){let u=d[m];u&&(c?u.enable():u.disable());}},flyTo:(c,l)=>d.flyTo({center:c,zoom:l?.zoom,duration:l?.durationMs??800}),panTo:(c,l)=>d.panTo(c,{duration:l?.durationMs??600}),fitBounds:(c,l)=>{if(c.length===0)return;let m=1/0,u=1/0,h=-1/0,y=-1/0;for(let[f,g]of c)f<m&&(m=f),g<u&&(u=g),f>h&&(h=f),g>y&&(y=g);d.fitBounds([[m,u],[h,y]],{padding:l?.paddingPx??40,duration:l?.durationMs??800});},getCenter:()=>{let c=d.getCenter();return [c.lng,c.lat]},getZoom:()=>d.getZoom(),getBounds:()=>{let c=d.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,l,m)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",u.addEventListener("mouseenter",()=>r.onMarkerHover(c)),u.addEventListener("mouseleave",()=>r.onMarkerHover(null)),u.addEventListener("click",f=>{r.onMarkerClick(c,y.coords,f);});let h=new o.Marker({element:u,anchor:m==="center"?"center":"bottom"}).setLngLat(l).addTo(d),y={element:u,coords:l,setHovered:f=>{u.dataset.gdsState=f?"hovered":"idle",u.style.zIndex=f?"10":"1";},setPosition:f=>{y.coords=f,h.setLngLat(f);},remove:()=>{h.remove(),p.delete(c);}};return p.set(c,{marker:h,handle:y}),y},destroy:()=>{p.forEach(({marker:c})=>c.remove()),p.clear(),d.remove();},instance:d}};});var vn={};sr(vn,{createMapboxAdapter:()=>ki});function Mi(){if(typeof document>"u"||document.getElementById(yn))return;let e=document.createElement("link");e.id=yn,e.rel="stylesheet",e.href=Ci,document.head.appendChild(e);}var hn,Ci,yn,ki,bn=Lt(()=>{hn={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},Ci="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",yn="gds-mapbox-gl-css";ki=async(e,t,r)=>{if(!t.accessToken)throw r.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");Mi();let o;try{o=await import('mapbox-gl'),o.default&&(o=o.default);}catch(i){throw r.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:i}),i}o.accessToken=t.accessToken;let s=t.styleUrl??hn[t.appearance],a=new o.Map({container:e,style:s,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(i=>{a.once("load",()=>i());}),r.onLoad(),a.on("error",i=>{let c=String(i?.error?.message??i?.message??"Mapbox error"),l=c.toLowerCase().includes("style");r.onError({code:l?"style-load-failed":"tile-load-failed",message:c,cause:i?.error??i});});let d=new globalThis.Map;return {setCenter:i=>a.setCenter(i),setZoom:i=>a.setZoom(i),setBounds:(i,c)=>a.fitBounds([i,c],{animate:false}),setAppearance:i=>{let c=t.styleUrl??hn[i];a.setStyle(c,{diff:false});},setInteractive:i=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let l of c){let m=a[l];m&&(i?m.enable():m.disable());}},flyTo:(i,c)=>a.flyTo({center:i,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(i,c)=>a.panTo(i,{duration:c?.durationMs??600}),fitBounds:(i,c)=>{if(i.length===0)return;let l=1/0,m=1/0,u=-1/0,h=-1/0;for(let[y,f]of i)y<l&&(l=y),f<m&&(m=f),y>u&&(u=y),f>h&&(h=f);a.fitBounds([[l,m],[u,h]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let i=a.getCenter();return [i.lng,i.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let i=a.getBounds();return [[i.getWest(),i.getSouth()],[i.getEast(),i.getNorth()]]},addMarker:(i,c,l)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>r.onMarkerHover(i)),m.addEventListener("mouseleave",()=>r.onMarkerHover(null)),m.addEventListener("click",y=>{r.onMarkerClick(i,h.coords,y);});let u=new o.Marker({element:m,anchor:l==="center"?"center":"bottom"}).setLngLat(c).addTo(a),h={element:m,coords:c,setHovered:y=>{m.dataset.gdsState=y?"hovered":"idle",m.style.zIndex=y?"10":"1";},setPosition:y=>{h.coords=y,u.setLngLat(y);},remove:()=>{u.remove(),d.delete(i);}};return d.set(i,{marker:u,handle:h}),h},destroy:()=>{d.forEach(({marker:i})=>i.remove()),d.clear(),a.remove();},instance:a}};});var Rn={};sr(Rn,{createGoogleAdapter:()=>Hi});var Ni,Ei,xn,Hi,Tn=Lt(()=>{Ni=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],Ei=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],xn=e=>e==="dark"?Ei:Ni,Hi=async(e,t,r)=>{if(!t.apiKey)throw r.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let o;try{let l=await import('@googlemaps/js-api-loader');o=l.Loader??l.default?.Loader;}catch(l){throw r.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:l}),l}let s=new o({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await s.load();}catch(l){throw r.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:l}),l}let d=t.appearance==="satellite",p=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:d?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:d?void 0:xn(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let l=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});p.fitBounds(l);}await new Promise(l=>{a.maps.event.addListenerOnce(p,"idle",()=>l());}),r.onLoad();let i=new globalThis.Map;return {setCenter:l=>p.setCenter({lat:l[1],lng:l[0]}),setZoom:l=>p.setZoom(l),setBounds:(l,m)=>{let u=new a.maps.LatLngBounds({lat:l[1],lng:l[0]},{lat:m[1],lng:m[0]});p.fitBounds(u);},setAppearance:l=>{l==="satellite"?(p.setMapTypeId(a.maps.MapTypeId.HYBRID),p.setOptions({styles:void 0})):(p.setMapTypeId(a.maps.MapTypeId.ROADMAP),p.setOptions({styles:xn(l)}));},setInteractive:l=>{p.setOptions({disableDefaultUI:!l,gestureHandling:l?"auto":"none",keyboardShortcuts:l});},flyTo:(l,m)=>{p.panTo({lat:l[1],lng:l[0]}),m?.zoom!=null&&p.setZoom(m.zoom);},panTo:l=>p.panTo({lat:l[1],lng:l[0]}),fitBounds:(l,m)=>{if(l.length===0)return;let u=new a.maps.LatLngBounds;for(let[h,y]of l)u.extend({lat:y,lng:h});p.fitBounds(u,m?.paddingPx??40);},getCenter:()=>{let l=p.getCenter();return l?[l.lng(),l.lat()]:[0,0]},getZoom:()=>p.getZoom()??0,getBounds:()=>{let l=p.getBounds();if(!l)return [[0,0],[0,0]];let m=l.getSouthWest(),u=l.getNorthEast();return [[m.lng(),m.lat()],[u.lng(),u.lat()]]},addMarker:(l,m,u)=>{let h=document.createElement("div");h.dataset.gdsPart="map-marker",h.dataset.gdsState="idle",h.style.cursor="pointer",u==="center"&&(h.style.transform="translateY(50%)"),h.addEventListener("mouseenter",()=>r.onMarkerHover(l)),h.addEventListener("mouseleave",()=>r.onMarkerHover(null)),h.addEventListener("click",g=>{r.onMarkerClick(l,f.coords,g);});let y=new a.maps.marker.AdvancedMarkerElement({map:p,position:{lat:m[1],lng:m[0]},content:h}),f={element:h,coords:m,setHovered:g=>{h.dataset.gdsState=g?"hovered":"idle",y.zIndex=g?10:1;},setPosition:g=>{f.coords=g,y.position={lat:g[1],lng:g[0]};},remove:()=>{y.map=null,i.delete(l);}};return i.set(l,{marker:y,handle:f}),f},destroy:()=>{i.forEach(({marker:l})=>{l.map=null;}),i.clear();},instance:p}};});function n(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Vn=me__namespace.Root,Kr=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(me__namespace.Item,{ref:r,className:n("border-b",e),...t}));Kr.displayName="AccordionItem";var Ur=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(me__namespace.Header,{className:"flex"},v__namespace.createElement(me__namespace.Trigger,{ref:o,className:n("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r},t,v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Ur.displayName=me__namespace.Trigger.displayName;var Wr=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(me__namespace.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r},v__namespace.createElement("div",{className:n("pb-4 pt-0",e)},t)));Wr.displayName=me__namespace.Content.displayName;var _n=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"}}),jr=v__namespace.forwardRef(({className:e,variant:t,...r},o)=>v__namespace.createElement("div",{ref:o,role:"alert",className:n(_n({variant:t}),e),...r}));jr.displayName="Alert";var Zr=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("h5",{ref:r,className:n("mb-1 font-medium leading-none tracking-tight",e),...t}));Zr.displayName="AlertTitle";var qr=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,className:n("text-sm [&_p]:leading-relaxed",e),...t}));qr.displayName="AlertDescription";var Yr=classVarianceAuthority.cva("rds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Xr=classVarianceAuthority.cva("rds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),Jr=classVarianceAuthority.cva("rds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Qr=classVarianceAuthority.cva("rds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),eo=classVarianceAuthority.cva("rds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),to=classVarianceAuthority.cva("rds-app-shell-footer border-t bg-background"),ro=v__namespace.forwardRef(({className:e,nav:t,asChild:r=false,...o},s)=>v__namespace.createElement(r?reactSlot.Slot:"div",{ref:s,"data-gds-part":"app-shell","data-nav":t??"none",className:n(Yr({nav:t,className:e})),...o}));ro.displayName="AppShell";var oo=v__namespace.forwardRef(({className:e,sticky:t,asChild:r=false,...o},s)=>v__namespace.createElement(r?reactSlot.Slot:"header",{ref:s,"data-gds-part":"app-shell-header",className:n(Xr({sticky:t,className:e})),...o}));oo.displayName="AppShellHeader";var ao=v__namespace.forwardRef(({className:e,placement:t,sticky:r,asChild:o=false,...s},a)=>v__namespace.createElement(o?reactSlot.Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:n(Jr({placement:t,sticky:r,className:e})),...s}));ao.displayName="AppShellNav";var no=v__namespace.forwardRef(({className:e,sticky:t,asChild:r=false,...o},s)=>v__namespace.createElement(r?reactSlot.Slot:"aside",{ref:s,"data-gds-part":"app-shell-aside",className:n(Qr({sticky:t,className:e})),...o}));no.displayName="AppShellAside";var so=v__namespace.forwardRef(({className:e,maxWidth:t,asChild:r=false,...o},s)=>v__namespace.createElement(r?reactSlot.Slot:"main",{ref:s,"data-gds-part":"app-shell-main",className:n(eo({maxWidth:t,className:e})),...o}));so.displayName="AppShellMain";var io=v__namespace.forwardRef(({className:e,asChild:t=false,...r},o)=>v__namespace.createElement(t?reactSlot.Slot:"footer",{ref:o,"data-gds-part":"app-shell-footer",className:n(to({className:e})),...r}));io.displayName="AppShellFooter";var lo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(Ce__namespace.Root,{ref:r,className:n("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));lo.displayName=Ce__namespace.Root.displayName;var co=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(Ce__namespace.Image,{ref:r,className:n("aspect-square h-full w-full",e),...t}));co.displayName=Ce__namespace.Image.displayName;var po=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(Ce__namespace.Fallback,{ref:r,className:n("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));po.displayName=Ce__namespace.Fallback.displayName;var uo=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 Kn({className:e,variant:t,rounded:r,...o}){return v__namespace.createElement("div",{className:n(uo({variant:t,rounded:r}),e),...o})}var dt=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md 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]: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:{sm:"h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",default:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",lg:"h-10 gap-2 px-4 text-sm [&_svg]:size-4",icon:"h-8 w-8 [&_svg]:size-3.5"}},defaultVariants:{variant:"default",size:"md"}}),re=v__namespace.forwardRef(({className:e,variant:t,size:r,asChild:o=false,...s},a)=>v__namespace.createElement(o?reactSlot.Slot:"button",{className:n("rds-button",dt({variant:t,size:r,className:e})),ref:a,...s}));re.displayName="Button";function At({className:e,classNames:t,showOutsideDays:r=true,captionLayout:o="label",buttonVariant:s="ghost",formatters:a,components:d,...p}){let i=reactDayPicker.getDefaultClassNames();return v__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:r,className:n("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:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:n("w-fit",i.root),months:n("relative flex flex-col gap-4 md:flex-row",i.months),month:n("flex w-full flex-col gap-4",i.month),nav:n("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",i.nav),button_previous:n(dt({variant:s}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",i.button_previous),button_next:n(dt({variant:s}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",i.button_next),month_caption:n("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",i.month_caption),dropdowns:n("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",i.dropdowns),dropdown_root:n("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",i.dropdown_root),dropdown:n("bg-popover absolute inset-0 opacity-0",i.dropdown),caption_label:n("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",i.caption_label),table:"w-full border-collapse",weekdays:n("flex",i.weekdays),weekday:n("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",i.weekday),week:n("mt-2 flex w-full",i.week),week_number_header:n("w-[--cell-size] select-none",i.week_number_header),week_number:n("text-muted-foreground select-none text-[0.8rem]",i.week_number),day:n("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",i.day),range_start:n("bg-accent rounded-l-md",i.range_start),range_middle:n("rounded-none",i.range_middle),range_end:n("bg-accent rounded-r-md",i.range_end),today:n("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",i.today),outside:n("text-muted-foreground aria-selected:text-muted-foreground",i.outside),disabled:n("text-muted-foreground opacity-50",i.disabled),hidden:n("invisible",i.hidden),...t},components:{Root:({className:c,rootRef:l,...m})=>v__namespace.createElement("div",{"data-slot":"calendar",ref:l,className:n(c),...m}),Chevron:({className:c,orientation:l,...m})=>l==="left"?v__namespace.createElement(lucideReact.ChevronLeftIcon,{className:n("size-4",c),...m}):l==="right"?v__namespace.createElement(lucideReact.ChevronRightIcon,{className:n("size-4",c),...m}):v__namespace.createElement(lucideReact.ChevronDownIcon,{className:n("size-4",c),...m}),DayButton:go,WeekNumber:({children:c,...l})=>v__namespace.createElement("td",{...l},v__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...d},...p})}function go({className:e,day:t,modifiers:r,...o}){let s=reactDayPicker.getDefaultClassNames(),a=v__namespace.useRef(null);return v__namespace.useEffect(()=>{r.focused&&a.current?.focus();},[r.focused]),v__namespace.createElement(re,{ref:a,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:n("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",s.day,e),...o})}var ho=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card",className:n("rds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));ho.displayName="Card";var yo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card-header",className:n("flex flex-col space-y-1.5 p-6",e),...t}));yo.displayName="CardHeader";var vo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card-title",className:n("font-semibold leading-none tracking-tight",e),...t}));vo.displayName="CardTitle";var bo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card-description",className:n("text-sm text-muted-foreground",e),...t}));bo.displayName="CardDescription";var xo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card-content",className:n("p-6 pt-0",e),...t}));xo.displayName="CardContent";var Ro=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card-footer",className:n("flex items-center p-6 pt-0",e),...t}));Ro.displayName="CardFooter";var To=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(ct__namespace.Root,{ref:r,className:n("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},v__namespace.createElement(ct__namespace.Indicator,{className:n("flex items-center justify-center text-current")},v__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));To.displayName=ct__namespace.Root.displayName;var Je=ve__namespace.Root,Qe=ve__namespace.Trigger,Jn=ve__namespace.Anchor,Ve=v__namespace.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},s)=>v__namespace.createElement(ve__namespace.Portal,null,v__namespace.createElement(ve__namespace.Content,{ref:s,align:t,sideOffset:r,className:n("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})));Ve.displayName=ve__namespace.Content.displayName;var Qn="PPP",es="LLL dd, y";function ts({value:e,onChange:t,placeholder:r="Pick a date",disabled:o,className:s,contentClassName:a,align:d="start",side:p,format:i=Qn,captionLayout:c,icon:l,"aria-label":m}){return v__namespace.createElement(Je,null,v__namespace.createElement(Qe,{asChild:true},v__namespace.createElement(re,{type:"button",variant:"outline",disabled:o,"aria-label":m??(e?void 0:r),"data-empty":!e,className:n("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",s)},l??v__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,i):v__namespace.createElement("span",null,r))),v__namespace.createElement(Ve,{className:n("w-auto p-0",a),align:d,side:p},v__namespace.createElement(At,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function rs({value:e,onChange:t,placeholder:r="Pick a date range",disabled:o,className:s,contentClassName:a,align:d="start",side:p,format:i=es,captionLayout:c,icon:l,numberOfMonths:m=2,"aria-label":u}){let h=!!e?.from;return v__namespace.createElement(Je,null,v__namespace.createElement(Qe,{asChild:true},v__namespace.createElement(re,{type:"button",variant:"outline",disabled:o,"aria-label":u??(h?void 0:r),"data-empty":!h,className:n("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",s)},l??v__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?v__namespace.createElement(v__namespace.Fragment,null,dateFns.format(e.from,i)," \u2013"," ",dateFns.format(e.to,i)):dateFns.format(e.from,i):v__namespace.createElement("span",null,r))),v__namespace.createElement(Ve,{className:n("w-auto p-0",a),align:d,side:p},v__namespace.createElement(At,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var as=B__namespace.Root,ns=B__namespace.Trigger,wo=B__namespace.Portal,ss=B__namespace.Close,ir=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Overlay,{ref:r,className:n("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}));ir.displayName=B__namespace.Overlay.displayName;var So=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(wo,null,v__namespace.createElement(ir,null),v__namespace.createElement(B__namespace.Content,{ref:o,className:n("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,v__namespace.createElement(B__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"},v__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"sr-only"},"Close")))));So.displayName=B__namespace.Content.displayName;var Co=({className:e,...t})=>v__namespace.createElement("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Co.displayName="DialogHeader";var Mo=({className:e,...t})=>v__namespace.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Mo.displayName="DialogFooter";var ko=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Title,{ref:r,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));ko.displayName=B__namespace.Title.displayName;var No=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Description,{ref:r,className:n("text-sm text-muted-foreground",e),...t}));No.displayName=B__namespace.Description.displayName;var cs=x__namespace.Root,ps=x__namespace.Trigger,ms=x__namespace.Group,us=x__namespace.Portal,fs=x__namespace.Sub,gs=x__namespace.RadioGroup,Eo=v__namespace.forwardRef(({className:e,inset:t,children:r,...o},s)=>v__namespace.createElement(x__namespace.SubTrigger,{ref:s,className:n("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,v__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"})));Eo.displayName=x__namespace.SubTrigger.displayName;var Ho=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(x__namespace.SubContent,{ref:r,className:n("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}));Ho.displayName=x__namespace.SubContent.displayName;var Lo=v__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>v__namespace.createElement(x__namespace.Portal,null,v__namespace.createElement(x__namespace.Content,{ref:o,sideOffset:t,className:n("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})));Lo.displayName=x__namespace.Content.displayName;var Do=v__namespace.forwardRef(({className:e,inset:t,...r},o)=>v__namespace.createElement(x__namespace.Item,{ref:o,className:n("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}));Do.displayName=x__namespace.Item.displayName;var Ao=v__namespace.forwardRef(({className:e,children:t,checked:r,...o},s)=>v__namespace.createElement(x__namespace.CheckboxItem,{ref:s,className:n("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},v__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},v__namespace.createElement(x__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),t));Ao.displayName=x__namespace.CheckboxItem.displayName;var Io=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(x__namespace.RadioItem,{ref:o,className:n("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},v__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},v__namespace.createElement(x__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t));Io.displayName=x__namespace.RadioItem.displayName;var Fo=v__namespace.forwardRef(({className:e,inset:t,...r},o)=>v__namespace.createElement(x__namespace.Label,{ref:o,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Fo.displayName=x__namespace.Label.displayName;var Go=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(x__namespace.Separator,{ref:r,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));Go.displayName=x__namespace.Separator.displayName;var Oo=({className:e,...t})=>v__namespace.createElement("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});Oo.displayName="DropdownMenuShortcut";var Bo=v__namespace.forwardRef(({className:e,type:t,...r},o)=>v__namespace.createElement("input",{type:t,className:n("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}));Bo.displayName="Input";var ys=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Vo=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(lr__namespace.Root,{ref:r,className:n(ys(),e),...t}));Vo.displayName=lr__namespace.Root.displayName;var zo=v__namespace.forwardRef(({className:e,value:t,...r},o)=>v__namespace.createElement(ut__namespace.Root,{ref:o,className:n("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r},v__namespace.createElement(ut__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));zo.displayName=ut__namespace.Root.displayName;var _o=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(De__namespace.Root,{className:n("grid gap-2",e),...t,ref:r}));_o.displayName=De__namespace.Root.displayName;var $o=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(De__namespace.Item,{ref:r,className:n("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},v__namespace.createElement(De__namespace.Indicator,{className:"flex items-center justify-center"},v__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));$o.displayName=De__namespace.Item.displayName;var xs=({className:e,...t})=>v__namespace.createElement(et__namespace.PanelGroup,{"data-gds-part":"resizable-panel-group",className:n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Rs=et__namespace.Panel,Ts=({withHandle:e,className:t,...r})=>v__namespace.createElement(et__namespace.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:n("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r},e&&v__namespace.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},v__namespace.createElement(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})));var Ko=classVarianceAuthority.cva("rds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),Uo=v__namespace.forwardRef(({className:e,gap:t,align:r,justify:o,wrap:s,asChild:a=false,...d},p)=>v__namespace.createElement(a?reactSlot.Slot:"div",{ref:p,"data-gds-part":"row",className:n(Ko({gap:t,align:r,justify:o,wrap:s,className:e})),...d}));Uo.displayName="Row";var Wo=classVarianceAuthority.cva("rds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),jo=v__namespace.forwardRef(({className:e,cols:t,gap:r,align:o,asChild:s=false,...a},d)=>v__namespace.createElement(s?reactSlot.Slot:"div",{ref:d,"data-gds-part":"grid",className:n(Wo({cols:t,gap:r,align:o,className:e})),...a}));jo.displayName="Grid";var Zo=classVarianceAuthority.cva("rds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),qo=v__namespace.forwardRef(({className:e,direction:t,gap:r,align:o,justify:s,wrap:a,asChild:d=false,...p},i)=>v__namespace.createElement(d?reactSlot.Slot:"div",{ref:i,"data-gds-part":"flex",className:n(Zo({direction:t,gap:r,align:o,justify:s,wrap:a,className:e})),...p}));qo.displayName="Flex";var Yo=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(ue__namespace.Root,{ref:o,className:n("relative overflow-hidden",e),...r},v__namespace.createElement(ue__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),v__namespace.createElement(dr,null),v__namespace.createElement(ue__namespace.Corner,null)));Yo.displayName=ue__namespace.Root.displayName;var dr=v__namespace.forwardRef(({className:e,orientation:t="vertical",...r},o)=>v__namespace.createElement(ue__namespace.ScrollAreaScrollbar,{ref:o,orientation:t,className:n("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},v__namespace.createElement(ue__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));dr.displayName=ue__namespace.ScrollAreaScrollbar.displayName;var Hs=T__namespace.Root,Ls=T__namespace.Group,Ds=T__namespace.Value,Jo=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(T__namespace.Trigger,{ref:o,className:n("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,v__namespace.createElement(T__namespace.Icon,{asChild:true},v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 opacity-50"}))));Jo.displayName=T__namespace.Trigger.displayName;var cr=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(T__namespace.ScrollUpButton,{ref:r,className:n("flex cursor-default items-center justify-center py-1",e),...t},v__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));cr.displayName=T__namespace.ScrollUpButton.displayName;var pr=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(T__namespace.ScrollDownButton,{ref:r,className:n("flex cursor-default items-center justify-center py-1",e),...t},v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));pr.displayName=T__namespace.ScrollDownButton.displayName;var Qo=v__namespace.forwardRef(({className:e,children:t,position:r="popper",...o},s)=>v__namespace.createElement(T__namespace.Portal,null,v__namespace.createElement(T__namespace.Content,{ref:s,className:n("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},v__namespace.createElement(cr,null),v__namespace.createElement(T__namespace.Viewport,{className:n("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),v__namespace.createElement(pr,null))));Qo.displayName=T__namespace.Content.displayName;var ea=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(T__namespace.Label,{ref:r,className:n("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ea.displayName=T__namespace.Label.displayName;var ta=v__namespace.forwardRef(({className:e,children:t,...r},o)=>v__namespace.createElement(T__namespace.Item,{ref:o,className:n("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},v__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},v__namespace.createElement(T__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),v__namespace.createElement(T__namespace.ItemText,null,t)));ta.displayName=T__namespace.Item.displayName;var ra=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(T__namespace.Separator,{ref:r,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));ra.displayName=T__namespace.Separator.displayName;var oa=v__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},s)=>v__namespace.createElement(mr__namespace.Root,{ref:s,decorative:r,orientation:t,className:n("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));oa.displayName=mr__namespace.Root.displayName;var Fs=B__namespace.Root,Gs=B__namespace.Trigger,Os=B__namespace.Close,aa=B__namespace.Portal,ur=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Overlay,{className:n("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}));ur.displayName=B__namespace.Overlay.displayName;var Bs=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"}}),na=v__namespace.forwardRef(({side:e="right",className:t,children:r,...o},s)=>v__namespace.createElement(aa,null,v__namespace.createElement(ur,null),v__namespace.createElement(B__namespace.Content,{ref:s,className:n(Bs({side:e}),t),...o},r,v__namespace.createElement(B__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"},v__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"sr-only"},"Close")))));na.displayName=B__namespace.Content.displayName;var sa=({className:e,...t})=>v__namespace.createElement("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...t});sa.displayName="SheetHeader";var ia=({className:e,...t})=>v__namespace.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ia.displayName="SheetFooter";var la=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Title,{ref:r,className:n("text-lg font-semibold text-foreground",e),...t}));la.displayName=B__namespace.Title.displayName;var da=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(B__namespace.Description,{ref:r,className:n("text-sm text-muted-foreground",e),...t}));da.displayName=B__namespace.Description.displayName;function Vs({className:e,...t}){return React.createElement("div",{className:n("animate-pulse rounded-md bg-muted",e),...t})}var ca=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(Me__namespace.Root,{ref:r,className:n("relative flex w-full touch-none select-none items-center",e),...t},v__namespace.createElement(Me__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},v__namespace.createElement(Me__namespace.Range,{className:"absolute h-full bg-primary"})),v__namespace.createElement(Me__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"})));ca.displayName=Me__namespace.Root.displayName;var pa=classVarianceAuthority.cva("rds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{gap:"md",align:"stretch"}}),ma=v__namespace.forwardRef(({className:e,gap:t,align:r,asChild:o=false,...s},a)=>v__namespace.createElement(o?reactSlot.Slot:"div",{ref:a,"data-gds-part":"stack",className:n(pa({gap:t,align:r,className:e})),...s}));ma.displayName="Stack";var ua=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(ht__namespace.Root,{className:n("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},v__namespace.createElement(ht__namespace.Thumb,{className:n("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")})));ua.displayName=ht__namespace.Root.displayName;var fa=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("div",{className:"relative w-full overflow-auto"},v__namespace.createElement("table",{ref:r,className:n("w-full caption-bottom text-sm",e),...t})));fa.displayName="Table";var ga=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("thead",{ref:r,className:n("[&_tr]:border-b",e),...t}));ga.displayName="TableHeader";var ha=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("tbody",{ref:r,className:n("[&_tr:last-child]:border-0",e),...t}));ha.displayName="TableBody";var ya=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("tfoot",{ref:r,className:n("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ya.displayName="TableFooter";var va=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("tr",{ref:r,className:n("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));va.displayName="TableRow";var ba=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("th",{ref:r,className:n("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}));ba.displayName="TableHead";var xa=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("td",{ref:r,className:n("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xa.displayName="TableCell";var Ra=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("caption",{ref:r,className:n("mt-4 text-sm text-muted-foreground",e),...t}));Ra.displayName="TableCaption";var Ta=v__namespace.forwardRef(({...e},t)=>v__namespace.createElement("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ta.displayName="Breadcrumb";var Pa=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("ol",{ref:r,className:n("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Pa.displayName="BreadcrumbList";var wa=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("li",{ref:r,className:n("inline-flex items-center gap-1.5",e),...t}));wa.displayName="BreadcrumbItem";var fr=n("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),Sa=v__namespace.forwardRef(({asChild:e,className:t,href:r,...o},s)=>e?v__namespace.createElement("span",{ref:s,className:n(fr,t),...o}):r?v__namespace.createElement("a",{ref:s,href:r,className:n(fr,t),...o}):v__namespace.createElement("button",{ref:s,type:"button",className:n(fr,t),...o}));Sa.displayName="BreadcrumbLink";var Ca=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:n("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));Ca.displayName="BreadcrumbPage";var Ma=({children:e,className:t,...r})=>v__namespace.createElement("li",{role:"presentation","aria-hidden":"true",className:n("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...r},e??v__namespace.createElement(lucideReact.ChevronRight,null));Ma.displayName="BreadcrumbSeparator";var ka=({className:e,...t})=>v__namespace.createElement("span",{role:"presentation","aria-hidden":"true",className:n("flex h-5 w-5 items-center justify-center",e),...t},v__namespace.createElement(lucideReact.MoreHorizontal,{className:"h-3.5 w-3.5"}),v__namespace.createElement("span",{className:"sr-only"},"More"));ka.displayName="BreadcrumbEllipsis";var gr=be__namespace.Provider,vt=be__namespace.Root,bt=be__namespace.Trigger,tt=v__namespace.forwardRef(({className:e,sideOffset:t=4,...r},o)=>v__namespace.createElement(be__namespace.Portal,null,v__namespace.createElement(be__namespace.Content,{ref:o,sideOffset:t,className:n("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})));tt.displayName=be__namespace.Content.displayName;var Ea=v__namespace.createContext("md"),Us=xe__namespace.Root,Ws=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),js=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=active]:bg-background data-[state=active]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),Ha=v__namespace.forwardRef(({className:e,size:t="md",children:r,...o},s)=>v__namespace.createElement(Ea.Provider,{value:t??"md"},v__namespace.createElement(xe__namespace.List,{ref:s,className:n(Ws({size:t}),e),...o},r)));Ha.displayName=xe__namespace.List.displayName;var La=v__namespace.forwardRef(({className:e,size:t,tooltip:r,...o},s)=>{let a=v__namespace.useContext(Ea),d=t??a,p=o["aria-label"]??(typeof r=="string"?r:void 0),i=v__namespace.createElement(xe__namespace.Trigger,{ref:s,className:n(js({size:d}),e),"aria-label":p,...o});return r?v__namespace.createElement(vt,null,v__namespace.createElement(bt,{asChild:true},i),v__namespace.createElement(tt,null,r)):i});La.displayName=xe__namespace.Trigger.displayName;var Da=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement(xe__namespace.Content,{ref:r,className:n("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Da.displayName=xe__namespace.Content.displayName;var Aa=v__namespace.forwardRef(({className:e,...t},r)=>v__namespace.createElement("textarea",{className:n("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}));Aa.displayName="Textarea";var Ia=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Fa=v__namespace.forwardRef(({className:e,variant:t,size:r,...o},s)=>v__namespace.createElement(hr__namespace.Root,{ref:s,className:n(Ia({variant:t,size:r,className:e})),...o}));Fa.displayName=hr__namespace.Root.displayName;var Oa=v__namespace.createContext("md"),qs=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),Ys=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),Ba=v__namespace.forwardRef(({className:e,size:t="md",children:r,...o},s)=>v__namespace.createElement(Oa.Provider,{value:t??"md"},v__namespace.createElement(rt__namespace.Root,{ref:s,className:n(qs({size:t}),e),...o},r)));Ba.displayName=rt__namespace.Root.displayName;var Va=v__namespace.forwardRef(({className:e,size:t,...r},o)=>{let s=v__namespace.useContext(Oa);return v__namespace.createElement(rt__namespace.Item,{ref:o,className:n(Ys({size:t??s}),e),...r})});Va.displayName=rt__namespace.Item.displayName;var _a=v__namespace.createContext(null);function $a(){let e=v__namespace.useContext(_a);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var Qs=({href:e,className:t,children:r})=>v__namespace.createElement("a",{href:e,className:t},r),Ka=v__namespace.forwardRef(({header:e,collapsedHeader:t,sections:r,items:o,footer:s,collapsed:a,onCollapsedChange:d,collapsible:p=true,defaultCollapsed:i=false,activeItem:c,className:l,linkComponent:m=Qs},u)=>{let[h,y]=v__namespace.useState(i),f=a??h,g=()=>{let R=!f;y(R),d?.(R);};return v__namespace.createElement(gr,{delayDuration:0},v__namespace.createElement(_a.Provider,{value:{collapsed:f,activeItem:c,LinkComponent:m}},v__namespace.createElement("aside",{ref:u,className:n("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",l)},v__namespace.createElement("div",{className:n("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,p&&v__namespace.createElement("button",{onClick:g,className:n("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?v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):v__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"}))),v__namespace.createElement("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden"},o&&o.length>0&&v__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},o.map(R=>v__namespace.createElement(yr,{key:R.id,item:R}))),r?.map(R=>v__namespace.createElement(ei,{key:R.id,section:R}))),s&&v__namespace.createElement("div",{className:"flex-shrink-0 border-t border-rds-gray-200 dark:border-[#1a1a1a] p-2"},s))))});Ka.displayName="SideMenu";function ei({section:e}){let{collapsed:t}=$a(),[r,o]=v__namespace.useState(e.defaultExpanded??true);return t?v__namespace.createElement("div",{className:"px-2 mb-1 space-y-0.5"},e.items.map(s=>v__namespace.createElement(yr,{key:s.id,item:s}))):v__namespace.createElement("div",{className:"px-2 mb-1"},v__namespace.createElement("button",{onClick:()=>o(!r),className:n("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&&v__namespace.createElement("span",{className:"h-3.5 w-3.5 flex-shrink-0"},e.icon),v__namespace.createElement("span",{className:"flex-1 text-left"},e.title),r?v__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})),r&&v__namespace.createElement("div",{className:"mt-0.5 space-y-0.5 relative pl-5"},v__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(s=>v__namespace.createElement(yr,{key:s.id,item:s,nested:true}))))}function yr({item:e,nested:t=false}){let{collapsed:r,activeItem:o,LinkComponent:s}=$a(),a=o===e.id,d=n("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",a?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"),p=v__namespace.createElement(v__namespace.Fragment,null,e.icon&&v__namespace.createElement("span",{className:n("flex-shrink-0",r?"h-5 w-5":"h-3.5 w-3.5")},e.icon),!r&&v__namespace.createElement("span",null,e.label),!r&&e.badge&&v__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)),i=e.href?v__namespace.createElement(s,{href:e.href,className:d},p):v__namespace.createElement("button",{onClick:e.onClick,disabled:e.disabled,className:n(d,"w-full")},p);return r?v__namespace.createElement(vt,null,v__namespace.createElement(bt,{asChild:true},i),v__namespace.createElement(tt,{side:"right",sideOffset:8},e.label)):i}var vr=v__namespace.createContext(null);function br(){let e=v__namespace.useContext(vr);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Ua=v__namespace.forwardRef(({tabs:e,activeTab:t,defaultTab:r,onTabChange:o,children:s,className:a,tabsClassName:d},p)=>{let[i,c]=v__namespace.useState(r||e[0]?.id||""),l=t??i,m=u=>{c(u),o?.(u);};return v__namespace.createElement(vr.Provider,{value:{activeTab:l,setActiveTab:m}},v__namespace.createElement("div",{ref:p,className:n("space-y-6",a)},v__namespace.createElement("div",{className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},v__namespace.createElement("nav",{className:n("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",d),"aria-label":"Tabs"},e.map(u=>{let h=l===u.id;return v__namespace.createElement("button",{key:u.id,onClick:()=>!u.disabled&&m(u.id),disabled:u.disabled,className:n("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",u.disabled&&"opacity-50 cursor-not-allowed")},u.icon&&v__namespace.createElement("span",{className:"h-4 w-4"},u.icon),u.label,h&&v__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))}))),s&&v__namespace.createElement("div",null,s)))});Ua.displayName="SimpleTabs";var Wa=v__namespace.forwardRef(({id:e,children:t,className:r},o)=>{let{activeTab:s}=br();return s!==e?null:v__namespace.createElement("div",{ref:o,role:"tabpanel","aria-labelledby":`tab-${e}`,className:r},t)});Wa.displayName="SimpleTabsPanel";var ja=v__namespace.forwardRef(({activeTab:e,defaultTab:t,onTabChange:r,children:o,className:s},a)=>{let[d,p]=v__namespace.useState(t||""),i=e??d,c=l=>{p(l),r?.(l);};return v__namespace.createElement(vr.Provider,{value:{activeTab:i,setActiveTab:c}},v__namespace.createElement("div",{ref:a,className:n("space-y-6",s)},o))});ja.displayName="SimpleTabsRoot";var Za=v__namespace.forwardRef(({children:e,className:t},r)=>v__namespace.createElement("div",{ref:r,className:"border-b border-rds-gray-200 dark:border-rds-gray-800"},v__namespace.createElement("nav",{className:n("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs"},e)));Za.displayName="SimpleTabsList";var qa=v__namespace.forwardRef(({value:e,children:t,icon:r,disabled:o,className:s},a)=>{let{activeTab:d,setActiveTab:p}=br(),i=d===e;return v__namespace.createElement("button",{ref:a,role:"tab",id:`tab-${e}`,"aria-selected":i,"aria-controls":`panel-${e}`,onClick:()=>!o&&p(e),disabled:o,className:n("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",i?"text-primary":"text-muted-foreground hover:text-foreground",o&&"opacity-50 cursor-not-allowed",s)},r&&v__namespace.createElement("span",{className:"h-4 w-4"},r),t,i&&v__namespace.createElement("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary","aria-hidden":"true"}))});qa.displayName="SimpleTabsTrigger";var Ya=v__namespace.forwardRef(({value:e,children:t,className:r},o)=>{let{activeTab:s}=br();return s!==e?null:v__namespace.createElement("div",{ref:o,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:r},t)});Ya.displayName="SimpleTabsContent";var Ae=[50,100,200,300,400,500,600,700,800,900,950],Xa=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],ti=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Ut({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let s=0;s<Ae.length;s++){let a=Xa[s],d=ti[s]*t;o[Ae[s]]=`${a.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function Ja(){let e={};for(let t=0;t<Ae.length;t++){let r=Xa[t];e[Ae[t]]=`${r.toFixed(4)} 0 0`;}return e}var xr={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"}},xt="1 0 0",Qa="0 0 0";function ot(e,t){let[,r,o]=e.split(/\s+/).map(l=>l.trim()),s=Number(r),a=o;if(t==="light"){let m=Math.min(s*.22,.045),u=.38,h=s;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${u.toFixed(3)} ${h.toFixed(3)} ${a}`}}let d=.22,p=Math.min(s*.45,.075),i=.82,c=s*.9;return {soft:`${d.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${i.toFixed(3)} ${c.toFixed(3)} ${a}`}}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 ri=["superLight","light","dark","superDark"],oi={muted:.6,default:1,vibrant:1.3};function ai(e,t,r){let o=t.primary*r,s=t.accent*r,a=(o+s)/2*.8,d=p=>(p%360+360)%360;return {1:`0.600 ${(.17*o).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${d(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*s).toFixed(4)} ${e.accent.toFixed(2)}`}}var b=e=>({source:"neutral",step:e}),fe=e=>({source:"primary",step:e}),Ie=e=>({source:"accent",step:e}),Rt=e=>({source:"pure",value:e}),ni={superLight:{background:b(50),foreground:b(800),card:Rt(xt),cardForeground:b(800),popover:Rt(xt),popoverForeground:b(800),primary:fe(600),primaryForeground:fe(50),secondary:b(100),secondaryForeground:b(700),muted:b(100),mutedForeground:b(500),accent:Ie(600),accentForeground:Ie(50),border:b(200),input:b(200),ring:fe(500)},light:{background:b(50),foreground:b(950),card:Rt(xt),cardForeground:b(950),popover:Rt(xt),popoverForeground:b(950),primary:fe(500),primaryForeground:fe(50),secondary:b(100),secondaryForeground:b(700),muted:b(100),mutedForeground:b(500),accent:Ie(500),accentForeground:Ie(50),border:b(200),input:b(200),ring:fe(500)},dark:{background:b(950),foreground:b(50),card:b(900),cardForeground:b(50),popover:b(900),popoverForeground:b(50),primary:fe(400),primaryForeground:fe(950),secondary:b(800),secondaryForeground:b(200),muted:b(800),mutedForeground:b(400),accent:Ie(400),accentForeground:Ie(950),border:b(800),input:b(800),ring:fe(400)},superDark:{background:Rt(Qa),foreground:b(100),card:b(950),cardForeground:b(100),popover:b(950),popoverForeground:b(100),primary:fe(300),primaryForeground:fe(950),secondary:b(900),secondaryForeground:b(300),muted:b(900),mutedForeground:b(500),accent:Ie(300),accentForeground:Ie(950),border:b(900),input:b(900),ring:fe(300)}};function Y(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function si(e,t){let r=ni[t],o=t==="superLight"||t==="light",s=o?xr.light:xr.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:s.destructive,destructiveForeground:s.destructiveFg,success:s.success,warning:s.warning,info:s.info,highlight:s.highlight,...(()=>{let a=o?"light":"dark",d=ot(s.destructive,a),p=ot(s.success,a),i=ot(s.warning,a),c=ot(s.info,a),l=ot(s.highlight,a);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:p.soft,successDeep:p.deep,warningSoft:i.soft,warningDeep:i.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:l.soft,highlightDeep:l.deep}})()}}var ke={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},ii={compact:.85,default:1,spacious:1.18};function li(e){let t=ii[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(ke.display),h1:r(ke.h1),h2:r(ke.h2),h3:r(ke.h3),h4:r(ke.h4),h5:r(ke.h5),h6:r(ke.h6),body:r(ke.body),bodySm:r(ke.bodySm)}}}var di={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function ci(e){let t=di[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 pi={tight:.85,default:1,roomy:1.2};function mi(e){return {baseUnit:"1rem",densityFactor:pi[e.density]}}var ui={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 fi(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=s=>`${Math.round(s*r)}ms`;return {shadows:ui[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function _e(e){let t=oi[e.intensity??"default"],r=e.neutralPureGray??false,o=(e.chroma?.neutral??.08)*t,s=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,d=r?Ja():Ut({hue:e.hues.neutral,chromaScale:o}),p=Ut({hue:e.hues.primary,chromaScale:s}),i=Ut({hue:e.hues.accent,chromaScale:a}),c={neutral:d,primary:p,accent:i},l=ai(e.hues,{primary:s,accent:a},t),m=Object.fromEntries(ri.map(R=>[R,si(c,R)])),u=li(e.typography),h=ci(e.radius),y=mi(e.spacing),f=fi(e.effects),g={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:c,colors:m,chart:l,typography:u,radius:h,spacing:y,effects:f,components:g}}var Tt={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Rr={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"}},jt=[Tt,Rr];function gi(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 Pr(e,t){let r=e.colors[t];return {...gi(r),...Tr("neutral",e.ramps.neutral),...Tr("primary",e.ramps.primary),...Tr("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 Tr(e,t){let r={};for(let o of Ae)r[`--ramp-${e}-${o}`]=t[o];return r}function Zt(e,t){if(typeof document>"u")return;let r=document.documentElement,o=Pr(e,t);for(let[s,a]of Object.entries(o))r.style.setProperty(s,a);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 Pt(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[s,a,d]=o.slice(0,3).map(Number);return "#"+[s,a,d].map(p=>Math.max(0,Math.min(255,p)).toString(16).padStart(2,"0")).join("").toUpperCase()}function hi(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[r,o,s]=t.map(Number),a=`${r.toFixed(3)} ${o.toFixed(3)} ${Math.round(s)}`,d=Pt(e);return {oklch:a,hex:d}}function wr(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let s of Ae){let{oklch:a,hex:d}=hi(t[s]);o.push(`| ${s} | \`${a}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
2
|
+
`)}function en(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let s=Pt(o.light)||"\u2014",a=Pt(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${s}\` (\`${o.light}\`) | \`${a}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
3
|
+
`)}function tn(e){return JSON.stringify(e.input,null,2)}function rn(e){let{input:t,ramps:r,colors:o,chart:s,typography:a,radius:d,spacing:p,effects:i,components:c}=e,l=t.intensity??"default",m=f=>({token:f,usage:yi[f]??"",light:o.light[f],dark:o.dark[f]}),u=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),h=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),y=[1,2,3,4,5].map(f=>{let g=s[f];return {slot:f,triplet:g,hex:Pt(g)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
4
|
+
|
|
5
|
+
> **Portable theme spec.** Paste this entire file into a fresh LLM prompt along with your design brief. The model will have everything it needs to produce UI that matches this exact theme \u2014 colors, typography, spacing, shapes, and the "feel" we're after.
|
|
6
|
+
|
|
7
|
+
## At a glance
|
|
8
|
+
|
|
9
|
+
- **Name**: ${e.name}
|
|
10
|
+
- **ID**: \`${t.id}\`
|
|
11
|
+
${t.description?`- **Description**: ${t.description}
|
|
12
|
+
`:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
|
|
13
|
+
- **Intensity**: \`${l}\` ${l==="muted"?"(quieter chroma across the board)":l==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
|
|
14
|
+
- **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
|
|
15
|
+
- **Spacing density**: \`${t.spacing.density}\`
|
|
16
|
+
- **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
|
|
17
|
+
- **Button shape**: \`${c.buttonShape}\` \xB7 **Input style**: \`${c.inputStyle}\` \xB7 **Card style**: \`${c.cardStyle}\`
|
|
18
|
+
- **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
|
|
19
|
+
|
|
20
|
+
## How themes work
|
|
21
|
+
|
|
22
|
+
Every theme in Grade DS is produced by a pure function:
|
|
23
|
+
|
|
24
|
+
\`\`\`ts
|
|
25
|
+
generateTheme(input: ThemeInput) => GeneratedTheme
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
A \`ThemeInput\` is a small object (three hues plus a handful of presets). The generator turns it into three 11-stop **OKLCH** color ramps, semantic tokens for four brightness modes (superLight / light / dark / superDark), a chart palette, and concrete values for typography, radius, spacing, and effects. Everything downstream reads from CSS variables set on \`:root\`.
|
|
29
|
+
|
|
30
|
+
## Full ThemeInput (round-trippable)
|
|
31
|
+
|
|
32
|
+
\`\`\`json
|
|
33
|
+
${tn(e)}
|
|
34
|
+
\`\`\`
|
|
35
|
+
|
|
36
|
+
## Color ramps
|
|
37
|
+
|
|
38
|
+
Three 11-stop OKLCH ramps, generated from the input hues + chromas + global intensity. Every color elsewhere in the theme resolves back to one of these stops.
|
|
39
|
+
|
|
40
|
+
${wr("Neutral",r.neutral,t.hues.neutral)}
|
|
41
|
+
|
|
42
|
+
${wr("Primary",r.primary,t.hues.primary)}
|
|
43
|
+
|
|
44
|
+
${wr("Accent",r.accent,t.hues.accent)}
|
|
45
|
+
|
|
46
|
+
## Semantic tokens (hue-derived)
|
|
47
|
+
|
|
48
|
+
Purpose-based tokens drawn from the ramps. Two values per token \u2014 the generator produces them for all four brightness modes, but only light + dark are shown here for brevity.
|
|
49
|
+
|
|
50
|
+
${en("Core semantic tokens",u)}
|
|
51
|
+
|
|
52
|
+
## Fixed semantic tokens (not hue-derived)
|
|
53
|
+
|
|
54
|
+
Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
|
|
55
|
+
|
|
56
|
+
${en("Status colors",h)}
|
|
57
|
+
|
|
58
|
+
## Chart palette
|
|
59
|
+
|
|
60
|
+
5-stop categorical palette derived from theme hues. Primary leads, then two hue-rotated variants, then neutral, then accent. Adjacent slots are guaranteed to be visually distinct.
|
|
61
|
+
|
|
62
|
+
| Slot | OKLCH | Hex |
|
|
63
|
+
|------|-------|-----|
|
|
64
|
+
${y.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
|
|
65
|
+
`)}
|
|
66
|
+
|
|
67
|
+
## Typography
|
|
68
|
+
|
|
69
|
+
- **Display font**: \`${a.fontDisplay}\`
|
|
70
|
+
- **Body font**: \`${a.fontSans}\`
|
|
71
|
+
- **Mono font**: \`${a.fontMono}\`
|
|
72
|
+
- **Heading weight**: \`${a.headingWeight}\`
|
|
73
|
+
- **Body weight**: \`${a.bodyWeight}\`
|
|
74
|
+
- **Heading letter-spacing**: \`${a.headingTracking}\`
|
|
75
|
+
|
|
76
|
+
### Type scale
|
|
77
|
+
|
|
78
|
+
| Step | Size |
|
|
79
|
+
|------|------|
|
|
80
|
+
| \`text-display\` | \`${a.scale.display}\` |
|
|
81
|
+
| \`text-h1\` | \`${a.scale.h1}\` |
|
|
82
|
+
| \`text-h2\` | \`${a.scale.h2}\` |
|
|
83
|
+
| \`text-h3\` | \`${a.scale.h3}\` |
|
|
84
|
+
| \`text-h4\` | \`${a.scale.h4}\` |
|
|
85
|
+
| \`text-h5\` | \`${a.scale.h5}\` |
|
|
86
|
+
| \`text-h6\` | \`${a.scale.h6}\` |
|
|
87
|
+
| body | \`${a.scale.body}\` |
|
|
88
|
+
| body-sm | \`${a.scale.bodySm}\` |
|
|
89
|
+
|
|
90
|
+
## Radius, spacing, effects
|
|
91
|
+
|
|
92
|
+
### Radius
|
|
93
|
+
|
|
94
|
+
| Step | Value |
|
|
95
|
+
|------|-------|
|
|
96
|
+
| \`--radius\` (base) | \`${d.base}\` |
|
|
97
|
+
| \`--rds-radius-sm\` | \`${d.sm}\` |
|
|
98
|
+
| \`--rds-radius-md\` | \`${d.md}\` |
|
|
99
|
+
| \`--rds-radius-lg\` | \`${d.lg}\` |
|
|
100
|
+
| \`--rds-radius-xl\` | \`${d.xl}\` |
|
|
101
|
+
| \`--rds-radius-2xl\` | \`${d["2xl"]}\` |
|
|
102
|
+
| \`--rds-radius-full\` | \`${d.full}\` |
|
|
103
|
+
|
|
104
|
+
### Spacing
|
|
105
|
+
|
|
106
|
+
- **Density factor**: \`${p.densityFactor}\` (applied as \`var(--rds-density)\` on components that opt in)
|
|
107
|
+
- **Base unit**: \`${p.baseUnit}\`
|
|
108
|
+
|
|
109
|
+
### Motion
|
|
110
|
+
|
|
111
|
+
| Var | Duration |
|
|
112
|
+
|-----|----------|
|
|
113
|
+
| \`--rds-transition-fast\` | \`${i.motion.fast}\` |
|
|
114
|
+
| \`--rds-transition-base\` | \`${i.motion.base}\` |
|
|
115
|
+
| \`--rds-transition-slow\` | \`${i.motion.slow}\` |
|
|
116
|
+
| \`--rds-transition-slower\` | \`${i.motion.slower}\` |
|
|
117
|
+
|
|
118
|
+
### Shadows
|
|
119
|
+
|
|
120
|
+
All shadows are applied via Tailwind's \`shadow-*\` utilities mapped to these var values.
|
|
121
|
+
|
|
122
|
+
| Var | Value |
|
|
123
|
+
|-----|-------|
|
|
124
|
+
| \`--rds-shadow-sm\` | \`${i.shadows.sm}\` |
|
|
125
|
+
| \`--rds-shadow-md\` | \`${i.shadows.md}\` |
|
|
126
|
+
| \`--rds-shadow-lg\` | \`${i.shadows.lg}\` |
|
|
127
|
+
| \`--rds-shadow-xl\` | \`${i.shadows.xl}\` |
|
|
128
|
+
|
|
129
|
+
## CSS variable conventions
|
|
130
|
+
|
|
131
|
+
Every color is stored as a bare \`L C H\` OKLCH triplet and wrapped at call time:
|
|
132
|
+
|
|
133
|
+
\`\`\`css
|
|
134
|
+
:root {
|
|
135
|
+
--primary: ${o.light.primary};
|
|
136
|
+
--background: ${o.light.background};
|
|
137
|
+
}
|
|
138
|
+
\`\`\`
|
|
139
|
+
|
|
140
|
+
Tailwind config wraps these with \`oklch(var(--x) / <alpha-value>)\` so Tailwind's opacity shortcuts work:
|
|
141
|
+
|
|
142
|
+
\`\`\`html
|
|
143
|
+
<div class="bg-primary text-primary-foreground">...</div>
|
|
144
|
+
<div class="bg-primary/50 hover:bg-primary/80">...</div>
|
|
145
|
+
<div class="text-muted-foreground border-border/40">...</div>
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
## Tailwind class cheat sheet
|
|
149
|
+
|
|
150
|
+
| Utility | Token |
|
|
151
|
+
|---------|-------|
|
|
152
|
+
| \`bg-background\`, \`text-foreground\` | page bg + primary text |
|
|
153
|
+
| \`bg-card\`, \`text-card-foreground\` | elevated surfaces |
|
|
154
|
+
| \`bg-popover\`, \`text-popover-foreground\` | floating menus |
|
|
155
|
+
| \`bg-primary\`, \`text-primary-foreground\` | primary action / brand |
|
|
156
|
+
| \`bg-secondary\`, \`text-secondary-foreground\` | secondary surface |
|
|
157
|
+
| \`bg-muted\`, \`text-muted-foreground\` | subtle surface + subtext |
|
|
158
|
+
| \`bg-accent\`, \`text-accent-foreground\` | highlight / hover |
|
|
159
|
+
| \`border-border\`, \`border-input\` | default + form borders |
|
|
160
|
+
| \`ring-ring\` | focus ring |
|
|
161
|
+
| \`bg-destructive\`, \`bg-success\`, \`bg-warning\`, \`bg-info\`, \`bg-highlight\` | status colors |
|
|
162
|
+
| \`bg-chart-1\` \u2026 \`bg-chart-5\` | chart series |
|
|
163
|
+
|
|
164
|
+
## Components the theme styles
|
|
165
|
+
|
|
166
|
+
Import from \`@gradeui/ui\` \u2014 all components read theme vars and re-skin automatically:
|
|
167
|
+
|
|
168
|
+
\`\`\`tsx
|
|
169
|
+
import {
|
|
170
|
+
Button, Input, Textarea, Label, Select, Checkbox, RadioGroup, Switch,
|
|
171
|
+
Slider, Toggle, Calendar, Card, Badge, Alert, Skeleton, Separator,
|
|
172
|
+
HoverCard, Popover, Dialog, Sheet, Tooltip, Progress, DropdownMenu,
|
|
173
|
+
Command, Tabs, SimpleTabs, Accordion, Collapsible, ScrollArea, Table,
|
|
174
|
+
Avatar, AIChat, Logo, SectionBlock, CardBlock, MediaBlock, FAQBlock,
|
|
175
|
+
} from "@gradeui/ui";
|
|
176
|
+
import "@gradeui/ui/styles.css";
|
|
177
|
+
\`\`\`
|
|
178
|
+
|
|
179
|
+
Every component accepts a \`className\` for layout tweaks. Variants are passed via a \`variant\` prop: \`<Button variant="outline">\`, \`<Alert variant="success">\`, \`<Badge variant="destructive-soft">\`.
|
|
180
|
+
|
|
181
|
+
## Feel and voice
|
|
182
|
+
|
|
183
|
+
When generating UI in the ${e.name} theme, match this character:
|
|
184
|
+
|
|
185
|
+
${vi(e)}
|
|
186
|
+
|
|
187
|
+
## Instructions for the generating LLM
|
|
188
|
+
|
|
189
|
+
1. **Use semantic tokens first**. Prefer \`bg-primary\`, \`text-foreground\`, \`border-border\` over raw ramp classes. Reach for \`bg-primary-500\` / \`bg-neutral-200\` only when you need a specific shade unavailable as a semantic token.
|
|
190
|
+
2. **Status colors are fixed**. Do not use \`success\` for a generic success-feeling visual \u2014 it's always green-ish. Use \`primary\` / \`accent\` for brand flavor; \`success\` / \`warning\` / \`destructive\` for actual state.
|
|
191
|
+
3. **Respect the shape presets**. If the theme's buttonShape is \`pill\`, don't add \`rounded-none\` to a Button. The component already matches the theme.
|
|
192
|
+
4. **Typography scales with the theme**. Heading utilities \`.text-h1\`\u2013\`.text-h6\` pick up the theme's display font automatically; body text inherits the body font. Only override with \`font-mono\` for code-like content.
|
|
193
|
+
5. **Charts get theme palette**. Use \`var(--chart-1)\` through \`var(--chart-5)\` for series colors. Don't hardcode hex in charts.
|
|
194
|
+
6. **Dark mode is one class**. Add \`dark\` to \`<html>\` (or toggle with the provider's \`setMode("dark")\`). All tokens have dark variants already \u2014 no \`dark:\` prefixes needed on most components.
|
|
195
|
+
7. **Layout freely**. The theme controls look-and-feel; composition is up to you. Use Tailwind for grids, spacing, flex layout exactly as normal.
|
|
196
|
+
|
|
197
|
+
## Quick regeneration
|
|
198
|
+
|
|
199
|
+
To recreate this theme in code:
|
|
200
|
+
|
|
201
|
+
\`\`\`ts
|
|
202
|
+
import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
|
|
203
|
+
|
|
204
|
+
const input: ThemeInput = ${tn(e).replace(/\n/g,`
|
|
205
|
+
`)};
|
|
206
|
+
|
|
207
|
+
const theme = generateTheme(input);
|
|
208
|
+
applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
209
|
+
\`\`\`
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
*Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
|
|
213
|
+
`}var yi={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 vi(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 s=r.typography.display;return s==="fraunces"||s==="instrumentSerif"||s==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(s==="geist"||s==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),o.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):o.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):o.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),o.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
|
|
214
|
+
`)}function Sr(e){if(typeof window>"u"||typeof document>"u")return;let t=rn(e),r=new Blob([t],{type:"text/markdown;charset=utf-8"}),o=URL.createObjectURL(r),s=document.createElement("a");s.href=o,s.download=`ramp-theme-${e.input.id}.md`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o);}var Pe=Object.fromEntries(jt.map(e=>[e.id,_e(e)])),at=Tt.id;function $e(e){if(e in Pe)return Pe[e];let t=Mr(e);if(t)return _e(t)}function Cr(){return [...Object.values(Pe),...nn()]}var on="ramp-user-themes";function qt(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(on);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function an(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(on,JSON.stringify(e));}catch{}}function nn(){return Object.values(qt()).map(_e)}function Mr(e){return qt()[e]}function Yt(e){let t=qt();return t[e.id]=e,an(t),_e(e)}function kr(e){if(e in Pe)return;let t=qt();delete t[e],an(t);}function bi(e,t,r){let o=Pe[e]?.input??Mr(e);if(!o)return;let s={...o,id:t,name:r};return Yt(s),s}var Nr="ramp-theme",Xt="ramp-mode",ln=["superLight","light","dark","superDark"],sn=new Set(["dark","superDark"]),xi=`
|
|
215
|
+
(function() {
|
|
216
|
+
try {
|
|
217
|
+
var mode = localStorage.getItem('${Xt}');
|
|
218
|
+
var valid = ['superLight','light','dark','superDark'];
|
|
219
|
+
if (!mode || valid.indexOf(mode) === -1) {
|
|
220
|
+
mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
221
|
+
}
|
|
222
|
+
if (mode === 'dark' || mode === 'superDark') {
|
|
223
|
+
document.documentElement.classList.add('dark');
|
|
224
|
+
}
|
|
225
|
+
document.documentElement.setAttribute('data-mode', mode);
|
|
226
|
+
var themeId = localStorage.getItem('${Nr}');
|
|
227
|
+
if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);
|
|
228
|
+
} catch(e) {}
|
|
229
|
+
})();
|
|
230
|
+
`,Er=v__namespace.createContext(null);function Ri({children:e,defaultTheme:t=at,defaultMode:r="light"}){let[o,s]=v__namespace.useState(t),[a,d]=v__namespace.useState(r),[p,i]=v__namespace.useState(0);v__namespace.useEffect(()=>{try{let f=localStorage.getItem(Nr);f&&$e(f)&&s(f);let g=localStorage.getItem(Xt);if(g&&ln.includes(g))d(g);else if(typeof window<"u"){let R=window.matchMedia("(prefers-color-scheme: dark)").matches;d(R?"dark":"light");}}catch{}},[]),v__namespace.useEffect(()=>{let f=$e(o)??$e(at);f&&(Zt(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",sn.has(a)));},[o,a,p]),v__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),g=R=>{try{if(localStorage.getItem(Xt))return}catch{return}d(R.matches?"dark":"light");};return f.addEventListener("change",g),()=>f.removeEventListener("change",g)},[]);let c=v__namespace.useCallback(f=>{s(f);try{localStorage.setItem(Nr,f);}catch{}},[]),l=v__namespace.useCallback(f=>{d(f);try{localStorage.setItem(Xt,f);}catch{}},[]),m=v__namespace.useCallback(f=>{Yt(f),i(g=>g+1),c(f.id);},[c]),u=v__namespace.useCallback(f=>{f in Pe||(kr(f),i(g=>g+1),s(g=>g===f?at:g));},[]),h=v__namespace.useCallback(()=>{i(f=>f+1);},[]),y=v__namespace.useMemo(()=>{let f=$e(o)??$e(at);return {theme:f,themeId:f.id,mode:a,isDark:sn.has(a),setThemeId:c,setMode:l,themes:Cr(),saveAndActivate:m,deleteTheme:u,refresh:h}},[o,a,p,c,l,m,u,h]);return v__namespace.createElement(Er.Provider,{value:y},e)}function Hr(){let e=v__namespace.useContext(Er);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Ke(){return v__namespace.useContext(Er)}var Lr=v__namespace.createContext(null);function dn(){return v__namespace.useContext(Lr)}var Li={maplibre:()=>Promise.resolve().then(()=>(gn(),fn)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(bn(),vn)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Tn(),Rn)).then(e=>e.createGoogleAdapter)},Di=500,Dr=v__namespace.forwardRef(function(t,r){let{center:o,zoom:s,bounds:a,appearance:d="auto",interactive:p=true,hoveredId:i,onHoveredIdChange:c,onLoad:l,onError:m,className:u,style:h,children:y,...f}=t,g=f.provider??"maplibre",R=f.styleUrl,w=f.tilerKey,k=f.accessToken,S=f.apiKey,_=f.mapId,j=v__namespace.useRef(null),O=v__namespace.useRef(null),se=v__namespace.useRef(new globalThis.Map),Se=v__namespace.useRef(null),[Nt,We]=v__namespace.useState(false),Et=v__namespace.useRef(c),H=v__namespace.useRef(m),Be=v__namespace.useRef(l);v__namespace.useEffect(()=>{Et.current=c,H.current=m,Be.current=l;});let je=Ke()?.isDark??false,A=d==="auto"?je?"dark":"light":d;v__namespace.useEffect(()=>{let L=false,Ze=j.current;if(!Ze)return;let Ne=d==="auto"?je?"dark":"light":d;return (async()=>{try{let ge=await Li[g]();if(L)return;let pe=await ge(Ze,{center:o,zoom:s,bounds:a,appearance:Ne,interactive:p,styleUrl:R,tilerKey:w,accessToken:k,apiKey:S,mapId:_},{onLoad:()=>{},onError:he=>H.current?.(he),onMarkerHover:he=>Et.current?.(he),onMarkerClick:()=>{}});if(L){pe.destroy();return}O.current=pe,We(!0),Be.current?.(Pn(O,se));}catch(ge){if(L)return;ge?.code||H.current?.({code:"provider-init-failed",message:ge?.message??"Map init failed",cause:ge});}})(),()=>{L=true,O.current?.destroy(),O.current=null,We(false),se.current.clear(),Se.current=null;}},[g,R,k,S,_,w]),v__namespace.useEffect(()=>{O.current?.setAppearance(A);},[A]),v__namespace.useEffect(()=>{O.current?.setInteractive(p);},[p]),v__namespace.useEffect(()=>{O.current&&(a?O.current.setBounds(a[0],a[1]):(O.current.setCenter(o),O.current.setZoom(s)));},[o[0],o[1],s,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),v__namespace.useEffect(()=>{let L=Se.current;L&&L!==i&&se.current.get(L)?.setHovered(false),i&&se.current.get(i)?.setHovered(true),Se.current=i??null;},[i]),v__namespace.useImperativeHandle(r,()=>Pn(O,se),[]);let nr=v__namespace.useMemo(()=>({registerMarker:(L,Ze,Ne)=>{let ge=O.current;if(!ge)return null;let pe=ge.addMarker(L,Ze,Ne);se.current.set(L,pe),process.env.NODE_ENV!=="production"&&se.current.size===Di+1&&console.warn(`@gradeui/ui Map: rendering ${se.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let he=pe.remove;return pe.remove=()=>{he(),se.current.delete(L),Se.current===L&&(Se.current=null);},i===L&&pe.setHovered(true),pe}}),[Nt]);return v__namespace.createElement("div",{ref:j,"data-gds-part":"map",className:n("rds-map relative isolate overflow-hidden",u),style:{borderRadius:"var(--rds-map-radius, var(--radius, 0.5rem))",border:"var(--rds-map-border, 1px solid var(--border, transparent))",...h}},v__namespace.createElement(Lr.Provider,{value:nr},y))});Dr.displayName="Map";function Pn(e,t){let r=()=>{};return {flyTo:(o,s)=>{let a=e.current;if(!a)return;let d;if(typeof o=="string"){if(d=t.current.get(o)?.coords??null,!d){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${o}".`);return}}else d=o;a.flyTo(d,s);},panTo:(o,s)=>e.current?.panTo(o,s)??r(),fitBounds:(o,s)=>e.current?.fitBounds(o,s)??r(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var Ar=v__namespace.memo(function({id:t,at:r,anchor:o="bottom",className:s,children:a,onClick:d}){let p=dn(),[i,c]=v__namespace.useState(null),l=v__namespace.useRef(null),m=v__namespace.useRef(d);return v__namespace.useEffect(()=>{m.current=d;}),v__namespace.useEffect(()=>{if(!p)return;let u=p.registerMarker(t,r,o);if(u){l.current=u,c(u.element);let h=y=>{m.current?.({id:t,coords:u.coords,native:y});};return u.element.addEventListener("click",h),()=>{u.element.removeEventListener("click",h),u.remove(),l.current=null,c(null);}}},[p,t]),v__namespace.useEffect(()=>{l.current?.setPosition(r);},[r[0],r[1]]),i?reactDom.createPortal(v__namespace.createElement("div",{"data-gds-part":"map-marker-content",className:n("pointer-events-auto",s)},a),i):null});Ar.displayName="MapMarker";var Fi={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Gi={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)"},we=v__namespace.forwardRef(({className:e,aspect:t="video",radius:r="lg",border:o=false,loading:s=false,onVisibilityChange:a,fallback:d,emptyState:p="icon",style:i,children:c,...l},m)=>{let u=v__namespace.useRef(null);return v__namespace.useImperativeHandle(m,()=>u.current),v__namespace.useEffect(()=>{if(!a||!u.current)return;let h=u.current,y=new IntersectionObserver(([f])=>a(f.isIntersecting),{threshold:.05});return y.observe(h),()=>y.disconnect()},[a]),v__namespace.createElement("div",{ref:u,"data-gds-part":"media-surface",className:n("rds-media-surface relative w-full overflow-hidden bg-muted",Fi[t],o&&"border border-border",e),style:{borderRadius:`var(--rds-media-radius, ${Gi[r]})`,...i},...l},c,s&&v__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},d),!c&&!s&&p!=="none"&&v__namespace.createElement("div",{"data-gds-part":"media-surface-placeholder",className:"absolute inset-0 flex items-center justify-center pointer-events-none",style:{background:"var(--rds-media-placeholder-bg)",color:"var(--rds-media-placeholder-fg)"},"aria-hidden":true},p==="icon"?v__namespace.createElement(lucideReact.ImageIcon,{className:"h-1/3 w-1/3 max-h-10 max-w-10"}):p))});we.displayName="MediaSurface";function Ue(){let[e,t]=v__namespace.useState(false);return v__namespace.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=s=>t(s.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var wn=v__namespace.forwardRef(({src:e,controls:t=true,autoPlay:r=false,loop:o=false,muted:s,pauseOffscreen:a=true,aspect:d="video",radius:p="lg",border:i=false,poster:c,label:l,className:m,style:u,playbackRate:h=1,objectFit:y="cover"},f)=>{let g=v__namespace.useRef(null),R=Ue(),[w,k]=v__namespace.useState(!!c);v__namespace.useImperativeHandle(f,()=>g.current);let S=s??r,_=r&&!R;v__namespace.useEffect(()=>{g.current&&(g.current.playbackRate=h);},[h]),v__namespace.useEffect(()=>{k(!!c);},[c]);let j=v__namespace.useCallback(O=>{!a||!g.current||(O&&_?g.current.play().catch(()=>{}):g.current.pause());},[a,_]);return v__namespace.createElement(we,{aspect:d,radius:p,border:i,"aria-label":l,className:m,style:u,onVisibilityChange:a?j:void 0},v__namespace.createElement("video",{ref:g,src:e,controls:t,autoPlay:_,loop:o,muted:S,playsInline:true,preload:_?"auto":"metadata",onPlaying:()=>k(false),className:n("w-full h-full",y==="cover"&&"object-cover",y==="contain"&&"object-contain",y==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&w&&v__namespace.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:n("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",y==="cover"&&"object-cover",y==="contain"&&"object-contain",y==="fill"&&"object-fill")}))});wn.displayName="VideoPlayer";var Sn=v__namespace.forwardRef(({src:e,controls:t=false,autoPlay:r=true,loop:o=true,pauseOffscreen:s=true,aspect:a="square",radius:d="lg",border:p=false,poster:i,label:c,className:l,style:m,stateMachines:u,artboard:h,fit:y="contain",stateMachineInputs:f},g)=>{let R=Ue(),[w,k]=v__namespace.useState(null),[S,_]=v__namespace.useState(null);return v__namespace.useEffect(()=>{let j=false;return import('@rive-app/react-canvas').then(O=>{j||k(O);}).catch(()=>{j||_("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{j=true;}},[]),v__namespace.createElement(we,{ref:g,aspect:a,radius:d,border:p,"aria-label":c,className:l,style:m},S?v__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},S):w&&e?v__namespace.createElement(Vi,{Mod:w,src:e,stateMachines:u,artboard:h,fit:y,stateMachineInputs:f,autoPlay:r&&!R,loop:o,pauseOffscreen:s,controls:t,poster:i}):i&&v__namespace.createElement("img",{src:i,alt:"",className:"w-full h-full object-contain"}))});Sn.displayName="RivePlayer";function Vi({Mod:e,src:t,stateMachines:r,artboard:o,fit:s,autoPlay:a,loop:d,pauseOffscreen:p,controls:i,poster:c}){let{useRive:l,Layout:m,Fit:u,Alignment:h,EventType:y}=e,f={contain:u.Contain,cover:u.Cover,fill:u.Fill,fitWidth:u.FitWidth,fitHeight:u.FitHeight,none:u.None},{rive:g,RiveComponent:R}=l({src:t,stateMachines:r,artboard:o,autoplay:a,layout:new m({fit:f[s],alignment:h.Center})}),[w,k]=v__namespace.useState(a);v__namespace.useEffect(()=>{if(!g||!d)return;let _=()=>{g.play();};return g.on(y.Stop,_),()=>{g.off(y.Stop,_);}},[g,d,y]),v__namespace.useEffect(()=>{if(!p||!g)return;let _=g.canvas;if(!_)return;let j=new IntersectionObserver(([O])=>{O.isIntersecting&&a?g.play():g.pause();},{threshold:.05});return j.observe(_),()=>j.disconnect()},[g,p,a]);let S=()=>{g&&(w?(g.pause(),k(false)):(g.play(),k(true)));};return v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement(R,{className:"w-full h-full"}),!g&&c&&v__namespace.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),i&&v__namespace.createElement("div",{className:n("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")},v__namespace.createElement(re,{size:"icon",variant:"secondary",onClick:S},w?v__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):v__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var Mn=({renderer:e,scene:t,camera:r,preset:o,width:s,height:a})=>{let d=new postprocessing.EffectComposer(e);d.setSize(s,a),d.addPass(new postprocessing.RenderPass(t,r));let p=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),i=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});i.blendMode.opacity.value=0;let c=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let l=new postprocessing.VignetteEffect({darkness:0,offset:.5}),m=new postprocessing.ChromaticAberrationEffect({offset:new G__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),u=new postprocessing.GlitchEffect({chromaticAberrationOffset:new G__namespace.Vector2(0,0),columns:.05});u.minStrength=0,u.maxStrength=0,d.addPass(new postprocessing.EffectPass(r,p)),d.addPass(new postprocessing.EffectPass(r,i,c,l)),d.addPass(new postprocessing.EffectPass(r,m)),d.addPass(new postprocessing.EffectPass(r,u));function h(y){let f=y.effects;p.intensity=f.bloom?.intensity??0,p.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(p.luminanceMaterial.threshold=f.bloom.luminanceThreshold),i.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,l.darkness=f.vignette?.darkness??0,l.offset=f.vignette?.offset??.5;let g=f.chromatic?.offset??0;m.offset?.set(g,g),f.glitch?(u.minStrength=f.glitch.strength?.[0]??0,u.maxStrength=f.glitch.strength?.[1]??0):(u.minStrength=0,u.maxStrength=0);}return h(o),{composer:d,setPreset:h,resize:(y,f)=>d.setSize(y,f),dispose:()=>{d.dispose();}}};var nt=3e3,Fr=400,Yi=80,kn=({width:e,height:t,palette:r})=>{let o=new G__namespace.Scene;o.background=new G__namespace.Color(r.background);let s=new G__namespace.PerspectiveCamera(70,e/t,.1,Fr*2);s.position.z=0;let a=new Float32Array(nt*6),d=new Float32Array(nt*6),p=new Float32Array(nt),i=new G__namespace.Color(r.primary),c=new G__namespace.Color(r.accent);function l(g,R){let w=Math.random()*Math.PI*2,k=Yi*Math.pow(Math.random(),.6),S=Math.cos(w)*k,_=Math.sin(w)*k,j=R?-Math.random()*Fr:-Fr;p[g]=j,a[g*6+0]=S,a[g*6+1]=_,a[g*6+2]=j,a[g*6+3]=S,a[g*6+4]=_,a[g*6+5]=j-2,d[g*6+0]=i.r,d[g*6+1]=i.g,d[g*6+2]=i.b,d[g*6+3]=c.r,d[g*6+4]=c.g,d[g*6+5]=c.b;}for(let g=0;g<nt;g++)l(g,true);let m=new G__namespace.BufferGeometry;m.setAttribute("position",new G__namespace.BufferAttribute(a,3)),m.setAttribute("color",new G__namespace.BufferAttribute(d,3));let u=new G__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:G__namespace.AdditiveBlending}),h=new G__namespace.LineSegments(m,u);o.add(h);let y=60,f=6;return {scene:o,camera:s,update:(g,R)=>{let w=m.attributes.position.array;for(let k=0;k<nt;k++){let S=k*6;w[S+2]+=y*R,w[S+5]=w[S+2]-f,w[S+2]>5&&l(k,false);}m.attributes.position.needsUpdate=true;},resize:(g,R)=>{let w=s;w.aspect=g/R,w.updateProjectionMatrix();},setPalette:g=>{o.background=new G__namespace.Color(g.background);let R=new G__namespace.Color(g.primary),w=new G__namespace.Color(g.accent),k=m.attributes.color.array;for(let S=0;S<nt;S++)k[S*6+0]=R.r,k[S*6+1]=R.g,k[S*6+2]=R.b,k[S*6+3]=w.r,k[S*6+4]=w.g,k[S*6+5]=w.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),u.dispose();}}};var Xi=`
|
|
2
231
|
precision highp float;
|
|
3
232
|
varying vec2 vUv;
|
|
4
233
|
uniform float uTime;
|
|
@@ -36,19 +265,19 @@
|
|
|
36
265
|
|
|
37
266
|
gl_FragColor = vec4(col, 1.0);
|
|
38
267
|
}
|
|
39
|
-
`,
|
|
268
|
+
`,Ji=`
|
|
40
269
|
varying vec2 vUv;
|
|
41
270
|
void main() {
|
|
42
271
|
vUv = uv;
|
|
43
272
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
44
273
|
}
|
|
45
|
-
`,
|
|
274
|
+
`,Nn=({width:e,height:t,palette:r})=>{let o=new G__namespace.Scene,s=new G__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new G__namespace.Vector2(e,t)},uBackground:{value:new G__namespace.Color(r.background)},uPrimary:{value:new G__namespace.Color(r.primary)},uSecondary:{value:new G__namespace.Color(r.secondary)},uAccent:{value:new G__namespace.Color(r.accent)}},d=new G__namespace.ShaderMaterial({uniforms:a,vertexShader:Ji,fragmentShader:Xi,depthTest:false,depthWrite:false}),p=new G__namespace.PlaneGeometry(2,2),i=new G__namespace.Mesh(p,d);return o.add(i),{scene:o,camera:s,update:l=>{a.uTime.value=l;},resize:(l,m)=>{a.uResolution.value.set(l,m);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{p.dispose(),d.dispose();}}};var Qi=`
|
|
46
275
|
varying vec2 vUv;
|
|
47
276
|
void main() {
|
|
48
277
|
vUv = uv;
|
|
49
278
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
50
279
|
}
|
|
51
|
-
`,
|
|
280
|
+
`,el=`
|
|
52
281
|
precision highp float;
|
|
53
282
|
varying vec2 vUv;
|
|
54
283
|
uniform float uTime;
|
|
@@ -105,13 +334,13 @@
|
|
|
105
334
|
|
|
106
335
|
gl_FragColor = vec4(col, 1.0);
|
|
107
336
|
}
|
|
108
|
-
`,
|
|
337
|
+
`,En=({width:e,height:t,palette:r})=>{let o=new G__namespace.Scene,s=new G__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new G__namespace.Vector2(e,t)},uBackground:{value:new G__namespace.Color(r.background)},uPrimary:{value:new G__namespace.Color(r.primary)},uSecondary:{value:new G__namespace.Color(r.secondary)},uAccent:{value:new G__namespace.Color(r.accent)}},d=new G__namespace.ShaderMaterial({uniforms:a,vertexShader:Qi,fragmentShader:el,depthTest:false,depthWrite:false}),p=new G__namespace.PlaneGeometry(2,2),i=new G__namespace.Mesh(p,d);return o.add(i),{scene:o,camera:s,update:l=>{a.uTime.value=l;},resize:(l,m)=>{a.uResolution.value.set(l,m);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{p.dispose(),d.dispose();}}};var tl=`
|
|
109
338
|
varying vec2 vUv;
|
|
110
339
|
void main() {
|
|
111
340
|
vUv = uv;
|
|
112
341
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
113
342
|
}
|
|
114
|
-
`,
|
|
343
|
+
`,rl=`
|
|
115
344
|
precision highp float;
|
|
116
345
|
varying vec2 vUv;
|
|
117
346
|
uniform float uTime;
|
|
@@ -181,7 +410,7 @@
|
|
|
181
410
|
|
|
182
411
|
gl_FragColor = vec4(col, 1.0);
|
|
183
412
|
}
|
|
184
|
-
`,
|
|
413
|
+
`,Hn=({palette:e})=>{let t=new G__namespace.Scene,r=new G__namespace.OrthographicCamera(-1,1,1,-1,0,1),o={uTime:{value:0},uBackground:{value:new G__namespace.Color(e.background)},uPrimary:{value:new G__namespace.Color(e.primary)},uSecondary:{value:new G__namespace.Color(e.secondary)},uAccent:{value:new G__namespace.Color(e.accent)}},s=new G__namespace.ShaderMaterial({uniforms:o,vertexShader:tl,fragmentShader:rl,depthTest:false,depthWrite:false}),a=new G__namespace.PlaneGeometry(2,2),d=new G__namespace.Mesh(a,s);return t.add(d),{scene:t,camera:r,update:i=>{o.uTime.value=i;},setPalette:i=>{o.uBackground.value.set(i.background),o.uPrimary.value.set(i.primary),o.uSecondary.value.set(i.secondary),o.uAccent.value.set(i.accent);},dispose:()=>{a.dispose(),s.dispose();}}};var wt={space:kn,plasma:Nn,voronoi:En,synthwave:Hn},St=[{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"}],Ct=Object.fromEntries(St.map(e=>[e.id,e]));var Mt={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}}}},tr="vhs";var Ln=`
|
|
185
414
|
precision highp float;
|
|
186
415
|
varying vec2 vUv;
|
|
187
416
|
uniform float uTime;
|
|
@@ -191,242 +420,13 @@
|
|
|
191
420
|
uniform vec3 uSecondary;
|
|
192
421
|
uniform vec3 uAccent;
|
|
193
422
|
uniform vec3 uBackground;
|
|
194
|
-
`,
|
|
423
|
+
`,ol=`
|
|
195
424
|
varying vec2 vUv;
|
|
196
425
|
void main() {
|
|
197
426
|
vUv = uv;
|
|
198
427
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
199
428
|
}
|
|
200
|
-
`,
|
|
201
|
-
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=r;}};function
|
|
202
|
-
${e}`;fi(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:ui,fragmentShader:i,depthTest:false,depthWrite:false}),c=new I__namespace.PlaneGeometry(2,2),m=new I__namespace.Mesh(c,p);return d.add(m),{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 et={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},yi=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,vi=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,bi=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Pt(e,t,r){if(typeof document>"u")return r;let o=e,n=bi.exec(e);if(n){let l=getComputedStyle(t).getPropertyValue(n[1]).trim();l&&(yi.test(l)?o=`oklch(${l})`:vi.test(l)&&(o=`hsl(${l})`));}let i=document.createElement("span");if(i.style.color="",i.style.color=o,i.style.color==="")return r;i.style.display="none",t.appendChild(i);let d=getComputedStyle(i).color;if(t.removeChild(i),!d)return r;if(d.startsWith("rgb"))return d;try{let l=document.createElement("canvas");l.width=1,l.height=1;let s=l.getContext("2d");if(!s)return d;s.clearRect(0,0,1,1),s.fillStyle=d,s.fillRect(0,0,1,1);let[p,c,m]=s.getImageData(0,0,1,1).data;return `rgb(${p}, ${c}, ${m})`}catch{return d}}function ba(e,t){return {primary:Pt(e.primary,t,et.primary),secondary:Pt(e.secondary,t,et.secondary),accent:Pt(e.accent,t,et.accent),background:Pt(e.background,t,et.background)}}var St=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:m=false,poster:g,label:h,className:T,style:f,maxDpr:u},w)=>{let N=y__namespace.useRef(null),[E,M]=y__namespace.useState(l),[_,J]=y__namespace.useState(false),ye=Ee(),It=y__namespace.useMemo(()=>({...et,...n}),[n]),At=y__namespace.useMemo(()=>i||(t?tr(t):e&&Xe[e]?Xe[e]:null),[i,t,e]),fr=y__namespace.useMemo(()=>{if(o)return o;if(e){let A=Je[e];if(A?.defaultPostPreset)return A.defaultPostPreset}return wt},[o,e]);y__namespace.useEffect(()=>{let A=N.current;if(!A||!At)return;let it=A.clientWidth||1,st=A.clientHeight||1,Ot=ba(It,A),$=new I__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),Da=u??Math.min(window.devicePixelRatio||1,2);$.setPixelRatio(Da),$.setSize(it,st),$.setClearColor(new I__namespace.Color(Ot.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=At({renderer:$,width:it,height:st,palette:Ot});}catch(D){if(D instanceof Oe)r?.(D),pe=Xe.space({renderer:$,width:it,height:st,palette:Ot});else throw $.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),D}let Ia=Qe[fr]??Qe[wt],dt=ua({renderer:$,scene:pe.scene,camera:pe.camera,preset:Ia,width:it,height:st}),gr=new I__namespace.Clock,hr=0,Ve=l&&!ye,yr=true,vr=()=>{if(hr=requestAnimationFrame(vr),!Ve||s&&!yr)return;let D=gr.getDelta(),te=gr.getElapsedTime();pe.update?.(te,D),dt.composer.render(D);};vr(),Ve&&J(true);let br=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),dt.resize(te,Be),pe.resize?.(te,Be);});br.observe(A);let xr=new IntersectionObserver(([D])=>{yr=D.isIntersecting;},{threshold:.05});xr.observe(A);let Rr=new MutationObserver(()=>{if(!N.current)return;let D=ba(It,N.current);$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);});Rr.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Tr=pe,lt=Tr.setMouse?D=>{let te=A.getBoundingClientRect(),Be=(D.clientX-te.left)/te.width,Aa=1-(D.clientY-te.top)/te.height;Tr.setMouse(Be,Aa);}:null;return lt&&A.addEventListener("pointermove",lt),Ft.current={toggle:()=>{Ve=!Ve,M(Ve);},setPalette:D=>{$.setClearColor(new I__namespace.Color(D.background),1),pe.setPalette?.(D);},setPostPreset:D=>{let te=Qe[D];te&&dt.setPreset(te);}},()=>{cancelAnimationFrame(hr),br.disconnect(),xr.disconnect(),Rr.disconnect(),lt&&A.removeEventListener("pointermove",lt),dt.dispose(),pe.dispose?.(),$.dispose(),$.domElement.parentElement===A&&A.removeChild($.domElement),Ft.current=null;}},[At,fr,It,l,ye,s,u,r]);let Ft=y__namespace.useRef(null),La=()=>Ft.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:m,"aria-label":h,className:T,style:f,"data-gds-part":"three-scene"},!_&&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:La},E?y__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):y__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});St.displayName="ThreeScene";var Ct=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 m=Je[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(St,{preset:e,postPreset:r,palette:o,aspect:i,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:m?.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"},m?.poster?y__namespace.createElement("img",{src:m.poster,alt:m.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"},m?.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??m?.label??e),m?.tags?.[0]&&y__namespace.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});Ct.displayName="ShaderPresetPreview";function Ri({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?Ze.filter(c=>r.some(m=>c.tags.includes(m))):Ze,[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 m=e===c.id;return y__namespace.createElement("div",{key:c.id,className:"relative",role:"radio","aria-checked":m},y__namespace.createElement(Ct,{preset:c.id,postPreset:n,palette:i,live:o,onClick:()=>t?.(c.id),className:a("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&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 Si({children:e}){let t=y.useRef(null);return y.useEffect(()=>{let r=new Pi__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 Se=[50,100,200,300,400,500,600,700,800,900,950],xa=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Ci=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Nt({hue:e,chromaScale:t=1}){let r=(e%360+360)%360,o={};for(let n=0;n<Se.length;n++){let i=xa[n],d=Ci[n]*t;o[Se[n]]=`${i.toFixed(4)} ${d.toFixed(4)} ${r.toFixed(2)}`;}return o}function Ra(){let e={};for(let t=0;t<Se.length;t++){let r=xa[t];e[Se[t]]=`${r.toFixed(4)} 0 0`;}return e}var rr={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"}},tt="1 0 0",Ta="0 0 0";function Ge(e,t){let[,r,o]=e.split(/\s+/).map(c=>c.trim()),n=Number(r),i=o;if(t==="light"){let m=Math.min(n*.22,.045),g=.38,h=n;return {soft:`${.965.toFixed(3)} ${m.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 kt={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 Ni=["superLight","light","dark","superDark"],ki={muted:.6,default:1,vibrant:1.3};function Mi(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}),Ce=e=>({source:"accent",step:e}),rt=e=>({source:"pure",value:e}),Ei={superLight:{background:v(50),foreground:v(800),card:rt(tt),cardForeground:v(800),popover:rt(tt),popoverForeground:v(800),primary:ie(600),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Ce(600),accentForeground:Ce(50),border:v(200),input:v(200),ring:ie(500)},light:{background:v(50),foreground:v(950),card:rt(tt),cardForeground:v(950),popover:rt(tt),popoverForeground:v(950),primary:ie(500),primaryForeground:ie(50),secondary:v(100),secondaryForeground:v(700),muted:v(100),mutedForeground:v(500),accent:Ce(500),accentForeground:Ce(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:Ce(400),accentForeground:Ce(950),border:v(800),input:v(800),ring:ie(400)},superDark:{background:rt(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:Ce(300),accentForeground:Ce(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 Hi(e,t){let r=Ei[t],o=t==="superLight"||t==="light",n=o?rr.light:rr.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=Ge(n.destructive,i),l=Ge(n.success,i),s=Ge(n.warning,i),p=Ge(n.info,i),c=Ge(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},Li={compact:.85,default:1,spacious:1.18};function Di(e){let t=Li[e.scale],r=o=>`${(o*t).toFixed(3)}rem`;return {fontSans:kt[e.body],fontMono:kt[e.mono],fontDisplay:kt[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 Ii={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Ai(e){let t=Ii[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 Fi={tight:.85,default:1,roomy:1.2};function Oi(e){return {baseUnit:"1rem",densityFactor:Fi[e.density]}}var Gi={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 $i(e){let t=e?.shadows??"default",r=e?.motionIntensity??1,o=n=>`${Math.round(n*r)}ms`;return {shadows:Gi[t],motion:{fast:o(150),base:o(200),slow:o(300),slower:o(500)},borderWidth:e?.borderWidth??"1px"}}function He(e){let t=ki[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?Ra():Nt({hue:e.hues.neutral,chromaScale:o}),l=Nt({hue:e.hues.primary,chromaScale:n}),s=Nt({hue:e.hues.accent,chromaScale:i}),p={neutral:d,primary:l,accent:s},c=Mi(e.hues,{primary:n,accent:i},t),m=Object.fromEntries(Ni.map(w=>[w,Hi(p,w)])),g=Di(e.typography),h=Ai(e.radius),T=Oi(e.spacing),f=$i(e.effects),u={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:m,chart:c,typography:g,radius:h,spacing:T,effects:f,components:u}}var ot={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"}},or={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"}},Mt=[ot,or];function Vi(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 nr(e,t){let r=e.colors[t];return {...Vi(r),...ar("neutral",e.ramps.neutral),...ar("primary",e.ramps.primary),...ar("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 ar(e,t){let r={};for(let o of Se)r[`--ramp-${e}-${o}`]=t[o];return r}function Et(e,t){if(typeof document>"u")return;let r=document.documentElement,o=nr(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 at(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 Bi(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=at(e);return {oklch:i,hex:d}}function ir(e,t,r){let o=[`### ${e} ramp (hue ${Math.round(r)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Se){let{oklch:i,hex:d}=Bi(t[n]);o.push(`| ${n} | \`${i}\` | \`${d||"\u2014"}\` |`);}return o.join(`
|
|
203
|
-
`)}function wa(e,t){let r=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let o of t){let n=at(o.light)||"\u2014",i=at(o.dark)||"\u2014";r.push(`| \`--${o.token}\` | ${o.usage} | \`${n}\` (\`${o.light}\`) | \`${i}\` (\`${o.dark}\`) |`);}return r.join(`
|
|
204
|
-
`)}function Pa(e){return JSON.stringify(e.input,null,2)}function Sa(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",m=f=>({token:f,usage:Ui[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(m),h=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),T=[1,2,3,4,5].map(f=>{let u=n[f];return {slot:f,triplet:u,hex:at(u)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
205
|
-
|
|
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.
|
|
207
|
-
|
|
208
|
-
## At a glance
|
|
209
|
-
|
|
210
|
-
- **Name**: ${e.name}
|
|
211
|
-
- **ID**: \`${t.id}\`
|
|
212
|
-
${t.description?`- **Description**: ${t.description}
|
|
213
|
-
`:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
|
|
214
|
-
- **Intensity**: \`${c}\` ${c==="muted"?"(quieter chroma across the board)":c==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
|
|
215
|
-
- **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
|
|
216
|
-
- **Spacing density**: \`${t.spacing.density}\`
|
|
217
|
-
- **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
|
|
218
|
-
- **Button shape**: \`${p.buttonShape}\` \xB7 **Input style**: \`${p.inputStyle}\` \xB7 **Card style**: \`${p.cardStyle}\`
|
|
219
|
-
- **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
|
|
220
|
-
|
|
221
|
-
## How themes work
|
|
222
|
-
|
|
223
|
-
Every theme in Grade DS is produced by a pure function:
|
|
224
|
-
|
|
225
|
-
\`\`\`ts
|
|
226
|
-
generateTheme(input: ThemeInput) => GeneratedTheme
|
|
227
|
-
\`\`\`
|
|
228
|
-
|
|
229
|
-
A \`ThemeInput\` is a small object (three hues plus a handful of presets). The generator turns it into three 11-stop **OKLCH** color ramps, semantic tokens for four brightness modes (superLight / light / dark / superDark), a chart palette, and concrete values for typography, radius, spacing, and effects. Everything downstream reads from CSS variables set on \`:root\`.
|
|
230
|
-
|
|
231
|
-
## Full ThemeInput (round-trippable)
|
|
232
|
-
|
|
233
|
-
\`\`\`json
|
|
234
|
-
${Pa(e)}
|
|
235
|
-
\`\`\`
|
|
236
|
-
|
|
237
|
-
## Color ramps
|
|
238
|
-
|
|
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.
|
|
240
|
-
|
|
241
|
-
${ir("Neutral",r.neutral,t.hues.neutral)}
|
|
242
|
-
|
|
243
|
-
${ir("Primary",r.primary,t.hues.primary)}
|
|
244
|
-
|
|
245
|
-
${ir("Accent",r.accent,t.hues.accent)}
|
|
246
|
-
|
|
247
|
-
## Semantic tokens (hue-derived)
|
|
248
|
-
|
|
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.
|
|
250
|
-
|
|
251
|
-
${wa("Core semantic tokens",g)}
|
|
252
|
-
|
|
253
|
-
## Fixed semantic tokens (not hue-derived)
|
|
254
|
-
|
|
255
|
-
Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
|
|
256
|
-
|
|
257
|
-
${wa("Status colors",h)}
|
|
258
|
-
|
|
259
|
-
## Chart palette
|
|
260
|
-
|
|
261
|
-
5-stop categorical palette derived from theme hues. Primary leads, then two hue-rotated variants, then neutral, then accent. Adjacent slots are guaranteed to be visually distinct.
|
|
262
|
-
|
|
263
|
-
| Slot | OKLCH | Hex |
|
|
264
|
-
|------|-------|-----|
|
|
265
|
-
${T.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
|
|
266
|
-
`)}
|
|
267
|
-
|
|
268
|
-
## Typography
|
|
269
|
-
|
|
270
|
-
- **Display font**: \`${i.fontDisplay}\`
|
|
271
|
-
- **Body font**: \`${i.fontSans}\`
|
|
272
|
-
- **Mono font**: \`${i.fontMono}\`
|
|
273
|
-
- **Heading weight**: \`${i.headingWeight}\`
|
|
274
|
-
- **Body weight**: \`${i.bodyWeight}\`
|
|
275
|
-
- **Heading letter-spacing**: \`${i.headingTracking}\`
|
|
276
|
-
|
|
277
|
-
### Type scale
|
|
278
|
-
|
|
279
|
-
| Step | Size |
|
|
280
|
-
|------|------|
|
|
281
|
-
| \`text-display\` | \`${i.scale.display}\` |
|
|
282
|
-
| \`text-h1\` | \`${i.scale.h1}\` |
|
|
283
|
-
| \`text-h2\` | \`${i.scale.h2}\` |
|
|
284
|
-
| \`text-h3\` | \`${i.scale.h3}\` |
|
|
285
|
-
| \`text-h4\` | \`${i.scale.h4}\` |
|
|
286
|
-
| \`text-h5\` | \`${i.scale.h5}\` |
|
|
287
|
-
| \`text-h6\` | \`${i.scale.h6}\` |
|
|
288
|
-
| body | \`${i.scale.body}\` |
|
|
289
|
-
| body-sm | \`${i.scale.bodySm}\` |
|
|
290
|
-
|
|
291
|
-
## Radius, spacing, effects
|
|
292
|
-
|
|
293
|
-
### Radius
|
|
294
|
-
|
|
295
|
-
| Step | Value |
|
|
296
|
-
|------|-------|
|
|
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}\` |
|
|
304
|
-
|
|
305
|
-
### Spacing
|
|
306
|
-
|
|
307
|
-
- **Density factor**: \`${l.densityFactor}\` (applied as \`var(--rds-density)\` on components that opt in)
|
|
308
|
-
- **Base unit**: \`${l.baseUnit}\`
|
|
309
|
-
|
|
310
|
-
### Motion
|
|
311
|
-
|
|
312
|
-
| Var | Duration |
|
|
313
|
-
|-----|----------|
|
|
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}\` |
|
|
318
|
-
|
|
319
|
-
### Shadows
|
|
320
|
-
|
|
321
|
-
All shadows are applied via Tailwind's \`shadow-*\` utilities mapped to these var values.
|
|
322
|
-
|
|
323
|
-
| Var | Value |
|
|
324
|
-
|-----|-------|
|
|
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}\` |
|
|
329
|
-
|
|
330
|
-
## CSS variable conventions
|
|
331
|
-
|
|
332
|
-
Every color is stored as a bare \`L C H\` OKLCH triplet and wrapped at call time:
|
|
333
|
-
|
|
334
|
-
\`\`\`css
|
|
335
|
-
:root {
|
|
336
|
-
--primary: ${o.light.primary};
|
|
337
|
-
--background: ${o.light.background};
|
|
338
|
-
}
|
|
339
|
-
\`\`\`
|
|
340
|
-
|
|
341
|
-
Tailwind config wraps these with \`oklch(var(--x) / <alpha-value>)\` so Tailwind's opacity shortcuts work:
|
|
342
|
-
|
|
343
|
-
\`\`\`html
|
|
344
|
-
<div class="bg-primary text-primary-foreground">...</div>
|
|
345
|
-
<div class="bg-primary/50 hover:bg-primary/80">...</div>
|
|
346
|
-
<div class="text-muted-foreground border-border/40">...</div>
|
|
347
|
-
\`\`\`
|
|
348
|
-
|
|
349
|
-
## Tailwind class cheat sheet
|
|
350
|
-
|
|
351
|
-
| Utility | Token |
|
|
352
|
-
|---------|-------|
|
|
353
|
-
| \`bg-background\`, \`text-foreground\` | page bg + primary text |
|
|
354
|
-
| \`bg-card\`, \`text-card-foreground\` | elevated surfaces |
|
|
355
|
-
| \`bg-popover\`, \`text-popover-foreground\` | floating menus |
|
|
356
|
-
| \`bg-primary\`, \`text-primary-foreground\` | primary action / brand |
|
|
357
|
-
| \`bg-secondary\`, \`text-secondary-foreground\` | secondary surface |
|
|
358
|
-
| \`bg-muted\`, \`text-muted-foreground\` | subtle surface + subtext |
|
|
359
|
-
| \`bg-accent\`, \`text-accent-foreground\` | highlight / hover |
|
|
360
|
-
| \`border-border\`, \`border-input\` | default + form borders |
|
|
361
|
-
| \`ring-ring\` | focus ring |
|
|
362
|
-
| \`bg-destructive\`, \`bg-success\`, \`bg-warning\`, \`bg-info\`, \`bg-highlight\` | status colors |
|
|
363
|
-
| \`bg-chart-1\` \u2026 \`bg-chart-5\` | chart series |
|
|
364
|
-
|
|
365
|
-
## Components the theme styles
|
|
366
|
-
|
|
367
|
-
Import from \`@gradeui/ui\` \u2014 all components read theme vars and re-skin automatically:
|
|
368
|
-
|
|
369
|
-
\`\`\`tsx
|
|
370
|
-
import {
|
|
371
|
-
Button, Input, Textarea, Label, Select, Checkbox, RadioGroup, Switch,
|
|
372
|
-
Slider, Toggle, Calendar, Card, Badge, Alert, Skeleton, Separator,
|
|
373
|
-
HoverCard, Popover, Dialog, Sheet, Tooltip, Progress, DropdownMenu,
|
|
374
|
-
Command, Tabs, SimpleTabs, Accordion, Collapsible, ScrollArea, Table,
|
|
375
|
-
Avatar, AIChat, Logo, SectionBlock, CardBlock, MediaBlock, FAQBlock,
|
|
376
|
-
} from "@gradeui/ui";
|
|
377
|
-
import "@gradeui/ui/styles.css";
|
|
378
|
-
\`\`\`
|
|
379
|
-
|
|
380
|
-
Every component accepts a \`className\` for layout tweaks. Variants are passed via a \`variant\` prop: \`<Button variant="outline">\`, \`<Alert variant="success">\`, \`<Badge variant="destructive-soft">\`.
|
|
381
|
-
|
|
382
|
-
## Feel and voice
|
|
383
|
-
|
|
384
|
-
When generating UI in the ${e.name} theme, match this character:
|
|
385
|
-
|
|
386
|
-
${_i(e)}
|
|
387
|
-
|
|
388
|
-
## Instructions for the generating LLM
|
|
389
|
-
|
|
390
|
-
1. **Use semantic tokens first**. Prefer \`bg-primary\`, \`text-foreground\`, \`border-border\` over raw ramp classes. Reach for \`bg-primary-500\` / \`bg-neutral-200\` only when you need a specific shade unavailable as a semantic token.
|
|
391
|
-
2. **Status colors are fixed**. Do not use \`success\` for a generic success-feeling visual \u2014 it's always green-ish. Use \`primary\` / \`accent\` for brand flavor; \`success\` / \`warning\` / \`destructive\` for actual state.
|
|
392
|
-
3. **Respect the shape presets**. If the theme's buttonShape is \`pill\`, don't add \`rounded-none\` to a Button. The component already matches the theme.
|
|
393
|
-
4. **Typography scales with the theme**. Heading utilities \`.text-h1\`\u2013\`.text-h6\` pick up the theme's display font automatically; body text inherits the body font. Only override with \`font-mono\` for code-like content.
|
|
394
|
-
5. **Charts get theme palette**. Use \`var(--chart-1)\` through \`var(--chart-5)\` for series colors. Don't hardcode hex in charts.
|
|
395
|
-
6. **Dark mode is one class**. Add \`dark\` to \`<html>\` (or toggle with the provider's \`setMode("dark")\`). All tokens have dark variants already \u2014 no \`dark:\` prefixes needed on most components.
|
|
396
|
-
7. **Layout freely**. The theme controls look-and-feel; composition is up to you. Use Tailwind for grids, spacing, flex layout exactly as normal.
|
|
397
|
-
|
|
398
|
-
## Quick regeneration
|
|
399
|
-
|
|
400
|
-
To recreate this theme in code:
|
|
401
|
-
|
|
402
|
-
\`\`\`ts
|
|
403
|
-
import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
|
|
404
|
-
|
|
405
|
-
const input: ThemeInput = ${Pa(e).replace(/\n/g,`
|
|
406
|
-
`)};
|
|
407
|
-
|
|
408
|
-
const theme = generateTheme(input);
|
|
409
|
-
applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
410
|
-
\`\`\`
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
*Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
|
|
414
|
-
`}var Ui={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 _i(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 sr(e){if(typeof window>"u"||typeof document>"u")return;let t=Sa(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(Mt.map(e=>[e.id,He(e)])),$e=ot.id;function Le(e){if(e in fe)return fe[e];let t=lr(e);if(t)return He(t)}function dr(){return [...Object.values(fe),...ka()]}var Ca="ramp-user-themes";function Ht(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Ca);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function Na(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Ca,JSON.stringify(e));}catch{}}function ka(){return Object.values(Ht()).map(He)}function lr(e){return Ht()[e]}function Lt(e){let t=Ht();return t[e.id]=e,Na(t),He(e)}function cr(e){if(e in fe)return;let t=Ht();delete t[e],Na(t);}function Ki(e,t,r){let o=fe[e]?.input??lr(e);if(!o)return;let n={...o,id:t,name:r};return Lt(n),n}var pr="ramp-theme",Dt="ramp-mode",Ea=["superLight","light","dark","superDark"],Ma=new Set(["dark","superDark"]),zi=`
|
|
416
|
-
(function() {
|
|
417
|
-
try {
|
|
418
|
-
var mode = localStorage.getItem('${Dt}');
|
|
419
|
-
var valid = ['superLight','light','dark','superDark'];
|
|
420
|
-
if (!mode || valid.indexOf(mode) === -1) {
|
|
421
|
-
mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
422
|
-
}
|
|
423
|
-
if (mode === 'dark' || mode === 'superDark') {
|
|
424
|
-
document.documentElement.classList.add('dark');
|
|
425
|
-
}
|
|
426
|
-
document.documentElement.setAttribute('data-mode', mode);
|
|
427
|
-
var themeId = localStorage.getItem('${pr}');
|
|
428
|
-
if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);
|
|
429
|
-
} catch(e) {}
|
|
430
|
-
})();
|
|
431
|
-
`,mr=y__namespace.createContext(null);function Wi({children:e,defaultTheme:t=$e,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(pr);f&&Le(f)&&n(f);let u=localStorage.getItem(Dt);if(u&&Ea.includes(u))d(u);else if(typeof window<"u"){let w=window.matchMedia("(prefers-color-scheme: dark)").matches;d(w?"dark":"light");}}catch{}},[]),y__namespace.useEffect(()=>{let f=Le(o)??Le($e);f&&(Et(f,i),typeof document<"u"&&document.documentElement.classList.toggle("dark",Ma.has(i)));},[o,i,l]),y__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),u=w=>{try{if(localStorage.getItem(Dt))return}catch{return}d(w.matches?"dark":"light");};return f.addEventListener("change",u),()=>f.removeEventListener("change",u)},[]);let p=y__namespace.useCallback(f=>{n(f);try{localStorage.setItem(pr,f);}catch{}},[]),c=y__namespace.useCallback(f=>{d(f);try{localStorage.setItem(Dt,f);}catch{}},[]),m=y__namespace.useCallback(f=>{Lt(f),s(u=>u+1),p(f.id);},[p]),g=y__namespace.useCallback(f=>{f in fe||(cr(f),s(u=>u+1),n(u=>u===f?$e:u));},[]),h=y__namespace.useCallback(()=>{s(f=>f+1);},[]),T=y__namespace.useMemo(()=>{let f=Le(o)??Le($e);return {theme:f,themeId:f.id,mode:i,isDark:Ma.has(i),setThemeId:p,setMode:c,themes:dr(),saveAndActivate:m,deleteTheme:g,refresh:h}},[o,i,l,p,c,m,g,h]);return y__namespace.createElement(mr.Provider,{value:T},e)}function ur(){let e=y__namespace.useContext(mr);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function nt(){return y__namespace.useContext(mr)}function Zi({className:e}){let t=nt();if(!t)return null;let{theme:r,themes:o,setThemeId:n,deleteTheme:i}=t;return y__namespace.createElement(Ie,null,y__namespace.createElement(Ae,{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(ke,{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:()=>sr(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],m=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(${m})`},"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 Ha=[{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 rs({className:e,variant:t="icons"}){let r=nt();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)},Ha.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)},Ha.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 ns(){let{isDark:e,setMode:t}=ur();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=Ea;exports.Accordion=$a;exports.AccordionContent=Sr;exports.AccordionItem=wr;exports.AccordionTrigger=Pr;exports.Alert=Cr;exports.AlertDescription=kr;exports.AlertTitle=Nr;exports.AppShell=Lr;exports.AppShellMain=Ir;exports.AppShellNav=Dr;exports.BUILT_IN_INPUTS=Mt;exports.Badge=_a;exports.Button=X;exports.Calendar=pt;exports.CalendarDayButton=Gr;exports.Card=$r;exports.CardContent=_r;exports.CardDescription=Ur;exports.CardFooter=Kr;exports.CardHeader=Vr;exports.CardTitle=Br;exports.Checkbox=zr;exports.DatePicker=en;exports.DateRangePicker=tn;exports.Dialog=on;exports.DialogClose=nn;exports.DialogContent=qr;exports.DialogDescription=Jr;exports.DialogFooter=Xr;exports.DialogHeader=Yr;exports.DialogOverlay=Vt;exports.DialogPortal=jr;exports.DialogTitle=Zr;exports.DialogTrigger=an;exports.DropdownMenu=cn;exports.DropdownMenuCheckboxItem=oo;exports.DropdownMenuContent=to;exports.DropdownMenuGroup=mn;exports.DropdownMenuItem=ro;exports.DropdownMenuLabel=no;exports.DropdownMenuPortal=un;exports.DropdownMenuRadioGroup=gn;exports.DropdownMenuRadioItem=ao;exports.DropdownMenuSeparator=io;exports.DropdownMenuShortcut=so;exports.DropdownMenuSub=fn;exports.DropdownMenuSubContent=eo;exports.DropdownMenuSubTrigger=Qr;exports.DropdownMenuTrigger=pn;exports.FRAGMENT_HEADER=va;exports.Flex=bo;exports.GRADE_PRE_HYDRATION_SCRIPT=zi;exports.GradeModeSwitcher=rs;exports.GradeThemeProvider=Wi;exports.GradeThemeSwitcher=Zi;exports.Grid=yo;exports.Input=lo;exports.Label=co;exports.LenisProvider=Si;exports.MediaSurface=ue;exports.Popover=Ie;exports.PopoverAnchor=Za;exports.PopoverContent=ke;exports.PopoverTrigger=Ae;exports.Progress=po;exports.RadioGroup=mo;exports.RadioGroupItem=uo;exports.RivePlayer=pa;exports.Row=go;exports.ScrollArea=xo;exports.ScrollBar=Ut;exports.Select=Nn;exports.SelectContent=wo;exports.SelectGroup=kn;exports.SelectItem=So;exports.SelectLabel=Po;exports.SelectScrollDownButton=Kt;exports.SelectScrollUpButton=_t;exports.SelectSeparator=Co;exports.SelectTrigger=To;exports.SelectValue=Mn;exports.Separator=No;exports.ShaderCompileError=Oe;exports.ShaderPresetPicker=Ri;exports.ShaderPresetPreview=Ct;exports.Sheet=Ln;exports.SheetClose=In;exports.SheetContent=Mo;exports.SheetDescription=Do;exports.SheetFooter=Ho;exports.SheetHeader=Eo;exports.SheetOverlay=Wt;exports.SheetPortal=ko;exports.SheetTitle=Lo;exports.SheetTrigger=Dn;exports.SideMenu=Qo;exports.SimpleTabs=aa;exports.SimpleTabsContent=la;exports.SimpleTabsList=sa;exports.SimpleTabsPanel=na;exports.SimpleTabsRoot=ia;exports.SimpleTabsTrigger=da;exports.Skeleton=Fn;exports.Slider=Io;exports.Stack=Fo;exports.Switch=Oo;exports.Table=Go;exports.TableBody=Vo;exports.TableCaption=zo;exports.TableCell=Ko;exports.TableFooter=Bo;exports.TableHead=_o;exports.TableHeader=$o;exports.TableRow=Uo;exports.Tabs=$n;exports.TabsContent=qo;exports.TabsList=Wo;exports.TabsTrigger=jo;exports.Textarea=Yo;exports.ThemeToggle=ns;exports.ThreeScene=St;exports.Tooltip=qt;exports.TooltipContent=Rt;exports.TooltipProvider=jt;exports.TooltipTrigger=Yt;exports.TopMenu=ea;exports.TopMenuUser=ta;exports.TopMenuUserItem=ra;exports.TopMenuUserSection=oa;exports.VideoPlayer=ca;exports.appShellMainVariants=Hr;exports.appShellNavVariants=Er;exports.applyThemeToRoot=Et;exports.badgeVariants=Fr;exports.buildFragmentShaderScene=tr;exports.builtInThemes=fe;exports.buttonVariants=Ue;exports.calmInput=ot;exports.cn=a;exports.defaultPostPreset=wt;exports.defaultThemeId=$e;exports.deleteUserTheme=cr;exports.duplicateTheme=Ki;exports.energyInput=or;exports.flexVariants=vo;exports.generateTheme=He;exports.getTheme=Le;exports.gridVariants=ho;exports.listThemes=dr;exports.listUserThemes=ka;exports.loadUserThemeInput=lr;exports.postPresets=Qe;exports.rowVariants=fo;exports.saveUserTheme=Lt;exports.sceneRegistry=Xe;exports.shaderPresetById=Je;exports.shaderPresets=Ze;exports.shellVariants=Mr;exports.stackVariants=Ao;exports.themeToCSSVars=nr;exports.useGradeTheme=ur;exports.useMaybeGradeTheme=nt;exports.usePrefersReducedMotion=Ee;//# sourceMappingURL=index.js.map
|
|
429
|
+
`,st=class extends Error{log;source;constructor(t,r){super(`Fragment shader failed to compile:
|
|
430
|
+
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=r;}};function al(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 s=r.getShaderParameter(o,r.COMPILE_STATUS),a=r.getShaderInfoLog(o)||"";if(r.deleteShader(o),!s)throw new st(a,t)}function Gr(e){return ({renderer:t,width:r,height:o,palette:s})=>{let a=`${Ln}
|
|
431
|
+
${e}`;al(t,a);let d=new G__namespace.Scene,p=new G__namespace.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new G__namespace.Vector2(r,o)},uMouse:{value:new G__namespace.Vector2(.5,.5)},uPrimary:{value:new G__namespace.Color(s.primary)},uSecondary:{value:new G__namespace.Color(s.secondary)},uAccent:{value:new G__namespace.Color(s.accent)},uBackground:{value:new G__namespace.Color(s.background)}},c=new G__namespace.ShaderMaterial({uniforms:i,vertexShader:ol,fragmentShader:a,depthTest:false,depthWrite:false}),l=new G__namespace.PlaneGeometry(2,2),m=new G__namespace.Mesh(l,c);return d.add(m),{scene:d,camera:p,update:h=>{i.uTime.value=h;},resize:(h,y)=>{i.uResolution.value.set(h,y);},setPalette:h=>{i.uPrimary.value.set(h.primary),i.uSecondary.value.set(h.secondary),i.uAccent.value.set(h.accent),i.uBackground.value.set(h.background);},setMouse:(h,y)=>{i.uMouse.value.set(h,y);},dispose:()=>{l.dispose(),c.dispose();}}}}var kt={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},il=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,ll=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,dl=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function rr(e,t,r){if(typeof document>"u")return r;let o=e,s=dl.exec(e);if(s){let p=getComputedStyle(t).getPropertyValue(s[1]).trim();p&&(il.test(p)?o=`oklch(${p})`:ll.test(p)&&(o=`hsl(${p})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=o,a.style.color==="")return r;a.style.display="none",t.appendChild(a);let d=getComputedStyle(a).color;if(t.removeChild(a),!d)return r;if(d.startsWith("rgb"))return d;try{let p=document.createElement("canvas");p.width=1,p.height=1;let i=p.getContext("2d");if(!i)return d;i.clearRect(0,0,1,1),i.fillStyle=d,i.fillRect(0,0,1,1);let[c,l,m]=i.getImageData(0,0,1,1).data;return `rgb(${c}, ${l}, ${m})`}catch{return d}}function Dn(e,t){return {primary:rr(e.primary,t,kt.primary),secondary:rr(e.secondary,t,kt.secondary),accent:rr(e.accent,t,kt.accent),background:rr(e.background,t,kt.background)}}var or=v__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:r,postPreset:o,palette:s,createScene:a,controls:d=false,autoPlay:p=true,pauseOffscreen:i=true,aspect:c="video",radius:l="lg",border:m=false,poster:u,label:h,className:y,style:f,maxDpr:g},R)=>{let w=v__namespace.useRef(null),[k,S]=v__namespace.useState(p),[_,j]=v__namespace.useState(false),O=Ue(),se=v__namespace.useMemo(()=>({...kt,...s}),[s]),Se=v__namespace.useMemo(()=>a||(t?Gr(t):e&&wt[e]?wt[e]:null),[a,t,e]),Nt=v__namespace.useMemo(()=>{if(o)return o;if(e){let H=Ct[e];if(H?.defaultPostPreset)return H.defaultPostPreset}return tr},[o,e]);v__namespace.useEffect(()=>{let H=w.current;if(!H||!Se)return;let Be=H.clientWidth||1,it=H.clientHeight||1,je=Dn(se,H),A=new G__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),nr=g??Math.min(window.devicePixelRatio||1,2);A.setPixelRatio(nr),A.setSize(Be,it),A.setClearColor(new G__namespace.Color(je.background),1),A.domElement.dataset.gdsPart="shader-canvas",A.domElement.style.width="100%",A.domElement.style.height="100%",A.domElement.style.display="block",H.appendChild(A.domElement);let L;try{L=Se({renderer:A,width:Be,height:it,palette:je});}catch(F){if(F instanceof st)r?.(F),L=wt.space({renderer:A,width:Be,height:it,palette:je});else throw A.dispose(),A.domElement.parentElement===H&&H.removeChild(A.domElement),F}let Ze=Mt[Nt]??Mt[tr],Ne=Mn({renderer:A,scene:L.scene,camera:L.camera,preset:Ze,width:Be,height:it}),ge=new G__namespace.Clock,pe=0,he=p&&!O,Or=true,Br=()=>{if(pe=requestAnimationFrame(Br),!he||i&&!Or)return;let F=ge.getDelta(),ie=ge.getElapsedTime();L.update?.(ie,F),Ne.composer.render(F);};Br(),he&&j(true);let Vr=new ResizeObserver(([F])=>{let ie=Math.max(1,Math.floor(F.contentRect.width)),lt=Math.max(1,Math.floor(F.contentRect.height));A.setSize(ie,lt),Ne.resize(ie,lt),L.resize?.(ie,lt);});Vr.observe(H);let zr=new IntersectionObserver(([F])=>{Or=F.isIntersecting;},{threshold:.05});zr.observe(H);let _r=new MutationObserver(()=>{if(!w.current)return;let F=Dn(se,w.current);A.setClearColor(new G__namespace.Color(F.background),1),L.setPalette?.(F);});_r.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let $r=L,Ht=$r.setMouse?F=>{let ie=H.getBoundingClientRect(),lt=(F.clientX-ie.left)/ie.width,In=1-(F.clientY-ie.top)/ie.height;$r.setMouse(lt,In);}:null;return Ht&&H.addEventListener("pointermove",Ht),We.current={toggle:()=>{he=!he,S(he);},setPalette:F=>{A.setClearColor(new G__namespace.Color(F.background),1),L.setPalette?.(F);},setPostPreset:F=>{let ie=Mt[F];ie&&Ne.setPreset(ie);}},()=>{cancelAnimationFrame(pe),Vr.disconnect(),zr.disconnect(),_r.disconnect(),Ht&&H.removeEventListener("pointermove",Ht),Ne.dispose(),L.dispose?.(),A.dispose(),A.domElement.parentElement===H&&H.removeChild(A.domElement),We.current=null;}},[Se,Nt,se,p,O,i,g,r]);let We=v__namespace.useRef(null),Et=()=>We.current?.toggle();return v__namespace.createElement(we,{ref:H=>{w.current=H,typeof R=="function"?R(H):R&&(R.current=H);},aspect:c,radius:l,border:m,"aria-label":h,className:y,style:f,"data-gds-part":"three-scene"},!_&&u&&v__namespace.createElement("img",{src:u,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&v__namespace.createElement("div",{"data-gds-part":"scene-controls",className:n("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")},v__namespace.createElement(re,{size:"icon",variant:"secondary",onClick:Et},k?v__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):v__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});or.displayName="ThreeScene";var ar=v__namespace.forwardRef(({preset:e,live:t="hover",postPreset:r,palette:o,className:s,aspect:a="video",radius:d="lg",label:p,hideLabel:i=false,onClick:c},l)=>{let m=Ct[e],[u,h]=v__namespace.useState(false),y=t==="always"||t==="hover"&&u;return v__namespace.createElement("div",{ref:l,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),onClick:c,className:n("group cursor-pointer flex flex-col gap-2",s)},y?v__namespace.createElement(or,{preset:e,postPreset:r,palette:o,aspect:a,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:m?.poster,maxDpr:1}):v__namespace.createElement(we,{aspect:a,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?v__namespace.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):v__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!i&&v__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},v__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},p??m?.label??e),m?.tags?.[0]&&v__namespace.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});ar.displayName="ShaderPresetPreview";function pl({value:e,onChange:t,filterTags:r,live:o="hover",postPreset:s,palette:a,columns:d=3,className:p}){let i=v__namespace.useMemo(()=>r?.length?St.filter(l=>r.some(m=>l.tags.includes(m))):St,[r]);return v__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:n("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",p)},i.map(l=>{let m=e===l.id;return v__namespace.createElement("div",{key:l.id,className:"relative",role:"radio","aria-checked":m},v__namespace.createElement(ar,{preset:l.id,postPreset:s,palette:a,live:o,onClick:()=>t?.(l.id),className:n("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&v__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"},v__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function gl({children:e}){let t=v.useRef(null);return v.useEffect(()=>{let r=new fl__default.default({duration:1.2,easing:s=>Math.min(1,1.001-Math.pow(2,-10*s)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=r;function o(s){r.raf(s),requestAnimationFrame(o);}return requestAnimationFrame(o),()=>{r.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function xl({className:e}){let t=Ke();if(!t)return null;let{theme:r,themes:o,setThemeId:s,deleteTheme:a}=t;return v__namespace.createElement(Je,null,v__namespace.createElement(Qe,{asChild:true},v__namespace.createElement(re,{variant:"ghost",size:"sm",className:n("gap-2",e),"aria-label":"Switch theme"},v__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"hidden sm:inline"},r.name))),v__namespace.createElement(Ve,{className:"w-80 p-2",align:"end"},v__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},v__namespace.createElement("div",null,v__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),v__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),v__namespace.createElement("button",{type:"button",onClick:()=>Sr(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"},v__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),v__namespace.createElement("div",{className:"flex flex-col gap-0.5"},o.map(d=>{let p=d.id===r.id,i=d.id in Pe,c=d.ramps.primary[500],l=d.ramps.accent[500],m=d.ramps.neutral[500];return v__namespace.createElement("div",{key:d.id,className:n("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",p&&"bg-muted")},v__namespace.createElement("button",{type:"button",onClick:()=>s(d.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},v__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${l})`},"aria-hidden":true}),v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),v__namespace.createElement("div",{className:"min-w-0 flex-1"},v__namespace.createElement("div",{className:"flex items-center gap-2"},v__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},d.name),d.tagline&&v__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},d.tagline)),d.description&&v__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},d.description))),p&&v__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!i&&!p&&v__namespace.createElement("button",{type:"button",onClick:u=>{u.stopPropagation(),a(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}`},v__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var An=[{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 Sl({className:e,variant:t="icons"}){let r=Ke();if(!r)return null;let{mode:o,setMode:s}=r;return t==="labeled"?v__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},An.map(({mode:a,label:d,icon:p})=>{let i=o===a;return v__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":i,onClick:()=>s(a),className:n("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",i?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},v__namespace.createElement(p,{className:"h-4 w-4"}),v__namespace.createElement("span",null,d))})):v__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},An.map(({mode:a,icon:d,tooltip:p})=>{let i=o===a;return v__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":i,"aria-label":p,title:p,onClick:()=>s(a),className:n("flex h-7 w-7 items-center justify-center rounded transition-colors",i?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},v__namespace.createElement(d,{className:"h-3.5 w-3.5"}))}))}function kl(){let{isDark:e,setMode:t}=Hr();return React.createElement(re,{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=ln;exports.Accordion=Vn;exports.AccordionContent=Wr;exports.AccordionItem=Kr;exports.AccordionTrigger=Ur;exports.Alert=jr;exports.AlertDescription=qr;exports.AlertTitle=Zr;exports.AppShell=ro;exports.AppShellAside=no;exports.AppShellFooter=io;exports.AppShellHeader=oo;exports.AppShellMain=so;exports.AppShellNav=ao;exports.Avatar=lo;exports.AvatarFallback=po;exports.AvatarImage=co;exports.BUILT_IN_INPUTS=jt;exports.Badge=Kn;exports.Breadcrumb=Ta;exports.BreadcrumbEllipsis=ka;exports.BreadcrumbItem=wa;exports.BreadcrumbLink=Sa;exports.BreadcrumbList=Pa;exports.BreadcrumbPage=Ca;exports.BreadcrumbSeparator=Ma;exports.Button=re;exports.Calendar=At;exports.CalendarDayButton=go;exports.Card=ho;exports.CardContent=xo;exports.CardDescription=bo;exports.CardFooter=Ro;exports.CardHeader=yo;exports.CardTitle=vo;exports.Checkbox=To;exports.DatePicker=ts;exports.DateRangePicker=rs;exports.Dialog=as;exports.DialogClose=ss;exports.DialogContent=So;exports.DialogDescription=No;exports.DialogFooter=Mo;exports.DialogHeader=Co;exports.DialogOverlay=ir;exports.DialogPortal=wo;exports.DialogTitle=ko;exports.DialogTrigger=ns;exports.DropdownMenu=cs;exports.DropdownMenuCheckboxItem=Ao;exports.DropdownMenuContent=Lo;exports.DropdownMenuGroup=ms;exports.DropdownMenuItem=Do;exports.DropdownMenuLabel=Fo;exports.DropdownMenuPortal=us;exports.DropdownMenuRadioGroup=gs;exports.DropdownMenuRadioItem=Io;exports.DropdownMenuSeparator=Go;exports.DropdownMenuShortcut=Oo;exports.DropdownMenuSub=fs;exports.DropdownMenuSubContent=Ho;exports.DropdownMenuSubTrigger=Eo;exports.DropdownMenuTrigger=ps;exports.FRAGMENT_HEADER=Ln;exports.Flex=qo;exports.GRADE_PRE_HYDRATION_SCRIPT=xi;exports.GradeModeSwitcher=Sl;exports.GradeThemeProvider=Ri;exports.GradeThemeSwitcher=xl;exports.Grid=jo;exports.Input=Bo;exports.Label=Vo;exports.LenisProvider=gl;exports.Map=Dr;exports.MapMarker=Ar;exports.MediaSurface=we;exports.Popover=Je;exports.PopoverAnchor=Jn;exports.PopoverContent=Ve;exports.PopoverTrigger=Qe;exports.Progress=zo;exports.RadioGroup=_o;exports.RadioGroupItem=$o;exports.ResizableHandle=Ts;exports.ResizablePanel=Rs;exports.ResizablePanelGroup=xs;exports.RivePlayer=Sn;exports.Row=Uo;exports.ScrollArea=Yo;exports.ScrollBar=dr;exports.Select=Hs;exports.SelectContent=Qo;exports.SelectGroup=Ls;exports.SelectItem=ta;exports.SelectLabel=ea;exports.SelectScrollDownButton=pr;exports.SelectScrollUpButton=cr;exports.SelectSeparator=ra;exports.SelectTrigger=Jo;exports.SelectValue=Ds;exports.Separator=oa;exports.ShaderCompileError=st;exports.ShaderPresetPicker=pl;exports.ShaderPresetPreview=ar;exports.Sheet=Fs;exports.SheetClose=Os;exports.SheetContent=na;exports.SheetDescription=da;exports.SheetFooter=ia;exports.SheetHeader=sa;exports.SheetOverlay=ur;exports.SheetPortal=aa;exports.SheetTitle=la;exports.SheetTrigger=Gs;exports.SideMenu=Ka;exports.SimpleTabs=Ua;exports.SimpleTabsContent=Ya;exports.SimpleTabsList=Za;exports.SimpleTabsPanel=Wa;exports.SimpleTabsRoot=ja;exports.SimpleTabsTrigger=qa;exports.Skeleton=Vs;exports.Slider=ca;exports.Stack=ma;exports.Switch=ua;exports.Table=fa;exports.TableBody=ha;exports.TableCaption=Ra;exports.TableCell=xa;exports.TableFooter=ya;exports.TableHead=ba;exports.TableHeader=ga;exports.TableRow=va;exports.Tabs=Us;exports.TabsContent=Da;exports.TabsList=Ha;exports.TabsTrigger=La;exports.Textarea=Aa;exports.ThemeToggle=kl;exports.ThreeScene=or;exports.Toggle=Fa;exports.ToggleGroup=Ba;exports.ToggleGroupItem=Va;exports.Tooltip=vt;exports.TooltipContent=tt;exports.TooltipProvider=gr;exports.TooltipTrigger=bt;exports.VideoPlayer=wn;exports.appShellAsideVariants=Qr;exports.appShellFooterVariants=to;exports.appShellHeaderVariants=Xr;exports.appShellMainVariants=eo;exports.appShellNavVariants=Jr;exports.applyThemeToRoot=Zt;exports.badgeVariants=uo;exports.buildFragmentShaderScene=Gr;exports.builtInThemes=Pe;exports.buttonVariants=dt;exports.calmInput=Tt;exports.cn=n;exports.defaultPostPreset=tr;exports.defaultThemeId=at;exports.deleteUserTheme=kr;exports.duplicateTheme=bi;exports.energyInput=Rr;exports.flexVariants=Zo;exports.generateTheme=_e;exports.getTheme=$e;exports.gridVariants=Wo;exports.listThemes=Cr;exports.listUserThemes=nn;exports.loadUserThemeInput=Mr;exports.postPresets=Mt;exports.rowVariants=Ko;exports.saveUserTheme=Yt;exports.sceneRegistry=wt;exports.shaderPresetById=Ct;exports.shaderPresets=St;exports.shellVariants=Yr;exports.stackVariants=pa;exports.themeToCSSVars=Pr;exports.toggleVariants=Ia;exports.useGradeTheme=Hr;exports.useMaybeGradeTheme=Ke;exports.usePrefersReducedMotion=Ue;//# sourceMappingURL=index.js.map
|
|
432
432
|
//# sourceMappingURL=index.js.map
|