@gradeui/ui 1.1.0 → 1.3.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/components/ui/background-fill.md +109 -0
- package/components/ui/checkbox-card.md +43 -0
- package/components/ui/checkbox.md +2 -2
- package/components/ui/code.md +2 -1
- package/components/ui/composer.md +226 -0
- package/components/ui/dropdown-menu.md +2 -0
- package/components/ui/field.md +26 -0
- package/components/ui/fill-picker.md +36 -0
- package/components/ui/input.md +27 -2
- package/components/ui/label.md +2 -1
- package/components/ui/logo.md +57 -0
- package/components/ui/message.md +263 -0
- package/components/ui/radio-card.md +41 -0
- package/components/ui/radio-group.md +2 -2
- package/components/ui/select.md +16 -4
- package/components/ui/switch-card.md +30 -0
- package/components/ui/switch.md +2 -2
- package/components/ui/textarea.md +2 -1
- package/components/ui/three-scene.md +22 -1
- package/dist/contracts.js +48 -4
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +48 -4
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +1255 -39
- package/dist/index.d.ts +1255 -39
- package/dist/index.js +122 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -47
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/tailwind-preset.mjs.map +1 -1
- package/package.json +11 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {z}from'zod';import*as w from'react';import {useRef,useEffect}from'react';import*as je from'@radix-ui/react-accordion';import {ChevronDown,X,ChevronLeft,ChevronRight,Check,Circle,Search,XCircle,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv,Disc3,Pause,Play,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,GripVertical,MoreHorizontal,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as yt from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import $d from'embla-carousel-react';import*as Ao from'@radix-ui/react-checkbox';import {Highlight}from'prism-react-renderer';import {useInView,motion}from'motion/react';import {format}from'date-fns';import*as tt from'@radix-ui/react-popover';import*as ae from'@radix-ui/react-dialog';import*as I from'@radix-ui/react-dropdown-menu';import*as ta from'@radix-ui/react-label';import*as zo from'@radix-ui/react-progress';import {Command}from'cmdk';import*as sa from'@radix-ui/react-separator';import*as Ht from'@radix-ui/react-radio-group';import*as go from'react-resizable-panels';import*as Ke from'@radix-ui/react-scroll-area';import*as B from'@radix-ui/react-select';import*as xt from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as _o from'@radix-ui/react-switch';import*as at from'@radix-ui/react-tabs';import*as rt from'@radix-ui/react-tooltip';import*as va from'@radix-ui/react-toggle';import*as fo from'@radix-ui/react-toggle-group';import {createPortal}from'react-dom';import*as oe from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,EffectPass}from'postprocessing';import su from'lenis';var od=Object.defineProperty;var or=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ur=(e,t)=>{for(var o in t)od(e,o,{get:t[o],enumerable:true});};var Ir,Nl,El=or(()=>{Ir="2pMfyvhpuKonkf7h8HzH",Nl=()=>Ir!=="YOUR_KEY_HERE"&&Ir.length>0;});var Dl={};Ur(Dl,{createMaplibreAdapter:()=>tm});function em(){if(typeof document>"u"||document.getElementById(Hl))return;let e=document.createElement("link");e.id=Hl,e.rel="stylesheet",e.href=Qp,document.head.appendChild(e);}var Jp,Ll,Qp,Hl,tm,Al=or(()=>{El();Jp={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},Ll=(e,t)=>`https://api.maptiler.com/maps/${Jp[e]}/style.json?key=${encodeURIComponent(t)}`,Qp="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",Hl="gds-maplibre-gl-css";tm=async(e,t,o)=>{em();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.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 n=t.tilerKey??Ir;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Nl()&&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??Ll(t.appearance,n),l=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&l.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{l.once("load",()=>c());}),o.onLoad(),l.on("error",c=>{let d=String(c?.error?.message??c?.message??"MapLibre error"),p=d.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:d,cause:c?.error??c});});let m=new globalThis.Map;return {setCenter:c=>l.setCenter(c),setZoom:c=>l.setZoom(c),setBounds:(c,d)=>l.fitBounds([c,d],{animate:false}),setAppearance:c=>{let d=t.styleUrl??Ll(c,n);l.setStyle(d,{diff:false});},setInteractive:c=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of d){let g=l[p];g&&(c?g.enable():g.disable());}},flyTo:(c,d)=>l.flyTo({center:c,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(c,d)=>l.panTo(c,{duration:d?.durationMs??600}),fitBounds:(c,d)=>{if(c.length===0)return;let p=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<p&&(p=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);l.fitBounds([[p,g],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let c=l.getCenter();return [c.lng,c.lat]},getZoom:()=>l.getZoom(),getBounds:()=>{let c=l.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,d,p)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:p==="center"?"center":"bottom"}).setLngLat(d).addTo(l),b={element:g,coords:d,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),m.delete(c);}};return m.set(c,{marker:u,handle:b}),b},destroy:()=>{m.forEach(({marker:c})=>c.remove()),m.clear(),l.remove();},instance:l}};});var zl={};Ur(zl,{createMapboxAdapter:()=>am});function rm(){if(typeof document>"u"||document.getElementById(Fl))return;let e=document.createElement("link");e.id=Fl,e.rel="stylesheet",e.href=om,document.head.appendChild(e);}var Il,om,Fl,am,Bl=or(()=>{Il={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},om="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",Fl="gds-mapbox-gl-css";am=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");rm();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let n=t.styleUrl??Il[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),d=c.toLowerCase().includes("style");o.onError({code:d?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let l=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??Il[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let d of c){let p=a[d];p&&(s?p.enable():p.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let d=1/0,p=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<d&&(d=b),f<p&&(p=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[d,p],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,d)=>{let p=document.createElement("div");p.dataset.gdsPart="map-marker",p.dataset.gdsState="idle",p.style.cursor="pointer",p.addEventListener("mouseenter",()=>o.onMarkerHover(s)),p.addEventListener("mouseleave",()=>o.onMarkerHover(null)),p.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:p,anchor:d==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:p,coords:c,setHovered:b=>{p.dataset.gdsState=b?"hovered":"idle",p.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),l.delete(s);}};return l.set(s,{marker:g,handle:u}),u},destroy:()=>{l.forEach(({marker:s})=>s.remove()),l.clear(),a.remove();},instance:a}};});var Ol={};Ur(Ol,{createGoogleAdapter:()=>sm});var nm,im,Vl,sm,Gl=or(()=>{nm=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],im=[{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"}]}],Vl=e=>e==="dark"?im:nm,sm=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let d=await import('@googlemaps/js-api-loader');r=d.Loader??d.default?.Loader;}catch(d){throw o.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:d}),d}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(d){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:d}),d}let l=t.appearance==="satellite",m=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:l?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:l?void 0:Vl(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let d=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});m.fitBounds(d);}await new Promise(d=>{a.maps.event.addListenerOnce(m,"idle",()=>d());}),o.onLoad();let s=new globalThis.Map;return {setCenter:d=>m.setCenter({lat:d[1],lng:d[0]}),setZoom:d=>m.setZoom(d),setBounds:(d,p)=>{let g=new a.maps.LatLngBounds({lat:d[1],lng:d[0]},{lat:p[1],lng:p[0]});m.fitBounds(g);},setAppearance:d=>{d==="satellite"?(m.setMapTypeId(a.maps.MapTypeId.HYBRID),m.setOptions({styles:void 0})):(m.setMapTypeId(a.maps.MapTypeId.ROADMAP),m.setOptions({styles:Vl(d)}));},setInteractive:d=>{m.setOptions({disableDefaultUI:!d,gestureHandling:d?"auto":"none",keyboardShortcuts:d});},flyTo:(d,p)=>{m.panTo({lat:d[1],lng:d[0]}),p?.zoom!=null&&m.setZoom(p.zoom);},panTo:d=>m.panTo({lat:d[1],lng:d[0]}),fitBounds:(d,p)=>{if(d.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of d)g.extend({lat:b,lng:u});m.fitBounds(g,p?.paddingPx??40);},getCenter:()=>{let d=m.getCenter();return d?[d.lng(),d.lat()]:[0,0]},getZoom:()=>m.getZoom()??0,getBounds:()=>{let d=m.getBounds();if(!d)return [[0,0],[0,0]];let p=d.getSouthWest(),g=d.getNorthEast();return [[p.lng(),p.lat()],[g.lng(),g.lat()]]},addMarker:(d,p,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(d)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(d,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:m,position:{lat:p[1],lng:p[0]},content:u}),f={element:u,coords:p,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(d);}};return s.set(d,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:d})=>{d.map=null;}),s.clear();},instance:m}};});var ja={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.string().optional(),design:"content",description:"initial open item(s)"},value:{schema:z.string().optional(),design:"content",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var Ka={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:z.string().optional(),design:"plumbing"}}};var qa={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:z.string().optional(),design:"plumbing"}}};var Ya={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
|
|
2
|
+
import {z}from'zod';import*as S from'react';import {useRef,useEffect}from'react';import*as gt from'@radix-ui/react-accordion';import {ChevronDown,X,ChevronLeft,ChevronRight,Check,Circle,Search,XCircle,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv,Disc3,Pause,Play,Paperclip,Square,Send,Bold,Italic,Underline,Strikethrough,Code,Heading1,Heading2,Heading3,Quote,List,ListOrdered,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,GripVertical,MoreHorizontal,Plus,Minus,Blend,Grid3x3,Sparkles,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as Vt from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import zp from'embla-carousel-react';import*as br from'@radix-ui/react-checkbox';import*as so from'@radix-ui/react-radio-group';import*as Nr from'@radix-ui/react-switch';import {Highlight}from'prism-react-renderer';import {useInView,motion,AnimatePresence,useReducedMotion}from'motion/react';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {LinkPlugin}from'@lexical/react/LexicalLinkPlugin';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {HeadingNode,QuoteNode,$createHeadingNode,$createQuoteNode}from'@lexical/rich-text';import {ListNode,ListItemNode,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {LinkNode,AutoLinkNode}from'@lexical/link';import {CodeNode,CodeHighlightNode}from'@lexical/code';import {$setBlocksType}from'@lexical/selection';import {mergeRegister}from'@lexical/utils';import {$getSelection,$isRangeSelection,$getRoot,$createParagraphNode,$createTextNode,FORMAT_TEXT_COMMAND,KEY_ENTER_COMMAND,COMMAND_PRIORITY_HIGH}from'lexical';import {BeautifulMentionNode,BeautifulMentionsPlugin,$createBeautifulMentionNode}from'lexical-beautiful-mentions';import {format}from'date-fns';import*as Ct from'@radix-ui/react-popover';import*as Se from'@radix-ui/react-dialog';import*as K from'@radix-ui/react-dropdown-menu';import*as cn from'@radix-ui/react-label';import*as Sr from'@radix-ui/react-progress';import {Command}from'cmdk';import*as hn from'@radix-ui/react-separator';import*as Ko from'react-resizable-panels';import*as ft from'@radix-ui/react-scroll-area';import*as J from'@radix-ui/react-select';import*as Kt from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as Pt from'@radix-ui/react-tabs';import*as Tt from'@radix-ui/react-tooltip';import*as Mn from'@radix-ui/react-toggle';import*as qo from'@radix-ui/react-toggle-group';import {createPortal}from'react-dom';import*as we from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,GlitchMode,EffectPass}from'postprocessing';import Bh from'lenis';var $c=Object.defineProperty;var Vr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ka=(e,t)=>{for(var o in t)$c(e,o,{get:t[o],enumerable:true});};var Fa,lc,dc=Vr(()=>{Fa="2pMfyvhpuKonkf7h8HzH",lc=()=>Fa!=="YOUR_KEY_HERE"&&Fa.length>0;});var mc={};Ka(mc,{createMaplibreAdapter:()=>pf});function cf(){if(typeof document>"u"||document.getElementById(pc))return;let e=document.createElement("link");e.id=pc,e.rel="stylesheet",e.href=df,document.head.appendChild(e);}var lf,cc,df,pc,pf,uc=Vr(()=>{dc();lf={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},cc=(e,t)=>`https://api.maptiler.com/maps/${lf[e]}/style.json?key=${encodeURIComponent(t)}`,df="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",pc="gds-maplibre-gl-css";pf=async(e,t,o)=>{cf();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.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 n=t.tilerKey??Fa;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!lc()&&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??cc(t.appearance,n),i=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&i.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{i.once("load",()=>c());}),o.onLoad(),i.on("error",c=>{let d=String(c?.error?.message??c?.message??"MapLibre error"),m=d.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:d,cause:c?.error??c});});let p=new globalThis.Map;return {setCenter:c=>i.setCenter(c),setZoom:c=>i.setZoom(c),setBounds:(c,d)=>i.fitBounds([c,d],{animate:false}),setAppearance:c=>{let d=t.styleUrl??cc(c,n);i.setStyle(d,{diff:false});},setInteractive:c=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of d){let g=i[m];g&&(c?g.enable():g.disable());}},flyTo:(c,d)=>i.flyTo({center:c,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(c,d)=>i.panTo(c,{duration:d?.durationMs??600}),fitBounds:(c,d)=>{if(c.length===0)return;let m=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<m&&(m=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);i.fitBounds([[m,g],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let c=i.getCenter();return [c.lng,c.lat]},getZoom:()=>i.getZoom(),getBounds:()=>{let c=i.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,d,m)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:m==="center"?"center":"bottom"}).setLngLat(d).addTo(i),b={element:g,coords:d,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),p.delete(c);}};return p.set(c,{marker:u,handle:b}),b},destroy:()=>{p.forEach(({marker:c})=>c.remove()),p.clear(),i.remove();},instance:i}};});var hc={};Ka(hc,{createMapboxAdapter:()=>gf});function uf(){if(typeof document>"u"||document.getElementById(fc))return;let e=document.createElement("link");e.id=fc,e.rel="stylesheet",e.href=mf,document.head.appendChild(e);}var gc,mf,fc,gf,bc=Vr(()=>{gc={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},mf="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",fc="gds-mapbox-gl-css";gf=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");uf();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let n=t.styleUrl??gc[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),d=c.toLowerCase().includes("style");o.onError({code:d?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let i=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??gc[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let d of c){let m=a[d];m&&(s?m.enable():m.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let d=1/0,m=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<d&&(d=b),f<m&&(m=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[d,m],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,d)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>o.onMarkerHover(s)),m.addEventListener("mouseleave",()=>o.onMarkerHover(null)),m.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:m,anchor:d==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:m,coords:c,setHovered:b=>{m.dataset.gdsState=b?"hovered":"idle",m.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),i.delete(s);}};return i.set(s,{marker:g,handle:u}),u},destroy:()=>{i.forEach(({marker:s})=>s.remove()),i.clear(),a.remove();},instance:a}};});var yc={};Ka(yc,{createGoogleAdapter:()=>bf});var ff,hf,vc,bf,xc=Vr(()=>{ff=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],hf=[{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"}]}],vc=e=>e==="dark"?hf:ff,bf=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let d=await import('@googlemaps/js-api-loader');r=d.Loader??d.default?.Loader;}catch(d){throw o.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:d}),d}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(d){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:d}),d}let i=t.appearance==="satellite",p=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:i?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:i?void 0:vc(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let d=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(d);}await new Promise(d=>{a.maps.event.addListenerOnce(p,"idle",()=>d());}),o.onLoad();let s=new globalThis.Map;return {setCenter:d=>p.setCenter({lat:d[1],lng:d[0]}),setZoom:d=>p.setZoom(d),setBounds:(d,m)=>{let g=new a.maps.LatLngBounds({lat:d[1],lng:d[0]},{lat:m[1],lng:m[0]});p.fitBounds(g);},setAppearance:d=>{d==="satellite"?(p.setMapTypeId(a.maps.MapTypeId.HYBRID),p.setOptions({styles:void 0})):(p.setMapTypeId(a.maps.MapTypeId.ROADMAP),p.setOptions({styles:vc(d)}));},setInteractive:d=>{p.setOptions({disableDefaultUI:!d,gestureHandling:d?"auto":"none",keyboardShortcuts:d});},flyTo:(d,m)=>{p.panTo({lat:d[1],lng:d[0]}),m?.zoom!=null&&p.setZoom(m.zoom);},panTo:d=>p.panTo({lat:d[1],lng:d[0]}),fitBounds:(d,m)=>{if(d.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of d)g.extend({lat:b,lng:u});p.fitBounds(g,m?.paddingPx??40);},getCenter:()=>{let d=p.getCenter();return d?[d.lng(),d.lat()]:[0,0]},getZoom:()=>p.getZoom()??0,getBounds:()=>{let d=p.getBounds();if(!d)return [[0,0],[0,0]];let m=d.getSouthWest(),g=d.getNorthEast();return [[m.lng(),m.lat()],[g.lng(),g.lat()]]},addMarker:(d,m,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(d)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(d,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:p,position:{lat:m[1],lng:m[0]},content:u}),f={element:u,coords:m,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(d);}};return s.set(d,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:d})=>{d.map=null;}),s.clear();},instance:p}};});var ni={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"initial open item(s)"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var ii={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:z.string().optional(),design:"plumbing"}}};var si={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:z.string().optional(),design:"plumbing"}}};var li={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
|
|
3
3
|
instead of hand-rolling \`grid grid-cols-[auto_1fr]\` so the layout shape (top nav,
|
|
4
4
|
side nav, three-pane Slack/Mail/Notion shape, constrained vs full-width main) is a
|
|
5
5
|
prop the settings panel can mutate. Don't compose top-level layouts from raw grid
|
|
@@ -14,7 +14,51 @@ Pick the \`nav\` variant from the source:
|
|
|
14
14
|
shape. ANY time you see a vertical icon rail next to
|
|
15
15
|
a separate list/sidebar, this is the answer \u2014 don't
|
|
16
16
|
reach for raw \`<div className="grid">\` with three
|
|
17
|
-
column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Za={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:z.unknown(),design:"plumbing"},initials:{schema:z.unknown(),design:"plumbing"}}};var Ja={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Qa={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],props:{variant:{schema:z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:z.unknown().optional(),design:"event"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var en={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var tn={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var on={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var rn={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var nn={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],props:{surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:z.unknown(),design:"plumbing"}}};var ad=z.enum(["start","center","end"]),nd=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),id=z.union([z.boolean(),nd]),sn={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:ad.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:id.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var ln={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var dn={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var cn={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],props:{source:{schema:z.string(),design:"content",description:"the code to render"},language:{schema:z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:z.boolean().optional(),design:"knob"},filename:{schema:z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},height:{schema:z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Use for terminal windows, code-tour cards, and surfaces that need a stable vertical rhythm regardless of snippet length."}}};var pn={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var mn={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var un={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var gn={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],props:{open:{schema:z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:z.unknown(),design:"plumbing"},used:{schema:z.unknown(),design:"plumbing"}}};var fn={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},onSelect:{schema:z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var hn={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var bn={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var vn={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var yn={name:"Input",description:"Any single-line text entry. Always pair with a Label for accessibility.",import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:z.string().optional(),design:"content"}}};var wn={name:"Label",description:"Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control.",import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:z.string().optional(),design:"content",description:"binds to the input's id"}}};var xn={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var dd=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),cd=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),pd=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),md=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),ud=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),gd=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),fd=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),hd=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),bd=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),vd=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),yd=z.object({kind:z.literal("generic"),prompt:z.string()}),wd=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),xd=z.union([dd,cd,pd,md,ud,gd,fd,hd,bd,vd,yd,wd]),Rd=z.enum(["video","square","portrait","wide","auto"]),Sd=z.enum(["none","sm","md","lg","xl"]),Cd=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),kd=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),jr={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:Cd.optional(),design:"knob",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:Rd.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:Sd.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:kd.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:z.string().optional(),design:"content",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:z.string().url().optional(),design:"content",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:xd.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}},refresh:{label:"Refresh",icon:"RotateCw",description:"Re-fetch this slot's resolved URL (cache-busts the browser AND the local URL map). Useful when a Pollinations URL failed to load on first hit \u2014 Pollinations has typically finished its cold-start by now, so a retry usually succeeds.",kind:"refresh-media-source",enabledWhen:{propPresent:"source"}}}};var Rn={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
|
|
17
|
+
column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var di={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:z.unknown(),design:"plumbing"},initials:{schema:z.unknown(),design:"plumbing"}}};var ci={name:"BackgroundFill",description:"The background *paint* of a frame \u2014 a generative shader, image, video, gradient, repeating texture, or solid token rendered as a layer BEHIND the frame's content. Use it as the first child of a `relative` frame; it paints an `absolute inset-0`, `z-0`, `pointer-events-none` layer, so content carrying `relative z-10` sits on top. This is the canonical way to give any container a rich background \u2014 never drop a full-bleed `<ThreeScene>` or `<img>` as a free-standing sibling. For a sized, in-flow media element (a hero card, a thumbnail), use ThreeScene / MediaSurface / VideoPlayer directly instead.",import:"@gradeui/ui",aliases:["background","fill","frame fill","backdrop","surface fill","background image","background video","background gradient","background shader","texture","paint"],composesWith:["AppShell","Card","Stack","Row","Grid (any relative container)","ThreeScene (shader fill)","MediaSurface"],props:{type:{schema:z.enum(["none","solid","gradient","image","video","shader"]),design:"knob",description:"which paint to render (required)"},color:{schema:z.string().optional(),design:"content",description:"solid fill; a token name (`primary`, `card`, `muted`, `accent`, `secondary`, `destructive`, `background`, `transparent`) or any CSS colour"},gradient:{schema:z.unknown().optional(),design:"plumbing",description:"gradient stops (token names or CSS colours) + angle in degrees (default 135)"},src:{schema:z.string().optional(),design:"content",description:"image or video URL"},fit:{schema:z.enum(["cover","contain","fill","none"]).optional(),design:"knob",description:'object-fit for image/video (default "cover")'},position:{schema:z.string().optional(),design:"content",description:'CSS object/background position (default "center")'},repeat:{schema:z.boolean().optional(),design:"knob",description:"tile the image (background-repeat) instead of a single <img>"},tileSize:{schema:z.string().optional(),design:"content",description:'CSS background-size when repeating (e.g. "120px")'},preset:{schema:z.string().optional(),design:"content",description:"shader preset id (see ThreeScene)"},fragmentShader:{schema:z.string().optional(),design:"content",description:"custom GLSL (takes precedence over preset)"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shader palette overrides; wrap tokens as `oklch(var(--token))`"},postPreset:{schema:z.string().optional(),design:"content",description:"shader post-FX"},opacity:{schema:z.number().optional(),design:"knob",description:"layer opacity 0\u20131"},blendMode:{schema:z.unknown().optional(),design:"plumbing",description:"blend against the frame behind it"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"match the frame's radius so the paint clips cleanly"}}};var mi={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var ui={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],props:{variant:{schema:z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:z.unknown().optional(),design:"event"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var gi={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var fi={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var hi={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var bi={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var yi={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],props:{surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:z.unknown(),design:"plumbing"}}};var qc=z.enum(["start","center","end"]),Yc=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),Zc=z.union([z.boolean(),Yc]),xi={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:qc.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:Zc.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var wi={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var Ri={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch. For a label + description row, wrap in Field. When each option should be a whole selectable card (label + description, selected state on the card surface), use CheckboxCard.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Field (label + description row)","CheckboxCard (whole-card selectable option)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Si={name:"CheckboxCard",description:"Multi-select where each option is a whole selectable card (add-ons, feature toggles, opt-ins). The whole card is the control, so focus and the checked state live on the card surface. Standalone (not in a group). Static content only \u2014 never nest an interactive control inside. For a plain checkbox + label row use Field instead.",import:"@gradeui/ui",aliases:["checkbox card","selectable card","multi-select card","add-on card","feature card","opt-in card"],composesWith:["Badge (in aside)","MediaSurface (custom children)","Stack / Grid (laying out several)"],props:{checked:{schema:z.unknown().optional(),design:"plumbing",description:"standard checkbox state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the check; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Ci={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],props:{source:{schema:z.string(),design:"content",description:"the code to render"},language:{schema:z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:z.boolean().optional(),design:"knob"},filename:{schema:z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema:z.enum(["xs","sm","md"]).optional(),design:"knob",description:"type-scale preset. `xs` (12px) for dense changelog cards / inline blocks; `sm` (14px, default) for marketing heroes and docs; `md` (16px) for focal-point displays."},height:{schema:z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Inherits the current size's line-height automatically."}}};var ki={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Ti={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var Pi={name:"Composer",description:`THE PRIMITIVE for any text composition surface \u2014 Slack / Discord /
|
|
18
|
+
Teams chat input, AI chat / copilot prompt box, comment thread input,
|
|
19
|
+
GitHub / Linear / Jira comment box, Reddit / Twitter reply box,
|
|
20
|
+
Notion / Linear document body, email composer, post body, anywhere
|
|
21
|
+
a user types text and submits.
|
|
22
|
+
|
|
23
|
+
CONCRETE TEST \u2014 if you find yourself writing a \`<textarea>\` (or
|
|
24
|
+
\`<Input>\` styled tall) with a row of \`<Bold>\` / \`<Italic>\` /
|
|
25
|
+
\`<Paperclip>\` / \`<Send>\` buttons below or beside it, STOP. That is
|
|
26
|
+
\`<Composer>\`. Use it.
|
|
27
|
+
|
|
28
|
+
Common shapes:
|
|
29
|
+
Chat input with formatting + attachments + send
|
|
30
|
+
\u2192 <Composer formats={["bold","italic","code"]} toolbar attachments />
|
|
31
|
+
AI prompt box with paperclip + send
|
|
32
|
+
\u2192 <AIChatComposer /> (preset wrapping Composer)
|
|
33
|
+
Comment / reply input
|
|
34
|
+
\u2192 <ComposerReply triggers={[{char:"@", items: people}]} />
|
|
35
|
+
Document body editor
|
|
36
|
+
\u2192 <Composer toolbar formats={[...]} bare />
|
|
37
|
+
|
|
38
|
+
Built on Lexical for rich text, mentions, slash commands. The
|
|
39
|
+
\`attachments\` prop wires image paste + paperclip + chip preview row
|
|
40
|
+
with object URL lifecycle handled internally \u2014 don't roll that
|
|
41
|
+
plumbing yourself. The \`triggers\` prop wires @mentions and /slash
|
|
42
|
+
commands with a typeahead popover. The \`formats\` array picks which
|
|
43
|
+
toolbar buttons render when \`toolbar\` is on.
|
|
44
|
+
|
|
45
|
+
Shares the lib/demo step vocabulary with <Code> so scripted
|
|
46
|
+
typing/format/mention demos animate in the same rhythm as your
|
|
47
|
+
terminal demos.`,import:"@gradeui/ui",composesWith:["AIChatComposer (preset wrapping this with paperclip + send + attachments)","ComposerReply (preset for comment threads)","AIChat (uses AIChatComposer internally)","Card (host above for reply boxes)",'Avatar (in leftActions slot for "your" avatar next to the input)'],props:{placeholder:{schema:z.string().optional(),design:"content"},initialText:{schema:z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema:z.unknown().optional(),design:"plumbing",description:"available formats (defaults to bold/italic/underline/strikethrough/code/h1/h2/blockquote/ul/ol); pass false for plain text only"},toolbar:{schema:z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:z.unknown().optional(),design:"event"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event"},maxLength:{schema:z.number().optional(),design:"knob"},autoFocus:{schema:z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:z.boolean().optional(),design:"knob"},loopDelay:{schema:z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema:z.boolean().optional(),design:"knob",description:"disables editing AND focusability; programmatic playback still works; use for marketing demos so the script doesn't steal focus"},bare:{schema:z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ni={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Mi={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],props:{open:{schema:z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:z.unknown(),design:"plumbing"},used:{schema:z.unknown(),design:"plumbing"}}};var Ei={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:'menu density; cascades to every item (Item, Checkbox, Radio, SubTrigger, Label) via context so a compact trigger gets a compact menu. Use "xs" in dense tool panels.'},onSelect:{schema:z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var Di={name:"Field",description:'Pair a bare control with a label and optional description in a row, with id + aria-describedby wired automatically. Use layout="setting" for the classic settings row (label on the left, Switch on the right). For a selectable CARD where the whole surface is the control, use RadioCard / CheckboxCard / SwitchCard instead.',import:"@gradeui/ui",aliases:["field","form field","control row","label and description","two line checkbox","option row","setting row","toggle row"],composesWith:["Checkbox","RadioGroup","RadioGroupItem","Switch","Badge (inside Field.Trailing)"],props:{layout:{schema:z.enum(["option","setting"]).optional(),design:"knob",description:"option (default): control leads, text beside it; setting: text leads, control pinned trailing"},children:{schema:z.unknown(),design:"plumbing",description:"order does not matter"}}};var Hi={name:"FillPicker",description:"Grade's paint picker \u2014 the control for choosing a frame's background fill, modelled on Figma's fill popover. A fill-type icon row (solid \xB7 gradient \xB7 image \xB7 pattern \xB7 video \xB7 shader) switches the panel below; a global opacity sits at the foot. Emits a FillValue that maps 1:1 onto BackgroundFill props. This is a Studio/inspector chrome control \u2014 pair it with BackgroundFill, which renders the chosen paint. Not for app content.",import:"@gradeui/ui",aliases:["fill picker","paint picker","background picker","fill chooser","fill popover"],composesWith:["BackgroundFill (renders the FillValue)","Popover (host it in a popover)","ShaderPresetPicker (the shader tab)","the inspector Fill section"],props:{value:{schema:z.unknown(),design:"plumbing",description:"current paint ({ type, color?, gradient?, src?, fit?, repeat?, tileSize?, preset?, palette?, postPreset?, opacity? }) (required)"},onChange:{schema:z.unknown(),design:"event",description:"called on any change (required)"}}};var Ii={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Fi={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var zi={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var Bi={name:"Input",description:'Any single-line text entry. Always pair with a Label for accessibility. Use startSlot/endSlot for icons, prefixes and units instead of hand-positioning absolute children; use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput","unit input","input with icon"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:z.string().optional(),design:"content"},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density. `default` (h-9) for forms; `sm` (h-8) and `xs` (h-7) for dense tool panels like the inspector."},startSlot:{schema:z.unknown().optional(),design:"plumbing",description:"adornment rendered inside the leading edge (icon, prefix, currency symbol). Non-interactive by default so clicks focus the input."},endSlot:{schema:z.unknown().optional(),design:"plumbing",description:'adornment rendered inside the trailing edge (unit like "px", a clear button, a stepper). Same pointer rules as startSlot.'}}};var _i={name:"Label",description:'Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control. Match `size` to the field it labels (size="xs" label over a size="xs" input).',import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:z.string().optional(),design:"content",description:"binds to the input's id"},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"text size, mirrors Input/Select/Textarea so a field and its label scale together. default = text-sm; xs = 11px for dense tool panels."}}};var Vi={name:"Logo",description:"A brand mark with built-in variations \u2014 a square mark for tight",import:"@gradeui/ui",aliases:["logo","brand","brandmark","wordmark","lockup","brand logo","app logo","logotype"],composesWith:["AppShell","AppShellHeader","Sidebar","SidebarHeader","Row","Stack"],props:{sources:{schema:z.unknown(),design:"plumbing",description:"artwork keyed by lockup then appearance:"}}};var Gi={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var Jc=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Qc=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),ep=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),tp=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),op=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),rp=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),ap=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),np=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),ip=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),sp=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),lp=z.object({kind:z.literal("generic"),prompt:z.string()}),dp=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),cp=z.union([Jc,Qc,ep,tp,op,rp,ap,np,ip,sp,lp,dp]),pp=z.enum(["video","square","portrait","wide","auto"]),mp=z.enum(["none","sm","md","lg","xl"]),up=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),gp=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),Ya={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:up.optional(),design:"knob",group:"image",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:pp.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:mp.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:gp.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:z.string().optional(),design:"content",group:"image",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:z.string().url().optional(),design:"content",group:"image",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:cp.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}}}};var Wi={name:"Message",description:`The canonical "avatar + author + timestamp + body" row. THE PRIMITIVE
|
|
48
|
+
for any chat surface, comment thread, post-reply, activity log, or
|
|
49
|
+
notification feed that follows the people-and-text shape.
|
|
50
|
+
|
|
51
|
+
CONCRETE TEST \u2014 if you find yourself composing an \`<Avatar>\` followed
|
|
52
|
+
by a \`<Row>\` of author name + timestamp, with a \`<p>\` or \`<span>\`
|
|
53
|
+
body below, STOP. That is \`<Message>\`. Reach for it directly.
|
|
54
|
+
|
|
55
|
+
Slack-style channel feed, Discord messages, Teams chat, Linear /
|
|
56
|
+
GitHub / Jira comments, Reddit replies, Twitter/X posts in a thread,
|
|
57
|
+
Notion comment sidebars, in-app activity logs, notification rows \u2014
|
|
58
|
+
every one of these IS \`<Message>\`. Do not roll the layout inline.
|
|
59
|
+
|
|
60
|
+
For non-people activity (system events, log lines, status pings) use
|
|
61
|
+
Callout or a plain Row instead \u2014 Message implies a human author.`,import:"@gradeui/ui",composesWith:['Avatar (in the avatar slot \u2014 pair with AvatarFallback tone="..." for stable per-author colour)',"Badge (in the badge slot for role / OP / bot tags)","Button (in actions",'typically size="icon" + variant="ghost")',"Stack (host multiple Messages in a thread)","Card (wrap a Stack of Messages for a comment-thread block)"],props:{author:{schema:z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:z.union([z.boolean(),z.string()]).optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema:z.enum(["start","end"]).optional(),design:"knob",description:'`start` (default) puts the avatar on the left; `end` mirrors for "your messages" in DM threads'},density:{schema:z.enum(["default","compact"]).optional(),design:"knob",description:'`default` is the canonical chat / channel-feed rhythm; `compact` tightens text sizes + gaps for dense side panels (Studio comments, activity feeds). Pair with `Avatar size="xs"` for the tightest stack.'},children:{schema:z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ui={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
|
|
18
62
|
"share with N people", multi-region settings.
|
|
19
63
|
|
|
20
64
|
**This is the answer for ANY "removable-chips-inside-an-input" pattern.**
|
|
@@ -32,7 +76,7 @@ already covers the trigger-with-badges shape.
|
|
|
32
76
|
|
|
33
77
|
Use \`<Select>\` instead for SINGLE selection. Use \`<Command>\` directly
|
|
34
78
|
(no MultiSelect wrapper) when the option set is unbounded or async
|
|
35
|
-
(users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var Sn={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var Cn={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var kn={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Stack (vertical list)","Card (radio card pattern)"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var Tn={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var Pn={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.string().optional(),design:"content",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var Mn={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Nn={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var En={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],props:{padding:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:z.string().optional(),design:"plumbing"},subtitle:{schema:z.string().optional(),design:"content"},cta1:{schema:z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:z.boolean().optional(),design:"knob"}}};var Ln={name:"Select",description:"Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive.",import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},wraps:{schema:z.unknown(),design:"plumbing"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"},accepts:{schema:z.unknown(),design:"plumbing"}}};var Hn={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var Dn={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var An={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var In={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var Fn={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var zn={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var Bn={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var Vn={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var On={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Gn={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)","Card (settings rows)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var Wn={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var Un={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:z.unknown().optional(),design:"plumbing"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var $n={name:"Textarea",description:"Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead.",import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{}};var jn={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:z.enum(["space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Kn={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var qn={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Yn={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.string().optional(),design:"content",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var Zn={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
|
|
79
|
+
(users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var ji={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var $i={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ki={name:"RadioCard",description:"Single-select where each option is a whole selectable card (shipping options, plan picker, onboarding choices). The whole card is the control, so focus and the checked state live on the card surface and the entire card is clickable. MUST sit inside a RadioGroup (keeps roving focus + single-select). Static content only \u2014 never nest an interactive control (Slider/Input/Button/link) inside. For a plain radio + label row use Field instead.",import:"@gradeui/ui",aliases:["radio card","selectable card","option card","plan picker","choice card","pricing tier","segmented choice card"],composesWith:["RadioGroup (required parent)","Badge (in aside)","MediaSurface (custom children)"],props:{value:{schema:z.string(),design:"content",description:"the radio value"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the dot; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content (image, custom layout) instead of label/description"}}};var qi={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. When each option should be a whole clickable card (label + description, selected state on the card), use RadioCard inside the RadioGroup instead of a Card with a radio in the corner. For a plain label + description row, wrap RadioGroupItem in Field. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Field (label + description row)","RadioCard (whole-card selectable option)","Stack (vertical list)"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var Yi={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var Zi={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var Xi={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Ji={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var Qi={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],props:{padding:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:z.string().optional(),design:"plumbing"},subtitle:{schema:z.string().optional(),design:"content"},cta1:{schema:z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:z.boolean().optional(),design:"knob"}}};var es={name:"Select",description:'Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive. In dense tool panels, set size="xs" on BOTH the trigger and the content so the closed control and open menu match.',import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density; wraps the clickable control, nest SelectValue inside"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"}}};var ts={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var os={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var rs={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var as={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var ns={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var is={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var ss={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var ls={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var ds={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var cs={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox. For a settings row (label + description on the left, Switch on the right) use Field layout="setting". For a prominent on/off presented as a whole selectable card, use SwitchCard.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)",'Field (layout="setting" settings row)',"SwitchCard (whole-card toggle)","Card (settings rows)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var ps={name:"SwitchCard",description:'A prominent on/off setting presented as a whole selectable card. The whole card is the switch, so the toggled state lives on the card surface. Standalone. For a row of compact settings (label left, small Switch right) use Field layout="setting" instead \u2014 SwitchCard is for the heavier, card-sized toggle.',import:"@gradeui/ui",aliases:["switch card","toggle card","setting card","feature toggle card"],composesWith:["Badge (in aside)","Stack (stacking several)"],props:{checked:{schema:z.unknown().optional(),design:"plumbing",description:"standard switch state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the switch glyph; state shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var us={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var gs={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:z.unknown().optional(),design:"plumbing"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var fs={name:"Textarea",description:'Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead. Use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density, mirrors Input. default = min-h-80 / text-sm; sm and xs shrink the min-height + padding for dense panels."}}};var hs={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:z.enum(["mesh","waves","space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var bs={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var vs={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var ys={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var xs={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
|
|
36
80
|
describes as a "Toolbar." App window chrome (Reddit, Twitter, GitHub, Linear,
|
|
37
81
|
most desktop apps), section toolbars inside Cards or panels, bottom action
|
|
38
82
|
bars on mobile layouts, persistent footer toolbars.
|
|
@@ -60,18 +104,18 @@ Use directly inside a Card or page section for section-scoped toolbars:
|
|
|
60
104
|
<Card>
|
|
61
105
|
<Toolbar size="sm" variant="subtle" leading={...} trailing={...} />
|
|
62
106
|
{content}
|
|
63
|
-
</Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var Xn={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Jn={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:z.number().optional(),design:"knob"}}};var Yr={Accordion:ja,AiChat:Ka,AiChatComposer:qa,AppShell:Ya,Avatar:Za,Badge:Ja,Banner:Qa,Breadcrumb:en,Button:tn,Calendar:on,Callout:rn,Card:nn,Carousel:sn,Chart:ln,Checkbox:dn,Code:cn,Collapsible:pn,Command:mn,DatePicker:un,Dialog:gn,DropdownMenu:fn,Flex:hn,Grid:bn,HoverCard:vn,Input:yn,Label:wn,Map:xn,MediaSurface:jr,MultiSelect:Rn,Popover:Sn,Progress:Cn,RadioGroup:kn,Resizable:Tn,RivePlayer:Pn,Row:Mn,ScrollArea:Nn,SectionBlock:En,Select:Ln,Separator:Hn,ShaderPresetPicker:Dn,ShaderPresetPreview:An,Sheet:In,Sidebar:Fn,Skeleton:zn,Slider:Bn,Sortable:Vn,Stack:On,Switch:Gn,Table:Wn,Tabs:Un,Textarea:$n,ThreeScene:jn,Toast:Kn,Toggle:qn,ToggleGroup:Yn,Toolbar:Zn,Tooltip:Xn,VideoPlayer:Jn};function Pd(e){return e?Yr[e]??null:null}function Md(){return Object.keys(Yr)}function i(...e){return twMerge(clsx(e))}var Hd=je.Root,Qn=w.forwardRef(({className:e,...t},o)=>w.createElement(je.Item,{ref:o,className:i("border-b",e),...t}));Qn.displayName="AccordionItem";var ei=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(je.Header,{className:"flex"},w.createElement(je.Trigger,{ref:r,className:i("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));ei.displayName=je.Trigger.displayName;var ti=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(je.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},w.createElement("div",{className:i("pb-4 pt-0",e)},t)));ti.displayName=je.Content.displayName;var oi=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"}},defaultVariants:{variant:"default"}}),Ad={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},ri=w.forwardRef(({className:e,variant:t,role:o,...r},n)=>w.createElement("div",{ref:n,role:o??Ad[t??"default"],"data-gds-part":"callout",className:i(oi({variant:t}),e),...r}));ri.displayName="Callout";var ai=w.forwardRef(({className:e,...t},o)=>w.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:i("mb-1 font-medium leading-none tracking-tight",e),...t}));ai.displayName="CalloutTitle";var ni=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"callout-description",className:i("text-sm [&_p]:leading-relaxed",e),...t}));ni.displayName="CalloutDescription";var ii=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),si=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),li=cva("gds-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}}),di=cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),ci=cva("gds-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"}}),pi=cva("gds-app-shell-footer border-t bg-background"),mi=w.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:i(ii({nav:t,className:e})),...r}));mi.displayName="AppShell";var ui=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:i(si({sticky:t,className:e})),...r}));ui.displayName="AppShellHeader";var gi=w.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>w.createElement(r?Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:i(li({placement:t,sticky:o,className:e})),...n}));gi.displayName="AppShellNav";var fi=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:i(di({sticky:t,className:e})),...r}));fi.displayName="AppShellAside";var hi=w.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:i(ci({maxWidth:t,className:e})),...r}));hi.displayName="AppShellMain";var bi=w.forwardRef(({className:e,asChild:t=false,...o},r)=>w.createElement(t?Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:i(pi({className:e})),...o}));bi.displayName="AppShellFooter";var vi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Root,{ref:o,className:i("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));vi.displayName=yt.Root.displayName;var yi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Image,{ref:o,className:i("aspect-square h-full w-full",e),...t}));yi.displayName=yt.Image.displayName;var wi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Fallback,{ref:o,className:i("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));wi.displayName=yt.Fallback.displayName;var Ri=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-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-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-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-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-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-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 cr({className:e,variant:t,rounded:o,...r}){return w.createElement("div",{className:i(Ri({variant:t,rounded:o}),e),...r})}var ze={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function et(e,t){return e==="solid"?t:""}var Si=cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),Bd={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},Ci=w.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:l,icon:m,action:s,role:c,children:d,...p},g)=>{let u=t??"default",b=c??Bd[u];return w.createElement("div",{ref:g,role:b,"data-gds-part":"banner","data-variant":u,"data-surface":n,className:i(Si({variant:t,align:o,sticky:r}),ze[n],e),...p},m?w.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},m):null,w.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},d),s?w.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,a?w.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:l,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},w.createElement(X,{className:"h-4 w-4"})):null)});Ci.displayName="Banner";var Eo=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",raised:"gds-button-raised"},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"}}),Ne=w.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>w.createElement(r?Slot:"button",{"data-gds-part":"button",className:i("gds-button",Eo({variant:t,size:o,className:e})),ref:a,...n}));Ne.displayName="Button";function mr({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:l,...m}){let s=getDefaultClassNames();return w.createElement(DayPicker,{showOutsideDays:o,className:i("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:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:i("w-fit",s.root),months:i("relative flex flex-col gap-4 md:flex-row",s.months),month:i("flex w-full flex-col gap-4",s.month),nav:i("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:i(Eo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:i(Eo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:i("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:i("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:i("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:i("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:i("select-none font-medium",r==="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:i("flex",s.weekdays),weekday:i("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:i("mt-2 flex w-full",s.week),week_number_header:i("w-[--cell-size] select-none",s.week_number_header),week_number:i("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:i("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:i("bg-accent rounded-l-md",s.range_start),range_middle:i("rounded-none",s.range_middle),range_end:i("bg-accent rounded-r-md",s.range_end),today:i("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:i("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:i("text-muted-foreground opacity-50",s.disabled),hidden:i("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:d,...p})=>w.createElement("div",{"data-slot":"calendar",ref:d,className:i(c),...p}),Chevron:({className:c,orientation:d,...p})=>d==="left"?w.createElement(ChevronLeftIcon,{className:i("size-4",c),...p}):d==="right"?w.createElement(ChevronRightIcon,{className:i("size-4",c),...p}):w.createElement(ChevronDownIcon,{className:i("size-4",c),...p}),DayButton:Ti,WeekNumber:({children:c,...d})=>w.createElement("td",{...d},w.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...l},...m})}function Ti({className:e,day:t,modifiers:o,...r}){let n=getDefaultClassNames(),a=w.useRef(null);return w.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),w.createElement(Ne,{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":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:i("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),...r})}var Zr=w.createContext(null);function Do(e){let t=w.useContext(Zr);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var qd=5e3,Et=w.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:l,style:m,children:s,...c},d)=>{let p=w.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[g,u]=$d(p),[b,f]=w.useState(0),[h,C]=w.useState(0),[S,x]=w.useState(false),[k,P]=w.useState(false),V=w.useRef(new Map),N=w.useRef(a);N.current=a;let F=w.useMemo(()=>r?r===true?{}:r:null,[r]);w.useEffect(()=>{if(!u)return;let v=()=>{f(u.selectedScrollSnap()),C(u.scrollSnapList().length),x(u.canScrollPrev()),P(u.canScrollNext()),N.current?.(u.selectedScrollSnap());};return v(),u.on("select",v),u.on("reInit",v),()=>{u.off("select",v),u.off("reInit",v);}},[u]);let G=w.useCallback(v=>{u&&u.selectedScrollSnap()===v&&u.scrollNext();},[u]),he=w.useRef(false),re=w.useRef(true),K=w.useRef(null);w.useImperativeHandle(d,()=>K.current),w.useEffect(()=>{if(!F?.pauseWhenOffscreen){re.current=true;return}let v=K.current;if(!v||typeof IntersectionObserver>"u")return;let z=new IntersectionObserver(H=>{re.current=H.some(X=>X.isIntersecting);},{threshold:.25});return z.observe(v),()=>z.disconnect()},[F?.pauseWhenOffscreen]),w.useEffect(()=>{if(!u||!F)return;let v=null,z=()=>{v&&clearTimeout(v);let le=u.selectedScrollSnap(),de=V.current.get(le)??F.delay??qd;v=setTimeout(()=>{if(he.current||!re.current){z();return}u.scrollNext();},de);},H=()=>z(),X=()=>{v&&clearTimeout(v);},Pe=()=>z();return u.on("select",H),u.on("pointerDown",X),u.on("settle",Pe),z(),()=>{v&&clearTimeout(v),u.off("select",H),u.off("pointerDown",X),u.off("settle",Pe);}},[u,F]);let O=()=>{F?.pauseOnHover!==false&&(he.current=true);},te=()=>{he.current=false;},He=w.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:S,canScrollNext:k,durationsRef:V,advanceFromSlide:G}),[u,b,h,S,k,G]),se=`calc(100% / ${o})`;return w.createElement(Zr.Provider,{value:He},w.createElement("div",{ref:K,"data-gds-part":"carousel",className:i("relative",l),style:{"--gds-carousel-slide-basis":se,...m},onMouseEnter:O,onMouseLeave:te,...c},w.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},w.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});Et.displayName="Carousel";var ur=w.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:l}=Do("Carousel.Slide"),m=w.useRef(null);return w.useImperativeHandle(a,()=>m.current),w.useEffect(()=>{if(e==null)return;let s=m.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let d=l.current;return d.set(c,e),()=>{d.delete(c);}},[e,l]),w.createElement("div",{ref:m,"data-gds-part":"carousel-slide",className:i("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});ur.displayName="Carousel.Slide";var Xr=w.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:l,className:m,style:s,...c},d)=>{let{api:p,selectedIndex:g,advanceFromSlide:u}=Do("Carousel.VideoSlide"),b=w.useRef(null),f=w.useRef(null);w.useImperativeHandle(d,()=>b.current);let[h,C]=w.useState(null);w.useEffect(()=>{let x=b.current;x?.parentElement&&C(Array.from(x.parentElement.children).indexOf(x));},[p]);let S=h!=null&&h===g;return w.useEffect(()=>{let x=f.current;if(x)if(S){let k=x.play();k&&typeof k.catch=="function"&&k.catch(()=>{});}else x.pause(),x.currentTime=0;},[S]),w.createElement(ur,{ref:b,duration:l,className:i("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",m),style:s,"data-gds-part":"carousel-video-slide",...c},t&&w.createElement("img",{src:t,alt:o??"","aria-hidden":S,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:S?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),w.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:S?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||h!=null&&u(h);}}))});Xr.displayName="Carousel.VideoSlide";var Jr=w.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:l,selectedIndex:m,slideCount:s}=Do("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(p,g)=>g),d=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return w.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:i("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...d,...r},...n},c.map(p=>{let g=p===m,u=()=>l?.scrollTo(p);return t?t({index:p,active:g,onClick:u}):w.createElement("button",{key:p,type:"button",onClick:u,"aria-label":`Go to slide ${p+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});Jr.displayName="Carousel.Dots";var Qr=w.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?w.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:i("flex items-center justify-end gap-2 pt-2",t),style:o,...r},w.createElement(Lo,null),w.createElement(Ho,null)):w.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:i("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},w.createElement(Lo,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),w.createElement(Ho,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));Qr.displayName="Carousel.Arrows";var Lo=w.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:l}=Do("Carousel.Prev");return w.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!l,onClick:()=>a?.scrollPrev(),className:i("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});Lo.displayName="Carousel.Prev";var Ho=w.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:l}=Do("Carousel.Next");return w.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!l,onClick:()=>a?.scrollNext(),className:i("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});Ho.displayName="Carousel.Next";Et.Slide=ur;Et.VideoSlide=Xr;Et.Dots=Jr;Et.Arrows=Qr;Et.Prev=Lo;Et.Next=Ho;var Yd=Et;function Zd(){return w.useContext(Zr)?.api}var Pi=w.forwardRef(({className:e,surface:t="solid",...o},r)=>w.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:i("gds-card rounded-xl border text-card-foreground shadow",et(t,"bg-card"),ze[t],e),...o}));Pi.displayName="Card";var Mi=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-header",className:i("flex flex-col space-y-1.5 p-6",e),...t}));Mi.displayName="CardHeader";var Ni=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-title",className:i("font-semibold leading-none tracking-tight",e),...t}));Ni.displayName="CardTitle";var Ei=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-description",className:i("text-sm text-muted-foreground",e),...t}));Ei.displayName="CardDescription";var Li=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-content",className:i("p-6 pt-0",e),...t}));Li.displayName="CardContent";var Hi=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-footer",className:i("flex items-center p-6 pt-0",e),...t}));Hi.displayName="CardFooter";var Di=w.forwardRef(({className:e,...t},o)=>w.createElement(Ao.Root,{ref:o,className:i("gds-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},w.createElement(Ao.Indicator,{className:i("flex items-center justify-center text-current")},w.createElement(Check,{className:"h-4 w-4"}))));Di.displayName=Ao.Root.displayName;var Ai={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},ec={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function tc(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let l=n;l<=a;l++)t.add(l);}return t}function oc(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var Fi=w.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:l="mount",play:m,speed:s="normal",delay:c,stagger:d,showLineNumbers:p=false,filename:g,wrap:u=false,bare:b=false,prompt:f,cursor:h,steps:C,loop:S=false,height:x,maxLines:k,className:P,style:V,...N},F){let G=Ai[s],he=c??0,re=d??(a==="typewriter"?G.tokenStagger:G.lineStagger),K=!!(C&&C.length),[O,te]=w.useState(""),[He,se]=w.useState(()=>new Set),v=K?O:t??"",z=w.useMemo(()=>v.replace(/\n$/,""),[v]),H=w.useMemo(()=>tc(r),[r]),X=!!(n?.added?.length||n?.removed?.length),Pe=p||X,le=w.useRef(null);w.useImperativeHandle(F,()=>le.current);let[de,J]=w.useState(a==="none"),nt=useInView(le,{once:true,amount:.55}),it=l==="inView"?G.preDelay:0,Ge=l==="mount"?true:l==="inView"?nt:!!m,Ot=re,er=z.split(`
|
|
64
|
-
`).length,
|
|
65
|
-
`)?
|
|
66
|
-
`:
|
|
67
|
-
`).length
|
|
68
|
-
`).length,
|
|
107
|
+
</Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var ws={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Rs={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:z.number().optional(),design:"knob"}}};var Qa={Accordion:ni,AiChat:ii,AiChatComposer:si,AppShell:li,Avatar:di,BackgroundFill:ci,Badge:mi,Banner:ui,Breadcrumb:gi,Button:fi,Calendar:hi,Callout:bi,Card:yi,Carousel:xi,Chart:wi,Checkbox:Ri,CheckboxCard:Si,Code:Ci,Collapsible:ki,Command:Ti,Composer:Pi,DatePicker:Ni,Dialog:Mi,DropdownMenu:Ei,Field:Di,FillPicker:Hi,Flex:Ii,Grid:Fi,HoverCard:zi,Input:Bi,Label:_i,Logo:Vi,Map:Gi,MediaSurface:Ya,Message:Wi,MultiSelect:Ui,Popover:ji,Progress:$i,RadioCard:Ki,RadioGroup:qi,Resizable:Yi,RivePlayer:Zi,Row:Xi,ScrollArea:Ji,SectionBlock:Qi,Select:es,Separator:ts,ShaderPresetPicker:os,ShaderPresetPreview:rs,Sheet:as,Sidebar:ns,Skeleton:is,Slider:ss,Sortable:ls,Stack:ds,Switch:cs,SwitchCard:ps,Table:us,Tabs:gs,Textarea:fs,ThreeScene:hs,Toast:bs,Toggle:vs,ToggleGroup:ys,Toolbar:xs,Tooltip:ws,VideoPlayer:Rs};function bp(e){return e?Qa[e]??null:null}function vp(){return Object.keys(Qa)}function l(...e){return twMerge(clsx(e))}var Rp=gt.Root,Ss=S.forwardRef(({className:e,...t},o)=>S.createElement(gt.Item,{ref:o,className:l("border-b",e),...t}));Ss.displayName="AccordionItem";var Cs=S.forwardRef(({className:e,children:t,...o},r)=>S.createElement(gt.Header,{className:"flex"},S.createElement(gt.Trigger,{ref:r,className:l("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,S.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Cs.displayName=gt.Trigger.displayName;var ks=S.forwardRef(({className:e,children:t,...o},r)=>S.createElement(gt.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},S.createElement("div",{className:l("pb-4 pt-0",e)},t)));ks.displayName=gt.Content.displayName;var Ts=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"}},defaultVariants:{variant:"default"}}),Cp={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},Ps=S.forwardRef(({className:e,variant:t,role:o,...r},n)=>S.createElement("div",{ref:n,role:o??Cp[t??"default"],"data-gds-part":"callout",className:l(Ts({variant:t}),e),...r}));Ps.displayName="Callout";var Ns=S.forwardRef(({className:e,...t},o)=>S.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));Ns.displayName="CalloutTitle";var Ms=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"callout-description",className:l("text-sm [&_p]:leading-relaxed",e),...t}));Ms.displayName="CalloutDescription";var Es=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Ls=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),Ds=cva("gds-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}}),As=cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Hs=cva("gds-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"}}),Is=cva("gds-app-shell-footer border-t bg-background"),Fs=S.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>S.createElement(o?Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:l(Es({nav:t,className:e})),...r}));Fs.displayName="AppShell";var zs=S.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>S.createElement(o?Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:l(Ls({sticky:t,className:e})),...r}));zs.displayName="AppShellHeader";var Bs=S.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>S.createElement(r?Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:l(Ds({placement:t,sticky:o,className:e})),...n}));Bs.displayName="AppShellNav";var Os=S.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>S.createElement(o?Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:l(As({sticky:t,className:e})),...r}));Os.displayName="AppShellAside";var _s=S.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>S.createElement(o?Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:l(Hs({maxWidth:t,className:e})),...r}));_s.displayName="AppShellMain";var Vs=S.forwardRef(({className:e,asChild:t=false,...o},r)=>S.createElement(t?Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:l(Is({className:e})),...o}));Vs.displayName="AppShellFooter";var kp=cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"h-6 w-6",sm:"h-7 w-7",md:"h-10 w-10",lg:"h-14 w-14",xl:"h-20 w-20"}},defaultVariants:{size:"md"}}),Ws=S.forwardRef(({className:e,size:t,...o},r)=>S.createElement(Vt.Root,{ref:r,"data-gds-part":"avatar","data-gds-size":t??"md",className:l(kp({size:t}),e),...o}));Ws.displayName=Vt.Root.displayName;var Us=S.forwardRef(({className:e,...t},o)=>S.createElement(Vt.Image,{ref:o,"data-gds-part":"avatar-image",className:l("aspect-square h-full w-full",e),...t}));Us.displayName=Vt.Image.displayName;var Tp=cva("flex h-full w-full items-center justify-center rounded-full font-semibold",{variants:{tone:{muted:"bg-muted text-foreground",primary:"bg-primary/15 text-primary",violet:"bg-violet-500/20 text-violet-600 dark:text-violet-400",amber:"bg-amber-500/20 text-amber-600 dark:text-amber-400",emerald:"bg-emerald-500/20 text-emerald-600 dark:text-emerald-400",sky:"bg-sky-500/20 text-sky-600 dark:text-sky-400",rose:"bg-rose-500/20 text-rose-600 dark:text-rose-400",plum:"bg-fuchsia-500/20 text-fuchsia-600 dark:text-fuchsia-400",lime:"bg-lime-500/20 text-lime-600 dark:text-lime-400"}},defaultVariants:{tone:"muted"}}),js=S.forwardRef(({className:e,tone:t,...o},r)=>S.createElement(Vt.Fallback,{ref:r,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:l(Tp({tone:t}),e),...o}));js.displayName=Vt.Fallback.displayName;var Ks=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-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-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-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-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-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-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 Yr({className:e,variant:t,rounded:o,...r}){return S.createElement("div",{className:l(Ks({variant:t,rounded:o}),e),...r})}var it={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function St(e,t){return e==="solid"?t:""}var qs=cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),Ep={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},Ys=S.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:i,icon:p,action:s,role:c,children:d,...m},g)=>{let u=t??"default",b=c??Ep[u];return S.createElement("div",{ref:g,role:b,"data-gds-part":"banner","data-variant":u,"data-surface":n,className:l(qs({variant:t,align:o,sticky:r}),it[n],e),...m},p?S.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},p):null,S.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},d),s?S.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,a?S.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:i,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},S.createElement(X,{className:"h-4 w-4"})):null)});Ys.displayName="Banner";var ur=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",raised:"gds-button-raised"},size:{xs:"h-6 gap-1 px-2 text-[11px] [&_svg]:size-3",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"}}),Je=S.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>S.createElement(r?Slot:"button",{"data-gds-part":"button",className:l("gds-button",ur({variant:t,size:o,className:e})),ref:a,...n}));Je.displayName="Button";function Xr({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:i,...p}){let s=getDefaultClassNames();return S.createElement(DayPicker,{showOutsideDays:o,className:l("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:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:l("w-fit",s.root),months:l("relative flex flex-col gap-4 md:flex-row",s.months),month:l("flex w-full flex-col gap-4",s.month),nav:l("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:l(ur({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:l(ur({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:l("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:l("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:l("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:l("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:l("select-none font-medium",r==="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:l("flex",s.weekdays),weekday:l("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:l("mt-2 flex w-full",s.week),week_number_header:l("w-[--cell-size] select-none",s.week_number_header),week_number:l("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:l("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:l("bg-accent rounded-l-md",s.range_start),range_middle:l("rounded-none",s.range_middle),range_end:l("bg-accent rounded-r-md",s.range_end),today:l("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:l("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:l("text-muted-foreground opacity-50",s.disabled),hidden:l("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:d,...m})=>S.createElement("div",{"data-slot":"calendar",ref:d,className:l(c),...m}),Chevron:({className:c,orientation:d,...m})=>d==="left"?S.createElement(ChevronLeftIcon,{className:l("size-4",c),...m}):d==="right"?S.createElement(ChevronRightIcon,{className:l("size-4",c),...m}):S.createElement(ChevronDownIcon,{className:l("size-4",c),...m}),DayButton:Xs,WeekNumber:({children:c,...d})=>S.createElement("td",{...d},S.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...i},...p})}function Xs({className:e,day:t,modifiers:o,...r}){let n=getDefaultClassNames(),a=S.useRef(null);return S.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),S.createElement(Je,{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":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:l("hover:bg-accent/40 hover:text-foreground","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),...r})}var en=S.createContext(null);function hr(e){let t=S.useContext(en);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var _p=5e3,oo=S.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:i,style:p,children:s,...c},d)=>{let m=S.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[g,u]=zp(m),[b,f]=S.useState(0),[h,v]=S.useState(0),[w,y]=S.useState(false),[C,T]=S.useState(false),I=S.useRef(new Map),E=S.useRef(a);E.current=a;let L=S.useMemo(()=>r?r===true?{}:r:null,[r]);S.useEffect(()=>{if(!u)return;let x=()=>{f(u.selectedScrollSnap()),v(u.scrollSnapList().length),y(u.canScrollPrev()),T(u.canScrollNext()),E.current?.(u.selectedScrollSnap());};return x(),u.on("select",x),u.on("reInit",x),()=>{u.off("select",x),u.off("reInit",x);}},[u]);let Y=S.useCallback(x=>{u&&u.selectedScrollSnap()===x&&u.scrollNext();},[u]),F=S.useRef(false),Z=S.useRef(true),A=S.useRef(null);S.useImperativeHandle(d,()=>A.current),S.useEffect(()=>{if(!L?.pauseWhenOffscreen){Z.current=true;return}let x=A.current;if(!x||typeof IntersectionObserver>"u")return;let M=new IntersectionObserver($=>{Z.current=$.some(B=>B.isIntersecting);},{threshold:.25});return M.observe(x),()=>M.disconnect()},[L?.pauseWhenOffscreen]),S.useEffect(()=>{if(!u||!L)return;let x=null,M=()=>{x&&clearTimeout(x);let re=u.selectedScrollSnap(),Q=I.current.get(re)??L.delay??_p;x=setTimeout(()=>{if(F.current||!Z.current){M();return}u.scrollNext();},Q);},$=()=>M(),B=()=>{x&&clearTimeout(x);},ve=()=>M();return u.on("select",$),u.on("pointerDown",B),u.on("settle",ve),M(),()=>{x&&clearTimeout(x),u.off("select",$),u.off("pointerDown",B),u.off("settle",ve);}},[u,L]);let H=()=>{L?.pauseOnHover!==false&&(F.current=true);},ne=()=>{F.current=false;},j=S.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:w,canScrollNext:C,durationsRef:I,advanceFromSlide:Y}),[u,b,h,w,C,Y]),q=`calc(100% / ${o})`;return S.createElement(en.Provider,{value:j},S.createElement("div",{ref:A,"data-gds-part":"carousel",className:l("relative",i),style:{"--gds-carousel-slide-basis":q,...p},onMouseEnter:H,onMouseLeave:ne,...c},S.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},S.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});oo.displayName="Carousel";var Jr=S.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:i}=hr("Carousel.Slide"),p=S.useRef(null);return S.useImperativeHandle(a,()=>p.current),S.useEffect(()=>{if(e==null)return;let s=p.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let d=i.current;return d.set(c,e),()=>{d.delete(c);}},[e,i]),S.createElement("div",{ref:p,"data-gds-part":"carousel-slide",className:l("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});Jr.displayName="Carousel.Slide";var tn=S.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:i,className:p,style:s,...c},d)=>{let{api:m,selectedIndex:g,advanceFromSlide:u}=hr("Carousel.VideoSlide"),b=S.useRef(null),f=S.useRef(null);S.useImperativeHandle(d,()=>b.current);let[h,v]=S.useState(null);S.useEffect(()=>{let y=b.current;y?.parentElement&&v(Array.from(y.parentElement.children).indexOf(y));},[m]);let w=h!=null&&h===g;return S.useEffect(()=>{let y=f.current;if(y)if(w){let C=y.play();C&&typeof C.catch=="function"&&C.catch(()=>{});}else y.pause(),y.currentTime=0;},[w]),S.createElement(Jr,{ref:b,duration:i,className:l("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",p),style:s,"data-gds-part":"carousel-video-slide",...c},t&&S.createElement("img",{src:t,alt:o??"","aria-hidden":w,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:w?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),S.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:w?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||h!=null&&u(h);}}))});tn.displayName="Carousel.VideoSlide";var on=S.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:i,selectedIndex:p,slideCount:s}=hr("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(m,g)=>g),d=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return S.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:l("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...d,...r},...n},c.map(m=>{let g=m===p,u=()=>i?.scrollTo(m);return t?t({index:m,active:g,onClick:u}):S.createElement("button",{key:m,type:"button",onClick:u,"aria-label":`Go to slide ${m+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});on.displayName="Carousel.Dots";var rn=S.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?S.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:l("flex items-center justify-end gap-2 pt-2",t),style:o,...r},S.createElement(gr,null),S.createElement(fr,null)):S.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:l("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},S.createElement(gr,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),S.createElement(fr,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));rn.displayName="Carousel.Arrows";var gr=S.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:i}=hr("Carousel.Prev");return S.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!i,onClick:()=>a?.scrollPrev(),className:l("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??S.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});gr.displayName="Carousel.Prev";var fr=S.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:i}=hr("Carousel.Next");return S.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!i,onClick:()=>a?.scrollNext(),className:l("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??S.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});fr.displayName="Carousel.Next";oo.Slide=Jr;oo.VideoSlide=tn;oo.Dots=on;oo.Arrows=rn;oo.Prev=gr;oo.Next=fr;var Vp=oo;function Gp(){return S.useContext(en)?.api}var Js=S.forwardRef(({className:e,surface:t="solid",...o},r)=>S.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:l("gds-card rounded-xl border text-card-foreground shadow",St(t,"bg-card"),it[t],e),...o}));Js.displayName="Card";var Qs=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"card-header",className:l("flex flex-col space-y-1.5 p-6",e),...t}));Qs.displayName="CardHeader";var el=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"card-title",className:l("font-semibold leading-none tracking-tight",e),...t}));el.displayName="CardTitle";var tl=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"card-description",className:l("text-sm text-muted-foreground",e),...t}));tl.displayName="CardDescription";var ol=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"card-content",className:l("p-6 pt-0",e),...t}));ol.displayName="CardContent";var rl=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,"data-gds-part":"card-footer",className:l("flex items-center p-6 pt-0",e),...t}));rl.displayName="CardFooter";var al=S.forwardRef(({className:e,...t},o)=>S.createElement(br.Root,{ref:o,className:l("gds-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},S.createElement(br.Indicator,{className:l("flex items-center justify-center text-current")},S.createElement(Check,{className:"h-4 w-4"}))));al.displayName=br.Root.displayName;var an=S.createContext(null),Qr=S.forwardRef(({className:e,...t},o)=>{let r=S.useContext(an);return S.createElement("label",{ref:o,htmlFor:r?.controlId,className:l("text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t})});Qr.displayName="Field.Label";var ea=S.forwardRef(({className:e,...t},o)=>{let r=S.useContext(an);return S.createElement("p",{ref:o,id:r?.descriptionId,className:l("text-sm text-muted-foreground",e),...t})});ea.displayName="Field.Description";var ta=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{ref:o,className:l("flex shrink-0 items-center gap-2",e),...t}));ta.displayName="Field.Trailing";var nl=S.forwardRef(({layout:e="option",className:t,children:o,...r},n)=>{let a=S.useId(),i=null,p=null,s=null,c=null;S.Children.forEach(o,v=>{S.isValidElement(v)&&(v.type===Qr?i=v:v.type===ea?p=v:v.type===ta?s=v:c||(c=v));});let d=c,m=d?.props??{},g=m.id??`${a}-control`,u=p?`${a}-description`:void 0,b=[m["aria-describedby"],u].filter(Boolean).join(" ")||void 0,f=d?S.cloneElement(d,{id:g,"aria-describedby":b}):null,h=S.createElement("div",{className:"flex min-w-0 flex-col gap-0.5"},i,p);return S.createElement(an.Provider,{value:{controlId:g,descriptionId:u}},S.createElement("div",{ref:n,"data-gds-part":"field","data-layout":e,className:l("flex gap-3",e==="setting"?"items-center justify-between":"items-start",t),...r},e==="setting"?S.createElement(S.Fragment,null,h,S.createElement("div",{className:"flex shrink-0 items-center gap-2"},s,f)):S.createElement(S.Fragment,null,S.createElement("div",{className:"mt-0.5 shrink-0"},f),S.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5"},i,p),s)))});nl.displayName="Field";var Up=Object.assign(nl,{Label:Qr,Description:ea,Trailing:ta});function nn({label:e,description:t,aside:o,hideIndicator:r,indicatorPosition:n="trailing",titleId:a,descriptionId:i,indicator:p,children:s}){let c=s!=null?S.createElement("div",{className:"gds-selection-card__slot"},s):S.createElement("div",{className:"gds-selection-card__content"},e!=null&&S.createElement("span",{id:a,className:"gds-selection-card__title"},e),t!=null&&S.createElement("span",{id:i,className:"gds-selection-card__desc"},t)),d=r?null:p;return n==="leading"?S.createElement(S.Fragment,null,d,c,o):S.createElement(S.Fragment,null,c,o,d)}var $p=S.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--radio","aria-hidden":true},S.createElement(so.Indicator,{className:"gds-selection-indicator__dot"})),Kp=S.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--checkbox","aria-hidden":true},S.createElement(br.Indicator,{className:"gds-selection-indicator__check"},S.createElement(Check,{className:"h-3.5 w-3.5",strokeWidth:3}))),qp=S.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--switch","aria-hidden":true},S.createElement(Nr.Thumb,{className:"gds-selection-indicator__thumb"})),il=S.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=S.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return S.createElement(so.Item,{ref:s,"data-gds-part":"radio-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},S.createElement(nn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:$p},i))});il.displayName="RadioCard";var sl=S.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=S.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return S.createElement(br.Root,{ref:s,"data-gds-part":"checkbox-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},S.createElement(nn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:Kp},i))});sl.displayName="CheckboxCard";var ll=S.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=S.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return S.createElement(Nr.Root,{ref:s,"data-gds-part":"switch-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},S.createElement(nn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:qp},i))});ll.displayName="SwitchCard";var jo={slow:{tokenStagger:70,lineStagger:200,preDelay:500,fadeMs:480},normal:{tokenStagger:22,lineStagger:55,preDelay:200,fadeMs:280},fast:{tokenStagger:8,lineStagger:18,preDelay:60,fadeMs:160}},sn=.55;function pe(e,t){return e<=0?Promise.resolve():new Promise((o,r)=>{if(t?.aborted){r(new DOMException("Aborted","AbortError"));return}let n=window.setTimeout(()=>{t?.removeEventListener("abort",a),o();},e),a=()=>{window.clearTimeout(n),r(new DOMException("Aborted","AbortError"));};t?.addEventListener("abort",a,{once:true});})}async function na(e,t,o=22,r){if(o<=0){t(e);return}for(let n=1;n<=e.length;n++)t(e.slice(0,n)),n<e.length&&await pe(o,r);}function ln(e){return e instanceof DOMException&&e.name==="AbortError"}var vr="data-motion",dl="off",cl="(prefers-reduced-motion: reduce)";function Yp(){if(typeof window>"u"||typeof document>"u")return false;let e=window.matchMedia(cl).matches,t=document.documentElement.getAttribute(vr)===dl;return e||t}function sa(){let[e,t]=S.useState(false);return S.useEffect(()=>{let o=()=>t(Yp());o();let r=window.matchMedia(cl);r.addEventListener("change",o);let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:true,attributeFilter:[vr]}),()=>{r.removeEventListener("change",o),n.disconnect();}},[]),e}var ro=sa;function Zp(e){if(typeof document>"u")return;let t=document.documentElement;e?t.removeAttribute(vr):t.setAttribute(vr,dl);}var Jp=2e3,Qp={tokenStagger:0,lineStagger:0,preDelay:0,fadeMs:0};function ao(e){let{steps:t,interpret:o,speed:r="normal",trigger:n="mount",play:a,loop:i=false,loopDelay:p=Jp,containerRef:s,onComplete:c,onLoopReset:d}=e,m=sa(),g=m?Qp:jo[r],u=m?false:i,[b,f]=S.useState(false),[h,v]=S.useState(false),[w,y]=S.useState(-1),C=S.useRef(null),T=useInView(s??C,{once:true,amount:sn}),[I,E]=S.useState(0),L=S.useMemo(()=>n==="mount"?true:n==="inView"?T:!!a||I>0,[n,T,a,I]),Y=S.useRef(o);Y.current=o;let F=S.useRef(c);F.current=c;let Z=S.useRef(d);Z.current=d;let A=S.useRef(null),H=S.useRef(null),ne=S.useCallback(()=>{A.current?.abort(),A.current=null,H.current!==null&&(window.clearTimeout(H.current),H.current=null),f(false);},[]),j=S.useCallback(()=>{E(x=>x+1);},[]),q=S.useCallback((x=0)=>{if(A.current?.abort(),A.current=null,H.current!==null&&(window.clearTimeout(H.current),H.current=null),x>0){H.current=window.setTimeout(()=>{H.current=null,E(M=>M+1);},x);return}E(M=>M+1);},[]);return S.useEffect(()=>()=>{H.current!==null&&(window.clearTimeout(H.current),H.current=null);},[]),S.useEffect(()=>{if(!t||t.length===0||!L&&!m)return;let x=new AbortController;A.current=x;let{signal:M}=x,B={speed:g,signal:M,cancelled:()=>M.aborted,reduced:m},ve=true;return (async()=>{do{f(true),v(false),y(-1);try{await pe(n==="inView"?g.preDelay:0,M);for(let Q=0;Q<t.length;Q++){if(M.aborted)return;y(Q),await Y.current(t[Q],B);}if(M.aborted)return;if(y(-1),v(!0),F.current?.(),!u){f(!1);return}if(await pe(p,M),M.aborted)return;Z.current?.();}catch(Q){if(ln(Q))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",Q),f(false);return}}while(ve&&u&&!M.aborted)})(),()=>{ve=false,x.abort(),A.current===x&&(A.current=null);}},[t,L,u,p,g,n,I,m]),{isPlaying:b,isComplete:h,currentIndex:w,play:j,stop:ne,restart:q}}var da=S.forwardRef(function({variant:t="inline",className:o,...r},n){return S.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:l("gds-demo-cursor",o),...r})});var pl=S.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function ml({steps:e,speed:t="normal",trigger:o="mount",play:r,loop:n=false,defaultAnimation:a="fade-up",visibleWhenIdle:i=true,className:p,children:s}){let c=useReducedMotion()??false,d=S.useRef(null),[m,g]=S.useState(()=>new Set),u=!!(e&&e.length);ao({steps:u?e:void 0,speed:t,trigger:o,play:r,loop:n,containerRef:d,onLoopReset:()=>g(new Set),interpret:async(h,v)=>{if(h.type==="wait")return pe(h.ms,v.signal);if(h.type==="reset")return g(new Set),pe(v.speed.preDelay,v.signal);if(h.type==="reveal")return g(w=>{if(w.has(h.target))return w;let y=new Set(w);return y.add(h.target),y}),pe(v.speed.lineStagger,v.signal);if(h.type==="reveal-all")return g(w=>{let y=new Set(w);return y.add("__all__"),y}),pe(v.speed.lineStagger,v.signal);if(h.type==="hide")return g(w=>{if(!w.has(h.target))return w;let y=new Set(w);return y.delete(h.target),y}),pe(v.speed.fadeMs,v.signal)}});let b=S.useMemo(()=>({visible:u?m:new Set(["__all__"]),hasStage:true,reducedMotion:c,defaultAnimation:a}),[u,m,c,a]),f=!u&&!i?{...b,visible:new Set}:b;return S.createElement("div",{ref:d,"data-gds-part":"demo-stage","data-gds-stage-playing":u?"true":"false",className:p},S.createElement(pl.Provider,{value:f},s))}var om={fade:{initial:{opacity:0},animate:{opacity:1}},"fade-up":{initial:{opacity:0,y:12},animate:{opacity:1,y:0}},"fade-down":{initial:{opacity:0,y:-12},animate:{opacity:1,y:0}},"fade-left":{initial:{opacity:0,x:12},animate:{opacity:1,x:0}},"fade-right":{initial:{opacity:0,x:-12},animate:{opacity:1,x:0}},scale:{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1}},none:{initial:{opacity:1},animate:{opacity:1}}};function ul({id:e,animation:t,durationMs:o,hideOutsideStage:r=false,onReveal:n,onHide:a,className:i,children:p}){let s=S.useContext(pl),c=s.hasStage?s.visible.has("__all__")||s.visible.has(e):!r,d=S.useRef(c),m=S.useRef(n),g=S.useRef(a);m.current=n,g.current=a,S.useEffect(()=>{c!==d.current&&(d.current=c,c?m.current?.():g.current?.());},[c]);let u=t??s.defaultAnimation,b=om[u],f=(o??280)/1e3;return s.reducedMotion?S.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,style:{opacity:c?1:0}},p):S.createElement(motion.div,{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,initial:b.initial,animate:c?b.animate:b.initial,transition:{duration:f,ease:[.22,1,.36,1]}},p)}var nm={xs:"text-xs",sm:"text-sm",md:"text-base"},im={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},sm={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function lm(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let i=n;i<=a;i++)t.add(i);}return t}function dm(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var fl=S.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:i="mount",play:p,speed:s="normal",delay:c,stagger:d,showLineNumbers:m=false,filename:g,wrap:u=false,bare:b=false,prompt:f,cursor:h,steps:v,loop:w=false,size:y="sm",height:C,maxLines:T,className:I,style:E,...L},Y){let F=im[s],Z=c??0,A=d??(a==="typewriter"?F.tokenStagger:F.lineStagger),H=!!(v&&v.length),[ne,j]=S.useState(""),[q,x]=S.useState(()=>new Set),M=H?ne:t??"",$=S.useMemo(()=>M.replace(/\n$/,""),[M]),B=S.useMemo(()=>lm(r),[r]),ve=!!(n?.added?.length||n?.removed?.length),re=m||ve,Q=S.useRef(null);S.useImperativeHandle(Y,()=>Q.current);let[ye,He]=S.useState(a==="none"),D=useInView(Q,{once:true,amount:.55}),se=i==="inView"?F.preDelay:0,le=i==="mount"?true:i==="inView"?D:!!p,$e=A,ce=$.split(`
|
|
108
|
+
`).length,Ee=a==="typewriter"?$.replace(/\s+/g," ").split(" ").length:ce,at=se+Z+Ee*$e+280;S.useEffect(()=>{if(H)return;if(!le||a==="none"){He(a==="none");return}He(false);let xe=window.setTimeout(()=>He(true),at);return ()=>window.clearTimeout(xe)},[le,a,at,H]);let Ke=S.useRef(""),qe=S.useRef(new Set),ae=S.useCallback(xe=>{Ke.current=xe,j(xe);},[]),Ie=S.useCallback(xe=>{qe.current=xe,x(xe);},[]),{isComplete:Yt}=ao({steps:H?v:void 0,speed:s,trigger:"manual",play:le,loop:w,containerRef:Q,onLoopReset:()=>{ae(""),Ie(new Set),He(false);},interpret:async(xe,_r)=>{let Zt=_r.signal;if(xe.type==="wait")return pe(xe.ms,Zt);if(xe.type==="clear"){ae(""),Ie(new Set);return}if(xe.type==="output"){let Ge=Ke.current,yt=Ge.length>0&&!Ge.endsWith(`
|
|
109
|
+
`)?Ge+`
|
|
110
|
+
`:Ge,rr=yt+xe.text,ar=yt.split(`
|
|
111
|
+
`).length,$a=xe.text.split(`
|
|
112
|
+
`).length,nr=new Set(qe.current);for(let Fo=0;Fo<$a;Fo++)nr.add(ar+Fo);return ae(rr),Ie(nr),ae(rr+(rr.endsWith(`
|
|
69
113
|
`)?"":`
|
|
70
|
-
`)
|
|
71
|
-
`)?
|
|
72
|
-
`:Ce,wo=0,xo=()=>{if(Q)return;if(wo>=ue.text.length){Ze(st+1,oo+ue.text,_t);return}wo++;let Wt=oo+ue.text.slice(0,wo);te(Wt),Me=window.setTimeout(xo,St);};Me=window.setTimeout(xo,60);};return Ze(0,"",new Set),()=>{Q=true,Me!==void 0&&window.clearTimeout(Me);}},[K,C,Ge,S,G.tokenStagger]);let q=h??(a==="typewriter"||K);return w.createElement("div",{ref:le,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":l,className:i("gds-code relative w-full overflow-hidden text-sm",!b&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],P),style:V,...N},g&&!b?w.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},w.createElement("span",{className:"font-mono"},g),o?w.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,w.createElement(Highlight,{code:z,language:o,theme:ec},({tokens:Q,getLineProps:Me,getTokenProps:Ze})=>w.createElement("pre",{"data-gds-part":"code-pre",className:i("font-mono leading-relaxed",b?"p-0":"px-0 py-3",u?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(x!==void 0||k!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...k!==void 0?{height:`calc(${k} * 1lh + 0.5rem)`}:x!==void 0&&x!=="auto"?{height:typeof x=="number"?`${x}px`:x}:null}},Q.map((st,Ce)=>{let _t=Ce+1,ue=oc(_t,n,H),St=Me({line:st}),$a=Ce===Q.length-1,oo=K&&He.has(_t),wo=q&&$a&&(!de||h===true),xo=i("flex w-full pr-4",b?"pl-0":"pl-4",ue==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",ue==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",ue==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),Wt=w.createElement(w.Fragment,null,Pe?w.createElement("span",{"data-gds-part":"code-gutter",className:i("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",X?"w-10":"w-8"),"aria-hidden":true},X?w.createElement("span",{className:"inline-block w-3 text-center"},ue==="added"?"+":ue==="removed"?"-":" "):null,p?w.createElement("span",{className:"ml-1 tabular-nums"},_t):null):null,w.createElement("span",{className:"flex-1",style:oo?{color:"var(--gds-code-comment)"}:void 0},f&&!oo?w.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,a==="typewriter"&&Ge&&!K?w.createElement(rc,{line:st,getTokenProps:Ze,delay:it+he+Ce*Ot,stagger:Ot}):st.map((Ro,Gr)=>w.createElement("span",{key:Gr,...Ze({token:Ro})})),wo&&!oo?w.createElement("span",{"data-gds-part":"code-cursor","aria-hidden":true,className:"gds-code-cursor"}):null));return a==="none"||a==="typewriter"||K||!Ge?w.createElement("div",{key:Ce,...St,className:i(St.className,xo),style:{...St.style,opacity:l!=="mount"&&!Ge&&a!=="none"?0:void 0}},Wt):w.createElement(motion.div,{key:Ce,...St,className:i(St.className,xo),initial:{opacity:0,y:a==="diff"?ue==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(it+he+Ce*Ot)/1e3,duration:G.fadeMs/1e3,ease:[.22,1,.36,1]},style:St.style},Wt)}))))});Fi.displayName="Code";function rc({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return w.createElement(w.Fragment,null,e.map((a,l)=>{let m=/^\s*$/.test(a.content),s=t({token:a});if(m)return w.createElement("span",{key:l,...s});let c=n++;return w.createElement(motion.span,{key:l,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var pt=tt.Root,mt=tt.Trigger,ac=tt.Anchor,ot=w.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>w.createElement(tt.Portal,null,w.createElement(tt.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:i("z-50 w-72 rounded-md border 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]",et(r,"bg-popover"),ze[r],e),...n})));ot.displayName=tt.Content.displayName;var nc="PPP",ic="LLL dd, y";function sc({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:l="start",side:m,format:s=nc,captionLayout:c,icon:d,"aria-label":p}){return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{type:"button",variant:"outline",disabled:r,"aria-label":p??(e?void 0:o),"data-empty":!e,className:i("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):w.createElement("span",null,o))),w.createElement(ot,{className:i("w-auto p-0",a),align:l,side:m},w.createElement(mr,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function lc({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:l="start",side:m,format:s=ic,captionLayout:c,icon:d,numberOfMonths:p=2,"aria-label":g}){let u=!!e?.from;return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:i("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?w.createElement(w.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):w.createElement("span",null,o))),w.createElement(ot,{className:i("w-auto p-0",a),align:l,side:m},w.createElement(mr,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:p,captionLayout:c,initialFocus:true})))}var cc=ae.Root,pc=ae.Trigger,Bi=ae.Portal,mc=ae.Close,ea=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Overlay,{ref:o,className:i("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}));ea.displayName=ae.Overlay.displayName;var Vi=w.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>w.createElement(Bi,null,w.createElement(ea,null),w.createElement(ae.Content,{ref:n,"data-surface":o,className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border 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",et(o,"bg-background"),ze[o],e),...r},t,w.createElement(ae.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"},w.createElement(X,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));Vi.displayName=ae.Content.displayName;var Oi=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Oi.displayName="DialogHeader";var Gi=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Gi.displayName="DialogFooter";var _i=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));_i.displayName=ae.Title.displayName;var Wi=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));Wi.displayName=ae.Description.displayName;var hc=I.Root,bc=I.Trigger,vc=I.Group,yc=I.Portal,wc=I.Sub,xc=I.RadioGroup,Ui=w.forwardRef(({className:e,inset:t,children:o,...r},n)=>w.createElement(I.SubTrigger,{ref:n,className:i("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),...r},o,w.createElement(ChevronRight,{className:"ml-auto"})));Ui.displayName=I.SubTrigger.displayName;var $i=w.forwardRef(({className:e,surface:t="solid",...o},r)=>w.createElement(I.SubContent,{ref:r,"data-surface":t,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border 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]",et(t,"bg-popover"),ze[t],e),...o}));$i.displayName=I.SubContent.displayName;var ji=w.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",...r},n)=>w.createElement(I.Portal,null,w.createElement(I.Content,{ref:n,sideOffset:t,"data-surface":o,className:i("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border 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]",et(o,"bg-popover"),ze[o],e),...r})));ji.displayName=I.Content.displayName;var Ki=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(I.Item,{ref:r,className:i("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),...o}));Ki.displayName=I.Item.displayName;var qi=w.forwardRef(({className:e,children:t,checked:o,...r},n)=>w.createElement(I.CheckboxItem,{ref:n,className:i("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:o,...r},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(I.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),t));qi.displayName=I.CheckboxItem.displayName;var Yi=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(I.RadioItem,{ref:r,className:i("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),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(I.ItemIndicator,null,w.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Yi.displayName=I.RadioItem.displayName;var Zi=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(I.Label,{ref:r,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Zi.displayName=I.Label.displayName;var Xi=w.forwardRef(({className:e,...t},o)=>w.createElement(I.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-muted",e),...t}));Xi.displayName=I.Separator.displayName;var Ji=({className:e,...t})=>w.createElement("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...t});Ji.displayName="DropdownMenuShortcut";var Sc=cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent 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",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Qi=w.forwardRef(({className:e,type:t,size:o="default",...r},n)=>w.createElement("input",{type:t,className:i(Sc({size:o}),e),ref:n,...r}));Qi.displayName="Input";var kc=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),es=w.forwardRef(({className:e,...t},o)=>w.createElement(ta.Root,{ref:o,className:i(kc(),e),...t}));es.displayName=ta.Root.displayName;var ts=w.forwardRef(({className:e,value:t,...o},r)=>w.createElement(zo.Root,{ref:r,className:i("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},w.createElement(zo.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));ts.displayName=zo.Root.displayName;var oa=w.forwardRef(({className:e,...t},o)=>w.createElement(Command,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));oa.displayName=Command.displayName;var ra=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},w.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),w.createElement(Command.Input,{ref:o,className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));ra.displayName=Command.Input.displayName;var aa=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.List,{ref:o,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));aa.displayName=Command.List.displayName;var na=w.forwardRef((e,t)=>w.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));na.displayName=Command.Empty.displayName;var br=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Group,{ref:o,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));br.displayName=Command.Group.displayName;var ia=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));ia.displayName=Command.Separator.displayName;var uo=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Item,{ref:o,className:i("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));uo.displayName=Command.Item.displayName;var Bo=w.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>w.createElement(sa.Root,{ref:n,decorative:o,orientation:t,className:i("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bo.displayName=sa.Root.displayName;var Hc=3,os=w.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:l="Search\u2026",emptyMessage:m="Nothing matches.",maxCount:s=Hc,searchable:c=true,badgeDismissible:d=true,disabled:p=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},C){let S=o!==void 0,[x,k]=w.useState(r??[]),P=S?o:x,[V,N]=w.useState(false),F=w.useMemo(()=>{let v=new Map;for(let z of t)v.set(z.value,z);return v},[t]),G=w.useCallback(v=>{S||k(v),n?.(v);},[S,n]),he=v=>{P.includes(v)?G(P.filter(z=>z!==v)):G([...P,v]);},re=(v,z)=>{v.preventDefault(),v.stopPropagation(),G(P.filter(H=>H!==z));},K=v=>{v?.preventDefault(),v?.stopPropagation(),G([]);},O=()=>{let v=t.filter(z=>!z.disabled).map(z=>z.value);G(v);},te=t.length>0&&t.filter(v=>!v.disabled).every(v=>P.includes(v.value)),He=P.slice(0,s),se=Math.max(0,P.length-s);return w.createElement(pt,{open:V,onOpenChange:N,modal:g},w.createElement(mt,{asChild:true},w.createElement("button",{ref:C,type:"button",id:b,role:"combobox","aria-expanded":V,"aria-haspopup":"listbox","aria-label":f,disabled:p,"data-gds-part":"multi-select",className:i("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},P.length===0?w.createElement("span",{className:"text-muted-foreground px-1"},a):w.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},He.map(v=>{let z=F.get(v);if(!z)return null;let H=z.icon;return w.createElement(cr,{key:v,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},H?w.createElement(H,{className:"h-3 w-3"}):null,w.createElement("span",{className:"truncate max-w-[12rem]"},z.label),d&&!p&&w.createElement("span",{role:"button","aria-label":`Remove ${z.label}`,tabIndex:0,onClick:X=>re(X,v),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&re(X,v);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},w.createElement(X,{className:"h-3 w-3","aria-hidden":true})))}),se>0&&w.createElement(cr,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:P.slice(s).map(v=>F.get(v)?.label??v).join(", ")},"+",se," more")),w.createElement("div",{className:"flex shrink-0 items-center gap-1"},P.length>0&&!p&&w.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:v=>K(v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&K(v);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},w.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),w.createElement(ot,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},w.createElement(oa,null,c&&w.createElement(ra,{placeholder:l}),w.createElement(aa,null,w.createElement(na,null,m),w.createElement(br,null,t.map(v=>{let z=v.icon,H=P.includes(v.value);return w.createElement(uo,{key:v.value,value:v.label,onSelect:()=>he(v.value),disabled:v.disabled,"data-gds-part":"multi-select-item","data-selected":H||void 0},w.createElement("div",{className:i("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",H?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},w.createElement(Check,{className:"h-3 w-3"})),z?w.createElement(z,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,w.createElement("span",{className:"truncate"},v.label))})),w.createElement(ia,null),w.createElement(br,null,w.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},w.createElement(uo,{onSelect:O,className:"flex-1 justify-center text-xs",disabled:te},"Select all"),w.createElement(Bo,{orientation:"vertical",className:"h-5"}),w.createElement(uo,{onSelect:()=>K(),className:"flex-1 justify-center text-xs",disabled:P.length===0},"Clear"),w.createElement(Bo,{orientation:"vertical",className:"h-5"}),w.createElement(uo,{onSelect:()=>N(false),className:"flex-1 justify-center text-xs"},"Close")))))))});os.displayName="MultiSelect";var rs=w.forwardRef(({className:e,...t},o)=>w.createElement(Ht.Root,{className:i("grid gap-2",e),...t,ref:o}));rs.displayName=Ht.Root.displayName;var as=w.forwardRef(({className:e,...t},o)=>w.createElement(Ht.Item,{ref:o,className:i("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},w.createElement(Ht.Indicator,{className:"flex items-center justify-center"},w.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));as.displayName=Ht.Item.displayName;var Ic=({className:e,...t})=>w.createElement(go.PanelGroup,{"data-gds-part":"resizable-panel-group",className:i("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Fc=go.Panel,zc=({withHandle:e,className:t,...o})=>w.createElement(go.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:i("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),...o},e&&w.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},w.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var ns=cva("gds-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}}),is=w.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...l},m)=>w.createElement(a?Slot:"div",{ref:m,"data-gds-part":"row",className:i(ns({gap:t,align:o,justify:r,wrap:n,className:e})),...l}));is.displayName="Row";var ss=cva("gds-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"}}),ls=w.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},l)=>w.createElement(n?Slot:"div",{ref:l,"data-gds-part":"grid",className:i(ss({cols:t,gap:o,align:r,className:e})),...a}));ls.displayName="Grid";var ds=cva("gds-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"}}),cs=w.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:l=false,...m},s)=>w.createElement(l?Slot:"div",{ref:s,"data-gds-part":"flex",className:i(ds({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...m}));cs.displayName="Flex";var ps=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(Ke.Root,{ref:r,className:i("relative overflow-hidden",e),...o},w.createElement(Ke.Viewport,{className:"h-full w-full rounded-[inherit]"},t),w.createElement(la,null),w.createElement(Ke.Corner,null)));ps.displayName=Ke.Root.displayName;var la=w.forwardRef(({className:e,orientation:t="vertical",...o},r)=>w.createElement(Ke.ScrollAreaScrollbar,{ref:r,orientation:t,className:i("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),...o},w.createElement(Ke.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));la.displayName=Ke.ScrollAreaScrollbar.displayName;var Kc=B.Root,qc=B.Group,Yc=B.Value,Zc=cva("flex w-full items-center justify-between rounded-md border border-input bg-background 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",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),us=w.forwardRef(({className:e,children:t,size:o="default",...r},n)=>w.createElement(B.Trigger,{ref:n,className:i(Zc({size:o}),e),...r},t,w.createElement(B.Icon,{asChild:true},w.createElement(ChevronDown,{className:i("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));us.displayName=B.Trigger.displayName;var da=w.forwardRef(({className:e,...t},o)=>w.createElement(B.ScrollUpButton,{ref:o,className:i("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronUp,{className:"h-4 w-4"})));da.displayName=B.ScrollUpButton.displayName;var ca=w.forwardRef(({className:e,...t},o)=>w.createElement(B.ScrollDownButton,{ref:o,className:i("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronDown,{className:"h-4 w-4"})));ca.displayName=B.ScrollDownButton.displayName;var gs=w.forwardRef(({className:e,children:t,position:o="popper",...r},n)=>w.createElement(B.Portal,null,w.createElement(B.Content,{ref:n,className:i("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",o==="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:o,...r},w.createElement(da,null),w.createElement(B.Viewport,{className:i("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),w.createElement(ca,null))));gs.displayName=B.Content.displayName;var fs=w.forwardRef(({className:e,...t},o)=>w.createElement(B.Label,{ref:o,className:i("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));fs.displayName=B.Label.displayName;var hs=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(B.Item,{ref:r,className:i("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),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(B.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),w.createElement(B.ItemText,null,t)));hs.displayName=B.Item.displayName;var bs=w.forwardRef(({className:e,...t},o)=>w.createElement(B.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-muted",e),...t}));bs.displayName=B.Separator.displayName;var Qc=ae.Root,ep=ae.Trigger,tp=ae.Close,vs=ae.Portal,pa=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Overlay,{className:i("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:o}));pa.displayName=ae.Overlay.displayName;var op=cva("fixed z-50 gap-4 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"}}),ys=w.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>w.createElement(vs,null,w.createElement(pa,null),w.createElement(ae.Content,{ref:a,"data-surface":t,className:i(op({side:e}),et(t,"bg-background"),ze[t],o),...n},r,w.createElement(ae.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"},w.createElement(X,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));ys.displayName=ae.Content.displayName;var ws=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col space-y-2 text-center sm:text-left",e),...t});ws.displayName="SheetHeader";var xs=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xs.displayName="SheetFooter";var Rs=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Title,{ref:o,className:i("text-lg font-semibold text-foreground",e),...t}));Rs.displayName=ae.Title.displayName;var Ss=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));Ss.displayName=ae.Description.displayName;function rp({className:e,...t}){return React.createElement("div",{className:i("animate-pulse rounded-md bg-muted",e),...t})}var Cs=w.forwardRef(({className:e,...t},o)=>w.createElement(xt.Root,{ref:o,className:i("relative flex w-full touch-none select-none items-center",e),...t},w.createElement(xt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},w.createElement(xt.Range,{className:"absolute h-full bg-primary"})),w.createElement(xt.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"})));Cs.displayName=xt.Root.displayName;var up={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},ma=w.createContext(null),Hs=w.createContext(null),ua=w.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let l=w.useRef(new Map),m=w.useCallback(p=>(l.current.set(p.id,p),()=>{l.current.delete(p.id);}),[]),s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),c=p=>{let g=l.current,u=g.get(String(p));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===p))return b;return null},d=w.useCallback(p=>{if(t)return;let{active:g,over:u}=p;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let x=b.values.findIndex(P=>P===g.id),k=b.values.findIndex(P=>P===u.id);if(x===-1||k===-1)return;b.onReorder?.(arrayMove(b.values,x,k));return}let h=b.values.filter(x=>x!==g.id),C=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(x=>x===u.id)),S=[...f.values.slice(0,C),g.id,...f.values.slice(C)];b.onReorder?.(h),f.onReorder?.(S);},[t]);return w.createElement(Hs.Provider,{value:{registerContainer:m}},w.createElement(DndContext,{sensors:s,collisionDetection:closestCorners,onDragEnd:d},w.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:i(o),...n},r)))});ua.displayName="Sortable.Group";var Oo=w.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:l,children:m,...s},c){let d=w.useContext(Hs),p=d!==null,g=w.useId(),u=a??g;w.useEffect(()=>{if(p)return d.registerContainer({id:u,values:t,onReorder:o})},[p,d,u,t,o]);let b=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=w.useCallback(S=>{let{active:x,over:k}=S;if(!k||x.id===k.id)return;let P=t.findIndex(N=>N===x.id),V=t.findIndex(N=>N===k.id);P===-1||V===-1||o?.(arrayMove(t,P,V));},[t,o]),h=w.useMemo(()=>({disabled:n}),[n]),C=w.createElement(SortableContext,{items:t,strategy:up[r]},w.createElement(gp,{id:u,enabled:p,forwardedRef:c,strategy:r,disabled:n,className:l,...s},m));return p?w.createElement(ma.Provider,{value:h},C):w.createElement(ma.Provider,{value:h},w.createElement(DndContext,{sensors:b,collisionDetection:closestCenter,onDragEnd:f},C))});Oo.displayName="Sortable";function gp({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:l,...m}){let s=useDroppable({id:e,disabled:!t}),c=w.useCallback(d=>{t&&s.setNodeRef(d),typeof o=="function"?o(d):o&&(o.current=d);},[t,s,o]);return w.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:i(a),...m},l)}var Ds=w.createContext(null),ga=w.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:l,...m},s){let c=w.useContext(ma);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let d=c.disabled||r||false,{attributes:p,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:C}=useSortable({id:t,disabled:d}),S=w.useRef(false),x=w.useCallback(N=>{u(N),typeof s=="function"?s(N):s&&(s.current=N);},[u,s]),k=w.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:S,disabled:d}),[g,b,d]),P={transform:CSS.Transform.toString(f),transition:h,zIndex:C?1:void 0,cursor:d?"default":S.current?void 0:"grab",...a},V=o?Slot:"div";return w.createElement(Ds.Provider,{value:k},w.createElement(V,{ref:x,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":C||void 0,className:i(n),style:P,...p,...S.current?{}:g,...m},l))});ga.displayName="Sortable.Item";var fa=w.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let l=w.useContext(Ds);if(!l)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");w.useLayoutEffect(()=>(l.hasHandle.current=true,()=>{l.hasHandle.current=false;}),[l.hasHandle]);let m=w.useCallback(c=>{l.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[l,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:i("cursor-grab touch-none select-none",l.disabled&&"cursor-default opacity-50",o),...l.disabled?{}:l.listeners,...n};return t?w.createElement(Slot,{ref:m,...s},r):w.createElement("button",{type:"button",ref:m,...s},r)});fa.displayName="Sortable.Handle";Oo.Item=ga;Oo.Handle=fa;Oo.Group=ua;var fp=Oo;var As=cva("gds-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"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),Is=w.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},l)=>w.createElement(n?Slot:"div",{ref:l,"data-gds-part":"stack",className:i(As({gap:t,align:o,justify:r,className:e})),...a}));Is.displayName="Stack";var Fs=w.forwardRef(({className:e,...t},o)=>w.createElement(_o.Root,{className:i("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:o},w.createElement(_o.Thumb,{className:i("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")})));Fs.displayName=_o.Root.displayName;var zs=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"relative w-full overflow-auto"},w.createElement("table",{ref:o,className:i("w-full caption-bottom text-sm",e),...t})));zs.displayName="Table";var Bs=w.forwardRef(({className:e,...t},o)=>w.createElement("thead",{ref:o,className:i("[&_tr]:border-b",e),...t}));Bs.displayName="TableHeader";var Vs=w.forwardRef(({className:e,...t},o)=>w.createElement("tbody",{ref:o,className:i("[&_tr:last-child]:border-0",e),...t}));Vs.displayName="TableBody";var Os=w.forwardRef(({className:e,...t},o)=>w.createElement("tfoot",{ref:o,className:i("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Os.displayName="TableFooter";var Gs=w.forwardRef(({className:e,...t},o)=>w.createElement("tr",{ref:o,className:i("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Gs.displayName="TableRow";var _s=w.forwardRef(({className:e,...t},o)=>w.createElement("th",{ref:o,className:i("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}));_s.displayName="TableHead";var Ws=w.forwardRef(({className:e,...t},o)=>w.createElement("td",{ref:o,className:i("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ws.displayName="TableCell";var Us=w.forwardRef(({className:e,...t},o)=>w.createElement("caption",{ref:o,className:i("mt-4 text-sm text-muted-foreground",e),...t}));Us.displayName="TableCaption";var $s=w.createContext(w.createElement(ChevronRight,null)),js=w.forwardRef(({separator:e,children:t,...o},r)=>w.createElement($s.Provider,{value:e??w.createElement(ChevronRight,null)},w.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));js.displayName="Breadcrumb";var Ks=w.forwardRef(({className:e,...t},o)=>w.createElement("ol",{ref:o,className:i("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Ks.displayName="BreadcrumbList";var qs=w.forwardRef(({className:e,...t},o)=>w.createElement("li",{ref:o,className:i("inline-flex items-center gap-1.5",e),...t}));qs.displayName="BreadcrumbItem";var Cr=i("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"),Ys=w.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?w.createElement("span",{ref:n,className:i(Cr,t),...r}):o?w.createElement("a",{ref:n,href:o,className:i(Cr,t),...r}):w.createElement("button",{ref:n,type:"button",className:i(Cr,t),...r}));Ys.displayName="BreadcrumbLink";var Zs=w.forwardRef(({className:e,...t},o)=>w.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:i("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}));Zs.displayName="BreadcrumbPage";var Xs=({children:e,className:t,...o})=>{let r=w.useContext($s);return w.createElement("li",{role:"presentation","aria-hidden":"true",className:i("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Xs.displayName="BreadcrumbSeparator";var Js=({className:e,...t})=>w.createElement("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...t},w.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),w.createElement("span",{className:"sr-only"},"More"));Js.displayName="BreadcrumbEllipsis";var Qs=w.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},l)=>{let[m,s]=w.useState(false);return w.createElement(pt,{open:m,onOpenChange:s},w.createElement(mt,{asChild:true},w.createElement("button",{ref:l,type:"button",className:i(Cr,n&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},w.createElement("span",null,e),w.createElement(ChevronDown,{className:i("h-3 w-3 text-muted-foreground transition-transform",m&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(d=>!d);},role:"button","aria-label":`Show ${e} children`}))),w.createElement(ot,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?w.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):w.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>w.createElement("li",{key:c.id},w.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:i("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},w.createElement("span",{className:"flex-1 min-w-0"},w.createElement("span",{className:"flex items-center gap-1.5"},w.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&w.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&w.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&w.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Qs.displayName="BreadcrumbMenuTrigger";var ba=rt.Provider,Zt=rt.Root,Xt=rt.Trigger,Dt=w.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w.createElement(rt.Portal,null,w.createElement(rt.Content,{ref:r,sideOffset:t,className:i("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),...o})));Dt.displayName=rt.Content.displayName;var tl=w.createContext({size:"md",variant:"pill"}),xp=at.Root,Rp=cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Sp=cva("inline-flex items-center justify-center whitespace-nowrap 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",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),ol=w.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>w.createElement(tl.Provider,{value:{size:t??"md",variant:o??"pill"}},w.createElement(at.List,{ref:a,className:i(Rp({size:t,variant:o}),e),...n},r)));ol.displayName=at.List.displayName;var rl=w.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let l=w.useContext(tl),m=t??l.size,s=o??l.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),d=w.createElement(at.Trigger,{ref:a,className:i(Sp({size:m,variant:s}),e),"aria-label":c,...n});return r?w.createElement(Zt,null,w.createElement(Xt,{asChild:true},d),w.createElement(Dt,null,r)):d});rl.displayName=at.Trigger.displayName;var al=w.forwardRef(({className:e,...t},o)=>w.createElement(at.Content,{ref:o,className:i("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));al.displayName=at.Content.displayName;var nl=w.forwardRef(({className:e,...t},o)=>w.createElement("textarea",{className:i("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:o,...t}));nl.displayName="Textarea";var il=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"}}),sl=w.forwardRef(({className:e,variant:t,size:o,...r},n)=>w.createElement(va.Root,{ref:n,className:i(il({variant:t,size:o,className:e})),...r}));sl.displayName=va.Root.displayName;var dl=w.createContext("md"),kp=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"}}),Tp=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"}}),cl=w.forwardRef(({className:e,size:t="md",children:o,...r},n)=>w.createElement(dl.Provider,{value:t??"md"},w.createElement(fo.Root,{ref:n,className:i(kp({size:t}),e),...r},o)));cl.displayName=fo.Root.displayName;var pl=w.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...l},m)=>{let s=w.useContext(dl),c=t??s,d=a??(typeof o=="string"?o:void 0),p=w.createElement(fo.Item,{ref:m,className:i(Tp({size:c}),e),"aria-label":d,...l});return o==null?p:w.createElement(Zt,{delayDuration:n},w.createElement(Xt,{asChild:true},w.createElement("span",{className:"inline-flex"},p)),w.createElement(Dt,{side:r},o))});pl.displayName=fo.Item.displayName;var Mp=cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),ml=w.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:l,trailing:m,children:s,"aria-label":c,...d},p)=>{let g=s==null;return w.createElement("div",{ref:p,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:i(Mp({position:t,variant:o,size:r,sticky:n}),e),...d},g?w.createElement(w.Fragment,null,w.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),w.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},l),w.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},m)):s)});ml.displayName="Toolbar";var ul=w.forwardRef(({className:e,align:t="leading",...o},r)=>w.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:i("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));ul.displayName="ToolbarSlot";var fl=w.createContext(null),ya=w.createContext(0);function hl(){return w.useContext(ya)}function Uo(e){let t=w.useContext(fl);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var At=w.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:l,children:m,...s},c)=>{let d=e!==void 0,[p,g]=w.useState(t),u=d?e:p,b=n==="panel",f=()=>{let h=!u;d||g(h),o?.(h);};return w.createElement(ba,{delayDuration:0},w.createElement(fl.Provider,{value:{collapsed:u}},w.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":n,className:i("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?l:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...l},...s},m,r&&!b&&w.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:i("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?w.createElement(ChevronRight,{className:"h-3 w-3"}):w.createElement(ChevronLeft,{className:"h-3 w-3"})))))});At.displayName="Sidebar";var xa=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Uo("SidebarHeader");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:i("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});xa.displayName="SidebarHeader";var Ra=w.forwardRef(({className:e,...t},o)=>w.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:i("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Ra.displayName="SidebarContent";var Sa=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Uo("SidebarFooter");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:i("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Sa.displayName="SidebarFooter";var Ca=w.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:l,...m},s)=>{let{collapsed:c}=Uo("SidebarSection"),[d,p]=w.useState(n),g=!!e&&r;return c?w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:i("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...m},l):w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:i("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...m},e&&(g?w.createElement("div",{className:i("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},w.createElement("button",{type:"button",onClick:()=>p(u=>!u),"aria-expanded":d,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,w.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),d?w.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):w.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&w.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):w.createElement("div",{className:i("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,w.createElement("span",{className:"flex-1 truncate"},e),o&&w.createElement("span",{className:"shrink-0"},o))),d&&w.createElement("div",{className:i("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},l))});Ca.displayName="SidebarSection";var ka=w.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:l,size:m="md",description:s,className:c,children:d,...p},g)=>{let{collapsed:u}=Uo("SidebarItem"),b=hl(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=m==="sm",C=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",S=h&&!o?"font-normal":"font-medium",x=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",k=!u&&s!=null,P=i("group flex items-center gap-2.5 rounded-md transition-colors",C,S,k&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,x,a&&"opacity-50 pointer-events-none",c),V=k?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},d),w.createElement("span",{className:i("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):w.createElement("span",{className:"flex-1 truncate text-left"},d),N=w.createElement(w.Fragment,null,e&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&V,!u&&t!==void 0&&t!==null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),F;if(n)F=w.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:P,style:f},d);else if(r){let{href:he,target:re,rel:K,download:O,hrefLang:te,ping:He,referrerPolicy:se,type:v,...z}=p;F=w.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:i(P,"w-full text-left"),style:f,...z},N);}else F=w.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:P,style:f,...p},N);if(!u)return F;let G=l??(typeof d=="string"?d:null);return G?w.createElement(Zt,null,w.createElement(Xt,{asChild:true},F),w.createElement(Dt,{side:"right",sideOffset:8},G,t!=null&&w.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):F});ka.displayName="SidebarItem";var Ta=w.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:l,onExpandedChange:m,disabled:s,description:c,trailing:d,className:p,style:g,children:u,...b},f){let{collapsed:h}=Uo("SidebarTreeItem"),C=hl(),S=l!==void 0,[x,k]=w.useState(a),P=S?l:x,V=()=>{let F=!P;S||k(F),m?.(F);};if(h)return w.createElement(ya.Provider,{value:C},u);let N=C*1.5;return w.createElement("div",{"data-gds-part":"sidebar-tree-item"},w.createElement("div",{className:"group/row relative"},w.createElement("button",{ref:f,type:"button",onClick:V,"aria-expanded":P,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:s,className:i("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",d!=null&&"pr-12",p),style:{paddingLeft:`calc(0.25rem + ${N}rem)`,paddingRight:d!=null?"3rem":"0.5rem",...g},...b},w.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},P?w.createElement(ChevronDown,{className:"h-3 w-3"}):w.createElement(ChevronRight,{className:"h-3 w-3"})),o&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},t),w.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):w.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),d!=null&&w.createElement("div",{onClick:F=>F.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},d)),P&&u&&w.createElement(ya.Provider,{value:C+1},w.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});Ta.displayName="SidebarTreeItem";At.Header=xa;At.Content=Ra;At.Footer=Sa;At.Section=Ca;At.Item=ka;At.TreeItem=Ta;var It=[50,100,200,300,400,500,600,700,800,900,950],bl=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Lp=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Pr({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<It.length;n++){let a=bl[n],l=Lp[n]*t;r[It[n]]=`${a.toFixed(4)} ${l.toFixed(4)} ${o.toFixed(2)}`;}return r}function vl(){let e={};for(let t=0;t<It.length;t++){let o=bl[t];e[It[t]]=`${o.toFixed(4)} 0 0`;}return e}var Pa={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"}},$o="1 0 0",yl="0 0 0";function ho(e,t){let[,o,r]=e.split(/\s+/).map(d=>d.trim()),n=Number(o),a=r;if(t==="light"){let p=Math.min(n*.22,.045),g=.38,u=n;return {soft:`${.965.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let l=.22,m=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${l.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Mr={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 Hp=["superLight","light","dark","superDark"],Dp={muted:.6,default:1,vibrant:1.3};function Ap(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,l=m=>(m%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${l(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${l(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 D=e=>({source:"neutral",step:e}),Ye=e=>({source:"primary",step:e}),Ft=e=>({source:"accent",step:e}),jo=e=>({source:"pure",value:e}),Ip={superLight:{background:D(50),foreground:D(800),card:jo($o),cardForeground:D(800),popover:jo($o),popoverForeground:D(800),primary:Ye(600),primaryForeground:Ye(50),secondary:D(100),secondaryForeground:D(700),muted:D(100),mutedForeground:D(500),accent:Ft(600),accentForeground:Ft(50),border:D(200),input:D(200),ring:Ye(500)},light:{background:D(50),foreground:D(950),card:jo($o),cardForeground:D(950),popover:jo($o),popoverForeground:D(950),primary:Ye(500),primaryForeground:Ye(50),secondary:D(100),secondaryForeground:D(700),muted:D(100),mutedForeground:D(500),accent:Ft(500),accentForeground:Ft(50),border:D(200),input:D(200),ring:Ye(500)},dark:{background:D(950),foreground:D(50),card:D(900),cardForeground:D(50),popover:D(900),popoverForeground:D(50),primary:Ye(400),primaryForeground:Ye(950),secondary:D(800),secondaryForeground:D(200),muted:D(800),mutedForeground:D(400),accent:Ft(400),accentForeground:Ft(950),border:D(800),input:D(800),ring:Ye(400)},superDark:{background:jo(yl),foreground:D(100),card:D(950),cardForeground:D(100),popover:D(950),popoverForeground:D(100),primary:Ye(300),primaryForeground:Ye(950),secondary:D(900),secondaryForeground:D(300),muted:D(900),mutedForeground:D(500),accent:Ft(300),accentForeground:Ft(950),border:D(900),input:D(900),ring:Ye(300)}};function we(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Fp(e,t){let o=Ip[t],r=t==="superLight"||t==="light",n=r?Pa.light:Pa.dark;return {background:we(o.background,e),foreground:we(o.foreground,e),card:we(o.card,e),cardForeground:we(o.cardForeground,e),popover:we(o.popover,e),popoverForeground:we(o.popoverForeground,e),primary:we(o.primary,e),primaryForeground:we(o.primaryForeground,e),secondary:we(o.secondary,e),secondaryForeground:we(o.secondaryForeground,e),muted:we(o.muted,e),mutedForeground:we(o.mutedForeground,e),accent:we(o.accent,e),accentForeground:we(o.accentForeground,e),border:we(o.border,e),input:we(o.input,e),ring:we(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",l=ho(n.destructive,a),m=ho(n.success,a),s=ho(n.warning,a),c=ho(n.info,a),d=ho(n.highlight,a);return {destructiveSoft:l.soft,destructiveDeep:l.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:d.soft,highlightDeep:d.deep}})()}}var Rt={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},zp={compact:.85,default:1,spacious:1.18};function Bp(e){let t=zp[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:Mr[e.body],fontMono:Mr[e.mono],fontDisplay:Mr[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(Rt.display),h1:o(Rt.h1),h2:o(Rt.h2),h3:o(Rt.h3),h4:o(Rt.h4),h5:o(Rt.h5),h6:o(Rt.h6),body:o(Rt.body),bodySm:o(Rt.bodySm)}}}var Vp={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Op(e){let t=Vp[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var Gp={tight:.85,default:1,roomy:1.2};function _p(e){return {baseUnit:"1rem",densityFactor:Gp[e.density]}}var Wp={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 Up(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:Wp[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Jt(e){let t=Dp[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,l=o?vl():Pr({hue:e.hues.neutral,chromaScale:r}),m=Pr({hue:e.hues.primary,chromaScale:n}),s=Pr({hue:e.hues.accent,chromaScale:a}),c={neutral:l,primary:m,accent:s},d=Ap(e.hues,{primary:n,accent:a},t),p=Object.fromEntries(Hp.map(C=>[C,Fp(c,C)])),g=Bp(e.typography),u=Op(e.radius),b=_p(e.spacing),f=Up(e.effects),h={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:p,chart:d,typography:g,radius:u,spacing:b,effects:f,components:h}}var Ko={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"}},Ma={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"}},Nr=[Ko,Ma];function $p(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 Ea(e,t){let o=e.colors[t];return {...$p(o),...Na("neutral",e.ramps.neutral),...Na("primary",e.ramps.primary),...Na("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,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function Na(e,t){let o={};for(let r of It)o[`--ramp-${e}-${r}`]=t[r];return o}function Er(e,t){if(typeof document>"u")return;let o=document.documentElement,r=Ea(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function qo(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 o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,l]=r.slice(0,3).map(Number);return "#"+[n,a,l].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function jp(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,l=qo(e);return {oklch:a,hex:l}}function La(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of It){let{oklch:a,hex:l}=jp(t[n]);r.push(`| ${n} | \`${a}\` | \`${l||"\u2014"}\` |`);}return r.join(`
|
|
73
|
-
`)}function
|
|
74
|
-
`)}function
|
|
114
|
+
`)),pe(240,Zt)}let tr=xe.speed?jo[xe.speed].tokenStagger:_r.speed.tokenStagger,vt=Ke.current,or=vt.length>0&&!vt.endsWith(`
|
|
115
|
+
`)?vt+`
|
|
116
|
+
`:vt;await pe(60,Zt);for(let Ge=0;Ge<xe.text.length;Ge++){if(Zt.aborted)return;let yt=or+xe.text.slice(0,Ge+1);ae(yt),Ge<xe.text.length-1&&await pe(tr,Zt);}}});S.useEffect(()=>{H&&He(Yt);},[H,Yt]);let ja=h??(a==="typewriter"||H);return S.createElement("div",{ref:Q,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":i,"data-gds-size":y,className:l("gds-code relative w-full overflow-hidden",nm[y],!b&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],I),style:E,...L},g&&!b?S.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},S.createElement("span",{className:"font-mono"},g),o?S.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,S.createElement(Highlight,{code:$,language:o,theme:sm},({tokens:xe,getLineProps:_r,getTokenProps:Zt})=>S.createElement("pre",{"data-gds-part":"code-pre",className:l("font-mono leading-relaxed",b?"p-0":"px-0 py-3",u?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(C!==void 0||T!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...T!==void 0?{height:`calc(${T} * 1lh + 0.5rem)`}:C!==void 0&&C!=="auto"?{height:typeof C=="number"?`${C}px`:C}:null}},xe.map((tr,vt)=>{let or=vt+1,Ge=dm(or,n,B),yt=_r({line:tr}),rr=vt===xe.length-1,ar=H&&q.has(or),$a=ja&&rr&&(!ye||h===true),nr=l("flex w-full pr-4",b?"pl-0":"pl-4",Ge==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",Ge==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",Ge==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),Fo=S.createElement(S.Fragment,null,re?S.createElement("span",{"data-gds-part":"code-gutter",className:l("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",ve?"w-10":"w-8"),"aria-hidden":true},ve?S.createElement("span",{className:"inline-block w-3 text-center"},Ge==="added"?"+":Ge==="removed"?"-":" "):null,m?S.createElement("span",{className:"ml-1 tabular-nums"},or):null):null,S.createElement("span",{className:"flex-1",style:ar?{color:"var(--gds-code-comment)"}:void 0},f&&!ar?S.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,a==="typewriter"&&le&&!H?S.createElement(cm,{line:tr,getTokenProps:Zt,delay:se+Z+vt*$e,stagger:$e}):tr.map((Uc,jc)=>S.createElement("span",{key:jc,...Zt({token:Uc})})),$a&&!ar?S.createElement(da,{"data-gds-part":"code-cursor"}):null));return a==="none"||a==="typewriter"||H||!le?S.createElement("div",{key:vt,...yt,className:l(yt.className,nr),style:{...yt.style,opacity:i!=="mount"&&!le&&a!=="none"?0:void 0}},Fo):S.createElement(motion.div,{key:vt,...yt,className:l(yt.className,nr),initial:{opacity:0,y:a==="diff"?Ge==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(se+Z+vt*$e)/1e3,duration:F.fadeMs/1e3,ease:[.22,1,.36,1]},style:yt.style},Fo)}))))});fl.displayName="Code";function cm({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return S.createElement(S.Fragment,null,e.map((a,i)=>{let p=/^\s*$/.test(a.content),s=t({token:a});if(p)return S.createElement("span",{key:i,...s});let c=n++;return S.createElement(motion.span,{key:i,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var pm={default:{row:"gap-3",content:"space-y-1",author:"text-sm font-semibold",meta:"text-xs",body:"text-sm leading-relaxed",thread:"text-xs"},compact:{row:"gap-2",content:"space-y-0.5",author:"text-xs font-semibold",meta:"text-[10px]",body:"text-xs leading-relaxed",thread:"text-[11px]"}},mm=S.forwardRef(function({author:t,timestamp:o,avatar:r,badge:n,edited:a,pinned:i,actions:p,reactions:s,threadCount:c,onThreadClick:d,align:m="start",density:g="default",className:u,children:b,...f},h){let v=m==="end",w=a===true?"(edited)":a||void 0,y=pm[g];return S.createElement("div",{ref:h,"data-gds-part":"message","data-gds-align":m,"data-gds-density":g,"data-gds-pinned":i?"true":void 0,className:l("flex items-start",y.row,v&&"flex-row-reverse",u),...f},r&&S.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},r),S.createElement("div",{"data-gds-part":"message-content",className:l("flex-1 min-w-0",y.content,v&&"text-right")},i&&S.createElement("div",{"data-gds-part":"message-pinned",className:l("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",v&&"flex-row-reverse")},S.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},S.createElement("path",{d:"M9.828.722a.5.5 0 0 1 .707 0l4.743 4.743a.5.5 0 0 1 0 .707l-2.121 2.121a.5.5 0 0 1-.354.146h-1.792l-3.586 3.586v2.293a.5.5 0 0 1-.854.354L4.146 12.39 1 15.535V14.12l3.146-3.146-1.293-1.293a.5.5 0 0 1 .354-.854h2.293l3.586-3.586V3.45a.5.5 0 0 1 .146-.354L9.828.722Z"})),"Pinned"),S.createElement("div",{"data-gds-part":"message-header",className:l("flex items-baseline gap-2 flex-wrap",v&&"flex-row-reverse")},S.createElement("span",{"data-gds-part":"message-author",className:y.author},t),n&&S.createElement("div",{"data-gds-part":"message-badge"},n),o&&S.createElement("span",{"data-gds-part":"message-timestamp",className:l(y.meta,"text-muted-foreground")},o),w&&S.createElement("span",{"data-gds-part":"message-edited",className:l(y.meta,"text-muted-foreground")},w),p&&S.createElement("div",{"data-gds-part":"message-actions",className:l(v?"mr-auto":"ml-auto")},p)),S.createElement("div",{"data-gds-part":"message-body",className:y.body},b),s&&S.createElement("div",{"data-gds-part":"message-reactions",className:l("flex flex-wrap gap-1 pt-1",v&&"justify-end")},s),typeof c=="number"&&c>0&&S.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:d,className:l("inline-flex items-center gap-1 font-medium",y.thread,"text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",v&&"flex-row-reverse")},S.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},S.createElement("path",{d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H6.414l-2.707 2.707A1 1 0 0 1 2 12V3Z"})),c," ",c===1?"reply":"replies")))});function ru({onSubmit:e,enabled:t}){let[o]=useLexicalComposerContext();return S.useEffect(()=>{if(t)return o.registerCommand(KEY_ENTER_COMMAND,r=>r&&r.shiftKey?false:(r?.preventDefault(),e(),true),COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function au({onImageFiles:e,enabled:t}){let[o]=useLexicalComposerContext();return S.useEffect(()=>{if(!t)return;let r=o.getRootElement();if(!r)return;let n=a=>{let p=Array.from(a.clipboardData?.items??[]).filter(s=>s.kind==="file"&&s.type.startsWith("image/")).map(s=>s.getAsFile()).filter(s=>s!==null);p.length>0&&(a.preventDefault(),e(p));};return r.addEventListener("paste",n),()=>r.removeEventListener("paste",n)},[o,t,e]),null}function nu({enabled:e}){let[t]=useLexicalComposerContext();return S.useEffect(()=>{e&&t.focus();},[t,e]),null}var bl={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function vl(e,t){let o=bl[t];if(o){e.dispatchCommand(FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let r=$getSelection();if($isRangeSelection(r)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;$setBlocksType(r,()=>$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&$setBlocksType(r,()=>{let n=$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function iu(e,t,o,r){e.update(()=>{let n=$getSelection();if(!$isRangeSelection(n))return;let a=$createBeautifulMentionNode(t,o,r);n.insertNodes([a]),n.insertText(" ");});}function su(e,t){let o=false;return e.update(()=>{let r=$getRoot(),a=r.getTextContent().indexOf(t);if(a===-1)return;let i=0,p=null,s=0,c=null,d=0,m=g=>{if(!(p&&c)){if(g.getType()==="text"){let u=g,b=u.getTextContentSize(),f=i,h=i+b;!p&&a>=f&&a<h&&(p=u,s=a-f);let v=a+t.length;!c&&v>f&&v<=h&&(c=u,d=v-f),i=h;return}if("getChildren"in g)for(let u of g.getChildren())m(u);else i+=g.getTextContentSize();}};if(m(r),p&&c){let g=p,u=c;g.select(s,0).focus.set(u.getKey(),d,"text"),o=true;}}),o}function yr(e){e.update(()=>{let t=$getRoot();t.clear();let o=$createParagraphNode();t.append(o),o.select();});}function yl(e){let t="",o="",r=[];return e.getEditorState().read(()=>{t=$getRoot().getTextContent(),o=JSON.stringify(e.getEditorState().toJSON());let n=a=>{if(a.getType()==="beautifulMention"){let i=a;r.push({trigger:i.getTrigger(),value:i.getValue(),data:i.getData()});}if("getChildren"in a)for(let i of a.getChildren())n(i);};n($getRoot());}),{text:t,json:o,mentions:r}}var lu=[{format:"bold",icon:Bold,label:"Bold"},{format:"italic",icon:Italic,label:"Italic"},{format:"underline",icon:Underline,label:"Underline"},{format:"strikethrough",icon:Strikethrough,label:"Strikethrough"},{format:"code",icon:Code,label:"Inline code"},{format:"h1",icon:Heading1,label:"Heading 1"},{format:"h2",icon:Heading2,label:"Heading 2"},{format:"h3",icon:Heading3,label:"Heading 3"},{format:"blockquote",icon:Quote,label:"Blockquote"},{format:"ul",icon:List,label:"Bulleted list"},{format:"ol",icon:ListOrdered,label:"Numbered list"}];function du({formats:e}){let[t]=useLexicalComposerContext(),[o,r]=S.useState(()=>new Set);S.useEffect(()=>mergeRegister(t.registerUpdateListener(({editorState:a})=>{a.read(()=>{let i=$getSelection();if(!$isRangeSelection(i))return;let p=new Set;for(let s of ["bold","italic","underline","strikethrough","code"])i.hasFormat(s)&&p.add(s);r(p);});})),[t]);let n=lu.filter(a=>e.includes(a.format));return S.createElement("div",{"data-gds-part":"composer-toolbar",className:l("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:a,icon:i,label:p})=>{let s=bl[a],c=s?o.has(s):false;return S.createElement("button",{key:a,type:"button","aria-label":p,title:p,"data-gds-part":"composer-toolbar-button","data-gds-active":c?"true":"false",onClick:()=>vl(t,a),className:l("h-7 w-7 inline-flex items-center justify-center rounded","text-[var(--gds-composer-toolbar-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary",c&&"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-toolbar-active-fg)]")},S.createElement(i,{className:"h-3.5 w-3.5"}))}))}function cu({attachments:e,onRemove:t}){return S.createElement(AnimatePresence,{initial:false},e.length>0&&S.createElement(motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},S.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>S.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?S.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):S.createElement("div",{className:"h-14 w-14 rounded-md border border-[var(--gds-composer-border)] flex items-center justify-center text-xs px-1 text-center text-[var(--gds-composer-muted-fg)]"},o.name.slice(0,18)),S.createElement("button",{type:"button",onClick:()=>t(o.id),"aria-label":`Remove ${o.name}`,className:l("absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full","bg-[var(--gds-composer-chip-remove-bg)]","text-[var(--gds-composer-chip-remove-fg)]","flex items-center justify-center","opacity-0 group-hover:opacity-100 focus:opacity-100","focus:outline-none focus:ring-2 focus:ring-primary","transition-opacity")},S.createElement(X,{className:"w-3 h-3"})))))))}function pu({placeholder:e,triggers:t,attachmentsCfg:o,formatList:r,showToolbar:n,isLoading:a,onStop:i,maxLength:p,autoFocus:s,submitOnEnter:c=true,leftActions:d,rightActions:m,hideSend:g,steps:u,trigger:b="mount",play:f,speed:h="normal",loop:v=false,loopDelay:w,onLoopReset:y,bare:C,className:T,onSubmit:I,onChange:E,readOnly:L,handleEditorReady:Y,submitRef:F,restartRef:Z,attachments:A,setAttachments:H,ingestImages:ne}){let[j]=useLexicalComposerContext(),q=S.useRef(null),x=S.useRef(null),[M,$]=S.useState(false);S.useEffect(()=>{Y(j);},[j,Y]),S.useEffect(()=>{j.setEditable(!L);},[j,L]);let B=S.useRef(E);B.current=E,S.useEffect(()=>j.registerUpdateListener(({editorState:D})=>{D.read(()=>{let se=$getRoot().getTextContent();$(se.trim().length>0),B.current?.(se);});}),[j]);let ve=S.useCallback(()=>{if(a)return;let D=yl(j),se=D.text.trim().length>0,le=A.length>0;!se&&!le||(I?.(D,le?A:void 0),yr(j),A.forEach($e=>URL.revokeObjectURL($e.previewUrl)),H([]));},[j,a,A,I,H]);F.current=ve;let{restart:re}=ao({steps:u,speed:h,trigger:b,play:f,loop:v,loopDelay:w,containerRef:q,onLoopReset:()=>{yr(j),y?.();},interpret:async(D,se)=>{let le=se.signal;if(D.type==="wait")return pe(D.ms,le);if(D.type==="clear")return yr(j),pe(120,le);if(D.type==="newline")return j.update(()=>{let ce=$getSelection();$isRangeSelection(ce)&&ce.insertParagraph();}),pe(60,le);if(D.type==="submit")return ve(),pe(120,le);if(D.type==="format")return vl(j,D.format),j.update(()=>{let ce=$getSelection();if(!$isRangeSelection(ce)||ce.isCollapsed())return;let Ee=ce.focus;ce.anchor.set(Ee.key,Ee.offset,Ee.type);}),pe(80,le);if(D.type==="select")return su(j,D.text),pe(120,le);if(D.type==="mention")return D.query&&(j.update(()=>{let ce=$getSelection();$isRangeSelection(ce)&&ce.insertText(D.trigger);}),await na(D.query,ce=>{j.update(()=>{let Ee=$getRoot(),at=Ee.getTextContent(),Ke=at.slice(0,at.length-D.trigger.length-(ce.length-1));Ee.clear();let qe=$createParagraphNode();Ke&&qe.append($createTextNode(Ke)),qe.append($createTextNode(D.trigger+ce)),Ee.append(qe);});},se.speed.tokenStagger,le),await pe(180,le),j.update(()=>{let ce=$getRoot(),Ee=ce.getTextContent(),at=D.trigger.length+D.query.length,Ke=Ee.slice(0,Ee.length-at);ce.clear();let qe=$createParagraphNode();Ke&&qe.append($createTextNode(Ke)),ce.append(qe),qe.select();})),iu(j,D.trigger,D.value),pe(120,le);let $e=D.speed?{slow:70,normal:22,fast:8}[D.speed]:se.speed.tokenStagger;for(let ce=0;ce<D.text.length;ce++){if(le.aborted)return;let Ee=D.text[ce];j.update(()=>{let at=$getSelection();if(!$isRangeSelection(at)){$getRoot().selectEnd();let Ke=$getSelection();$isRangeSelection(Ke)&&Ke.insertText(Ee);return}at.insertText(Ee);}),ce<D.text.length-1&&await pe($e,le);}}});S.useEffect(()=>{Z.current=D=>{yr(j),re(D);};},[j,re,Z]);let Q=!L&&!m&&!g,ye=!L&&!d&&o!==null,He=!L&&(ye||d||Q||m);return S.createElement("div",{ref:q,"data-gds-part":"composer","data-gds-loading":a?"true":"false",className:l("w-full",!C&&["rounded-md","bg-transparent","border border-input","shadow-sm","focus-within:outline-none focus-within:ring-1 focus-within:ring-ring","transition-colors"],T)},n&&S.createElement(du,{formats:r}),o&&S.createElement(cu,{attachments:A,onRemove:D=>{H(se=>{let le=se.find($e=>$e.id===D);return le&&URL.revokeObjectURL(le.previewUrl),se.filter($e=>$e.id!==D)});}}),S.createElement("div",{className:"relative"},S.createElement(RichTextPlugin,{contentEditable:S.createElement(ContentEditable,{"data-gds-part":"composer-editor",className:l("outline-none","px-3 sm:px-4 py-3","text-sm text-[var(--gds-composer-fg)]","min-h-[44px] max-h-[300px] overflow-y-auto","[&_p]:m-0 [&_p+p]:mt-2","[&_h1]:text-xl [&_h1]:font-semibold [&_h1]:mt-2","[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mt-2","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:mt-2","[&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5","[&_blockquote]:border-l-2 [&_blockquote]:border-[var(--gds-composer-border)] [&_blockquote]:pl-3 [&_blockquote]:italic","[&_code]:bg-[var(--gds-composer-toolbar-active-bg)] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-xs [&_code]:font-mono",a&&"opacity-60 pointer-events-none"),"aria-placeholder":e??"",placeholder:S.createElement("div",{"data-gds-part":"composer-placeholder",className:"absolute top-3 left-3 sm:left-4 text-sm text-muted-foreground pointer-events-none select-none"},e),spellCheck:true}),ErrorBoundary:LexicalErrorBoundary}),S.createElement(HistoryPlugin,null),S.createElement(ListPlugin,null),S.createElement(LinkPlugin,null),S.createElement(OnChangePlugin,{onChange:()=>{}}),S.createElement(nu,{enabled:!!s}),S.createElement(ru,{onSubmit:ve,enabled:c}),o&&S.createElement(au,{onImageFiles:ne,enabled:true}),t.length>0&&S.createElement(BeautifulMentionsPlugin,{items:t.reduce((D,se)=>(typeof se.items=="function"||(D[se.char]=se.items.map(le=>({value:le.value}))),D),{})})),He&&S.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},S.createElement("div",{className:"flex items-center gap-1"},d??(ye&&S.createElement("button",{type:"button",onClick:()=>x.current?.click(),disabled:a,"aria-label":"Attach image",title:"Attach image",className:l("h-8 w-8 rounded-lg flex items-center justify-center","text-[var(--gds-composer-action-fg)]","hover:text-[var(--gds-composer-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed")},S.createElement(Paperclip,{className:"w-4 h-4"})))),m??(Q&&S.createElement("button",{type:"button",onClick:a?i:ve,disabled:a?!i:!M&&A.length===0,"aria-label":a?"Stop":"Send",className:l("h-8 w-8 rounded-lg flex items-center justify-center transition-colors flex-shrink-0","focus:outline-none focus:ring-2 focus:ring-primary",a?"bg-red-500 hover:bg-red-600 text-white disabled:opacity-50":M||A.length>0?"bg-primary hover:bg-primary/90 text-primary-foreground":"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-muted-fg)] cursor-not-allowed")},a?S.createElement(Square,{className:"w-3.5 h-3.5"}):S.createElement(Send,{className:"w-3.5 h-3.5"}))),o&&S.createElement("input",{ref:x,type:"file",accept:o.accept,multiple:o.multiple,onChange:D=>{D.target.files&&ne(Array.from(D.target.files)),D.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var xl=S.forwardRef(function(t,o){let{initialText:r,initialJson:n,formats:a,toolbar:i,triggers:p,attachments:s,...c}=t,d=S.useMemo(()=>a===false?[]:a??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[a]),m=i===true||i==="top",g=S.useMemo(()=>{if(!s)return null;let F=s===true?{}:s;return F.enabled===false?null:{enabled:true,accept:F.accept??"image/*",maxItems:F.maxItems??10,multiple:F.multiple??true}},[s]),[u,b]=S.useState([]),f=S.useRef(u);f.current=u,S.useEffect(()=>()=>{f.current.forEach(F=>URL.revokeObjectURL(F.previewUrl));},[]);let h=S.useCallback(F=>{if(!g)return;let Z=F.filter(A=>g.accept?g.accept==="image/*"?A.type.startsWith("image/"):g.accept.split(",").some(H=>{let ne=H.trim();return ne.endsWith("/*")?A.type.startsWith(ne.slice(0,-1)):A.type===ne||A.name.toLowerCase().endsWith(ne)}):true);Z.length!==0&&b(A=>{let H=g.maxItems-A.length;if(H<=0)return A;let ne=Z.slice(0,H).map(j=>({id:`${j.name}-${j.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:j,previewUrl:URL.createObjectURL(j),name:j.name}));return [...A,...ne]});},[g]),v=S.useRef(null),w=S.useRef(()=>{}),y=S.useRef(()=>{}),C=S.useCallback(F=>{v.current=F;},[]);S.useImperativeHandle(o,()=>({play:F=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:F=>y.current(F),focus:()=>v.current?.focus(),clear:()=>{let F=v.current;F&&yr(F);},insert:F=>{v.current?.update(()=>{let Z=$getSelection();$isRangeSelection(Z)&&Z.insertText(F);});},getContent:()=>v.current?yl(v.current):{text:"",json:"",mentions:[]},getEditor:()=>v.current}),[]);let T=S.useMemo(()=>({paragraph:"gds-composer-paragraph",quote:"gds-composer-quote",heading:{h1:"gds-composer-h1",h2:"gds-composer-h2",h3:"gds-composer-h3"},list:{ul:"gds-composer-ul",ol:"gds-composer-ol",listitem:"gds-composer-li"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"gds-composer-code"},beautifulMentions:{"@":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-primary/10 text-primary font-medium","/":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-violet-500/15 text-violet-600 dark:text-violet-400 font-medium"}}),[]),I=S.useMemo(()=>({namespace:"gds-composer",theme:T,onError:F=>{console.error("[Composer]",F);},nodes:[HeadingNode,QuoteNode,ListNode,ListItemNode,LinkNode,AutoLinkNode,CodeNode,CodeHighlightNode,BeautifulMentionNode],editorState:n||(r?F=>{let Z=$getRoot(),A=$createParagraphNode();A.append($createTextNode(r)),Z.append(A);}:void 0)}),[T,n,r]),E=d.length>0,{readOnly:L=false,...Y}=c;return S.createElement(LexicalComposer,{initialConfig:{...I,editable:!L}},S.createElement(pu,{...Y,readOnly:L,triggers:p??[],attachmentsCfg:L?null:g,formatList:d,showToolbar:m&&E&&!L,handleEditorReady:C,submitRef:w,restartRef:y,attachments:u,setAttachments:b,ingestImages:h}))}),mu=S.forwardRef(function(t,o){return S.createElement(xl,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var Lt=Ct.Root,Dt=Ct.Trigger,uu=Ct.Anchor,kt=S.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>S.createElement(Ct.Portal,null,S.createElement(Ct.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:l("z-50 w-72 rounded-md border 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]",St(r,"bg-popover"),it[r],e),...n})));kt.displayName=Ct.Content.displayName;var gu="PPP",fu="LLL dd, y";function hu({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=gu,captionLayout:c,icon:d,"aria-label":m}){return S.createElement(Lt,null,S.createElement(Dt,{asChild:true},S.createElement(Je,{type:"button",variant:"outline",disabled:r,"aria-label":m??(e?void 0:o),"data-empty":!e,className:l("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??S.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):S.createElement("span",null,o))),S.createElement(kt,{className:l("w-auto p-0",a),align:i,side:p},S.createElement(Xr,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function bu({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=fu,captionLayout:c,icon:d,numberOfMonths:m=2,"aria-label":g}){let u=!!e?.from;return S.createElement(Lt,null,S.createElement(Dt,{asChild:true},S.createElement(Je,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:l("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??S.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?S.createElement(S.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):S.createElement("span",null,o))),S.createElement(kt,{className:l("w-auto p-0",a),align:i,side:p},S.createElement(Xr,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var yu=Se.Root,xu=Se.Trigger,Rl=Se.Portal,wu=Se.Close,dn=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Overlay,{ref:o,className:l("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}));dn.displayName=Se.Overlay.displayName;var Sl=S.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>S.createElement(Rl,null,S.createElement(dn,null),S.createElement(Se.Content,{ref:n,"data-surface":o,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border 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",St(o,"bg-background"),it[o],e),...r},t,S.createElement(Se.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"},S.createElement(X,{className:"h-4 w-4"}),S.createElement("span",{className:"sr-only"},"Close")))));Sl.displayName=Se.Content.displayName;var Cl=({className:e,...t})=>S.createElement("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cl.displayName="DialogHeader";var kl=({className:e,...t})=>S.createElement("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});kl.displayName="DialogFooter";var Tl=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));Tl.displayName=Se.Title.displayName;var Pl=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));Pl.displayName=Se.Description.displayName;var ku=K.Root,Tu=K.Trigger,Co=S.createContext("default"),Nl=e=>e==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",Pu=K.Group,Nu=K.Portal,Mu=K.Sub,Eu=K.RadioGroup,Ml=S.forwardRef(({className:e,inset:t,children:o,...r},n)=>{let a=S.useContext(Co);return S.createElement(K.SubTrigger,{ref:n,className:l("flex cursor-default select-none items-center gap-2 rounded-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0",Nl(a),a==="default"?"[&_svg]:size-4":"[&_svg]:size-3.5",t&&(a==="default"?"pl-8":"pl-7"),e),...r},o,S.createElement(ChevronRight,{className:"ml-auto"}))});Ml.displayName=K.SubTrigger.displayName;var El=S.forwardRef(({className:e,surface:t="solid",size:o="default",children:r,...n},a)=>S.createElement(K.SubContent,{ref:a,"data-surface":t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border 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]",o==="default"?"p-1":"p-0.5",St(t,"bg-popover"),it[t],e),...n},S.createElement(Co.Provider,{value:o},r)));El.displayName=K.SubContent.displayName;var Ll=S.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",size:r="default",children:n,...a},i)=>S.createElement(K.Portal,null,S.createElement(K.Content,{ref:i,sideOffset:t,"data-surface":o,className:l("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border text-popover-foreground shadow-md",r==="default"?"p-1":"p-0.5","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]",St(o,"bg-popover"),it[o],e),...a},S.createElement(Co.Provider,{value:r},n))));Ll.displayName=K.Content.displayName;var Dl=S.forwardRef(({className:e,inset:t,...o},r)=>{let n=S.useContext(Co);return S.createElement(K.Item,{ref:r,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:shrink-0",Nl(n),n==="default"?"[&>svg]:size-4":"[&>svg]:size-3.5",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});Dl.displayName=K.Item.displayName;var Al=S.forwardRef(({className:e,children:t,checked:o,...r},n)=>{let i=S.useContext(Co)!=="default";return S.createElement(K.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),checked:o,...r},S.createElement("span",{className:l("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},S.createElement(K.ItemIndicator,null,S.createElement(Check,{className:i?"h-3 w-3":"h-4 w-4"}))),t)});Al.displayName=K.CheckboxItem.displayName;var Hl=S.forwardRef(({className:e,children:t,...o},r)=>{let a=S.useContext(Co)!=="default";return S.createElement(K.RadioItem,{ref:r,className:l("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),...o},S.createElement("span",{className:l("absolute flex items-center justify-center",a?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},S.createElement(K.ItemIndicator,null,S.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t)});Hl.displayName=K.RadioItem.displayName;var Il=S.forwardRef(({className:e,inset:t,...o},r)=>{let n=S.useContext(Co);return S.createElement(K.Label,{ref:r,className:l("font-semibold",n==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});Il.displayName=K.Label.displayName;var Fl=S.forwardRef(({className:e,...t},o)=>S.createElement(K.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));Fl.displayName=K.Separator.displayName;var zl=({className:e,...t})=>S.createElement("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});zl.displayName="DropdownMenuShortcut";var Bl=cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent 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",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs",xs:"h-7 pl-2 pr-2 py-0 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Du={default:{startPad:"pl-9",endPad:"pr-9",startInset:"pl-3",endInset:"pr-3"},sm:{startPad:"pl-7",endPad:"pr-6",startInset:"pl-2",endInset:"pr-2"},xs:{startPad:"pl-6",endPad:"pr-5",startInset:"pl-2",endInset:"pr-2"}},$t=S.forwardRef(({className:e,type:t,size:o="default",startSlot:r,endSlot:n,...a},i)=>{if(!r&&!n)return S.createElement("input",{type:t,className:l(Bl({size:o}),e),ref:i,...a});let p=Du[o];return S.createElement("div",{className:"relative flex w-full items-center"},r?S.createElement("span",{className:l("pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.startInset)},r):null,S.createElement("input",{type:t,ref:i,className:l(Bl({size:o}),r&&p.startPad,n&&p.endPad,e),...a}),n?S.createElement("span",{className:l("pointer-events-none absolute inset-y-0 right-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.endInset)},n):null)});$t.displayName="Input";var Hu=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{default:"text-sm",sm:"text-xs",xs:"text-[11px]"}},defaultVariants:{size:"default"}}),ko=S.forwardRef(({className:e,size:t,...o},r)=>S.createElement(cn.Root,{ref:r,className:l(Hu({size:t}),e),...o}));ko.displayName=cn.Root.displayName;var Ol=S.forwardRef(({className:e,value:t,...o},r)=>S.createElement(Sr.Root,{ref:r,className:l("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},S.createElement(Sr.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Ol.displayName=Sr.Root.displayName;var pn=S.forwardRef(({className:e,...t},o)=>S.createElement(Command,{ref:o,className:l("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));pn.displayName=Command.displayName;var mn=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},S.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),S.createElement(Command.Input,{ref:o,className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));mn.displayName=Command.Input.displayName;var un=S.forwardRef(({className:e,...t},o)=>S.createElement(Command.List,{ref:o,className:l("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));un.displayName=Command.List.displayName;var gn=S.forwardRef((e,t)=>S.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));gn.displayName=Command.Empty.displayName;var ga=S.forwardRef(({className:e,...t},o)=>S.createElement(Command.Group,{ref:o,className:l("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ga.displayName=Command.Group.displayName;var fn=S.forwardRef(({className:e,...t},o)=>S.createElement(Command.Separator,{ref:o,className:l("-mx-1 h-px bg-border",e),...t}));fn.displayName=Command.Separator.displayName;var $o=S.forwardRef(({className:e,...t},o)=>S.createElement(Command.Item,{ref:o,className:l("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));$o.displayName=Command.Item.displayName;var Cr=S.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>S.createElement(hn.Root,{ref:n,decorative:o,orientation:t,className:l("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Cr.displayName=hn.Root.displayName;var Vu=3,_l=S.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:p="Nothing matches.",maxCount:s=Vu,searchable:c=true,badgeDismissible:d=true,disabled:m=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},v){let w=o!==void 0,[y,C]=S.useState(r??[]),T=w?o:y,[I,E]=S.useState(false),L=S.useMemo(()=>{let x=new Map;for(let M of t)x.set(M.value,M);return x},[t]),Y=S.useCallback(x=>{w||C(x),n?.(x);},[w,n]),F=x=>{T.includes(x)?Y(T.filter(M=>M!==x)):Y([...T,x]);},Z=(x,M)=>{x.preventDefault(),x.stopPropagation(),Y(T.filter($=>$!==M));},A=x=>{x?.preventDefault(),x?.stopPropagation(),Y([]);},H=()=>{let x=t.filter(M=>!M.disabled).map(M=>M.value);Y(x);},ne=t.length>0&&t.filter(x=>!x.disabled).every(x=>T.includes(x.value)),j=T.slice(0,s),q=Math.max(0,T.length-s);return S.createElement(Lt,{open:I,onOpenChange:E,modal:g},S.createElement(Dt,{asChild:true},S.createElement("button",{ref:v,type:"button",id:b,role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-label":f,disabled:m,"data-gds-part":"multi-select",className:l("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},T.length===0?S.createElement("span",{className:"text-muted-foreground px-1"},a):S.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},j.map(x=>{let M=L.get(x);if(!M)return null;let $=M.icon;return S.createElement(Yr,{key:x,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},$?S.createElement($,{className:"h-3 w-3"}):null,S.createElement("span",{className:"truncate max-w-[12rem]"},M.label),d&&!m&&S.createElement("span",{role:"button","aria-label":`Remove ${M.label}`,tabIndex:0,onClick:B=>Z(B,x),onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&Z(B,x);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},S.createElement(X,{className:"h-3 w-3","aria-hidden":true})))}),q>0&&S.createElement(Yr,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:T.slice(s).map(x=>L.get(x)?.label??x).join(", ")},"+",q," more")),S.createElement("div",{className:"flex shrink-0 items-center gap-1"},T.length>0&&!m&&S.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:x=>A(x),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&A(x);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},S.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),S.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),S.createElement(kt,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},S.createElement(pn,null,c&&S.createElement(mn,{placeholder:i}),S.createElement(un,null,S.createElement(gn,null,p),S.createElement(ga,null,t.map(x=>{let M=x.icon,$=T.includes(x.value);return S.createElement($o,{key:x.value,value:x.label,onSelect:()=>F(x.value),disabled:x.disabled,"data-gds-part":"multi-select-item","data-selected":$||void 0},S.createElement("div",{className:l("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",$?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},S.createElement(Check,{className:"h-3 w-3"})),M?S.createElement(M,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,S.createElement("span",{className:"truncate"},x.label))})),S.createElement(fn,null),S.createElement(ga,null,S.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},S.createElement($o,{onSelect:H,className:"flex-1 justify-center text-xs",disabled:ne},"Select all"),S.createElement(Cr,{orientation:"vertical",className:"h-5"}),S.createElement($o,{onSelect:()=>A(),className:"flex-1 justify-center text-xs",disabled:T.length===0},"Clear"),S.createElement(Cr,{orientation:"vertical",className:"h-5"}),S.createElement($o,{onSelect:()=>E(false),className:"flex-1 justify-center text-xs"},"Close")))))))});_l.displayName="MultiSelect";var Vl=S.forwardRef(({className:e,...t},o)=>S.createElement(so.Root,{className:l("grid gap-2",e),...t,ref:o}));Vl.displayName=so.Root.displayName;var Gl=S.forwardRef(({className:e,...t},o)=>S.createElement(so.Item,{ref:o,className:l("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},S.createElement(so.Indicator,{className:"flex items-center justify-center"},S.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Gl.displayName=so.Item.displayName;var Uu=({className:e,...t})=>S.createElement(Ko.PanelGroup,{"data-gds-part":"resizable-panel-group",className:l("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),ju=Ko.Panel,$u=({withHandle:e,className:t,...o})=>S.createElement(Ko.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:l("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),...o},e&&S.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},S.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var Wl=cva("gds-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}}),Ul=S.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...i},p)=>S.createElement(a?Slot:"div",{ref:p,"data-gds-part":"row",className:l(Wl({gap:t,align:o,justify:r,wrap:n,className:e})),...i}));Ul.displayName="Row";var jl=cva("gds-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"}}),$l=S.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},i)=>S.createElement(n?Slot:"div",{ref:i,"data-gds-part":"grid",className:l(jl({cols:t,gap:o,align:r,className:e})),...a}));$l.displayName="Grid";var Kl=cva("gds-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"}}),ql=S.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:i=false,...p},s)=>S.createElement(i?Slot:"div",{ref:s,"data-gds-part":"flex",className:l(Kl({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...p}));ql.displayName="Flex";var Yl=S.forwardRef(({className:e,children:t,...o},r)=>S.createElement(ft.Root,{ref:r,className:l("relative overflow-hidden",e),...o},S.createElement(ft.Viewport,{className:"h-full w-full rounded-[inherit]"},t),S.createElement(bn,null),S.createElement(ft.Corner,null)));Yl.displayName=ft.Root.displayName;var bn=S.forwardRef(({className:e,orientation:t="vertical",...o},r)=>S.createElement(ft.ScrollAreaScrollbar,{ref:r,orientation:t,className:l("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),...o},S.createElement(ft.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));bn.displayName=ft.ScrollAreaScrollbar.displayName;var vn=J.Root,tg=J.Group,yn=J.Value,Jl=S.createContext("default"),og=cva("flex w-full items-center justify-between rounded-md border border-input bg-background 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",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs",xs:"h-7 px-2 py-0 text-xs"}},defaultVariants:{size:"default"}}),ya=S.forwardRef(({className:e,children:t,size:o="default",...r},n)=>S.createElement(J.Trigger,{ref:n,className:l(og({size:o}),e),...r},t,S.createElement(J.Icon,{asChild:true},S.createElement(ChevronDown,{className:l("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));ya.displayName=J.Trigger.displayName;var xn=S.forwardRef(({className:e,...t},o)=>S.createElement(J.ScrollUpButton,{ref:o,className:l("flex cursor-default items-center justify-center py-1",e),...t},S.createElement(ChevronUp,{className:"h-4 w-4"})));xn.displayName=J.ScrollUpButton.displayName;var wn=S.forwardRef(({className:e,...t},o)=>S.createElement(J.ScrollDownButton,{ref:o,className:l("flex cursor-default items-center justify-center py-1",e),...t},S.createElement(ChevronDown,{className:"h-4 w-4"})));wn.displayName=J.ScrollDownButton.displayName;var xa=S.forwardRef(({className:e,children:t,position:o="popper",size:r="default",...n},a)=>S.createElement(J.Portal,null,S.createElement(J.Content,{ref:a,className:l("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",o==="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:o,...n},S.createElement(xn,null),S.createElement(J.Viewport,{className:l(r==="default"?"p-1":"p-0.5",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},S.createElement(Jl.Provider,{value:r},t)),S.createElement(wn,null))));xa.displayName=J.Content.displayName;var Ql=S.forwardRef(({className:e,...t},o)=>S.createElement(J.Label,{ref:o,className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ql.displayName=J.Label.displayName;var rg=cva("relative flex w-full cursor-default select-none items-center rounded-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{default:"py-1.5 pl-8 pr-2 text-sm",sm:"py-1 pl-7 pr-2 text-xs",xs:"py-1 pl-6 pr-2 text-xs"}},defaultVariants:{size:"default"}}),wa=S.forwardRef(({className:e,children:t,...o},r)=>{let n=S.useContext(Jl),a=n!=="default";return S.createElement(J.Item,{ref:r,className:l(rg({size:n}),e),...o},S.createElement("span",{className:l("absolute flex items-center justify-center",a?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},S.createElement(J.ItemIndicator,null,S.createElement(Check,{className:a?"h-3 w-3":"h-4 w-4"}))),S.createElement(J.ItemText,null,t))});wa.displayName=J.Item.displayName;var ed=S.forwardRef(({className:e,...t},o)=>S.createElement(J.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));ed.displayName=J.Separator.displayName;var ig=Se.Root,sg=Se.Trigger,lg=Se.Close,td=Se.Portal,Rn=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Overlay,{className:l("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:o}));Rn.displayName=Se.Overlay.displayName;var dg=cva("fixed z-50 gap-4 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"}}),od=S.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>S.createElement(td,null,S.createElement(Rn,null),S.createElement(Se.Content,{ref:a,"data-surface":t,className:l(dg({side:e}),St(t,"bg-background"),it[t],o),...n},r,S.createElement(Se.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"},S.createElement(X,{className:"h-4 w-4"}),S.createElement("span",{className:"sr-only"},"Close")))));od.displayName=Se.Content.displayName;var rd=({className:e,...t})=>S.createElement("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t});rd.displayName="SheetHeader";var ad=({className:e,...t})=>S.createElement("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ad.displayName="SheetFooter";var nd=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Title,{ref:o,className:l("text-lg font-semibold text-foreground",e),...t}));nd.displayName=Se.Title.displayName;var id=S.forwardRef(({className:e,...t},o)=>S.createElement(Se.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));id.displayName=Se.Description.displayName;function cg({className:e,...t}){return React.createElement("div",{className:l("animate-pulse rounded-md bg-muted",e),...t})}var Po=S.forwardRef(({className:e,...t},o)=>S.createElement(Kt.Root,{ref:o,className:l("relative flex w-full touch-none select-none items-center",e),...t},S.createElement(Kt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},S.createElement(Kt.Range,{className:"absolute h-full bg-primary"})),S.createElement(Kt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));Po.displayName=Kt.Root.displayName;var xg={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},Sn=S.createContext(null),gd=S.createContext(null),Cn=S.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let i=S.useRef(new Map),p=S.useCallback(m=>(i.current.set(m.id,m),()=>{i.current.delete(m.id);}),[]),s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),c=m=>{let g=i.current,u=g.get(String(m));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===m))return b;return null},d=S.useCallback(m=>{if(t)return;let{active:g,over:u}=m;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let y=b.values.findIndex(T=>T===g.id),C=b.values.findIndex(T=>T===u.id);if(y===-1||C===-1)return;b.onReorder?.(arrayMove(b.values,y,C));return}let h=b.values.filter(y=>y!==g.id),v=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(y=>y===u.id)),w=[...f.values.slice(0,v),g.id,...f.values.slice(v)];b.onReorder?.(h),f.onReorder?.(w);},[t]);return S.createElement(gd.Provider,{value:{registerContainer:p}},S.createElement(DndContext,{sensors:s,collisionDetection:closestCorners,onDragEnd:d},S.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:l(o),...n},r)))});Cn.displayName="Sortable.Group";var Tr=S.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:i,children:p,...s},c){let d=S.useContext(gd),m=d!==null,g=S.useId(),u=a??g;S.useEffect(()=>{if(m)return d.registerContainer({id:u,values:t,onReorder:o})},[m,d,u,t,o]);let b=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=S.useCallback(w=>{let{active:y,over:C}=w;if(!C||y.id===C.id)return;let T=t.findIndex(E=>E===y.id),I=t.findIndex(E=>E===C.id);T===-1||I===-1||o?.(arrayMove(t,T,I));},[t,o]),h=S.useMemo(()=>({disabled:n}),[n]),v=S.createElement(SortableContext,{items:t,strategy:xg[r]},S.createElement(wg,{id:u,enabled:m,forwardedRef:c,strategy:r,disabled:n,className:i,...s},p));return m?S.createElement(Sn.Provider,{value:h},v):S.createElement(Sn.Provider,{value:h},S.createElement(DndContext,{sensors:b,collisionDetection:closestCenter,onDragEnd:f},v))});Tr.displayName="Sortable";function wg({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:i,...p}){let s=useDroppable({id:e,disabled:!t}),c=S.useCallback(d=>{t&&s.setNodeRef(d),typeof o=="function"?o(d):o&&(o.current=d);},[t,s,o]);return S.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:l(a),...p},i)}var fd=S.createContext(null),kn=S.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:i,...p},s){let c=S.useContext(Sn);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let d=c.disabled||r||false,{attributes:m,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:v}=useSortable({id:t,disabled:d}),w=S.useRef(false),y=S.useCallback(E=>{u(E),typeof s=="function"?s(E):s&&(s.current=E);},[u,s]),C=S.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:w,disabled:d}),[g,b,d]),T={transform:CSS.Transform.toString(f),transition:h,zIndex:v?1:void 0,cursor:d?"default":w.current?void 0:"grab",...a},I=o?Slot:"div";return S.createElement(fd.Provider,{value:C},S.createElement(I,{ref:y,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":v||void 0,className:l(n),style:T,...m,...w.current?{}:g,...p},i))});kn.displayName="Sortable.Item";var Tn=S.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let i=S.useContext(fd);if(!i)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");S.useLayoutEffect(()=>(i.hasHandle.current=true,()=>{i.hasHandle.current=false;}),[i.hasHandle]);let p=S.useCallback(c=>{i.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[i,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:l("cursor-grab touch-none select-none",i.disabled&&"cursor-default opacity-50",o),...i.disabled?{}:i.listeners,...n};return t?S.createElement(Slot,{ref:p,...s},r):S.createElement("button",{type:"button",ref:p,...s},r)});Tn.displayName="Sortable.Handle";Tr.Item=kn;Tr.Handle=Tn;Tr.Group=Cn;var Rg=Tr;var hd=cva("gds-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"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),bd=S.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},i)=>S.createElement(n?Slot:"div",{ref:i,"data-gds-part":"stack",className:l(hd({gap:t,align:o,justify:r,className:e})),...a}));bd.displayName="Stack";var Ca=S.forwardRef(({className:e,...t},o)=>S.createElement(Nr.Root,{className:l("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:o},S.createElement(Nr.Thumb,{className:l("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")})));Ca.displayName=Nr.Root.displayName;var vd=S.forwardRef(({className:e,...t},o)=>S.createElement("div",{className:"relative w-full overflow-auto"},S.createElement("table",{ref:o,className:l("w-full caption-bottom text-sm",e),...t})));vd.displayName="Table";var yd=S.forwardRef(({className:e,...t},o)=>S.createElement("thead",{ref:o,className:l("[&_tr]:border-b",e),...t}));yd.displayName="TableHeader";var xd=S.forwardRef(({className:e,...t},o)=>S.createElement("tbody",{ref:o,className:l("[&_tr:last-child]:border-0",e),...t}));xd.displayName="TableBody";var wd=S.forwardRef(({className:e,...t},o)=>S.createElement("tfoot",{ref:o,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));wd.displayName="TableFooter";var Rd=S.forwardRef(({className:e,...t},o)=>S.createElement("tr",{ref:o,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Rd.displayName="TableRow";var Sd=S.forwardRef(({className:e,...t},o)=>S.createElement("th",{ref:o,className:l("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}));Sd.displayName="TableHead";var Cd=S.forwardRef(({className:e,...t},o)=>S.createElement("td",{ref:o,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Cd.displayName="TableCell";var kd=S.forwardRef(({className:e,...t},o)=>S.createElement("caption",{ref:o,className:l("mt-4 text-sm text-muted-foreground",e),...t}));kd.displayName="TableCaption";var Td=S.createContext(S.createElement(ChevronRight,null)),Pd=S.forwardRef(({separator:e,children:t,...o},r)=>S.createElement(Td.Provider,{value:e??S.createElement(ChevronRight,null)},S.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));Pd.displayName="Breadcrumb";var Nd=S.forwardRef(({className:e,...t},o)=>S.createElement("ol",{ref:o,className:l("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Nd.displayName="BreadcrumbList";var Md=S.forwardRef(({className:e,...t},o)=>S.createElement("li",{ref:o,className:l("inline-flex items-center gap-1.5",e),...t}));Md.displayName="BreadcrumbItem";var ka=l("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"),Ed=S.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?S.createElement("span",{ref:n,className:l(ka,t),...r}):o?S.createElement("a",{ref:n,href:o,className:l(ka,t),...r}):S.createElement("button",{ref:n,type:"button",className:l(ka,t),...r}));Ed.displayName="BreadcrumbLink";var Ld=S.forwardRef(({className:e,...t},o)=>S.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:l("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}));Ld.displayName="BreadcrumbPage";var Dd=({children:e,className:t,...o})=>{let r=S.useContext(Td);return S.createElement("li",{role:"presentation","aria-hidden":"true",className:l("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Dd.displayName="BreadcrumbSeparator";var Ad=({className:e,...t})=>S.createElement("span",{role:"presentation","aria-hidden":"true",className:l("flex h-5 w-5 items-center justify-center",e),...t},S.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),S.createElement("span",{className:"sr-only"},"More"));Ad.displayName="BreadcrumbEllipsis";var Hd=S.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},i)=>{let[p,s]=S.useState(false);return S.createElement(Lt,{open:p,onOpenChange:s},S.createElement(Dt,{asChild:true},S.createElement("button",{ref:i,type:"button",className:l(ka,n&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},S.createElement("span",null,e),S.createElement(ChevronDown,{className:l("h-3 w-3 text-muted-foreground transition-transform",p&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(d=>!d);},role:"button","aria-label":`Show ${e} children`}))),S.createElement(kt,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?S.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):S.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>S.createElement("li",{key:c.id},S.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:l("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},S.createElement("span",{className:"flex-1 min-w-0"},S.createElement("span",{className:"flex items-center gap-1.5"},S.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&S.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&S.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&S.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Hd.displayName="BreadcrumbMenuTrigger";var Nn=Tt.Provider,No=Tt.Root,Mo=Tt.Trigger,lo=S.forwardRef(({className:e,sideOffset:t=4,...o},r)=>S.createElement(Tt.Portal,null,S.createElement(Tt.Content,{ref:r,sideOffset:t,className:l("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),...o})));lo.displayName=Tt.Content.displayName;var Fd=S.createContext({size:"md",variant:"pill"}),Ng=Pt.Root,Mg=cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Eg=cva("inline-flex items-center justify-center whitespace-nowrap 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",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),zd=S.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>S.createElement(Fd.Provider,{value:{size:t??"md",variant:o??"pill"}},S.createElement(Pt.List,{ref:a,className:l(Mg({size:t,variant:o}),e),...n},r)));zd.displayName=Pt.List.displayName;var Bd=S.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let i=S.useContext(Fd),p=t??i.size,s=o??i.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),d=S.createElement(Pt.Trigger,{ref:a,className:l(Eg({size:p,variant:s}),e),"aria-label":c,...n});return r?S.createElement(No,null,S.createElement(Mo,{asChild:true},d),S.createElement(lo,null,r)):d});Bd.displayName=Pt.Trigger.displayName;var Od=S.forwardRef(({className:e,...t},o)=>S.createElement(Pt.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Od.displayName=Pt.Content.displayName;var Dg=cva("flex w-full rounded-md border border-input bg-background 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",{variants:{size:{default:"min-h-[80px] px-3 py-2 text-sm",sm:"min-h-[64px] px-2 py-1.5 text-xs",xs:"min-h-[52px] px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),_d=S.forwardRef(({className:e,size:t="default",...o},r)=>S.createElement("textarea",{className:l(Dg({size:t}),e),ref:r,...o}));_d.displayName="Textarea";var Vd=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",xs:"h-7 px-1 min-w-7",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Gd=S.forwardRef(({className:e,variant:t,size:o,...r},n)=>S.createElement(Mn.Root,{ref:n,className:l(Vd({variant:t,size:o,className:e})),...r}));Gd.displayName=Mn.Root.displayName;var Ud=S.createContext("md"),Hg=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"}}),Ig=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"}}),Eo=S.forwardRef(({className:e,size:t="md",children:o,...r},n)=>S.createElement(Ud.Provider,{value:t??"md"},S.createElement(qo.Root,{ref:n,className:l(Hg({size:t}),e),...r},o)));Eo.displayName=qo.Root.displayName;var Lo=S.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...i},p)=>{let s=S.useContext(Ud),c=t??s,d=a??(typeof o=="string"?o:void 0),m=S.createElement(qo.Item,{ref:p,className:l(Ig({size:c}),e),"aria-label":d,...i});return o==null?m:S.createElement(No,{delayDuration:n},S.createElement(Mo,{asChild:true},S.createElement("span",{className:"inline-flex"},m)),S.createElement(lo,{side:r},o))});Lo.displayName=qo.Item.displayName;var zg=cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),jd=S.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:i,trailing:p,children:s,"aria-label":c,...d},m)=>{let g=s==null;return S.createElement("div",{ref:m,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:l(zg({position:t,variant:o,size:r,sticky:n}),e),...d},g?S.createElement(S.Fragment,null,S.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),S.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},i),S.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},p)):s)});jd.displayName="Toolbar";var $d=S.forwardRef(({className:e,align:t="leading",...o},r)=>S.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:l("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));$d.displayName="ToolbarSlot";var qd=S.createContext(null),En=S.createContext(0);function Yd(){return S.useContext(En)}function Er(e){let t=S.useContext(qd);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var co=S.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:i,children:p,...s},c)=>{let d=e!==void 0,[m,g]=S.useState(t),u=d?e:m,b=n==="panel",f=()=>{let h=!u;d||g(h),o?.(h);};return S.createElement(Nn,{delayDuration:0},S.createElement(qd.Provider,{value:{collapsed:u}},S.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":n,className:l("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?i:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...i},...s},p,r&&!b&&S.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:l("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?S.createElement(ChevronRight,{className:"h-3 w-3"}):S.createElement(ChevronLeft,{className:"h-3 w-3"})))))});co.displayName="Sidebar";var Dn=S.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Er("SidebarHeader");return S.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:l("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});Dn.displayName="SidebarHeader";var An=S.forwardRef(({className:e,...t},o)=>S.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:l("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));An.displayName="SidebarContent";var Hn=S.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Er("SidebarFooter");return S.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:l("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Hn.displayName="SidebarFooter";var In=S.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:i,...p},s)=>{let{collapsed:c}=Er("SidebarSection"),[d,m]=S.useState(n),g=!!e&&r;return c?S.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:l("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...p},i):S.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:l("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...p},e&&(g?S.createElement("div",{className:l("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},S.createElement("button",{type:"button",onClick:()=>m(u=>!u),"aria-expanded":d,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,S.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),d?S.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):S.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&S.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):S.createElement("div",{className:l("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,S.createElement("span",{className:"flex-1 truncate"},e),o&&S.createElement("span",{className:"shrink-0"},o))),d&&S.createElement("div",{className:l("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},i))});In.displayName="SidebarSection";var Fn=S.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:i,size:p="md",description:s,className:c,children:d,...m},g)=>{let{collapsed:u}=Er("SidebarItem"),b=Yd(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=p==="sm",v=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",w=h&&!o?"font-normal":"font-medium",y=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",C=!u&&s!=null,T=l("group flex items-center gap-2.5 rounded-md transition-colors",v,w,C&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,y,a&&"opacity-50 pointer-events-none",c),I=C?S.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},S.createElement("span",{className:"truncate"},d),S.createElement("span",{className:l("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):S.createElement("span",{className:"flex-1 truncate text-left"},d),E=S.createElement(S.Fragment,null,e&&S.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&I,!u&&t!==void 0&&t!==null&&S.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),L;if(n)L=S.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:T,style:f},d);else if(r){let{href:F,target:Z,rel:A,download:H,hrefLang:ne,ping:j,referrerPolicy:q,type:x,...M}=m;L=S.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:l(T,"w-full text-left"),style:f,...M},E);}else L=S.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:T,style:f,...m},E);if(!u)return L;let Y=i??(typeof d=="string"?d:null);return Y?S.createElement(No,null,S.createElement(Mo,{asChild:true},L),S.createElement(lo,{side:"right",sideOffset:8},Y,t!=null&&S.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):L});Fn.displayName="SidebarItem";var zn=S.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:i,onExpandedChange:p,disabled:s,description:c,trailing:d,className:m,style:g,children:u,...b},f){let{collapsed:h}=Er("SidebarTreeItem"),v=Yd(),w=i!==void 0,[y,C]=S.useState(a),T=w?i:y,I=()=>{let L=!T;w||C(L),p?.(L);};if(h)return S.createElement(En.Provider,{value:v},u);let E=v*1.5;return S.createElement("div",{"data-gds-part":"sidebar-tree-item"},S.createElement("div",{className:"group/row relative"},S.createElement("button",{ref:f,type:"button",onClick:I,"aria-expanded":T,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:s,className:l("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",d!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${E}rem)`,paddingRight:d!=null?"3rem":"0.5rem",...g},...b},S.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},T?S.createElement(ChevronDown,{className:"h-3 w-3"}):S.createElement(ChevronRight,{className:"h-3 w-3"})),o&&S.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?S.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},S.createElement("span",{className:"truncate"},t),S.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):S.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&S.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),d!=null&&S.createElement("div",{onClick:L=>L.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},d)),T&&u&&S.createElement(En.Provider,{value:v+1},S.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});zn.displayName="SidebarTreeItem";co.Header=Dn;co.Content=An;co.Footer=Hn;co.Section=In;co.Item=Fn;co.TreeItem=zn;var po=[50,100,200,300,400,500,600,700,800,900,950],Zd=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],_g=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Na({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<po.length;n++){let a=Zd[n],i=_g[n]*t;r[po[n]]=`${a.toFixed(4)} ${i.toFixed(4)} ${o.toFixed(2)}`;}return r}function Xd(){let e={};for(let t=0;t<po.length;t++){let o=Zd[t];e[po[t]]=`${o.toFixed(4)} 0 0`;}return e}var Bn={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"}},Lr="1 0 0",Jd="0 0 0";function Yo(e,t){let[,o,r]=e.split(/\s+/).map(d=>d.trim()),n=Number(o),a=r;if(t==="light"){let m=Math.min(n*.22,.045),g=.38,u=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let i=.22,p=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${i.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Ma={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 Vg=["superLight","light","dark","superDark"],Gg={muted:.6,default:1,vibrant:1.3};function Wg(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,i=p=>(p%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${i(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${i(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 W=e=>({source:"neutral",step:e}),bt=e=>({source:"primary",step:e}),mo=e=>({source:"accent",step:e}),Dr=e=>({source:"pure",value:e}),Ug={superLight:{background:W(50),foreground:W(800),card:Dr(Lr),cardForeground:W(800),popover:Dr(Lr),popoverForeground:W(800),primary:bt(600),primaryForeground:bt(50),secondary:W(100),secondaryForeground:W(700),muted:W(100),mutedForeground:W(500),accent:mo(600),accentForeground:mo(50),border:W(200),input:W(200),ring:bt(500)},light:{background:W(50),foreground:W(950),card:Dr(Lr),cardForeground:W(950),popover:Dr(Lr),popoverForeground:W(950),primary:bt(500),primaryForeground:bt(50),secondary:W(100),secondaryForeground:W(700),muted:W(100),mutedForeground:W(500),accent:mo(500),accentForeground:mo(50),border:W(200),input:W(200),ring:bt(500)},dark:{background:W(950),foreground:W(50),card:W(900),cardForeground:W(50),popover:W(900),popoverForeground:W(50),primary:bt(400),primaryForeground:bt(950),secondary:W(800),secondaryForeground:W(200),muted:W(800),mutedForeground:W(400),accent:mo(400),accentForeground:mo(950),border:W(800),input:W(800),ring:bt(400)},superDark:{background:Dr(Jd),foreground:W(100),card:W(950),cardForeground:W(100),popover:W(950),popoverForeground:W(100),primary:bt(300),primaryForeground:bt(950),secondary:W(900),secondaryForeground:W(300),muted:W(900),mutedForeground:W(500),accent:mo(300),accentForeground:mo(950),border:W(900),input:W(900),ring:bt(300)}};function Be(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function jg(e,t){let o=Ug[t],r=t==="superLight"||t==="light",n=r?Bn.light:Bn.dark;return {background:Be(o.background,e),foreground:Be(o.foreground,e),card:Be(o.card,e),cardForeground:Be(o.cardForeground,e),popover:Be(o.popover,e),popoverForeground:Be(o.popoverForeground,e),primary:Be(o.primary,e),primaryForeground:Be(o.primaryForeground,e),secondary:Be(o.secondary,e),secondaryForeground:Be(o.secondaryForeground,e),muted:Be(o.muted,e),mutedForeground:Be(o.mutedForeground,e),accent:Be(o.accent,e),accentForeground:Be(o.accentForeground,e),border:Be(o.border,e),input:Be(o.input,e),ring:Be(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",i=Yo(n.destructive,a),p=Yo(n.success,a),s=Yo(n.warning,a),c=Yo(n.info,a),d=Yo(n.highlight,a);return {destructiveSoft:i.soft,destructiveDeep:i.deep,successSoft:p.soft,successDeep:p.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:d.soft,highlightDeep:d.deep}})()}}var qt={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},$g={compact:.85,default:1,spacious:1.18};function Kg(e){let t=$g[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:Ma[e.body],fontMono:Ma[e.mono],fontDisplay:Ma[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(qt.display),h1:o(qt.h1),h2:o(qt.h2),h3:o(qt.h3),h4:o(qt.h4),h5:o(qt.h5),h6:o(qt.h6),body:o(qt.body),bodySm:o(qt.bodySm)}}}var qg={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Yg(e){let t=qg[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var Zg={tight:.85,default:1,roomy:1.2};function Xg(e){return {baseUnit:"1rem",densityFactor:Zg[e.density]}}var Jg={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 Qg(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:Jg[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Do(e){let t=Gg[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,i=o?Xd():Na({hue:e.hues.neutral,chromaScale:r}),p=Na({hue:e.hues.primary,chromaScale:n}),s=Na({hue:e.hues.accent,chromaScale:a}),c={neutral:i,primary:p,accent:s},d=Wg(e.hues,{primary:n,accent:a},t),m=Object.fromEntries(Vg.map(v=>[v,jg(c,v)])),g=Kg(e.typography),u=Yg(e.radius),b=Xg(e.spacing),f=Qg(e.effects),h={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:d,typography:g,radius:u,spacing:b,effects:f,components:h}}var Ar={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"}},On={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"}},Ea=[Ar,On];function ef(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 Vn(e,t){let o=e.colors[t];return {...ef(o),..._n("neutral",e.ramps.neutral),..._n("primary",e.ramps.primary),..._n("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,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function _n(e,t){let o={};for(let r of po)o[`--ramp-${e}-${r}`]=t[r];return o}function La(e,t){if(typeof document>"u")return;let o=document.documentElement,r=Vn(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function Hr(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 o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,i]=r.slice(0,3).map(Number);return "#"+[n,a,i].map(p=>Math.max(0,Math.min(255,p)).toString(16).padStart(2,"0")).join("").toUpperCase()}function tf(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,i=Hr(e);return {oklch:a,hex:i}}function Gn(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of po){let{oklch:a,hex:i}=tf(t[n]);r.push(`| ${n} | \`${a}\` | \`${i||"\u2014"}\` |`);}return r.join(`
|
|
117
|
+
`)}function Qd(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=Hr(r.light)||"\u2014",a=Hr(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
|
|
118
|
+
`)}function ec(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function tc(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:i,spacing:p,effects:s,components:c}=e,d=t.intensity??"default",m=f=>({token:f,usage:of[f]??"",light:r.light[f],dark:r.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),b=[1,2,3,4,5].map(f=>{let h=n[f];return {slot:f,triplet:h,hex:Hr(h)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
|
|
75
119
|
|
|
76
120
|
> **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.
|
|
77
121
|
|
|
@@ -84,7 +128,7 @@ ${t.description?`- **Description**: ${t.description}
|
|
|
84
128
|
- **Intensity**: \`${d}\` ${d==="muted"?"(quieter chroma across the board)":d==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
|
|
85
129
|
- **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
|
|
86
130
|
- **Spacing density**: \`${t.spacing.density}\`
|
|
87
|
-
- **Radius style**: \`${t.radius.style}\` (base \`${
|
|
131
|
+
- **Radius style**: \`${t.radius.style}\` (base \`${i.base}\`)
|
|
88
132
|
- **Button shape**: \`${c.buttonShape}\` \xB7 **Input style**: \`${c.inputStyle}\` \xB7 **Card style**: \`${c.cardStyle}\`
|
|
89
133
|
- **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
|
|
90
134
|
|
|
@@ -101,30 +145,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
|
|
|
101
145
|
## Full ThemeInput (round-trippable)
|
|
102
146
|
|
|
103
147
|
\`\`\`json
|
|
104
|
-
${
|
|
148
|
+
${ec(e)}
|
|
105
149
|
\`\`\`
|
|
106
150
|
|
|
107
151
|
## Color ramps
|
|
108
152
|
|
|
109
153
|
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.
|
|
110
154
|
|
|
111
|
-
${
|
|
155
|
+
${Gn("Neutral",o.neutral,t.hues.neutral)}
|
|
112
156
|
|
|
113
|
-
${
|
|
157
|
+
${Gn("Primary",o.primary,t.hues.primary)}
|
|
114
158
|
|
|
115
|
-
${
|
|
159
|
+
${Gn("Accent",o.accent,t.hues.accent)}
|
|
116
160
|
|
|
117
161
|
## Semantic tokens (hue-derived)
|
|
118
162
|
|
|
119
163
|
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.
|
|
120
164
|
|
|
121
|
-
${
|
|
165
|
+
${Qd("Core semantic tokens",g)}
|
|
122
166
|
|
|
123
167
|
## Fixed semantic tokens (not hue-derived)
|
|
124
168
|
|
|
125
169
|
Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
|
|
126
170
|
|
|
127
|
-
${
|
|
171
|
+
${Qd("Status colors",u)}
|
|
128
172
|
|
|
129
173
|
## Chart palette
|
|
130
174
|
|
|
@@ -164,18 +208,18 @@ ${b.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
|
|
|
164
208
|
|
|
165
209
|
| Step | Value |
|
|
166
210
|
|------|-------|
|
|
167
|
-
| \`--radius\` (base) | \`${
|
|
168
|
-
| \`--gds-radius-sm\` | \`${
|
|
169
|
-
| \`--gds-radius-md\` | \`${
|
|
170
|
-
| \`--gds-radius-lg\` | \`${
|
|
171
|
-
| \`--gds-radius-xl\` | \`${
|
|
172
|
-
| \`--gds-radius-2xl\` | \`${
|
|
173
|
-
| \`--gds-radius-full\` | \`${
|
|
211
|
+
| \`--radius\` (base) | \`${i.base}\` |
|
|
212
|
+
| \`--gds-radius-sm\` | \`${i.sm}\` |
|
|
213
|
+
| \`--gds-radius-md\` | \`${i.md}\` |
|
|
214
|
+
| \`--gds-radius-lg\` | \`${i.lg}\` |
|
|
215
|
+
| \`--gds-radius-xl\` | \`${i.xl}\` |
|
|
216
|
+
| \`--gds-radius-2xl\` | \`${i["2xl"]}\` |
|
|
217
|
+
| \`--gds-radius-full\` | \`${i.full}\` |
|
|
174
218
|
|
|
175
219
|
### Spacing
|
|
176
220
|
|
|
177
|
-
- **Density factor**: \`${
|
|
178
|
-
- **Base unit**: \`${
|
|
221
|
+
- **Density factor**: \`${p.densityFactor}\` (applied as \`var(--gds-density)\` on components that opt in)
|
|
222
|
+
- **Base unit**: \`${p.baseUnit}\`
|
|
179
223
|
|
|
180
224
|
### Motion
|
|
181
225
|
|
|
@@ -253,7 +297,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
|
|
|
253
297
|
|
|
254
298
|
When generating UI in the ${e.name} theme, match this character:
|
|
255
299
|
|
|
256
|
-
${
|
|
300
|
+
${rf(e)}
|
|
257
301
|
|
|
258
302
|
## Instructions for the generating LLM
|
|
259
303
|
|
|
@@ -272,7 +316,7 @@ To recreate this theme in code:
|
|
|
272
316
|
\`\`\`ts
|
|
273
317
|
import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
|
|
274
318
|
|
|
275
|
-
const input: ThemeInput = ${
|
|
319
|
+
const input: ThemeInput = ${ec(e).replace(/\n/g,`
|
|
276
320
|
`)};
|
|
277
321
|
|
|
278
322
|
const theme = generateTheme(input);
|
|
@@ -281,11 +325,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
281
325
|
|
|
282
326
|
---
|
|
283
327
|
*Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
|
|
284
|
-
`}var
|
|
285
|
-
`)}function
|
|
328
|
+
`}var of={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 rf(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.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."),o.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."):o.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."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=o.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."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
|
|
329
|
+
`)}function Wn(e){if(typeof window>"u"||typeof document>"u")return;let t=tc(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}var Ht=Object.fromEntries(Ea.map(e=>[e.id,Do(e)])),Zo=Ar.id;function Ao(e){if(e in Ht)return Ht[e];let t=jn(e);if(t)return Do(t)}function Un(){return [...Object.values(Ht),...ac()]}var oc="grade-user-themes";function Da(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(oc);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function rc(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(oc,JSON.stringify(e));}catch{}}function ac(){return Object.values(Da()).map(Do)}function jn(e){return Da()[e]}function Aa(e){let t=Da();return t[e.id]=e,rc(t),Do(e)}function $n(e){if(e in Ht)return;let t=Da();delete t[e],rc(t);}function af(e,t,o){let r=Ht[e]?.input??jn(e);if(!r)return;let n={...r,id:t,name:o};return Aa(n),n}var Kn="grade-theme",Ha="grade-mode",ic=["superLight","light","dark","superDark"],nc=new Set(["dark","superDark"]),nf=`
|
|
286
330
|
(function() {
|
|
287
331
|
try {
|
|
288
|
-
var mode = localStorage.getItem('${
|
|
332
|
+
var mode = localStorage.getItem('${Ha}');
|
|
289
333
|
var valid = ['superLight','light','dark','superDark'];
|
|
290
334
|
if (!mode || valid.indexOf(mode) === -1) {
|
|
291
335
|
mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
@@ -294,11 +338,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
294
338
|
document.documentElement.classList.add('dark');
|
|
295
339
|
}
|
|
296
340
|
document.documentElement.setAttribute('data-mode', mode);
|
|
297
|
-
var themeId = localStorage.getItem('${
|
|
341
|
+
var themeId = localStorage.getItem('${Kn}');
|
|
298
342
|
if (themeId) document.documentElement.setAttribute('data-grade-theme', themeId);
|
|
299
343
|
} catch(e) {}
|
|
300
344
|
})();
|
|
301
|
-
`,za=w.createContext(null);function Xp({children:e,defaultTheme:t=bo,defaultMode:o="light"}){let[r,n]=w.useState(t),[a,l]=w.useState(o),[m,s]=w.useState(0);w.useEffect(()=>{try{let f=localStorage.getItem(Fa);f&&Qt(f)&&n(f);let h=localStorage.getItem(Dr);if(h&&Pl.includes(h))l(h);else if(typeof window<"u"){let C=window.matchMedia("(prefers-color-scheme: dark)").matches;l(C?"dark":"light");}}catch{}},[]),w.useEffect(()=>{let f=Qt(r)??Qt(bo);f&&(Er(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",Tl.has(a)));},[r,a,m]),w.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=C=>{try{if(localStorage.getItem(Dr))return}catch{return}l(C.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=w.useCallback(f=>{n(f);try{localStorage.setItem(Fa,f);}catch{}},[]),d=w.useCallback(f=>{l(f);try{localStorage.setItem(Dr,f);}catch{}},[]),p=w.useCallback(f=>{Hr(f),s(h=>h+1),c(f.id);},[c]),g=w.useCallback(f=>{f in gt||(Ia(f),s(h=>h+1),n(h=>h===f?bo:h));},[]),u=w.useCallback(()=>{s(f=>f+1);},[]),b=w.useMemo(()=>{let f=Qt(r)??Qt(bo);return {theme:f,themeId:f.id,mode:a,isDark:Tl.has(a),setThemeId:c,setMode:d,themes:Da(),saveAndActivate:p,deleteTheme:g,refresh:u}},[r,a,m,c,d,p,g,u]);return w.createElement(za.Provider,{value:b},e)}function Ba(){let e=w.useContext(za);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function eo(){return w.useContext(za)}var Va=w.createContext(null);function Ml(){return w.useContext(Va)}var lm={maplibre:()=>Promise.resolve().then(()=>(Al(),Dl)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(Bl(),zl)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Gl(),Ol)).then(e=>e.createGoogleAdapter)},dm=500,Oa=w.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:l="auto",interactive:m=true,hoveredId:s,onHoveredIdChange:c,onLoad:d,onError:p,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",C=f.styleUrl,S=f.tilerKey,x=f.accessToken,k=f.apiKey,P=f.mapId,V=w.useRef(null),N=w.useRef(null),F=w.useRef(new globalThis.Map),G=w.useRef(null),[he,re]=w.useState(false),K=w.useRef(c),O=w.useRef(p),te=w.useRef(d);w.useEffect(()=>{K.current=c,O.current=p,te.current=d;});let se=eo()?.isDark??false,v=l==="auto"?se?"dark":"light":l;w.useEffect(()=>{let H=false,X=V.current;if(!X)return;let Pe=l==="auto"?se?"dark":"light":l;return (async()=>{try{let le=await lm[h]();if(H)return;let de=await le(X,{center:r,zoom:n,bounds:a,appearance:Pe,interactive:m,styleUrl:C,tilerKey:S,accessToken:x,apiKey:k,mapId:P},{onLoad:()=>{},onError:J=>O.current?.(J),onMarkerHover:J=>K.current?.(J),onMarkerClick:()=>{}});if(H){de.destroy();return}N.current=de,re(!0),te.current?.(_l(N,F));}catch(le){if(H)return;le?.code||O.current?.({code:"provider-init-failed",message:le?.message??"Map init failed",cause:le});}})(),()=>{H=true,N.current?.destroy(),N.current=null,re(false),F.current.clear(),G.current=null;}},[h,C,x,k,P,S]),w.useEffect(()=>{N.current?.setAppearance(v);},[v]),w.useEffect(()=>{N.current?.setInteractive(m);},[m]),w.useEffect(()=>{N.current&&(a?N.current.setBounds(a[0],a[1]):(N.current.setCenter(r),N.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),w.useEffect(()=>{let H=G.current;H&&H!==s&&F.current.get(H)?.setHovered(false),s&&F.current.get(s)?.setHovered(true),G.current=s??null;},[s]),w.useImperativeHandle(o,()=>_l(N,F),[]);let z=w.useMemo(()=>({registerMarker:(H,X,Pe)=>{let le=N.current;if(!le)return null;let de=le.addMarker(H,X,Pe);F.current.set(H,de),process.env.NODE_ENV!=="production"&&F.current.size===dm+1&&console.warn(`@gradeui/ui Map: rendering ${F.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let J=de.remove;return de.remove=()=>{J(),F.current.delete(H),G.current===H&&(G.current=null);},s===H&&de.setHovered(true),de}}),[he]);return w.createElement("div",{ref:V,"data-gds-part":"map",className:i("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},w.createElement(Va.Provider,{value:z},b))});Oa.displayName="Map";function _l(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let l;if(typeof r=="string"){if(l=t.current.get(r)?.coords??null,!l){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else l=r;a.flyTo(l,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),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 Ga=w.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:l}){let m=Ml(),[s,c]=w.useState(null),d=w.useRef(null),p=w.useRef(l);return w.useEffect(()=>{p.current=l;}),w.useEffect(()=>{if(!m)return;let g=m.registerMarker(t,o,r);if(g){d.current=g,c(g.element);let u=b=>{p.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),d.current=null,c(null);}}},[m,t]),w.useEffect(()=>{d.current?.setPosition(o);},[o[0],o[1]]),s?createPortal(w.createElement("div",{"data-gds-part":"map-marker-content",className:i("pointer-events-auto",n)},a),s):null});Ga.displayName="MapMarker";var km={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Tm={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)"},Pm={album:Disc3,"tv-show":Tv,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Mm={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function Nm(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function Em(e){return e<64?"sm":e>=160?"lg":"md"}var ft=w.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:l,emptyState:m="auto",hint:s="generic",alt:c,source:d,src:p,glyph:g,overlay:u,instanceId:b,style:f,children:h,...C},S)=>{let x=w.useRef(null);w.useImperativeHandle(S,()=>x.current);let k=s,P=t,V=o,N=r,F=n,G=c,he=p,re=m,K=P??Mm[k];w.useEffect(()=>{if(!a||!x.current)return;let J=x.current,nt=new IntersectionObserver(([it])=>a(it.isIntersecting),{threshold:.05});return nt.observe(J),()=>nt.disconnect()},[a]);let O=!h&&re!=="none",[te,He]=w.useState("md");w.useEffect(()=>{if(!O)return;let J=x.current;if(!J)return;let nt=new ResizeObserver(([it])=>{let Ge=it.contentRect.width;He(Em(Ge));});return nt.observe(J),()=>nt.disconnect()},[O]);let se=w.useMemo(()=>Nm(G),[G]),v=Pm[k]??Image,z=re==="auto"||re==="icon",H=he,X=w.useMemo(()=>d?JSON.stringify(d):void 0,[d]),[Pe,le]=w.useState(false);w.useEffect(()=>{le(false);},[H]);let de=Pe?void 0:H;return w.createElement("div",{ref:x,"data-gds-part":"media-surface","data-media-hint":k,"data-media-source-kind":d?.kind,"data-media-source":X,"data-media-alt":G,"data-gds-instance-id":b,className:i("gds-media-surface relative w-full overflow-hidden",km[K],N&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Tm[V]})`,...f},...C},O&&w.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":te,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},z?te==="sm"?se?w.createElement("span",{className:"font-semibold text-sm tracking-tight"},se):w.createElement(v,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):te==="md"?w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),G&&w.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},G)):re),(de||h)&&w.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},de&&w.createElement("img",{src:de,alt:G??"",onError:()=>le(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),F&&w.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},l),u&&w.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});ft.displayName="MediaSurface";function to(){let[e,t]=w.useState(false);return w.useEffect(()=>{let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Ul=w.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:l="video",radius:m="lg",border:s=false,poster:c,label:d,className:p,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=w.useRef(null),C=to(),[S,x]=w.useState(!!c);w.useImperativeHandle(f,()=>h.current);let k=n??o,P=o&&!C;w.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),w.useEffect(()=>{x(!!c);},[c]);let V=w.useCallback(N=>{!a||!h.current||(N&&P?h.current.play().catch(()=>{}):h.current.pause());},[a,P]);return w.createElement(ft,{aspect:l,radius:m,border:s,"aria-label":d,className:p,style:g,onVisibilityChange:a?V:void 0},w.createElement("video",{ref:h,src:e,controls:t,autoPlay:P,loop:r,muted:k,playsInline:true,preload:P?"auto":"metadata",onPlaying:()=>x(false),className:i("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&S&&w.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:i("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});Ul.displayName="VideoPlayer";var $l=w.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:l="lg",border:m=false,poster:s,label:c,className:d,style:p,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let C=to(),[S,x]=w.useState(null),[k,P]=w.useState(null);return w.useEffect(()=>{let V=false;return import('@rive-app/react-canvas').then(N=>{V||x(N);}).catch(()=>{V||P("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{V=true;}},[]),w.createElement(ft,{ref:h,aspect:a,radius:l,border:m,"aria-label":c,className:d,style:p},k?w.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},k):S&&e?w.createElement(Dm,{Mod:S,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!C,loop:r,pauseOffscreen:n,controls:t,poster:s}):s&&w.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});$l.displayName="RivePlayer";function Dm({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:l,pauseOffscreen:m,controls:s,poster:c}){let{useRive:d,Layout:p,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:C}=d({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new p({fit:f[n],alignment:u.Center})}),[S,x]=w.useState(a);w.useEffect(()=>{if(!h||!l)return;let P=()=>{h.play();};return h.on(b.Stop,P),()=>{h.off(b.Stop,P);}},[h,l,b]),w.useEffect(()=>{if(!m||!h)return;let P=h.canvas;if(!P)return;let V=new IntersectionObserver(([N])=>{N.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return V.observe(P),()=>V.disconnect()},[h,m,a]);let k=()=>{h&&(S?(h.pause(),x(false)):(h.play(),x(true)));};return w.createElement(w.Fragment,null,w.createElement(C,{className:"w-full h-full"}),!h&&c&&w.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&w.createElement("div",{className:i("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")},w.createElement(Ne,{size:"icon",variant:"secondary",onClick:k},S?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))}var Kl=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let l=new EffectComposer(e);l.setSize(n,a),l.addPass(new RenderPass(t,o));let m=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let d=new VignetteEffect({darkness:0,offset:.5}),p=new ChromaticAberrationEffect({offset:new oe.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new oe.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,l.addPass(new EffectPass(o,m)),l.addPass(new EffectPass(o,s,c,d)),l.addPass(new EffectPass(o,p)),l.addPass(new EffectPass(o,g));function u(b){let f=b.effects;m.intensity=f.bloom?.intensity??0,m.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,d.darkness=f.vignette?.darkness??0,d.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;p.offset?.set(h,h),f.glitch?(g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=f.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return u(r),{composer:l,setPreset:u,resize:(b,f)=>l.setSize(b,f),dispose:()=>{l.dispose();}}};var vo=3e3,Wa=400,Wm=80,ql=({width:e,height:t,palette:o})=>{let r=new oe.Scene;r.background=new oe.Color(o.background);let n=new oe.PerspectiveCamera(70,e/t,.1,Wa*2);n.position.z=0;let a=new Float32Array(vo*6),l=new Float32Array(vo*6),m=new Float32Array(vo),s=new oe.Color(o.primary),c=new oe.Color(o.accent);function d(h,C){let S=Math.random()*Math.PI*2,x=Wm*Math.pow(Math.random(),.6),k=Math.cos(S)*x,P=Math.sin(S)*x,V=C?-Math.random()*Wa:-Wa;m[h]=V,a[h*6+0]=k,a[h*6+1]=P,a[h*6+2]=V,a[h*6+3]=k,a[h*6+4]=P,a[h*6+5]=V-2,l[h*6+0]=s.r,l[h*6+1]=s.g,l[h*6+2]=s.b,l[h*6+3]=c.r,l[h*6+4]=c.g,l[h*6+5]=c.b;}for(let h=0;h<vo;h++)d(h,true);let p=new oe.BufferGeometry;p.setAttribute("position",new oe.BufferAttribute(a,3)),p.setAttribute("color",new oe.BufferAttribute(l,3));let g=new oe.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:oe.AdditiveBlending}),u=new oe.LineSegments(p,g);r.add(u);let b=60,f=6;return {scene:r,camera:n,update:(h,C)=>{let S=p.attributes.position.array;for(let x=0;x<vo;x++){let k=x*6;S[k+2]+=b*C,S[k+5]=S[k+2]-f,S[k+2]>5&&d(x,false);}p.attributes.position.needsUpdate=true;},resize:(h,C)=>{let S=n;S.aspect=h/C,S.updateProjectionMatrix();},setPalette:h=>{r.background=new oe.Color(h.background);let C=new oe.Color(h.primary),S=new oe.Color(h.accent),x=p.attributes.color.array;for(let k=0;k<vo;k++)x[k*6+0]=C.r,x[k*6+1]=C.g,x[k*6+2]=C.b,x[k*6+3]=S.r,x[k*6+4]=S.g,x[k*6+5]=S.b;p.attributes.color.needsUpdate=true;},dispose:()=>{p.dispose(),g.dispose();}}};var Um=`
|
|
345
|
+
`,qn=S.createContext(null);function sf({children:e,defaultTheme:t=Zo,defaultMode:o="light"}){let[r,n]=S.useState(t),[a,i]=S.useState(o),[p,s]=S.useState(0);S.useEffect(()=>{try{let f=localStorage.getItem(Kn);f&&Ao(f)&&n(f);let h=localStorage.getItem(Ha);if(h&&ic.includes(h))i(h);else if(typeof window<"u"){let v=window.matchMedia("(prefers-color-scheme: dark)").matches;i(v?"dark":"light");}}catch{}},[]),S.useEffect(()=>{let f=Ao(r)??Ao(Zo);f&&(La(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",nc.has(a)));},[r,a,p]),S.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=v=>{try{if(localStorage.getItem(Ha))return}catch{return}i(v.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=S.useCallback(f=>{n(f);try{localStorage.setItem(Kn,f);}catch{}},[]),d=S.useCallback(f=>{i(f);try{localStorage.setItem(Ha,f);}catch{}},[]),m=S.useCallback(f=>{Aa(f),s(h=>h+1),c(f.id);},[c]),g=S.useCallback(f=>{f in Ht||($n(f),s(h=>h+1),n(h=>h===f?Zo:h));},[]),u=S.useCallback(()=>{s(f=>f+1);},[]),b=S.useMemo(()=>{let f=Ao(r)??Ao(Zo);return {theme:f,themeId:f.id,mode:a,isDark:nc.has(a),setThemeId:c,setMode:d,themes:Un(),saveAndActivate:m,deleteTheme:g,refresh:u}},[r,a,p,c,d,m,g,u]);return S.createElement(qn.Provider,{value:b},e)}function Yn(){let e=S.useContext(qn);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Ho(){return S.useContext(qn)}var Zn=S.createContext(null);function sc(){return S.useContext(Zn)}var vf={maplibre:()=>Promise.resolve().then(()=>(uc(),mc)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(bc(),hc)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(xc(),yc)).then(e=>e.createGoogleAdapter)},yf=500,Xn=S.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:i="auto",interactive:p=true,hoveredId:s,onHoveredIdChange:c,onLoad:d,onError:m,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",v=f.styleUrl,w=f.tilerKey,y=f.accessToken,C=f.apiKey,T=f.mapId,I=S.useRef(null),E=S.useRef(null),L=S.useRef(new globalThis.Map),Y=S.useRef(null),[F,Z]=S.useState(false),A=S.useRef(c),H=S.useRef(m),ne=S.useRef(d);S.useEffect(()=>{A.current=c,H.current=m,ne.current=d;});let q=Ho()?.isDark??false,x=i==="auto"?q?"dark":"light":i;S.useEffect(()=>{let $=false,B=I.current;if(!B)return;let ve=i==="auto"?q?"dark":"light":i;return (async()=>{try{let re=await vf[h]();if($)return;let Q=await re(B,{center:r,zoom:n,bounds:a,appearance:ve,interactive:p,styleUrl:v,tilerKey:w,accessToken:y,apiKey:C,mapId:T},{onLoad:()=>{},onError:ye=>H.current?.(ye),onMarkerHover:ye=>A.current?.(ye),onMarkerClick:()=>{}});if($){Q.destroy();return}E.current=Q,Z(!0),ne.current?.(wc(E,L));}catch(re){if($)return;re?.code||H.current?.({code:"provider-init-failed",message:re?.message??"Map init failed",cause:re});}})(),()=>{$=true,E.current?.destroy(),E.current=null,Z(false),L.current.clear(),Y.current=null;}},[h,v,y,C,T,w]),S.useEffect(()=>{E.current?.setAppearance(x);},[x]),S.useEffect(()=>{E.current?.setInteractive(p);},[p]),S.useEffect(()=>{E.current&&(a?E.current.setBounds(a[0],a[1]):(E.current.setCenter(r),E.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),S.useEffect(()=>{let $=Y.current;$&&$!==s&&L.current.get($)?.setHovered(false),s&&L.current.get(s)?.setHovered(true),Y.current=s??null;},[s]),S.useImperativeHandle(o,()=>wc(E,L),[]);let M=S.useMemo(()=>({registerMarker:($,B,ve)=>{let re=E.current;if(!re)return null;let Q=re.addMarker($,B,ve);L.current.set($,Q),process.env.NODE_ENV!=="production"&&L.current.size===yf+1&&console.warn(`@gradeui/ui Map: rendering ${L.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let ye=Q.remove;return Q.remove=()=>{ye(),L.current.delete($),Y.current===$&&(Y.current=null);},s===$&&Q.setHovered(true),Q}}),[F]);return S.createElement("div",{ref:I,"data-gds-part":"map",className:l("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},S.createElement(Zn.Provider,{value:M},b))});Xn.displayName="Map";function wc(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let i;if(typeof r=="string"){if(i=t.current.get(r)?.coords??null,!i){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else i=r;a.flyTo(i,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),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 Jn=S.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:i}){let p=sc(),[s,c]=S.useState(null),d=S.useRef(null),m=S.useRef(i);return S.useEffect(()=>{m.current=i;}),S.useEffect(()=>{if(!p)return;let g=p.registerMarker(t,o,r);if(g){d.current=g,c(g.element);let u=b=>{m.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),d.current=null,c(null);}}},[p,t]),S.useEffect(()=>{d.current?.setPosition(o);},[o[0],o[1]]),s?createPortal(S.createElement("div",{"data-gds-part":"map-marker-content",className:l("pointer-events-auto",n)},a),s):null});Jn.displayName="MapMarker";var If={video:"aspect-video",standard:"aspect-[4/3]",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Ff={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)"},zf={album:Disc3,"tv-show":Tv,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Bf={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function Of(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function _f(e){return e<64?"sm":e>=160?"lg":"md"}var It=S.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:i,emptyState:p="auto",hint:s="generic",alt:c,source:d,src:m,glyph:g,overlay:u,instanceId:b,style:f,children:h,...v},w)=>{let y=S.useRef(null);S.useImperativeHandle(w,()=>y.current);let C=s,T=t,I=o,E=r,L=n,Y=c,F=m,Z=p,A=T??Bf[C];S.useEffect(()=>{if(!a||!y.current)return;let ye=y.current,He=new IntersectionObserver(([D])=>a(D.isIntersecting),{threshold:.05});return He.observe(ye),()=>He.disconnect()},[a]);let H=!h&&Z!=="none",[ne,j]=S.useState("md");S.useEffect(()=>{if(!H)return;let ye=y.current;if(!ye)return;let He=new ResizeObserver(([D])=>{let se=D.contentRect.width;j(_f(se));});return He.observe(ye),()=>He.disconnect()},[H]);let q=S.useMemo(()=>Of(Y),[Y]),x=zf[C]??Image,M=Z==="auto"||Z==="icon",$=F,B=S.useMemo(()=>d?JSON.stringify(d):void 0,[d]),[ve,re]=S.useState(false);S.useEffect(()=>{re(false);},[$]);let Q=ve?void 0:$;return S.createElement("div",{ref:y,"data-gds-part":"media-surface","data-media-hint":C,"data-media-source-kind":d?.kind,"data-media-source":B,"data-media-alt":Y,"data-gds-instance-id":b,className:l("gds-media-surface relative w-full overflow-hidden",If[A],E&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Ff[I]})`,...f},...v},H&&S.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":ne,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},M?ne==="sm"?q?S.createElement("span",{className:"font-semibold text-sm tracking-tight"},q):S.createElement(x,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):ne==="md"?S.createElement(S.Fragment,null,g??S.createElement(x,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):S.createElement(S.Fragment,null,g??S.createElement(x,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),Y&&S.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},Y)):Z),(Q||h)&&S.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},Q&&S.createElement("img",{src:Q,alt:Y??"",onError:()=>re(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),L&&S.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},i),u&&S.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});It.displayName="MediaSurface";var Sc=S.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:i="video",radius:p="lg",border:s=false,poster:c,label:d,className:m,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=S.useRef(null),v=ro(),[w,y]=S.useState(!!c);S.useImperativeHandle(f,()=>h.current);let C=n??o,T=o&&!v;S.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),S.useEffect(()=>{y(!!c);},[c]);let I=S.useCallback(E=>{!a||!h.current||(E&&T?h.current.play().catch(()=>{}):h.current.pause());},[a,T]);return S.createElement(It,{aspect:i,radius:p,border:s,"aria-label":d,className:m,style:g,onVisibilityChange:a?I:void 0},S.createElement("video",{ref:h,src:e,controls:t,autoPlay:T,loop:r,muted:C,playsInline:true,preload:T?"auto":"metadata",onPlaying:()=>y(false),className:l("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&w&&S.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:l("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});Sc.displayName="VideoPlayer";var Cc=S.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:i="lg",border:p=false,poster:s,label:c,className:d,style:m,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let v=ro(),[w,y]=S.useState(null),[C,T]=S.useState(null);return S.useEffect(()=>{let I=false;return import('@rive-app/react-canvas').then(E=>{I||y(E);}).catch(()=>{I||T("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{I=true;}},[]),S.createElement(It,{ref:h,aspect:a,radius:i,border:p,"aria-label":c,className:d,style:m},C?S.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},C):w&&e?S.createElement(Wf,{Mod:w,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!v,loop:r,pauseOffscreen:n,controls:t,poster:s}):s&&S.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});Cc.displayName="RivePlayer";function Wf({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:i,pauseOffscreen:p,controls:s,poster:c}){let{useRive:d,Layout:m,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:v}=d({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new m({fit:f[n],alignment:u.Center})}),[w,y]=S.useState(a);S.useEffect(()=>{if(!h||!i)return;let T=()=>{h.play();};return h.on(b.Stop,T),()=>{h.off(b.Stop,T);}},[h,i,b]),S.useEffect(()=>{if(!p||!h)return;let T=h.canvas;if(!T)return;let I=new IntersectionObserver(([E])=>{E.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return I.observe(T),()=>I.disconnect()},[h,p,a]);let C=()=>{h&&(w?(h.pause(),y(false)):(h.play(),y(true)));};return S.createElement(S.Fragment,null,S.createElement(v,{className:"w-full h-full"}),!h&&c&&S.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&S.createElement("div",{className:l("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")},S.createElement(Je,{size:"icon",variant:"secondary",onClick:C},w?S.createElement(Pause,{className:"h-4 w-4"}):S.createElement(Play,{className:"h-4 w-4"}))))}var Uf={sm:20,md:28,lg:40,xl:56},jf={horizontal:["horizontal","square","icon"],square:["square","icon","horizontal"],icon:["icon","square","horizontal"]};function $f(e,t,o,r){for(let n of jf[t]){let a=e[n];if(!a)continue;let i=o==="dark"?a.dark??a.light:a.light??a.dark,p=r?a.mono??i:i??a.mono;if(p!=null)return p}return null}var Kf=S.forwardRef(function({sources:t,lockup:o="horizontal",mode:r="light",mono:n=false,size:a="md",label:i,decorative:p=false,href:s,className:c,style:d,...m},g){let u=typeof a=="number"?a:Uf[a],b=$f(t,o,r,n),f=p?{"aria-hidden":true}:i?s?{}:{role:"img","aria-label":i}:{},h=b??S.createElement(qf,{label:i,mono:n}),v=S.createElement("span",{className:l("gds-logo inline-flex shrink-0 select-none items-center","[&_img]:h-full [&_img]:w-auto [&_svg]:h-full [&_svg]:w-auto",c),style:{height:u,...d},"data-gds-part":"logo","data-gds-lockup":o,"data-gds-mode":r,...s?{}:f,...s?{}:m},h);return s?S.createElement("a",{ref:g,href:s,"aria-label":p?void 0:i,className:"inline-flex",...p?{"aria-hidden":true}:{},...m},v):S.cloneElement(v,{ref:g})});function qf({label:e,mono:t}){return S.createElement("span",{className:l("inline-flex h-full items-center gap-1.5 rounded-md border border-dashed px-2 text-xs font-medium",t?"border-current/40 text-current":"border-border bg-muted text-muted-foreground")},S.createElement("span",{"aria-hidden":true,className:"inline-block h-3.5 w-3.5 rounded-[3px] bg-current opacity-60"}),e??"Logo")}var Tc=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let i=new EffectComposer(e);i.setSize(n,a),i.addPass(new RenderPass(t,o));let p=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let d=new VignetteEffect({darkness:0,offset:.5}),m=new ChromaticAberrationEffect({offset:new we.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new we.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,g.mode=GlitchMode.DISABLED,g.blendMode.opacity.value=0,i.addPass(new EffectPass(o,p)),i.addPass(new EffectPass(o,s,c,d)),i.addPass(new EffectPass(o,m)),i.addPass(new EffectPass(o,g));function u(b){let f=b.effects;p.intensity=f.bloom?.intensity??0,p.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(p.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,d.darkness=f.vignette?.darkness??0,d.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;m.offset?.set(h,h);let v=f.glitch?.strength?.[1]??0;f.glitch&&v>0?(g.mode=GlitchMode.SPORADIC,g.blendMode.opacity.value=1,g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=v):(g.mode=GlitchMode.DISABLED,g.blendMode.opacity.value=0,g.minStrength=0,g.maxStrength=0);}return u(r),{composer:i,setPreset:u,resize:(b,f)=>i.setSize(b,f),dispose:()=>{i.dispose();}}};var Xo=3e3,ti=400,ah=80,Pc=({width:e,height:t,palette:o})=>{let r=new we.Scene;r.background=new we.Color(o.background);let n=new we.PerspectiveCamera(70,e/t,.1,ti*2);n.position.z=0;let a=new Float32Array(Xo*6),i=new Float32Array(Xo*6),p=new Float32Array(Xo),s=new we.Color(o.primary),c=new we.Color(o.accent);function d(h,v){let w=Math.random()*Math.PI*2,y=ah*Math.pow(Math.random(),.6),C=Math.cos(w)*y,T=Math.sin(w)*y,I=v?-Math.random()*ti:-ti;p[h]=I,a[h*6+0]=C,a[h*6+1]=T,a[h*6+2]=I,a[h*6+3]=C,a[h*6+4]=T,a[h*6+5]=I-2,i[h*6+0]=s.r,i[h*6+1]=s.g,i[h*6+2]=s.b,i[h*6+3]=c.r,i[h*6+4]=c.g,i[h*6+5]=c.b;}for(let h=0;h<Xo;h++)d(h,true);let m=new we.BufferGeometry;m.setAttribute("position",new we.BufferAttribute(a,3)),m.setAttribute("color",new we.BufferAttribute(i,3));let g=new we.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:we.AdditiveBlending}),u=new we.LineSegments(m,g);r.add(u);let b=60,f=6;return {scene:r,camera:n,update:(h,v)=>{let w=m.attributes.position.array;for(let y=0;y<Xo;y++){let C=y*6;w[C+2]+=b*v,w[C+5]=w[C+2]-f,w[C+2]>5&&d(y,false);}m.attributes.position.needsUpdate=true;},resize:(h,v)=>{let w=n;w.aspect=h/v,w.updateProjectionMatrix();},setPalette:h=>{r.background=new we.Color(h.background);let v=new we.Color(h.primary),w=new we.Color(h.accent),y=m.attributes.color.array;for(let C=0;C<Xo;C++)y[C*6+0]=v.r,y[C*6+1]=v.g,y[C*6+2]=v.b,y[C*6+3]=w.r,y[C*6+4]=w.g,y[C*6+5]=w.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),g.dispose();}}};var nh=`
|
|
302
346
|
precision highp float;
|
|
303
347
|
varying vec2 vUv;
|
|
304
348
|
uniform float uTime;
|
|
@@ -336,19 +380,19 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
336
380
|
|
|
337
381
|
gl_FragColor = vec4(col, 1.0);
|
|
338
382
|
}
|
|
339
|
-
|
|
383
|
+
`,ih=`
|
|
340
384
|
varying vec2 vUv;
|
|
341
385
|
void main() {
|
|
342
386
|
vUv = uv;
|
|
343
387
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
344
388
|
}
|
|
345
|
-
`,
|
|
389
|
+
`,Nc=({width:e,height:t,palette:o})=>{let r=new we.Scene,n=new we.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new we.Vector2(e,t)},uBackground:{value:new we.Color(o.background)},uPrimary:{value:new we.Color(o.primary)},uSecondary:{value:new we.Color(o.secondary)},uAccent:{value:new we.Color(o.accent)}},i=new we.ShaderMaterial({uniforms:a,vertexShader:ih,fragmentShader:nh,depthTest:false,depthWrite:false}),p=new we.PlaneGeometry(2,2),s=new we.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var sh=`
|
|
346
390
|
varying vec2 vUv;
|
|
347
391
|
void main() {
|
|
348
392
|
vUv = uv;
|
|
349
393
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
350
394
|
}
|
|
351
|
-
`,
|
|
395
|
+
`,lh=`
|
|
352
396
|
precision highp float;
|
|
353
397
|
varying vec2 vUv;
|
|
354
398
|
uniform float uTime;
|
|
@@ -405,13 +449,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
405
449
|
|
|
406
450
|
gl_FragColor = vec4(col, 1.0);
|
|
407
451
|
}
|
|
408
|
-
`,
|
|
452
|
+
`,Mc=({width:e,height:t,palette:o})=>{let r=new we.Scene,n=new we.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new we.Vector2(e,t)},uBackground:{value:new we.Color(o.background)},uPrimary:{value:new we.Color(o.primary)},uSecondary:{value:new we.Color(o.secondary)},uAccent:{value:new we.Color(o.accent)}},i=new we.ShaderMaterial({uniforms:a,vertexShader:sh,fragmentShader:lh,depthTest:false,depthWrite:false}),p=new we.PlaneGeometry(2,2),s=new we.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var dh=`
|
|
409
453
|
varying vec2 vUv;
|
|
410
454
|
void main() {
|
|
411
455
|
vUv = uv;
|
|
412
456
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
413
457
|
}
|
|
414
|
-
`,
|
|
458
|
+
`,ch=`
|
|
415
459
|
precision highp float;
|
|
416
460
|
varying vec2 vUv;
|
|
417
461
|
uniform float uTime;
|
|
@@ -481,7 +525,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
481
525
|
|
|
482
526
|
gl_FragColor = vec4(col, 1.0);
|
|
483
527
|
}
|
|
484
|
-
`,
|
|
528
|
+
`,Ec=({palette:e})=>{let t=new we.Scene,o=new we.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new we.Color(e.background)},uPrimary:{value:new we.Color(e.primary)},uSecondary:{value:new we.Color(e.secondary)},uAccent:{value:new we.Color(e.accent)}},n=new we.ShaderMaterial({uniforms:r,vertexShader:dh,fragmentShader:ch,depthTest:false,depthWrite:false}),a=new we.PlaneGeometry(2,2),i=new we.Mesh(a,n);return t.add(i),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),n.dispose();}}};var Lc=`
|
|
485
529
|
precision highp float;
|
|
486
530
|
varying vec2 vUv;
|
|
487
531
|
uniform float uTime;
|
|
@@ -491,13 +535,44 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
|
|
|
491
535
|
uniform vec3 uSecondary;
|
|
492
536
|
uniform vec3 uAccent;
|
|
493
537
|
uniform vec3 uBackground;
|
|
494
|
-
`,
|
|
538
|
+
`,ph=`
|
|
495
539
|
varying vec2 vUv;
|
|
496
540
|
void main() {
|
|
497
541
|
vUv = uv;
|
|
498
542
|
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
499
543
|
}
|
|
500
|
-
`,
|
|
501
|
-
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function
|
|
502
|
-
${e}`;Xm(t,a);let l=new oe.Scene,m=new oe.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new oe.Vector2(o,r)},uMouse:{value:new oe.Vector2(.5,.5)},uPrimary:{value:new oe.Color(n.primary)},uSecondary:{value:new oe.Color(n.secondary)},uAccent:{value:new oe.Color(n.accent)},uBackground:{value:new oe.Color(n.background)}},c=new oe.ShaderMaterial({uniforms:s,vertexShader:Zm,fragmentShader:a,depthTest:false,depthWrite:false}),d=new oe.PlaneGeometry(2,2),p=new oe.Mesh(d,c);return l.add(p),{scene:l,camera:m,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{d.dispose(),c.dispose();}}}}var Qo={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},eu=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,tu=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,ou=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Br(e,t,o){if(typeof document>"u")return o;let r=e,n=ou.exec(e);if(n){let m=getComputedStyle(t).getPropertyValue(n[1]).trim();m&&(eu.test(m)?r=`oklch(${m})`:tu.test(m)&&(r=`hsl(${m})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let l=getComputedStyle(a).color;if(t.removeChild(a),!l)return o;if(l.startsWith("rgb"))return l;try{let m=document.createElement("canvas");m.width=1,m.height=1;let s=m.getContext("2d");if(!s)return l;s.clearRect(0,0,1,1),s.fillStyle=l,s.fillRect(0,0,1,1);let[c,d,p]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${d}, ${p})`}catch{return l}}function Ql(e,t){return {primary:Br(e.primary,t,Qo.primary),secondary:Br(e.secondary,t,Qo.secondary),accent:Br(e.accent,t,Qo.accent),background:Br(e.background,t,Qo.background)}}var Vr=w.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,createScene:a,controls:l=false,autoPlay:m=true,pauseOffscreen:s=true,aspect:c="video",radius:d="lg",border:p=false,poster:g,label:u,className:b,style:f,maxDpr:h},C)=>{let S=w.useRef(null),[x,k]=w.useState(m),[P,V]=w.useState(false),N=to(),F=w.useMemo(()=>({...Qo,...n}),[n]),G=w.useMemo(()=>a||(t?Ua(t):e&&Yo[e]?Yo[e]:null),[a,t,e]),he=w.useMemo(()=>{if(r)return r;if(e){let O=Xo[e];if(O?.defaultPostPreset)return O.defaultPostPreset}return zr},[r,e]);w.useEffect(()=>{let O=S.current;if(!O||!G)return;let te=O.clientWidth||1,He=O.clientHeight||1,se=Ql(F,O),v=new oe.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),z=h??Math.min(window.devicePixelRatio||1,2);v.setPixelRatio(z),v.setSize(te,He),v.setClearColor(new oe.Color(se.background),1),v.domElement.dataset.gdsPart="shader-canvas",v.domElement.style.width="100%",v.domElement.style.height="100%",v.domElement.style.display="block",O.appendChild(v.domElement);let H;try{H=G({renderer:v,width:te,height:He,palette:se});}catch(q){if(q instanceof yo)o?.(q),H=Yo.space({renderer:v,width:te,height:He,palette:se});else throw v.dispose(),v.domElement.parentElement===O&&O.removeChild(v.domElement),q}let X=Jo[he]??Jo[zr],Pe=Kl({renderer:v,scene:H.scene,camera:H.camera,preset:X,width:te,height:He}),le=new oe.Clock,de=0,J=m&&!N,nt=true,it=()=>{if(de=requestAnimationFrame(it),!J||s&&!nt)return;let q=le.getDelta(),Q=le.getElapsedTime();H.update?.(Q,q),Pe.composer.render(q);};it(),J&&V(true);let Ge=new ResizeObserver(([q])=>{let Q=Math.max(1,Math.floor(q.contentRect.width)),Me=Math.max(1,Math.floor(q.contentRect.height));v.setSize(Q,Me),Pe.resize(Q,Me),H.resize?.(Q,Me);});Ge.observe(O);let Ot=new IntersectionObserver(([q])=>{nt=q.isIntersecting;},{threshold:.05});Ot.observe(O);let er=new MutationObserver(()=>{if(!S.current)return;let q=Ql(F,S.current);v.setClearColor(new oe.Color(q.background),1),H.setPalette?.(q);});er.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let tr=H,Gt=tr.setMouse?q=>{let Q=O.getBoundingClientRect(),Me=(q.clientX-Q.left)/Q.width,Ze=1-(q.clientY-Q.top)/Q.height;tr.setMouse(Me,Ze);}:null;return Gt&&O.addEventListener("pointermove",Gt),re.current={toggle:()=>{J=!J,k(J);},setPalette:q=>{v.setClearColor(new oe.Color(q.background),1),H.setPalette?.(q);},setPostPreset:q=>{let Q=Jo[q];Q&&Pe.setPreset(Q);}},()=>{cancelAnimationFrame(de),Ge.disconnect(),Ot.disconnect(),er.disconnect(),Gt&&O.removeEventListener("pointermove",Gt),Pe.dispose(),H.dispose?.(),v.dispose(),v.domElement.parentElement===O&&O.removeChild(v.domElement),re.current=null;}},[G,he,F,m,N,s,h,o]);let re=w.useRef(null),K=()=>re.current?.toggle();return w.createElement(ft,{ref:O=>{S.current=O,typeof C=="function"?C(O):C&&(C.current=O);},aspect:c,radius:d,border:p,"aria-label":u,className:b,style:f,"data-gds-part":"three-scene"},!P&&g&&w.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),l&&w.createElement("div",{"data-gds-part":"scene-controls",className:i("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")},w.createElement(Ne,{size:"icon",variant:"secondary",onClick:K},x?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))});Vr.displayName="ThreeScene";var Or=w.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:l="lg",label:m,hideLabel:s=false,onClick:c},d)=>{let p=Xo[e],[g,u]=w.useState(false),b=t==="always"||t==="hover"&&g;return w.createElement("div",{ref:d,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:i("group cursor-pointer flex flex-col gap-2",n)},b?w.createElement(Vr,{preset:e,postPreset:o,palette:r,aspect:a,radius:l,autoPlay:true,controls:false,pauseOffscreen:true,poster:p?.poster,maxDpr:1}):w.createElement(ft,{aspect:a,radius:l,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},p?.poster?w.createElement("img",{src:p.poster,alt:p.label,className:"w-full h-full object-cover"}):w.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},p?.label??e)),!s&&w.createElement("div",{className:"flex items-baseline justify-between text-xs"},w.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??p?.label??e),p?.tags?.[0]&&w.createElement("span",{className:"text-muted-foreground"},p.tags[0])))});Or.displayName="ShaderPresetPreview";function au({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:l=3,className:m}){let s=w.useMemo(()=>o?.length?Zo.filter(d=>o.some(p=>d.tags.includes(p))):Zo,[o]);return w.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:i("grid grid-cols-2 gap-3",l===2?"md:grid-cols-2":l===4?"md:grid-cols-4":"md:grid-cols-3",m)},s.map(d=>{let p=e===d.id;return w.createElement("div",{key:d.id,className:"relative",role:"radio","aria-checked":p},w.createElement(Or,{preset:d.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(d.id),className:i("transition-all",p&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),p&&w.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"},w.createElement(Check,{className:"h-3.5 w-3.5"})))}))}function lu({children:e}){let t=useRef(null);return useEffect(()=>{let o=new su({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function uu({className:e}){let t=eo();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{variant:"ghost",size:"sm",className:i("gap-2",e),"aria-label":"Switch theme"},w.createElement(Palette,{className:"h-4 w-4"}),w.createElement("span",{className:"hidden sm:inline"},o.name))),w.createElement(ot,{className:"w-80 p-2",align:"end"},w.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},w.createElement("div",null,w.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),w.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),w.createElement("button",{type:"button",onClick:()=>Ha(o),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"},w.createElement(Download,{className:"h-3 w-3"}),".md")),w.createElement("div",{className:"flex flex-col gap-0.5"},r.map(l=>{let m=l.id===o.id,s=l.id in gt,c=l.ramps.primary[500],d=l.ramps.accent[500],p=l.ramps.neutral[500];return w.createElement("div",{key:l.id,className:i("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},w.createElement("button",{type:"button",onClick:()=>n(l.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},w.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true})),w.createElement("div",{className:"min-w-0 flex-1"},w.createElement("div",{className:"flex items-center gap-2"},w.createElement("span",{className:"text-sm font-medium truncate text-foreground"},l.name),l.tagline&&w.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},l.tagline)),l.description&&w.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},l.description))),m&&w.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!m&&w.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(l.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 ${l.name}`},w.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var ed=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function vu({className:e,variant:t="icons"}){let o=eo();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:i("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},ed.map(({mode:a,label:l,icon:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>n(a),className:i("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")},w.createElement(m,{className:"h-4 w-4"}),w.createElement("span",null,l))})):w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:i("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},ed.map(({mode:a,icon:l,tooltip:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":m,title:m,onClick:()=>n(a),className:i("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")},w.createElement(l,{className:"h-3.5 w-3.5"}))}))}function xu(){let{isDark:e,setMode:t}=Ba();return React.createElement(Ne,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}export{Pl as ALL_MODES,Hd as Accordion,ti as AccordionContent,Qn as AccordionItem,ei as AccordionTrigger,mi as AppShell,fi as AppShellAside,bi as AppShellFooter,ui as AppShellHeader,hi as AppShellMain,gi as AppShellNav,vi as Avatar,wi as AvatarFallback,yi as AvatarImage,Nr as BUILT_IN_INPUTS,cr as Badge,Ci as Banner,js as Breadcrumb,Js as BreadcrumbEllipsis,qs as BreadcrumbItem,Ys as BreadcrumbLink,Ks as BreadcrumbList,Qs as BreadcrumbMenuTrigger,Zs as BreadcrumbPage,Xs as BreadcrumbSeparator,Ne as Button,Yr as COMPONENT_CONTRACTS,mr as Calendar,Ti as CalendarDayButton,ri as Callout,ni as CalloutDescription,ai as CalloutTitle,Pi as Card,Li as CardContent,Ei as CardDescription,Hi as CardFooter,Mi as CardHeader,Ni as CardTitle,Yd as Carousel,Qr as CarouselArrows,Jr as CarouselDots,Ho as CarouselNext,Lo as CarouselPrev,ur as CarouselSlide,Xr as CarouselVideoSlide,Di as Checkbox,Fi as Code,sc as DatePicker,lc as DateRangePicker,cc as Dialog,mc as DialogClose,Vi as DialogContent,Wi as DialogDescription,Gi as DialogFooter,Oi as DialogHeader,ea as DialogOverlay,Bi as DialogPortal,_i as DialogTitle,pc as DialogTrigger,hc as DropdownMenu,qi as DropdownMenuCheckboxItem,ji as DropdownMenuContent,vc as DropdownMenuGroup,Ki as DropdownMenuItem,Zi as DropdownMenuLabel,yc as DropdownMenuPortal,xc as DropdownMenuRadioGroup,Yi as DropdownMenuRadioItem,Xi as DropdownMenuSeparator,Ji as DropdownMenuShortcut,wc as DropdownMenuSub,$i as DropdownMenuSubContent,Ui as DropdownMenuSubTrigger,bc as DropdownMenuTrigger,Jl as FRAGMENT_HEADER,cs as Flex,Zp as GRADE_PRE_HYDRATION_SCRIPT,vu as GradeModeSwitcher,Xp as GradeThemeProvider,uu as GradeThemeSwitcher,ls as Grid,Qi as Input,es as Label,lu as LenisProvider,Oa as Map,Ga as MapMarker,ft as MediaSurface,jr as MediaSurfaceContract,os as MultiSelect,pt as Popover,ac as PopoverAnchor,ot as PopoverContent,mt as PopoverTrigger,ts as Progress,rs as RadioGroup,as as RadioGroupItem,zc as ResizableHandle,Fc as ResizablePanel,Ic as ResizablePanelGroup,$l as RivePlayer,is as Row,ps as ScrollArea,la as ScrollBar,Kc as Select,gs as SelectContent,qc as SelectGroup,hs as SelectItem,fs as SelectLabel,ca as SelectScrollDownButton,da as SelectScrollUpButton,bs as SelectSeparator,us as SelectTrigger,Yc as SelectValue,Bo as Separator,yo as ShaderCompileError,au as ShaderPresetPicker,Or as ShaderPresetPreview,Qc as Sheet,tp as SheetClose,ys as SheetContent,Ss as SheetDescription,xs as SheetFooter,ws as SheetHeader,pa as SheetOverlay,vs as SheetPortal,Rs as SheetTitle,ep as SheetTrigger,At as Sidebar,Ra as SidebarContent,Sa as SidebarFooter,xa as SidebarHeader,ka as SidebarItem,Ca as SidebarSection,Ta as SidebarTreeItem,rp as Skeleton,Cs as Slider,fp as Sortable,ua as SortableGroup,fa as SortableHandle,ga as SortableItem,Is as Stack,Fs as Switch,zs as Table,Vs as TableBody,Us as TableCaption,Ws as TableCell,Os as TableFooter,_s as TableHead,Bs as TableHeader,Gs as TableRow,xp as Tabs,al as TabsContent,ol as TabsList,rl as TabsTrigger,nl as Textarea,xu as ThemeToggle,Vr as ThreeScene,sl as Toggle,cl as ToggleGroup,pl as ToggleGroupItem,ml as Toolbar,ul as ToolbarSlot,Zt as Tooltip,Dt as TooltipContent,ba as TooltipProvider,Xt as TooltipTrigger,Ul as VideoPlayer,di as appShellAsideVariants,pi as appShellFooterVariants,si as appShellHeaderVariants,ci as appShellMainVariants,li as appShellNavVariants,Er as applyThemeToRoot,Ri as badgeVariants,Si as bannerVariants,Ua as buildFragmentShaderScene,gt as builtInThemes,Eo as buttonVariants,oi as calloutVariants,Ko as calmInput,i as cn,zr as defaultPostPreset,bo as defaultThemeId,Ia as deleteUserTheme,Yp as duplicateTheme,Ma as energyInput,ds as flexVariants,Jt as generateTheme,Pd as getComponentContract,Qt as getTheme,ss as gridVariants,Md as listContractedComponents,Da as listThemes,kl as listUserThemes,Aa as loadUserThemeInput,Jo as postPresets,ns as rowVariants,Hr as saveUserTheme,Yo as sceneRegistry,Xo as shaderPresetById,Zo as shaderPresets,ii as shellVariants,As as stackVariants,Ea as themeToCSSVars,il as toggleVariants,Zd as useCarouselApi,Ba as useGradeTheme,eo as useMaybeGradeTheme,to as usePrefersReducedMotion};//# sourceMappingURL=index.mjs.map
|
|
544
|
+
`,Jo=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
|
|
545
|
+
${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function mh(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let n=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!n)throw new Jo(a,t)}function Qo(e){return ({renderer:t,width:o,height:r,palette:n})=>{let a=`${Lc}
|
|
546
|
+
${e}`;mh(t,a);let i=new we.Scene,p=new we.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new we.Vector2(o,r)},uMouse:{value:new we.Vector2(.5,.5)},uPrimary:{value:new we.Color(n.primary)},uSecondary:{value:new we.Color(n.secondary)},uAccent:{value:new we.Color(n.accent)},uBackground:{value:new we.Color(n.background)}},c=new we.ShaderMaterial({uniforms:s,vertexShader:ph,fragmentShader:a,depthTest:false,depthWrite:false}),d=new we.PlaneGeometry(2,2),m=new we.Mesh(d,c);return i.add(m),{scene:i,camera:p,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{d.dispose(),c.dispose();}}}}var Dc=Qo(`
|
|
547
|
+
void main() {
|
|
548
|
+
vec2 uv = vUv;
|
|
549
|
+
float t = uTime * 0.15;
|
|
550
|
+
|
|
551
|
+
vec2 p1 = vec2(0.5 + 0.36 * sin(t * 1.1), 0.5 + 0.30 * cos(t * 0.9));
|
|
552
|
+
vec2 p2 = vec2(0.5 + 0.40 * cos(t * 0.7 + 1.0), 0.4 + 0.34 * sin(t * 1.3));
|
|
553
|
+
vec2 p3 = vec2(0.45 + 0.32 * sin(t * 0.5 + 2.0),0.6 + 0.30 * cos(t * 1.7));
|
|
554
|
+
|
|
555
|
+
float w1 = smoothstep(0.62, 0.0, distance(uv, p1));
|
|
556
|
+
float w2 = smoothstep(0.62, 0.0, distance(uv, p2));
|
|
557
|
+
float w3 = smoothstep(0.62, 0.0, distance(uv, p3));
|
|
558
|
+
|
|
559
|
+
vec3 col = uBackground;
|
|
560
|
+
col = mix(col, uPrimary, w1);
|
|
561
|
+
col = mix(col, uSecondary, w2 * 0.9);
|
|
562
|
+
col = mix(col, uAccent, w3 * 0.85);
|
|
563
|
+
gl_FragColor = vec4(col, 1.0);
|
|
564
|
+
}
|
|
565
|
+
`),Ac=Qo(`
|
|
566
|
+
void main() {
|
|
567
|
+
vec2 uv = vUv;
|
|
568
|
+
float t = uTime * 0.4;
|
|
569
|
+
float band = sin(uv.x * 6.2831 + sin(uv.y * 4.0 + t) * 1.5 + t);
|
|
570
|
+
float m = 0.5 + 0.5 * band;
|
|
571
|
+
vec3 col = mix(uBackground, uPrimary, smoothstep(0.3, 0.7, m));
|
|
572
|
+
col = mix(col, uSecondary, smoothstep(0.6, 1.0, m));
|
|
573
|
+
col = mix(col, uAccent, smoothstep(0.85, 1.0, m));
|
|
574
|
+
gl_FragColor = vec4(col, 1.0);
|
|
575
|
+
}
|
|
576
|
+
`);var Ir={space:Pc,plasma:Nc,voronoi:Mc,synthwave:Ec,mesh:Dc,waves:Ac},Fr=[{id:"mesh",label:"Mesh gradient",description:"Smooth moving blobs of the primary / secondary / accent colours over the background \u2014 the go-to soft, theme-reactive background.",tags:["gradient","mesh","abstract","hero","background"],scene:"mesh",defaultPostPreset:"none"},{id:"waves",label:"Waves",description:"Flowing banded ribbons that ripple across the surface. Clean motion for headers and hero backdrops.",tags:["waves","motion","abstract","hero"],scene:"waves",defaultPostPreset:"none"},{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"}],zr=Object.fromEntries(Fr.map(e=>[e.id,e]));var Br={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}}}},Ba="vhs";var Or={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},fh=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,hh=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,bh=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Oa(e,t,o){if(typeof document>"u")return o;let r=e,n=bh.exec(e);if(n){let p=getComputedStyle(t).getPropertyValue(n[1]).trim();p&&(fh.test(p)?r=`oklch(${p})`:hh.test(p)&&(r=`hsl(${p})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let i=getComputedStyle(a).color;if(t.removeChild(a),!i)return o;if(i.startsWith("rgb"))return i;try{let p=document.createElement("canvas");p.width=1,p.height=1;let s=p.getContext("2d");if(!s)return i;s.clearRect(0,0,1,1),s.fillStyle=i,s.fillRect(0,0,1,1);let[c,d,m]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${d}, ${m})`}catch{return i}}function Hc(e,t){return {primary:Oa(e.primary,t,Or.primary),secondary:Oa(e.secondary,t,Or.secondary),accent:Oa(e.accent,t,Or.accent),background:Oa(e.background,t,Or.background)}}var er=S.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,createScene:a,controls:i=false,autoPlay:p=true,play:s,pauseOffscreen:c=true,aspect:d="video",radius:m="lg",border:g=false,poster:u,label:b,className:f,style:h,maxDpr:v,...w},y)=>{let C=S.useRef(null),[T,I]=S.useState(s??p),[E,L]=S.useState(false),Y=ro(),F=S.useMemo(()=>({...Or,...n}),[n]),Z=S.useMemo(()=>a||(t?Qo(t):e&&Ir[e]?Ir[e]:null),[a,t,e]),A=S.useMemo(()=>{if(r&&typeof r=="object")return r;let q=typeof r=="string"?r:(e?zr[e]?.defaultPostPreset:void 0)??Ba;return Br[q]??Br[Ba]},[r,e]),H=S.useRef(A);H.current=A,S.useEffect(()=>{let q=C.current;if(!q||!Z)return;let x=q.clientWidth||1,M=q.clientHeight||1,$=Hc(F,q),B=new we.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),ve=v??Math.min(window.devicePixelRatio||1,2);B.setPixelRatio(ve),B.setSize(x,M),B.setClearColor(new we.Color($.background),1),B.domElement.dataset.gdsPart="shader-canvas",B.domElement.style.width="100%",B.domElement.style.height="100%",B.domElement.style.display="block",q.appendChild(B.domElement);let re;try{re=Z({renderer:B,width:x,height:M,palette:$});}catch(ae){if(ae instanceof Jo)o?.(ae),re=Ir.space({renderer:B,width:x,height:M,palette:$});else throw B.dispose(),B.domElement.parentElement===q&&q.removeChild(B.domElement),ae}let Q=H.current,ye=Tc({renderer:B,scene:re.scene,camera:re.camera,preset:Q,width:x,height:M}),He=new we.Clock,D=0,se=(s??p)&&!Y,le=true,$e=()=>{if(D=requestAnimationFrame($e),!se||c&&!le)return;let ae=He.getDelta(),Ie=He.getElapsedTime();re.update?.(Ie,ae),ye.composer.render(ae);};re.update?.(0,0),ye.composer.render(0),L(true),$e();let ce=new ResizeObserver(([ae])=>{let Ie=Math.max(1,Math.floor(ae.contentRect.width)),Yt=Math.max(1,Math.floor(ae.contentRect.height));B.setSize(Ie,Yt),ye.resize(Ie,Yt),re.resize?.(Ie,Yt),se||(re.update?.(He.getElapsedTime(),0),ye.composer.render(0));});ce.observe(q);let Ee=new IntersectionObserver(([ae])=>{le=ae.isIntersecting;},{threshold:.05});Ee.observe(q);let at=new MutationObserver(()=>{if(!C.current)return;let ae=Hc(F,C.current);B.setClearColor(new we.Color(ae.background),1),re.setPalette?.(ae);});at.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Ke=re,qe=Ke.setMouse?ae=>{let Ie=q.getBoundingClientRect(),Yt=(ae.clientX-Ie.left)/Ie.width,ja=1-(ae.clientY-Ie.top)/Ie.height;Ke.setMouse(Yt,ja);}:null;return qe&&q.addEventListener("pointermove",qe),ne.current={toggle:()=>{se=!se,I(se);},setRunning:ae=>{se=ae&&!Y,I(se);},setPalette:ae=>{B.setClearColor(new we.Color(ae.background),1),re.setPalette?.(ae);},setPostPreset:ae=>{let Ie=typeof ae=="string"?Br[ae]:ae;Ie&&ye.setPreset(Ie);}},()=>{cancelAnimationFrame(D),ce.disconnect(),Ee.disconnect(),at.disconnect(),qe&&q.removeEventListener("pointermove",qe),ye.dispose(),re.dispose?.(),B.dispose(),B.domElement.parentElement===q&&q.removeChild(B.domElement),ne.current=null;}},[Z,F,p,Y,c,v,o]);let ne=S.useRef(null);S.useEffect(()=>{ne.current?.setPostPreset(A);},[A]),S.useEffect(()=>{s!==void 0&&ne.current?.setRunning(s);},[s]);let j=()=>ne.current?.toggle();return S.createElement(It,{...w,ref:q=>{C.current=q,typeof y=="function"?y(q):y&&(y.current=q);},aspect:d,radius:m,border:g,"aria-label":b,className:f,style:h,"data-gds-part":"three-scene"},!E&&u&&S.createElement("img",{src:u,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),i&&S.createElement("div",{"data-gds-part":"scene-controls",className:l("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")},S.createElement(Je,{size:"icon",variant:"secondary",onClick:j},T?S.createElement(Pause,{className:"h-4 w-4"}):S.createElement(Play,{className:"h-4 w-4"}))))});er.displayName="ThreeScene";function Ic(e,t,o){let r=e[t];return typeof r=="number"?r:o}function _a(e,t,o){let r=e[t];return typeof r=="string"?r:o}function Fc(e,t,o){let r=e[t];return typeof r=="boolean"?r:o}function zc(e,t,o){let r=e[t];return Array.isArray(r)?r:o}var Va="text-[11px] font-medium text-foreground";function xh({controls:e,state:t,onChange:o,disabled:r,className:n}){return S.createElement("div",{className:l("flex flex-col",n)},e.map(a=>{if(a.type==="divider")return S.createElement("div",{key:a.key,className:"mt-3 mb-1 border-t border-border/60 pt-2 first:mt-0 first:border-t-0 first:pt-0"},a.label?S.createElement("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-foreground/80"},a.label):null);if(a.type==="slider")return S.createElement(wh,{key:a.key,spec:a,value:Ic(t,a.key,a.default),disabled:r,onChange:p=>o(a.key,p)});if(a.type==="segmented"){let p=_a(t,a.key,a.default);return S.createElement(oi,{key:a.key,label:a.label},S.createElement(Eo,{type:"single",size:"sm",value:p,onValueChange:s=>s&&o(a.key,s),disabled:r,className:"w-full justify-start"},a.options.map(s=>S.createElement(Lo,{key:s.value,value:s.value,className:"flex-1"},s.label))))}if(a.type==="select"){let p=_a(t,a.key,a.default);return S.createElement(oi,{key:a.key,label:a.label},S.createElement(vn,{value:p,onValueChange:s=>o(a.key,s),disabled:r},S.createElement(ya,{size:"xs",className:"w-full"},S.createElement(yn,null)),S.createElement(xa,{size:"xs"},a.options.map(s=>S.createElement(wa,{key:s.value,value:s.value},s.label)))))}if(a.type==="toggle"){let p=Fc(t,a.key,a.default);return S.createElement("div",{key:a.key,className:"flex items-center justify-between gap-2 py-1"},S.createElement(ko,{className:Va},a.label),S.createElement(Ca,{checked:p,onCheckedChange:s=>o(a.key,s),disabled:r}))}if(a.type==="color"){let p=_a(t,a.key,a.default);return S.createElement(oi,{key:a.key,label:a.label,hint:a.slot?`\u2192 ${a.slot}`:void 0},S.createElement(Bc,{value:p,disabled:r,onChange:s=>o(a.key,s)}))}let i=zc(t,a.key,a.default);return S.createElement(Sh,{key:a.key,spec:a,value:i,disabled:r,onChange:p=>o(a.key,p)})}))}function oi({label:e,hint:t,children:o}){return S.createElement("div",{className:"space-y-1 py-1"},S.createElement("div",{className:"flex items-baseline justify-between gap-2"},S.createElement(ko,{className:Va},e),t?S.createElement("span",{className:"text-[10px] text-muted-foreground/70"},t):null),o)}function wh({spec:e,value:t,disabled:o,onChange:r}){let n=e.step<1?e.step<.1?3:2:0,a=d=>Math.min(e.max,Math.max(e.min,d)),[i,p]=S.useState(null),s=i??t.toFixed(n),c=d=>{let m=Number(d);Number.isFinite(m)&&r(a(m)),p(null);};return S.createElement("div",{className:"space-y-1 py-1"},S.createElement("div",{className:"flex items-center justify-between gap-2"},S.createElement(ko,{className:Va},e.label),S.createElement($t,{size:"xs",type:"text",inputMode:"decimal","aria-label":e.label,value:s,disabled:o,endSlot:e.unit?S.createElement("span",{className:"text-[9px] text-muted-foreground/60"},e.unit):void 0,className:"w-16 tabular-nums",onChange:d=>p(d.currentTarget.value),onBlur:d=>c(d.currentTarget.value),onKeyDown:d=>{d.key==="Enter"&&c(d.currentTarget.value);}})),S.createElement(Po,{value:[t],min:e.min,max:e.max,step:e.step,disabled:o,onValueChange:d=>r(a(d[0]??e.default))}))}var Rh=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Bc({value:e,disabled:t,onChange:o}){let r=Rh.test(e)?e:"#000000";return S.createElement("div",{className:"flex items-center gap-1.5"},S.createElement("input",{type:"color",value:r,disabled:t,onChange:n=>o(n.currentTarget.value),"aria-label":"Colour swatch",className:"h-7 w-9 shrink-0 cursor-pointer rounded-md border border-input bg-transparent disabled:opacity-50"}),S.createElement($t,{size:"xs",value:e,disabled:t,onChange:n=>o(n.currentTarget.value),className:"font-mono"}))}function Sh({spec:e,value:t,disabled:o,onChange:r}){let n=e.min??1,a=e.max??8,i=(c,d)=>r(t.map((m,g)=>g===c?d:m)),p=()=>t.length<a&&r([...t,t[t.length-1]??"#ffffff"]),s=c=>t.length>n&&r(t.filter((d,m)=>m!==c));return S.createElement("div",{className:"space-y-1 py-1"},S.createElement("div",{className:"flex items-baseline justify-between gap-2"},S.createElement(ko,{className:Va},e.label),S.createElement("button",{type:"button",onClick:p,disabled:o||t.length>=a,"aria-label":"Add colour",className:"inline-flex h-5 w-5 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},S.createElement(Plus,null))),S.createElement("div",{className:"space-y-1.5"},t.map((c,d)=>S.createElement("div",{key:d,className:"flex items-center gap-1.5"},S.createElement(Bc,{value:c,disabled:o,onChange:m=>i(d,m)}),S.createElement("button",{type:"button",onClick:()=>s(d),disabled:o||t.length<=n,"aria-label":"Remove colour",className:"inline-flex h-7 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},S.createElement(Minus,null))))))}var Ch={background:"oklch(var(--background))",card:"oklch(var(--card))",muted:"oklch(var(--muted))",secondary:"oklch(var(--secondary))",accent:"oklch(var(--accent))",primary:"oklch(var(--primary))",destructive:"oklch(var(--destructive))",transparent:"transparent"};function Ga(e){if(e)return Ch[e]??e}var kh={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Oc={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"},_c=S.forwardRef(({type:e,color:t,gradient:o,src:r,fit:n="cover",position:a="center",repeat:i=false,tileSize:p,preset:s,fragmentShader:c,palette:d,postPreset:m,opacity:g,blendMode:u,radius:b="none",className:f,style:h},v)=>{if(e==="none")return null;let w={opacity:g,mixBlendMode:u,...h},y=null;if(e==="solid")w.background=Ga(t)??"oklch(var(--background))";else if(e==="gradient"){let C=o?.angle??135,T=[Ga(o?.from)??"oklch(var(--primary))",Ga(o?.via),Ga(o?.to)??"oklch(var(--accent))"].filter(Boolean);w.backgroundImage=`linear-gradient(${C}deg, ${T.join(", ")})`;}else e==="image"?i&&r?(w.backgroundImage=`url(${r})`,w.backgroundRepeat="repeat",w.backgroundPosition=a,p&&(w.backgroundSize=p)):r&&(y=S.createElement("img",{src:r,alt:"",className:l("absolute inset-0 h-full w-full",Oc[n]),style:{objectPosition:a}})):e==="video"?r&&(y=S.createElement("video",{src:r,autoPlay:true,muted:true,loop:true,playsInline:true,className:l("absolute inset-0 h-full w-full",Oc[n]),style:{objectPosition:a}})):e==="shader"&&(y=S.createElement(er,{preset:s,fragmentShader:c,palette:d,postPreset:m,aspect:"auto",radius:"none",className:"absolute inset-0"}));return S.createElement("div",{ref:v,"data-gds-part":"frame-fill","data-gds-fill-type":e,"aria-hidden":"true",className:l("absolute inset-0 z-0 overflow-hidden pointer-events-none",b!=="none"&&kh[b],f),style:w},y)});_c.displayName="BackgroundFill";var Vc={primary:"oklch(var(--primary))",secondary:"oklch(var(--accent))",accent:"oklch(var(--primary))",background:"oklch(var(--foreground))"};var Wa=S.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:i="lg",label:p,hideLabel:s=false,onClick:c},d)=>{let m=zr[e],[g,u]=S.useState(false),b=t!=="never",f=t==="always"||t==="hover"&&g;return S.createElement("div",{ref:d,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:l("group cursor-pointer flex flex-col gap-2",n)},b?S.createElement(er,{key:e,preset:e,postPreset:o,palette:r??Vc,aspect:a,radius:i,autoPlay:false,play:f,controls:false,pauseOffscreen:true,poster:m?.poster,maxDpr:1}):S.createElement(It,{aspect:a,radius:i,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?S.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):S.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!s&&S.createElement("div",{className:"flex items-baseline justify-between text-xs"},S.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},p??m?.label??e),m?.tags?.[0]&&S.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});Wa.displayName="ShaderPresetPreview";function ri({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:i=3,className:p}){let s=S.useMemo(()=>o?.length?Fr.filter(d=>o.some(m=>d.tags.includes(m))):Fr,[o]);return S.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:l("grid grid-cols-2 gap-3",i===2?"md:grid-cols-2":i===4?"md:grid-cols-4":"md:grid-cols-3",p)},s.map(d=>{let m=e===d.id;return S.createElement("div",{key:d.id,className:"relative",role:"radio","aria-checked":m},S.createElement(Wa,{preset:d.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(d.id),className:l("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&S.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"},S.createElement(Check,{className:"h-3.5 w-3.5"})))}))}var Ua=["primary","accent","secondary","muted","card","background","destructive","transparent"];function Ah(e){return e==="transparent"?"transparent":`oklch(var(--${e}))`}var Hh=[{tab:"solid",icon:Square,label:"Solid"},{tab:"gradient",icon:Blend,label:"Gradient"},{tab:"image",icon:Image,label:"Image"},{tab:"pattern",icon:Grid3x3,label:"Pattern"},{tab:"video",icon:Video,label:"Video"},{tab:"shader",icon:Sparkles,label:"Shader"}];function Ih(e){return e.type==="image"&&e.repeat?"pattern":e.type==="image"?"image":e.type}var zt="text-[11px] font-medium text-muted-foreground";function ai({token:e,active:t,onClick:o}){return S.createElement("button",{type:"button",title:e,onClick:o,className:l("h-7 w-7 rounded-md border border-border/60 transition-shadow",e==="transparent"&&"bg-[linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%),linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%)] bg-[length:8px_8px] bg-[position:0_0,4px_4px]",t&&"ring-2 ring-primary ring-offset-1 ring-offset-background"),style:e==="transparent"?void 0:{background:Ah(e)}})}function Gc({value:e,onChange:t,className:o}){let r=Ih(e),n=i=>t({...e,...i}),a=i=>{i&&n(i==="pattern"?{type:"image",repeat:true}:i==="image"?{type:"image",repeat:false}:{type:i});};return S.createElement("div",{className:l("flex flex-col gap-3",o)},S.createElement(Eo,{type:"single",size:"sm",value:r,onValueChange:i=>a(i),className:"justify-start gap-0.5"},Hh.map(({tab:i,icon:p,label:s})=>S.createElement(Lo,{key:i,value:i,"aria-label":s,title:s},S.createElement(p,{className:"h-4 w-4"})))),r==="solid"&&S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Token"),S.createElement("div",{className:"flex flex-wrap gap-1.5"},Ua.map(i=>S.createElement(ai,{key:i,token:i,active:e.color===i,onClick:()=>n({color:i})})))),r==="gradient"&&S.createElement("div",{className:"flex flex-col gap-2"},S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"From"),S.createElement("div",{className:"flex flex-wrap gap-1.5"},Ua.map(i=>S.createElement(ai,{key:i,token:i,active:e.gradient?.from===i,onClick:()=>n({gradient:{...e.gradient,from:i}})})))),S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"To"),S.createElement("div",{className:"flex flex-wrap gap-1.5"},Ua.map(i=>S.createElement(ai,{key:i,token:i,active:e.gradient?.to===i,onClick:()=>n({gradient:{...e.gradient,to:i}})})))),S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Angle \u2014 ",e.gradient?.angle??135,"\xB0"),S.createElement(Po,{value:[e.gradient?.angle??135],min:0,max:360,step:5,onValueChange:([i])=>n({gradient:{...e.gradient,angle:i}})}))),(r==="image"||r==="pattern")&&S.createElement("div",{className:"flex flex-col gap-2"},S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Image URL"),S.createElement($t,{size:"sm",value:e.src??"",placeholder:"https://\u2026 or /asset.png",onChange:i=>n({src:i.target.value})})),r==="image"&&S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Fit"),S.createElement(Eo,{type:"single",size:"sm",value:e.fit??"cover",onValueChange:i=>i&&n({fit:i}),className:"justify-start gap-0.5"},["cover","contain","fill","none"].map(i=>S.createElement(Lo,{key:i,value:i,className:"px-2 text-[11px] capitalize"},i)))),r==="pattern"&&S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Tile size"),S.createElement($t,{size:"sm",value:e.tileSize??"",placeholder:"120px",onChange:i=>n({tileSize:i.target.value})}))),r==="video"&&S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Video URL"),S.createElement($t,{size:"sm",value:e.src??"",placeholder:"https://\u2026.mp4",onChange:i=>n({src:i.target.value})})),r==="shader"&&S.createElement("div",{className:"flex flex-col gap-1.5"},S.createElement("span",{className:zt},"Shader"),S.createElement(ri,{value:e.preset,onChange:i=>n({preset:i}),live:"hover",columns:3})),e.type!=="none"&&S.createElement("div",{className:"flex items-center gap-2 border-t border-border/50 pt-2.5"},S.createElement("span",{className:l(zt,"shrink-0")},"Opacity"),S.createElement(Po,{value:[e.opacity??1],min:0,max:1,step:.05,onValueChange:([i])=>n({opacity:i}),className:"flex-1"}),S.createElement("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-foreground"},Math.round((e.opacity??1)*100),"%")))}Gc.displayName="FillPicker";function Oh({children:e}){let t=useRef(null);return useEffect(()=>{let o=new Bh({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function Uh({className:e}){let t=Ho();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return S.createElement(Lt,null,S.createElement(Dt,{asChild:true},S.createElement(Je,{variant:"ghost",size:"sm",className:l("gap-2",e),"aria-label":"Switch theme"},S.createElement(Palette,{className:"h-4 w-4"}),S.createElement("span",{className:"hidden sm:inline"},o.name))),S.createElement(kt,{className:"w-80 p-2",align:"end"},S.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},S.createElement("div",null,S.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),S.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),S.createElement("button",{type:"button",onClick:()=>Wn(o),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"},S.createElement(Download,{className:"h-3 w-3"}),".md")),S.createElement("div",{className:"flex flex-col gap-0.5"},r.map(i=>{let p=i.id===o.id,s=i.id in Ht,c=i.ramps.primary[500],d=i.ramps.accent[500],m=i.ramps.neutral[500];return S.createElement("div",{key:i.id,className:l("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",p&&"bg-muted")},S.createElement("button",{type:"button",onClick:()=>n(i.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},S.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},S.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),S.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),S.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),S.createElement("div",{className:"min-w-0 flex-1"},S.createElement("div",{className:"flex items-center gap-2"},S.createElement("span",{className:"text-sm font-medium truncate text-foreground"},i.name),i.tagline&&S.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},i.tagline)),i.description&&S.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},i.description))),p&&S.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!p&&S.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(i.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 ${i.name}`},S.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var Wc=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Yh({className:e,variant:t="icons"}){let o=Ho();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?S.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:l("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Wc.map(({mode:a,label:i,icon:p})=>{let s=r===a;return S.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>n(a),className:l("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")},S.createElement(p,{className:"h-4 w-4"}),S.createElement("span",null,i))})):S.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:l("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Wc.map(({mode:a,icon:i,tooltip:p})=>{let s=r===a;return S.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":p,title:p,onClick:()=>n(a),className:l("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")},S.createElement(i,{className:"h-3.5 w-3.5"}))}))}function Jh(){let{isDark:e,setMode:t}=Yn();return React.createElement(Je,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}
|
|
577
|
+
export{ic as ALL_MODES,Rp as Accordion,ks as AccordionContent,Ss as AccordionItem,Cs as AccordionTrigger,Fs as AppShell,Os as AppShellAside,Vs as AppShellFooter,zs as AppShellHeader,_s as AppShellMain,Bs as AppShellNav,Ws as Avatar,js as AvatarFallback,Us as AvatarImage,Ea as BUILT_IN_INPUTS,_c as BackgroundFill,Yr as Badge,Ys as Banner,da as BlinkingCursor,Pd as Breadcrumb,Ad as BreadcrumbEllipsis,Md as BreadcrumbItem,Ed as BreadcrumbLink,Nd as BreadcrumbList,Hd as BreadcrumbMenuTrigger,Ld as BreadcrumbPage,Dd as BreadcrumbSeparator,Je as Button,Qa as COMPONENT_CONTRACTS,Xr as Calendar,Xs as CalendarDayButton,Ps as Callout,Ms as CalloutDescription,Ns as CalloutTitle,Js as Card,ol as CardContent,tl as CardDescription,rl as CardFooter,Qs as CardHeader,el as CardTitle,Vp as Carousel,rn as CarouselArrows,on as CarouselDots,fr as CarouselNext,gr as CarouselPrev,Jr as CarouselSlide,tn as CarouselVideoSlide,al as Checkbox,sl as CheckboxCard,fl as Code,xl as Composer,mu as ComposerReply,jo as DEMO_SPEED_PRESETS,hu as DatePicker,bu as DateRangePicker,ml as DemoStage,yu as Dialog,wu as DialogClose,Sl as DialogContent,Pl as DialogDescription,kl as DialogFooter,Cl as DialogHeader,dn as DialogOverlay,Rl as DialogPortal,Tl as DialogTitle,xu as DialogTrigger,ku as DropdownMenu,Al as DropdownMenuCheckboxItem,Ll as DropdownMenuContent,Pu as DropdownMenuGroup,Dl as DropdownMenuItem,Il as DropdownMenuLabel,Nu as DropdownMenuPortal,Eu as DropdownMenuRadioGroup,Hl as DropdownMenuRadioItem,Fl as DropdownMenuSeparator,zl as DropdownMenuShortcut,Mu as DropdownMenuSub,El as DropdownMenuSubContent,Ml as DropdownMenuSubTrigger,Tu as DropdownMenuTrigger,Ua as FILL_TOKENS,Lc as FRAGMENT_HEADER,Up as Field,ea as FieldDescription,Qr as FieldLabel,ta as FieldTrailing,Gc as FillPicker,ql as Flex,nf as GRADE_PRE_HYDRATION_SCRIPT,Yh as GradeModeSwitcher,sf as GradeThemeProvider,Uh as GradeThemeSwitcher,$l as Grid,$t as Input,ko as Label,Oh as LenisProvider,Kf as Logo,vr as MOTION_ATTR,Xn as Map,Jn as MapMarker,It as MediaSurface,Ya as MediaSurfaceContract,mm as Message,_l as MultiSelect,Lt as Popover,uu as PopoverAnchor,kt as PopoverContent,Dt as PopoverTrigger,Ol as Progress,il as RadioCard,Vl as RadioGroup,Gl as RadioGroupItem,$u as ResizableHandle,ju as ResizablePanel,Uu as ResizablePanelGroup,ul as Reveal,Cc as RivePlayer,Ul as Row,Yl as ScrollArea,bn as ScrollBar,vn as Select,xa as SelectContent,tg as SelectGroup,wa as SelectItem,Ql as SelectLabel,wn as SelectScrollDownButton,xn as SelectScrollUpButton,ed as SelectSeparator,ya as SelectTrigger,yn as SelectValue,Cr as Separator,Jo as ShaderCompileError,xh as ShaderControls,ri as ShaderPresetPicker,Wa as ShaderPresetPreview,ig as Sheet,lg as SheetClose,od as SheetContent,id as SheetDescription,ad as SheetFooter,rd as SheetHeader,Rn as SheetOverlay,td as SheetPortal,nd as SheetTitle,sg as SheetTrigger,co as Sidebar,An as SidebarContent,Hn as SidebarFooter,Dn as SidebarHeader,Fn as SidebarItem,In as SidebarSection,zn as SidebarTreeItem,cg as Skeleton,Po as Slider,Rg as Sortable,Cn as SortableGroup,Tn as SortableHandle,kn as SortableItem,bd as Stack,Ca as Switch,ll as SwitchCard,vd as Table,xd as TableBody,kd as TableCaption,Cd as TableCell,wd as TableFooter,Sd as TableHead,yd as TableHeader,Rd as TableRow,Ng as Tabs,Od as TabsContent,zd as TabsList,Bd as TabsTrigger,_d as Textarea,Jh as ThemeToggle,er as ThreeScene,Gd as Toggle,Eo as ToggleGroup,Lo as ToggleGroupItem,jd as Toolbar,$d as ToolbarSlot,No as Tooltip,lo as TooltipContent,Nn as TooltipProvider,Mo as TooltipTrigger,Sc as VideoPlayer,As as appShellAsideVariants,Is as appShellFooterVariants,Ls as appShellHeaderVariants,Hs as appShellMainVariants,Ds as appShellNavVariants,La as applyThemeToRoot,Ks as badgeVariants,qs as bannerVariants,Qo as buildFragmentShaderScene,Ht as builtInThemes,ur as buttonVariants,Ts as calloutVariants,Ar as calmInput,l as cn,Ba as defaultPostPreset,Zo as defaultThemeId,$n as deleteUserTheme,pe as demoSleep,na as demoTypeText,af as duplicateTheme,On as energyInput,Kl as flexVariants,Do as generateTheme,bp as getComponentContract,Ao as getTheme,jl as gridVariants,vp as listContractedComponents,Un as listThemes,ac as listUserThemes,jn as loadUserThemeInput,Br as postPresets,Wl as rowVariants,Aa as saveUserTheme,Ir as sceneRegistry,Zp as setMotion,zr as shaderPresetById,Fr as shaderPresets,Es as shellVariants,hd as stackVariants,Vn as themeToCSSVars,Vd as toggleVariants,Gp as useCarouselApi,Yn as useGradeTheme,Ho as useMaybeGradeTheme,ro as usePrefersReducedMotion,sa as useReducedMotion,ao as useScriptedDemo};//# sourceMappingURL=index.mjs.map
|
|
503
578
|
//# sourceMappingURL=index.mjs.map
|