@gryt/ui 0.12.1 → 0.12.2
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.
|
@@ -12,6 +12,7 @@ export interface SelectProps extends Omit<ComponentPropsWithoutRef<typeof BaseSe
|
|
|
12
12
|
placeholder?: string;
|
|
13
13
|
size?: SelectSize;
|
|
14
14
|
className?: string;
|
|
15
|
+
portalContainer?: HTMLElement | null;
|
|
15
16
|
}
|
|
16
|
-
export declare function Select({ className, label, options, placeholder, size, ...props }: SelectProps): import("react").JSX.Element;
|
|
17
|
+
export declare function Select({ className, label, options, placeholder, size, portalContainer, ...props }: SelectProps): import("react").JSX.Element;
|
|
17
18
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAO5C,MAAM,WAAW,WACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAChD,UAAU,GAAG,OAAO,CACrB;IACD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAO5C,MAAM,WAAW,WACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAChD,UAAU,GAAG,OAAO,CACrB;IACD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACtC;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,KAAK,EACL,OAAY,EACZ,WAAsB,EACtB,IAAe,EACf,eAAe,EACf,GAAG,KAAK,EACT,EAAE,WAAW,+BAyDb"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),H=require("@base-ui/react/tooltip"),Se=require("@base-ui/react/button"),i=require("react"),We=require("clsx"),Qe=require("tailwind-merge"),ee=require("@base-ui/react/field"),S=require("@phosphor-icons/react"),ie=require("@base-ui/react/avatar"),we=require("@base-ui/react/checkbox"),ve=require("@base-ui/react/radio"),Je=require("@base-ui/react/radio-group"),Re=require("@base-ui/react/switch"),U=require("@base-ui/react/slider"),w=require("@base-ui/react/select"),Ze=require("@base-ui/react/separator"),de=require("@base-ui/react/progress"),M=require("@base-ui/react/dialog"),N=require("@base-ui/react/drawer"),G=require("@base-ui/react/menu"),Z=require("@base-ui/react/tabs"),W=require("@base-ui/react/accordion"),A=require("@base-ui/react/context-menu"),C=require("@base-ui/react/popover"),L=require("@base-ui/react/toast"),B=require("@base-ui/react/scroll-area"),et=require("@base-ui/react/toggle"),tt=require("@base-ui/react/toggle-group"),V=require("@base-ui/react/meter"),D=require("@base-ui/react/alert-dialog"),p=require("@base-ui/react/autocomplete"),m=require("@base-ui/react/combobox"),rt=require("@base-ui/react/checkbox-group"),ye=require("@base-ui/react/collapsible"),ot=require("@base-ui/react/form"),Ce=require("@base-ui/react/fieldset"),at=require("@base-ui/react/menubar"),v=require("@base-ui/react/navigation-menu"),$=require("@base-ui/react/number-field"),je=require("@base-ui/react/otp-field"),_=require("@base-ui/react/preview-card"),q=require("@base-ui/react/toolbar");function Le(o){return o<=.04045?o/12.92:((o+.055)/1.055)**2.4}function le(o){return o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055}function Y(o){return Math.min(1,Math.max(0,o))}function X(o){const t=o.replace("#",""),r=t.length===3?t.split("").map(e=>e+e).join(""):t;return[parseInt(r.slice(0,2),16)/255,parseInt(r.slice(2,4),16)/255,parseInt(r.slice(4,6),16)/255]}function Ae([o,t,r]){const e=n=>Math.round(Y(n)*255).toString(16).padStart(2,"0");return`#${e(o)}${e(t)}${e(r)}`}function z(o){const[t,r,e]=X(o).map(Le),n=Math.cbrt(.4122214708*t+.5363325363*r+.0514459929*e),c=Math.cbrt(.2119034982*t+.6806995451*r+.1073969566*e),d=Math.cbrt(.0883024619*t+.2817188376*r+.6299787005*e),l=.2104542553*n+.793617785*c-.0040720468*d,g=1.9779984951*n-2.428592205*c+.4505937099*d,y=.0259040371*n+.7827717662*c-.808675766*d;return{l,c:Math.hypot(g,y),h:(Math.atan2(y,g)*180/Math.PI+360)%360}}function k({l:o,c:t,h:r}){const e=t*Math.cos(r*Math.PI/180),n=t*Math.sin(r*Math.PI/180),c=(o+.3963377774*e+.2158037573*n)**3,d=(o-.1055613458*e-.0638541728*n)**3,l=(o-.0894841775*e-1.291485548*n)**3;return Ae([le(Y(4.0767416621*c-3.3077115913*d+.2309699292*l)),le(Y(-1.2684380046*c+2.6097574011*d-.3413193965*l)),le(Y(-.0041960863*c-.7034186147*d+1.707614701*l))])}const nt=[.195,.24,.27,.3,.33,.37,.43,.52],st=[.014,.026,.04,.052,.062,.072,.084,.1];function T(o,t){const{h:r}=z(o),e=nt.map((l,g)=>k({l,c:st[g],h:r}));e.push(o,t);const n=z(t).l,c=Math.min(.95,Math.max(.84,n+.04)),d=Math.min(.98,Math.max(c+.06,.93));return e.push(k({l:c,c:.11,h:r})),e.push(k({l:d,c:.055,h:r})),e}const ct=[.187,.231,.245,.268,.289,.31,.355,.425,.52,.57,.627,.908],it=[.011,.014,.016,.019,.022,.024,.026,.026,.02,.012,0,.008];function Me(o){const t={0:o.bg,1:o.surface,2:o.surfaceRaised,5:o.border,10:o.muted,11:o.text},r=z(o.border).h;return ct.map((e,n)=>t[n]??k({l:e,c:it[n],h:r}))}function Q(o,t){const r=X(t);return o.map(e=>{const n=X(e);let c=0;for(let f=0;f<3;f++){const b=n[f],R=r[f];b>R?c=Math.max(c,R<1?(b-R)/(1-R):0):b<R&&(c=Math.max(c,R>0?(R-b)/R:0))}if(c<1e-6)return"transparent";const d=Ae(n.map((f,b)=>Y(r[b]+(f-r[b])/c))),[l,g,y]=X(d).map(f=>Math.round(f*255));return`rgb(${l} ${g} ${y} / ${(c*100).toFixed(1)}%)`})}const dt=[.962,1,.978,.952,.928,.898,.855,.79,.66,.61,.48,.25],lt=[.006,0,.004,.007,.01,.013,.016,.018,.016,.014,.012,.014],ut=[.975,.955,.93,.905,.878,.845,.795,.72],gt=[.012,.024,.038,.05,.062,.074,.09,.11];function De(o){const t={0:o.bg,1:o.surface,2:o.surfaceRaised,5:o.border,10:o.muted,11:o.text},r=z(o.border).h;return dt.map((e,n)=>t[n]??k({l:e,c:lt[n],h:r}))}function P(o){const{l:t,c:r,h:e}=z(o),n=ut.map((c,d)=>k({l:c,c:gt[d],h:e}));return n.push(o),n.push(k({l:Math.max(0,t-.07),c:r,h:e})),n.push(k({l:.46,c:.15,h:e})),n.push(k({l:.33,c:.1,h:e})),n}function Ne(o){const[t,r,e]=X(o).map(Le);return .2126*t+.7152*r+.0722*e}function ft(o,t){const r=Ne(o),e=Ne(t);return(Math.max(r,e)+.05)/(Math.min(r,e)+.05)}const u={color:{bg:"#111318",surface:"#1a1d24",surfaceRaised:"#1e2028",surfaceHover:"#334155",border:"#2b303d",text:"#e0e0e6",muted:"#888888",accent:"#968ff8",accentLight:"#b4afff",secondary:"#7dd3fc",secondaryLight:"#bae6fd",success:"#4ade80",danger:"#f87171",dangerLight:"#fca5a5",warning:"#fbbf24",onAccent:"#0c0a20",onSecondary:"#02121a",onDanger:"#1f0405"},radius:{sm:8,md:12,lg:20,xl:28,full:999}},j={bg:"#f1f2f7",surface:"#ffffff",surfaceRaised:"#f7f8fb",border:"#dadde6",muted:"#5b5d65",text:"#1f2129"},fe={neutral:Me({bg:u.color.bg,surface:u.color.surface,surfaceRaised:u.color.surfaceRaised,border:u.color.border,muted:u.color.muted,text:u.color.text}),accent:T(u.color.accent,u.color.accentLight),secondary:T(u.color.secondary,u.color.secondaryLight),success:T(u.color.success,u.color.success),danger:T(u.color.danger,u.color.dangerLight),warning:T(u.color.warning,u.color.warning)},re={neutral:De(j),accent:P(u.color.accent),secondary:P(u.color.secondary),success:P(u.color.success),danger:P(u.color.danger),warning:P(u.color.warning)},Ie=re.neutral[3],yt={neutral:Q(fe.neutral,u.color.bg),accent:Q(fe.accent,u.color.bg)},bt={neutral:Q(re.neutral,j.bg),accent:Q(re.accent,j.bg)};function $e(o={}){const t=o.appearance==="light",e={...t?{...u.color,...j,surfaceHover:Ie}:u.color,...o.color},n={...u.radius,...o.radius},c={bg:e.bg,surface:e.surface,surfaceRaised:e.surfaceRaised,border:e.border,muted:e.muted,text:e.text},d=t?{neutral:De(c),accent:P(e.accent),secondary:P(e.secondary),success:P(e.success),danger:P(e.danger),warning:P(e.warning)}:{neutral:Me(c),accent:T(e.accent,e.accentLight),secondary:T(e.secondary,e.secondaryLight),success:T(e.success,e.success),danger:T(e.danger,e.dangerLight),warning:T(e.warning,e.warning)},l={};for(const[g,y]of Object.entries(d))y.forEach((f,b)=>{l[`--gryt-${g}-${b+1}`]=f,l[`--color-gryt-${g}-${b+1}`]=f});for(const g of["neutral","accent"])Q(d[g],e.bg).forEach((y,f)=>{l[`--gryt-${g}-a${f+1}`]=y,l[`--color-gryt-${g}-a${f+1}`]=y});return{...l,"--gryt-bg":e.bg,"--gryt-surface":e.surface,"--gryt-surface-raised":e.surfaceRaised,"--gryt-surface-hover":e.surfaceHover,"--gryt-border":e.border,"--gryt-text":e.text,"--gryt-muted":e.muted,"--gryt-accent":e.accent,"--gryt-accent-light":e.accentLight,"--gryt-secondary":e.secondary,"--gryt-secondary-light":e.secondaryLight,"--gryt-success":e.success,"--gryt-danger":e.danger,"--gryt-danger-light":e.dangerLight,"--gryt-warning":e.warning,"--gryt-on-accent":e.onAccent,"--gryt-on-secondary":e.onSecondary,"--gryt-on-danger":e.onDanger,"--color-gryt-bg":e.bg,"--color-gryt-surface":e.surface,"--color-gryt-surface-raised":e.surfaceRaised,"--color-gryt-surface-hover":e.surfaceHover,"--color-gryt-border":e.border,"--color-gryt-text":e.text,"--color-gryt-muted":e.muted,"--color-gryt-accent":e.accent,"--color-gryt-accent-light":e.accentLight,"--color-gryt-secondary":e.secondary,"--color-gryt-secondary-light":e.secondaryLight,"--color-gryt-success":e.success,"--color-gryt-danger":e.danger,"--color-gryt-danger-light":e.dangerLight,"--color-gryt-warning":e.warning,"--color-gryt-on-accent":e.onAccent,"--color-gryt-on-secondary":e.onSecondary,"--color-gryt-on-danger":e.onDanger,"--gryt-radius-sm":`${n.sm}px`,"--gryt-radius-md":`${n.md}px`,"--gryt-radius-lg":`${n.lg}px`,"--gryt-radius-xl":`${n.xl}px`,"--gryt-radius-full":`${n.full}px`}}function mt(o){return Object.keys(o).some(t=>t.startsWith("--"))}function pt({children:o,className:t,theme:r,tooltipDelay:e=400}){const n=r===void 0?void 0:mt(r)?r:$e(r);return a.jsx("div",{className:t,style:n,children:a.jsx(H.Tooltip.Provider,{delay:e,children:o})})}const J=["accent","accentLight","secondary","secondaryLight","success","danger","dangerLight","warning","onAccent","onSecondary","onDanger"],be=["bg","surface","surfaceRaised","surfaceHover","border","muted","text"],oe=["sm","md","lg","xl","full"],He=60;function ae(o){return o.replace(/\s+/g," ").trim().slice(0,He)}const E={hue:{accent:u.color.accent,accentLight:u.color.accentLight,secondary:u.color.secondary,secondaryLight:u.color.secondaryLight,success:u.color.success,danger:u.color.danger,dangerLight:u.color.dangerLight,warning:u.color.warning,onAccent:u.color.onAccent,onSecondary:u.color.onSecondary,onDanger:u.color.onDanger},lightHue:null,dark:{bg:u.color.bg,surface:u.color.surface,surfaceRaised:u.color.surfaceRaised,surfaceHover:u.color.surfaceHover,border:u.color.border,muted:u.color.muted,text:u.color.text},light:{bg:j.bg,surface:j.surface,surfaceRaised:j.surfaceRaised,surfaceHover:Ie,border:j.border,muted:j.muted,text:j.text},radius:{...u.radius}};function me(o){return{...o.name===void 0?{}:{name:o.name},hue:{...o.hue},lightHue:o.lightHue===null?null:{...o.lightHue},dark:{...o.dark},light:{...o.light},radius:{...o.radius}}}function Ge(o,t){return t==="light"&&o.lightHue!==null?o.lightHue:o.hue}function xt(o,t){return{appearance:t,color:{...Ge(o,t),...o[t]},radius:{...o.radius}}}const K={accent:"accent",accentLight:"accent-light",secondary:"secondary",secondaryLight:"secondary-light",success:"success",danger:"danger",dangerLight:"danger-light",warning:"warning",onAccent:"on-accent",onSecondary:"on-secondary",onDanger:"on-danger"},Ee={bg:"bg",surface:"surface",surfaceRaised:"raised",surfaceHover:"hover",border:"border",muted:"muted",text:"text"},ht=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;function pe(o){return ht.test(o.trim())}function ne(o){const t=o.trim().toLowerCase();return t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function wt(o,t){const r=new URLSearchParams,e=c=>ne(c).slice(1),n=ae(o.name??"");n!==""&&r.set("name",n);for(const c of J)o.hue[c]!==E.hue[c]&&r.set(K[c],e(o.hue[c]));if(o.lightHue!==null)for(const c of J)r.set(`lh-${K[c]}`,e(o.lightHue[c]));for(const c of["dark","light"]){const d=c==="dark"?"d":"l";for(const l of be)o[c][l]!==E[c][l]&&r.set(`${d}-${Ee[l]}`,e(o[c][l]))}for(const c of oe)o.radius[c]!==E.radius[c]&&r.set(`r-${c}`,String(o.radius[c]));return t==="light"&&r.set("mode","light"),r}function vt(o){const t=o.trim();if(t==="")return null;if(t.startsWith("{"))return jt(t);const r=t.includes("?")?t.slice(t.indexOf("?")+1):t;return Rt(new URLSearchParams(r))}function Rt(o){const t=me(E);let r=!1;const e=c=>{const d=o.get(c);if(d===null)return null;const l=d.startsWith("#")?d:`#${d}`;return pe(l)?(r=!0,ne(l)):null},n=ae(o.get("name")??"");n!==""&&(t.name=n,r=!0);for(const c of J){const d=e(K[c]);d!==null&&(t.hue[c]=d)}if(o.has(`lh-${K.accent}`)){const c={...t.hue};for(const d of J){const l=e(`lh-${K[d]}`);l!==null&&(c[d]=l)}t.lightHue=c}for(const c of["dark","light"]){const d=c==="dark"?"d":"l";for(const l of be){const g=e(`${d}-${Ee[l]}`);g!==null&&(t[c][l]=g)}}for(const c of oe){const d=Number(o.get(`r-${c}`));Number.isFinite(d)&&d>=0&&d<=999&&o.has(`r-${c}`)&&(t.radius[c]=Math.round(d),r=!0)}return r?{theme:t,appearance:o.get("mode")==="light"?"light":"dark"}:null}function jt(o){let t;try{t=JSON.parse(o)}catch{return null}if(typeof t!="object"||t===null)return null;const r=t,e=me(E);let n=!1;const c=(d,l)=>{if(!(typeof d!="object"||d===null))for(const[g,y]of Object.entries(d))typeof y=="string"&&pe(y)&&g in l&&(l[g]=ne(y),n=!0)};if(typeof r.name=="string"){const d=ae(r.name);d!==""&&(e.name=d,n=!0)}if(c(r.hue,e.hue),c(r.dark,e.dark),c(r.light,e.light),typeof r.lightHue=="object"&&r.lightHue!==null){const d={...e.hue};c(r.lightHue,d),e.lightHue=d}if(typeof r.radius=="object"&&r.radius!==null)for(const[d,l]of Object.entries(r.radius)){const g=Number(l);oe.includes(d)&&Number.isFinite(g)&&g>=0&&g<=999&&(e.radius[d]=Math.round(g),n=!0)}return n?{theme:e,appearance:"dark"}:null}const ue={sm:8,md:12,lg:20,xl:28,full:999},ge={sm:6,md:8,lg:14,xl:18,full:999},Nt={sm:4,md:6,lg:10,xl:14,full:6},Tt={sm:6,md:8,lg:10,xl:14,full:10},Te={sm:2,md:4,lg:6,xl:8,full:4},Fe=[{id:"gryt",name:"Gryt",note:"What the library ships, from the Gryt code-theme.",group:"Gryt",source:"github.com/Gryt-chat/code-theme",theme:E},{id:"ember",name:"Ember",note:"Warm all the way down — the neutrals are brown, not blue.",group:"Gryt",theme:{name:"Ember",hue:{accent:"#f0803c",accentLight:"#ff9f66",secondary:"#d9a441",secondaryLight:"#ecc06a",success:"#8bb056",danger:"#e35d55",dangerLight:"#ef8079",warning:"#e8b33e",onAccent:"#231004",onSecondary:"#241a04",onDanger:"#2b0a08"},lightHue:null,dark:{bg:"#17110e",surface:"#1f1815",surfaceRaised:"#251d19",surfaceHover:"#33261f",border:"#352822",muted:"#a48f81",text:"#f5ece5"},light:{bg:"#f6efe8",surface:"#fffdfb",surfaceRaised:"#faf3ec",surfaceHover:"#efe3d8",border:"#e0d2c4",muted:"#6b5b50",text:"#241a14"},radius:ue}},{id:"paper",name:"Paper",note:"Near-monochrome. One quiet slate accent and nothing else.",group:"Gryt",theme:{name:"Paper",hue:{accent:"#8390a8",accentLight:"#a3aec2",secondary:"#93a0a0",secondaryLight:"#b1bcbc",success:"#7f9b7f",danger:"#b56b6b",dangerLight:"#c98d8d",warning:"#b39a6a",onAccent:"#11151c",onSecondary:"#121717",onDanger:"#1d0e0e"},lightHue:null,dark:{bg:"#101011",surface:"#17171a",surfaceRaised:"#1d1d20",surfaceHover:"#282a2e",border:"#2a2a2e",muted:"#8e8e94",text:"#ededf0"},light:{bg:"#f0f0f2",surface:"#ffffff",surfaceRaised:"#f7f7f9",surfaceHover:"#e6e6ea",border:"#d6d6dc",muted:"#5b5b63",text:"#17171a"},radius:ge}},{id:"signal",name:"Signal",note:"Black, white, and a yellow that cannot be missed.",group:"Gryt",theme:{name:"Signal",hue:{accent:"#ffd400",accentLight:"#ffe454",secondary:"#00d0ff",secondaryLight:"#66e2ff",success:"#00e06a",danger:"#ff453a",dangerLight:"#ff7a72",warning:"#ffab00",onAccent:"#161200",onSecondary:"#001a20",onDanger:"#1a0300"},lightHue:null,dark:{bg:"#000000",surface:"#0c0c0c",surfaceRaised:"#151515",surfaceHover:"#242424",border:"#454545",muted:"#bcbcbc",text:"#ffffff"},light:{bg:"#f0f0f0",surface:"#ffffff",surfaceRaised:"#f8f8f8",surfaceHover:"#e3e3e3",border:"#6f6f6f",muted:"#3d3d3d",text:"#000000"},radius:Te}},{id:"dracula",name:"Dracula",note:"The purple-and-pink dark theme, with Alucard as its light half.",group:"Ported",source:"draculatheme.com, MIT",theme:{name:"Dracula",hue:{accent:"#bd93f9",accentLight:"#d0b3fb",secondary:"#8be9fd",secondaryLight:"#aff0fe",success:"#50fa7b",danger:"#ff5555",dangerLight:"#ff7979",warning:"#ffb86c",onAccent:"#282a36",onSecondary:"#282a36",onDanger:"#282a36"},lightHue:{accent:"#644ac9",accentLight:"#7b64d6",secondary:"#036a96",secondaryLight:"#0b83b5",success:"#14710a",danger:"#cb3a2a",dangerLight:"#d95445",warning:"#a34d14",onAccent:"#fffbeb",onSecondary:"#fffbeb",onDanger:"#fffbeb"},dark:{bg:"#282a36",surface:"#31323f",surfaceRaised:"#383a49",surfaceHover:"#44475a",border:"#44475a",muted:"#6272a4",text:"#f8f8f2"},light:{bg:"#f5f1e1",surface:"#fffbeb",surfaceRaised:"#faf6e6",surfaceHover:"#ece7d4",border:"#dcd6bf",muted:"#6c664b",text:"#1f1f1f"},radius:ge}},{id:"nord",name:"Nord",note:"Polar Night and Snow Storm, with Frost on top.",group:"Ported",source:"nordtheme.com, MIT",theme:{name:"Nord",hue:{accent:"#88c0d0",accentLight:"#8fbcbb",secondary:"#81a1c1",secondaryLight:"#a3b8d4",success:"#a3be8c",danger:"#bf616a",dangerLight:"#d08770",warning:"#ebcb8b",onAccent:"#2e3440",onSecondary:"#2e3440",onDanger:"#eceff4"},lightHue:{accent:"#5e81ac",accentLight:"#81a1c1",secondary:"#8fbcbb",secondaryLight:"#88c0d0",success:"#a3be8c",danger:"#bf616a",dangerLight:"#d08770",warning:"#ebcb8b",onAccent:"#eceff4",onSecondary:"#2e3440",onDanger:"#eceff4"},dark:{bg:"#2e3440",surface:"#3b4252",surfaceRaised:"#434c5e",surfaceHover:"#4c566a",border:"#4c566a",muted:"#d8dee9",text:"#eceff4"},light:{bg:"#e5e9f0",surface:"#eceff4",surfaceRaised:"#e9edf2",surfaceHover:"#d8dee9",border:"#c9d1de",muted:"#4c566a",text:"#2e3440"},radius:ge}},{id:"catppuccin",name:"Catppuccin",note:"Mocha for dark, Latte for light. Mauve does the accent work.",group:"Ported",source:"catppuccin/palette, MIT",theme:{name:"Catppuccin",hue:{accent:"#cba6f7",accentLight:"#dcc0fa",secondary:"#89b4fa",secondaryLight:"#a8c8fb",success:"#a6e3a1",danger:"#f38ba8",dangerLight:"#eba0ac",warning:"#f9e2af",onAccent:"#1e1e2e",onSecondary:"#1e1e2e",onDanger:"#1e1e2e"},lightHue:{accent:"#8839ef",accentLight:"#9a55f2",secondary:"#1e66f5",secondaryLight:"#4680f7",success:"#40a02b",danger:"#d20f39",dangerLight:"#e64553",warning:"#df8e1d",onAccent:"#eff1f5",onSecondary:"#eff1f5",onDanger:"#eff1f5"},dark:{bg:"#1e1e2e",surface:"#313244",surfaceRaised:"#45475a",surfaceHover:"#585b70",border:"#45475a",muted:"#a6adc8",text:"#cdd6f4"},light:{bg:"#e6e9ef",surface:"#eff1f5",surfaceRaised:"#eaedf3",surfaceHover:"#dce0e8",border:"#ccd0da",muted:"#6c6f85",text:"#4c4f69"},radius:ue}},{id:"github",name:"GitHub",note:"Primer's own tokens, six-pixel corners included.",group:"Ported",source:"@primer/primitives",theme:{name:"GitHub",hue:{accent:"#1f6feb",accentLight:"#4493f8",secondary:"#8957e5",secondaryLight:"#a371f7",success:"#238636",danger:"#da3633",dangerLight:"#f85149",warning:"#9e6a03",onAccent:"#ffffff",onSecondary:"#ffffff",onDanger:"#ffffff"},lightHue:{accent:"#0969da",accentLight:"#218bff",secondary:"#8250df",secondaryLight:"#a475f9",success:"#1f883d",danger:"#cf222e",dangerLight:"#d1242f",warning:"#9a6700",onAccent:"#ffffff",onSecondary:"#ffffff",onDanger:"#ffffff"},dark:{bg:"#0d1117",surface:"#151b23",surfaceRaised:"#1c222b",surfaceHover:"#262c36",border:"#3d444d",muted:"#9198a1",text:"#f0f6fc"},light:{bg:"#f6f8fa",surface:"#ffffff",surfaceRaised:"#fbfcfd",surfaceHover:"#eef1f4",border:"#d1d9e0",muted:"#59636e",text:"#1f2328"},radius:Nt}},{id:"claude",name:"Claude",note:"Anthropic's clay orange on cream and near-black.",group:"Ported",source:"anthropic.com — a likeness, not a published palette",theme:{name:"Claude",hue:{accent:"#d97757",accentLight:"#e59275",secondary:"#7d9ec4",secondaryLight:"#9db8d6",success:"#6ba368",danger:"#bf4d43",dangerLight:"#d4726a",warning:"#d9a441",onAccent:"#241009",onSecondary:"#0c1720",onDanger:"#faf9f5"},lightHue:null,dark:{bg:"#141413",surface:"#1f1e1d",surfaceRaised:"#262624",surfaceHover:"#3d3d3a",border:"#3d3d3a",muted:"#b0aea5",text:"#faf9f5"},light:{bg:"#f0eee6",surface:"#faf9f5",surfaceRaised:"#f5f3ec",surfaceHover:"#e8e6dc",border:"#d5d2c5",muted:"#87867f",text:"#141413"},radius:ue}},{id:"shadcn",name:"shadcn/ui",note:"Zinc neutrals and a ten-pixel radius. No pills anywhere.",group:"Ported",source:"ui.shadcn.com, MIT — accent adapted",theme:{name:"shadcn/ui",hue:{accent:"#a1a1aa",accentLight:"#d4d4d8",secondary:"#71717a",secondaryLight:"#a1a1aa",success:"#4ade80",danger:"#e7000b",dangerLight:"#fb2c36",warning:"#fd9a00",onAccent:"#18181b",onSecondary:"#fafafa",onDanger:"#fafafa"},lightHue:{accent:"#3f3f46",accentLight:"#52525b",secondary:"#71717a",secondaryLight:"#a1a1aa",success:"#00a63e",danger:"#e7000b",dangerLight:"#fb2c36",warning:"#e17100",onAccent:"#fafafa",onSecondary:"#fafafa",onDanger:"#fafafa"},dark:{bg:"#18181b",surface:"#27272a",surfaceRaised:"#3f3f46",surfaceHover:"#3f3f46",border:"#3f3f46",muted:"#a1a1aa",text:"#fafafa"},light:{bg:"#f4f4f5",surface:"#ffffff",surfaceRaised:"#fafafa",surfaceHover:"#e4e4e7",border:"#e4e4e7",muted:"#71717a",text:"#18181b"},radius:Tt}},{id:"solarized",name:"Solarized",note:"Both halves on one set of accents, as designed.",group:"Ported",source:"ethanschoonover.com/solarized, MIT",theme:{name:"Solarized",hue:{accent:"#268bd2",accentLight:"#4ba3e3",secondary:"#2aa198",secondaryLight:"#43bbb1",success:"#859900",danger:"#dc322f",dangerLight:"#cb4b16",warning:"#b58900",onAccent:"#fdf6e3",onSecondary:"#002b36",onDanger:"#fdf6e3"},lightHue:null,dark:{bg:"#002b36",surface:"#073642",surfaceRaised:"#0b414f",surfaceHover:"#134b5a",border:"#0f4757",muted:"#93a1a1",text:"#eee8d5"},light:{bg:"#eee8d5",surface:"#fdf6e3",surfaceRaised:"#f7f0dc",surfaceHover:"#e4dcc4",border:"#d9d0b4",muted:"#586e75",text:"#073642"},radius:Te}}],Pt=new Map(Fe.map(o=>[o.id,o]));function s(...o){return Qe.twMerge(We.clsx(o))}const kt={primary:"bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",secondary:"bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",neutral:"bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",danger:"bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",ghost:"bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},St={xsmall:"min-h-8 px-3 text-xs",small:"min-h-9 px-4 text-sm",medium:"min-h-10 px-5 text-sm",large:"min-h-12 px-6 text-base"},_e=i.forwardRef(function({children:t,className:r,endIcon:e,size:n="medium",startIcon:c,tone:d="primary",...l},g){return a.jsxs(Se.Button,{ref:g,className:s("gryt-button","inline-flex cursor-pointer items-center justify-center gap-2 border-0 shadow-none","rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none","transition-[scale,background-color,color]","duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.03]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-50",St[n],kt[d],r),...l,children:[c,t,e]})}),x="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",Ct="has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light",qe=["w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised","text-gryt-text outline-none placeholder:text-gryt-muted","transition-colors duration-150 motion-reduce:transition-none","hover:border-gryt-accent-light focus:border-gryt-accent","disabled:cursor-not-allowed disabled:opacity-60"].join(" "),Be={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},F="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",I=["transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0"].join(" "),O="cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",Lt={primary:"data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",secondary:"data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",neutral:"data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",danger:"data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",success:"data-checked:bg-gryt-success data-checked:text-gryt-on-accent",warning:"data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"},ze={primary:"bg-gryt-accent",secondary:"bg-gryt-secondary",neutral:"bg-gryt-surface-hover",danger:"bg-gryt-danger",success:"bg-gryt-success",warning:"bg-gryt-warning"},At={primary:"data-checked:border-gryt-accent",secondary:"data-checked:border-gryt-secondary",neutral:"data-checked:border-gryt-muted",danger:"data-checked:border-gryt-danger",success:"data-checked:border-gryt-success",warning:"data-checked:border-gryt-warning"},Mt={primary:"data-checked:bg-gryt-accent",secondary:"data-checked:bg-gryt-secondary",neutral:"data-checked:bg-gryt-surface-hover",danger:"data-checked:bg-gryt-danger",success:"data-checked:bg-gryt-success",warning:"data-checked:bg-gryt-warning"},Dt={primary:"text-gryt-accent-11 hover:not-data-disabled:bg-gryt-accent-3",secondary:"text-gryt-secondary-11 hover:not-data-disabled:bg-gryt-secondary-3",neutral:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",danger:"text-gryt-danger-11 hover:not-data-disabled:bg-gryt-danger-3",ghost:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},It={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},$t=i.forwardRef(function({className:t,size:r="medium",tone:e="neutral",...n},c){return a.jsx(Se.Button,{ref:c,className:s("gryt-icon-button","inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0","rounded-(--gryt-radius-full) select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",x,O,It[r],Dt[e],t),...n})}),Ht=i.forwardRef(function({className:t,elevated:r=!1,...e},n){return a.jsx("div",{ref:n,className:s("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",r?"bg-gryt-surface-raised":"bg-gryt-surface",t),...e})}),Gt=i.forwardRef(function({children:t,className:r,from:e="assistant",...n},c){return a.jsx("div",{ref:c,className:s("gryt-message-bubble",e==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",e==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",e==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",r),...n,children:t})}),Et=i.forwardRef(function({className:t,error:r=!1,fieldClassName:e,helperText:n,label:c,minRows:d=3,multiline:l=!1,size:g="medium",...y},f){const b=a.jsx(ee.Field.Control,{ref:f,render:l?a.jsx("textarea",{rows:d}):void 0,className:s("gryt-text-field-control",qe,l&&"resize-y leading-6",r?"border-gryt-danger":"border-gryt-border",Be[g],t),...y});return a.jsxs(ee.Field.Root,{className:s("gryt-text-field flex w-full flex-col gap-1.5",e),children:[c?a.jsx(ee.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:c}):null,b,n?a.jsx(ee.Field.Description,{className:s("text-xs",r?"text-gryt-danger-11":"text-gryt-muted"),children:n}):null]})}),Ft=i.forwardRef(function({className:t,disabled:r=!1,maxRows:e=8,minRows:n=1,onSubmit:c,placeholder:d="Message Gryt",submitLabel:l="Send",...g},y){const f=i.useRef(null),b=i.useCallback(()=>{const h=f.current;if(!h)return;const ce=window.getComputedStyle(h),xe=parseFloat(ce.lineHeight)||24,he=parseFloat(ce.paddingTop)+parseFloat(ce.paddingBottom);h.style.height="auto",h.style.height=`${Math.min(Math.max(h.scrollHeight,xe*n+he),xe*e+he)}px`},[e,n]);i.useLayoutEffect(b,[b,g.value]);function R(h){if(!c){h.preventDefault();return}c(h)}return a.jsxs("form",{className:s("gryt-composer",t),onSubmit:R,children:[a.jsx("textarea",{ref:h=>{f.current=h,typeof y=="function"?y(h):y&&(y.current=h)},rows:n,disabled:r,placeholder:d,onInput:b,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...g}),a.jsx(_e,{type:"submit",disabled:r,size:"small",endIcon:a.jsx(S.PaperPlaneTilt,{size:14,weight:"fill"}),children:l})]})}),_t={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},Oe=i.forwardRef(function({alt:t,children:r,className:e,fallback:n,size:c="medium",src:d,...l},g){return a.jsxs(ie.Avatar.Root,{ref:g,className:s("gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none","rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",_t[c],e),...l,children:[d?a.jsx(ie.Avatar.Image,{src:d,alt:t,className:"h-full w-full object-cover"}):null,a.jsx(ie.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:n??r})]})}),qt=i.forwardRef(function({active:t=!1,avatar:r,className:e,subtitle:n,title:c,...d},l){return a.jsxs("button",{ref:l,type:"button",className:s("gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",e),...d,children:[r??a.jsx(Oe,{size:"small",className:s(t?"bg-gryt-on-accent text-gryt-accent-9 ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:c.slice(0,1).toUpperCase()}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block truncate text-sm font-semibold",children:c}),n?a.jsx("span",{className:s("block truncate text-xs",t?"text-gryt-on-accent/85":"text-gryt-muted"),children:n}):null]})]})}),Bt=i.forwardRef(function({badgeContent:t,children:r,className:e,max:n=99,showZero:c=!1,...d},l){const g=typeof t=="number"?t:null,y=g!==null&&g===0&&!c,f=g!==null&&g>n?`${n}+`:t;return a.jsxs("span",{ref:l,className:s("gryt-badge relative inline-flex",e),...d,children:[r,t!==void 0&&!y?a.jsx("span",{className:s("gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center","min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5","bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent","ring-2 ring-gryt-bg"),children:f}):null]})}),zt={neutral:"border-gryt-border bg-gryt-surface-raised text-gryt-text",primary:"border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",secondary:"border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",success:"border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",warning:"border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",danger:"border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"},Ot=i.forwardRef(function({children:t,className:r,icon:e,label:n,onDelete:c,tone:d="neutral",...l},g){return a.jsxs("span",{ref:g,className:s("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",zt[d],r),...l,children:[e,n??t,c?a.jsx("button",{type:"button","aria-label":"Remove",onClick:c,className:s("-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)","opacity-70 transition-opacity hover:opacity-100",x),children:a.jsx(S.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),Ut=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(we.Checkbox.Root,{ref:n,className:s("gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",x,O,Lt[r],t),...e,children:a.jsx(we.Checkbox.Indicator,{keepMounted:!0,className:s("flex origin-center","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none"),children:a.jsx(S.Check,{size:12,weight:"bold"})})})}),Vt=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(ve.Radio.Root,{ref:n,className:s("gryt-radio flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",x,O,At[r],t),...e,children:a.jsx(ve.Radio.Indicator,{keepMounted:!0,className:s("h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none",ze[r])})})}),Yt=i.forwardRef(function({className:t,...r},e){return a.jsx(Je.RadioGroup,{ref:e,className:s("gryt-radio-group flex flex-col gap-2",t),...r})}),Xt=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(Re.Switch.Root,{ref:n,className:s("gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.05]","motion-safe:active:not-data-disabled:scale-[0.95]",x,O,Mt[r],t),...e,children:a.jsx(Re.Switch.Thumb,{className:s("h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text","transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-checked:translate-x-4 data-checked:bg-gryt-bg")})})}),Pe=3;function Kt({className:o,tone:t="primary","aria-label":r,...e}){const[n,c]=i.useState(!1),d=i.useRef(null);i.useEffect(()=>{if(!n&&d.current===null)return;const f=()=>{d.current=null,c(!1)};return window.addEventListener("pointerup",f),window.addEventListener("pointercancel",f),()=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f)}},[n]);function l(f){d.current={x:f.clientX,y:f.clientY}}function g(f){const b=d.current;if(b===null||n)return;(Math.abs(f.clientX-b.x)>Pe||Math.abs(f.clientY-b.y)>Pe)&&c(!0)}const y=n?"transition-none":"duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";return a.jsx(U.Slider.Root,{className:s("gryt-slider w-full",o),...e,children:a.jsx(U.Slider.Control,{className:"flex w-full cursor-pointer touch-none items-center py-2 select-none",onPointerDown:l,onPointerMove:g,children:a.jsxs(U.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[a.jsx(U.Slider.Indicator,{className:s("h-full rounded-(--gryt-radius-full) select-none","transition-[width]",y,ze[t])}),a.jsx(U.Slider.Thumb,{"aria-label":r,className:s("group h-4 w-4 rounded-(--gryt-radius-full) select-none","transition-[inset-inline-start]",y,Ct),children:a.jsx("span",{className:s("block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]","motion-reduce:transition-none")})})]})})})}const Wt={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function Qt({className:o,label:t,options:r=[],placeholder:e="Select",size:n="medium",...c}){return a.jsxs(w.Select.Root,{items:r,...c,children:[a.jsxs("div",{className:s("gryt-select flex w-full flex-col gap-1.5",o),children:[t?a.jsx(w.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:t}):null,a.jsxs(w.Select.Trigger,{className:s("flex w-full cursor-pointer items-center justify-between gap-2","rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised","text-gryt-text select-none","transition-colors duration-150 hover:border-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-60",x,Wt[n]),children:[a.jsx(w.Select.Value,{placeholder:e}),a.jsx(w.Select.Icon,{className:"shrink-0 text-gryt-muted",children:a.jsx(S.CaretUpDown,{size:16})})]})]}),a.jsx(w.Select.Portal,{children:a.jsx(w.Select.Positioner,{sideOffset:6,className:"outline-none",children:a.jsx(w.Select.Popup,{className:s("min-w-(--anchor-width) p-1",F,I),children:a.jsx(w.Select.List,{children:r.map(d=>a.jsxs(w.Select.Item,{value:d.value,disabled:d.disabled,className:s("flex cursor-pointer items-center justify-between gap-2","rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text","outline-none select-none data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50"),children:[a.jsx(w.Select.ItemText,{children:d.label}),a.jsx(w.Select.ItemIndicator,{className:"text-gryt-accent-11",children:a.jsx(S.Check,{size:14,weight:"bold"})})]},String(d.value)))})})})})]})}function Jt({children:o,className:t,side:r="top",sideOffset:e=8,title:n}){return a.jsxs(H.Tooltip.Root,{children:[a.jsx(H.Tooltip.Trigger,{render:o}),a.jsx(H.Tooltip.Portal,{children:a.jsx(H.Tooltip.Positioner,{side:r,sideOffset:e,children:a.jsx(H.Tooltip.Popup,{className:s("gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised","px-2.5 py-1.5 text-xs text-gryt-text",I,t),children:n})})})]})}const Zt=H.Tooltip.Provider,er=i.forwardRef(function({className:t,orientation:r="horizontal",...e},n){return a.jsx(Ze.Separator,{ref:n,orientation:r,className:s("gryt-divider bg-gryt-border",r==="vertical"?"h-full w-px":"h-px w-full",t),...e})}),tr=i.forwardRef(function({className:t,...r},e){return a.jsx("div",{ref:e,className:s("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",t),...r})});function rr({children:o,className:t,subheader:r,title:e,...n}){return a.jsxs("div",{className:s("gryt-card-header flex flex-col gap-1 p-4",t),...n,children:[e?a.jsx("span",{className:"text-base font-semibold text-gryt-text",children:e}):null,r?a.jsx("span",{className:"text-sm text-gryt-muted",children:r}):null,o]})}function or({className:o,...t}){return a.jsx("div",{className:s("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",o),...t})}function ar({className:o,...t}){return a.jsx("div",{className:s("gryt-card-actions flex items-center gap-2 px-4 pb-4",o),...t})}const nr={info:"border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",success:"border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",warning:"border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",error:"border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"},sr=i.forwardRef(function({className:t,severity:r="info",...e},n){return a.jsx("div",{ref:n,role:"alert",className:s("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",nr[r],t),...e})});function cr({className:o,value:t=null,...r}){return a.jsx(de.Progress.Root,{value:t,className:s("gryt-progress w-full",o),...r,children:a.jsx(de.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:a.jsx(de.Progress.Indicator,{className:"h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none"})})})}function ir({className:o,size:t=24,"aria-label":r="Loading"}){return a.jsx(S.CircleNotch,{role:"status","aria-label":r,size:t,weight:"bold",className:s("gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",o)})}const dr={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function lr({className:o,height:t,style:r,variant:e="text",width:n,...c}){const d={width:n,height:t,...r};return a.jsx("div",{"aria-hidden":"true",className:s("gryt-skeleton bg-white/9 motion-safe:animate-pulse",dr[e],o),style:d,...c})}const Ue="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",ur=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Backdrop,{ref:e,className:s("gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)",Ue,"data-starting-style:opacity-0 data-ending-style:opacity-0",t),...r})}),gr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Popup,{ref:e,className:s("gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",Ue,"data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",t),...r})}),fr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Title,{ref:e,className:s("gryt-dialog-title text-base font-semibold text-gryt-text",t),...r})}),yr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Description,{ref:e,className:s("gryt-dialog-description text-sm text-gryt-muted",t),...r})}),br=i.forwardRef(function({className:t,...r},e){return a.jsx("div",{ref:e,className:s("gryt-dialog-footer flex justify-end gap-3",t),...r})}),mr={Root:M.Dialog.Root,Trigger:M.Dialog.Trigger,Portal:M.Dialog.Portal,Close:M.Dialog.Close,Backdrop:ur,Popup:gr,Title:fr,Description:yr,Footer:br},pr=()=>()=>{};function Ve(o){const t=i.useCallback(e=>{if(typeof window>"u"||!window.matchMedia)return pr();const n=window.matchMedia(o);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)},[o]),r=i.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(o).matches,[o]);return i.useSyncExternalStore(t,r,()=>!1)}const xr={left:"left",right:"right",top:"up",bottom:"down"},se=i.createContext("right"),hr={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},wr={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},vr={left:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),right:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-mr-(--gryt-drawer-bleed) border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]"].join(" "),top:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mt-(--gryt-drawer-bleed) border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),bottom:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mb-(--gryt-drawer-bleed) border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"].join(" ")};function Rr({side:o="right",sheetOnMobile:t=!0,children:r,...e}){const n=Ve("(max-width: 767px)"),c=t&&n?"bottom":o;return a.jsx(se.Provider,{value:c,children:a.jsx(N.Drawer.Root,{swipeDirection:xr[c],...e,children:r})})}const jr=i.forwardRef(function({className:t,...r},e){const n=i.useContext(se);return a.jsx(N.Drawer.Viewport,{ref:e,className:s("gryt-drawer-viewport fixed inset-0 z-50 flex",hr[n],t),...r})}),Nr=i.forwardRef(function({className:t,...r},e){const n=i.useContext(se);return a.jsx(N.Drawer.Popup,{ref:e,className:s("gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text","overflow-y-auto overscroll-contain outline-none","transition-transform duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0 data-swiping:select-none","motion-reduce:transition-none",vr[n],wr[n],t),...r})}),Tr=i.forwardRef(function({className:t,...r},e){return a.jsx(N.Drawer.Backdrop,{ref:e,className:s("gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","[opacity:calc(1-var(--drawer-swipe-progress,0))]","transition-opacity duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0","data-starting-style:opacity-0 data-ending-style:opacity-0","motion-reduce:transition-none",t),...r})});function Pr({className:o}){const t=i.useContext(se);return t!=="bottom"&&t!=="top"?null:a.jsx("div",{"aria-hidden":!0,className:s("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",t==="top"&&"order-last",o)})}const kr={Root:Rr,Trigger:N.Drawer.Trigger,Portal:N.Drawer.Portal,Backdrop:Tr,Viewport:jr,Popup:Nr,Content:N.Drawer.Content,Grabber:Pr,Close:N.Drawer.Close,Title:N.Drawer.Title,Description:N.Drawer.Description},Sr=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(G.Menu.Positioner,{ref:n,sideOffset:r,className:s("gryt-menu-positioner outline-none",t),...e})}),Cr=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Popup,{ref:e,className:s("gryt-menu min-w-44 p-1 outline-none",F,I,t),...r})}),Lr=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Item,{ref:e,className:s("gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",t),...r})}),Ar=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Separator,{ref:e,className:s("gryt-menu-separator my-1 h-px bg-gryt-border",t),...r})}),te={Root:G.Menu.Root,Trigger:G.Menu.Trigger,Portal:G.Menu.Portal,Positioner:Sr,Popup:Cr,Item:Lr,Separator:Ar},Mr=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Root,{ref:e,className:s("gryt-tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",t),...r})}),Dr=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.List,{ref:e,className:s("gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1","data-[orientation=vertical]:flex data-[orientation=vertical]:shrink-0","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch","data-[orientation=vertical]:rounded-(--gryt-radius-lg)",t),...r})}),Ye=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Tab,{ref:e,className:s("gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap","rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5","text-sm font-medium text-gryt-muted select-none","relative z-10 transition-colors duration-150 hover:text-gryt-text","data-active:text-gryt-on-accent","data-[orientation=vertical]:min-h-9 data-[orientation=vertical]:justify-start","data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3","data-[orientation=vertical]:rounded-(--gryt-radius-md)","data-disabled:cursor-not-allowed data-disabled:opacity-50",x,t),...r})}),Ir=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Indicator,{ref:e,renderBeforeHydration:!0,className:s("gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]","w-(--active-tab-width) translate-x-(--active-tab-left)","rounded-(--gryt-radius-full) bg-gryt-accent","transition-[translate,width] duration-(--gryt-dur-spring) ease-spring","motion-reduce:transition-none","[[data-orientation=vertical]_&]:top-0 [[data-orientation=vertical]_&]:left-1","[[data-orientation=vertical]_&]:h-(--active-tab-height)","[[data-orientation=vertical]_&]:w-[calc(100%-0.5rem)]","[[data-orientation=vertical]_&]:translate-x-0","[[data-orientation=vertical]_&]:translate-y-(--active-tab-top)","[[data-orientation=vertical]_&]:rounded-(--gryt-radius-md)","[[data-orientation=vertical]_&]:transition-[translate,height]",t),...r})}),$r=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Panel,{ref:e,className:s("gryt-tabs-panel pt-3 text-sm text-gryt-text","data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:flex-1","data-[orientation=vertical]:pt-0 data-[orientation=vertical]:pl-4",t),...r})}),Hr=Object.assign(Mr,{List:Dr,Tab:Ye,Panel:$r,Indicator:Ir}),Gr=i.forwardRef(function({className:t,...r},e){return a.jsx(W.Accordion.Root,{ref:e,className:s("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",t),...r})}),Er=i.forwardRef(function({className:t,...r},e){return a.jsx(W.Accordion.Item,{ref:e,className:s("gryt-accordion-item",t),...r})}),Fr=i.forwardRef(function({children:t,className:r,expandIcon:e,...n},c){return a.jsx(W.Accordion.Header,{className:"gryt-accordion-header m-0",children:a.jsxs(W.Accordion.Trigger,{ref:c,className:s("gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3","rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5","text-left text-sm font-medium text-gryt-text select-none","transition-colors duration-150 hover:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",x,r),...n,children:[t,e===void 0?a.jsx(S.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):e]})})}),_r=i.forwardRef(function({children:t,className:r,...e},n){return a.jsx(W.Accordion.Panel,{ref:n,className:s("gryt-accordion-panel overflow-hidden text-sm text-gryt-muted","h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",r),...e,children:a.jsx("div",{className:"px-3 pt-1 pb-3",children:t})})}),qr=Object.assign(Gr,{Item:Er,Trigger:Fr,Panel:_r}),Br=i.forwardRef(function({className:t,sideOffset:r=2,...e},n){return a.jsx(A.ContextMenu.Positioner,{ref:n,sideOffset:r,className:s("gryt-context-menu-positioner outline-none",t),...e})}),zr={Root:A.ContextMenu.Root,Trigger:A.ContextMenu.Trigger,Portal:A.ContextMenu.Portal,Positioner:Br,Popup:te.Popup,Item:te.Item,Separator:te.Separator,Group:A.ContextMenu.Group,GroupLabel:A.ContextMenu.GroupLabel,SubmenuRoot:A.ContextMenu.SubmenuRoot,SubmenuTrigger:A.ContextMenu.SubmenuTrigger},Or=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(C.Popover.Positioner,{ref:n,sideOffset:r,className:s("gryt-popover-positioner outline-none",t),...e})}),Ur=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Popup,{ref:e,className:s("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",F,I,t),...r})}),Vr=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Title,{ref:e,className:s("gryt-popover-title text-sm font-semibold text-gryt-text",t),...r})}),Yr=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Description,{ref:e,className:s("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",t),...r})}),Xr={Root:C.Popover.Root,Trigger:C.Popover.Trigger,Portal:C.Popover.Portal,Positioner:Or,Popup:Ur,Title:Vr,Description:Yr,Close:C.Popover.Close,Arrow:C.Popover.Arrow},Kr={neutral:"border-white/8 bg-gryt-surface",info:"border-gryt-secondary-6 bg-gryt-secondary-2",success:"border-gryt-success-6 bg-gryt-success-2",warning:"border-gryt-warning-6 bg-gryt-warning-2",danger:"border-gryt-danger-6 bg-gryt-danger-2"},Wr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Viewport,{ref:e,className:s("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",t),...r})}),Qr=i.forwardRef(function({className:t,severity:r="neutral",...e},n){return a.jsx(L.Toast.Root,{ref:n,className:s("gryt-toast relative flex flex-col p-3 pr-9","rounded-(--gryt-radius-xl) border text-gryt-text",Kr[r],"transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring","data-starting-style:translate-y-2 data-starting-style:opacity-0","data-ending-style:translate-y-2 data-ending-style:opacity-0","motion-reduce:transition-none",t),...e})}),Jr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Title,{ref:e,className:s("gryt-toast-title text-sm font-semibold text-gryt-text",t),...r})}),Zr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Description,{ref:e,className:s("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",t),...r})}),eo=i.forwardRef(function({className:t,children:r,...e},n){return a.jsx(L.Toast.Close,{ref:n,"aria-label":"Close",className:s("gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center","rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted","transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",t),...e,children:r??a.jsx(S.X,{size:14,weight:"bold"})})}),to=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Action,{ref:e,className:s("gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0","bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:scale-[1.04] motion-safe:active:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",t),...r})}),ro={Provider:L.Toast.Provider,Portal:L.Toast.Portal,Viewport:Wr,Root:Qr,Title:Jr,Description:Zr,Close:eo,Action:to},oo=L.Toast.useToastManager,ao=i.forwardRef(function({className:t,...r},e){return a.jsx(B.ScrollArea.Root,{ref:e,className:s("gryt-scroll-area relative",t),...r})}),no=i.forwardRef(function({className:t,...r},e){return a.jsx(B.ScrollArea.Viewport,{ref:e,className:s("gryt-scroll-area-viewport h-full w-full overscroll-contain","focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",t),...r})}),so=i.forwardRef(function({className:t,orientation:r,...e},n){return a.jsx(B.ScrollArea.Scrollbar,{ref:n,orientation:r,className:s("gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none","opacity-0 transition-opacity duration-(--gryt-dur-fast)","data-hovering:opacity-100 data-scrolling:opacity-100","motion-reduce:transition-none",r==="horizontal"?"h-2 flex-col":"w-2",t),...e,children:a.jsx(B.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),co={Root:ao,Viewport:no,Scrollbar:so,Content:B.ScrollArea.Content,Corner:B.ScrollArea.Corner},io={primary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent","data-pressed:hover:not-data-disabled:bg-gryt-accent"].join(" "),secondary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-secondary data-pressed:text-gryt-on-secondary","data-pressed:hover:not-data-disabled:bg-gryt-secondary"].join(" "),neutral:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-surface-hover data-pressed:text-gryt-text"].join(" "),danger:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger","data-pressed:hover:not-data-disabled:bg-gryt-danger"].join(" ")},lo={xsmall:"h-8 min-w-8 px-2 text-xs",small:"h-9 min-w-9 px-2.5 text-sm",medium:"h-10 min-w-10 px-3 text-sm",large:"h-12 min-w-12 px-4 text-base"},uo=i.forwardRef(function({className:t,size:r="medium",tone:e="primary",...n},c){return a.jsx(et.Toggle,{ref:c,className:s("gryt-toggle","inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent","rounded-(--gryt-radius-full) font-medium select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.06]","motion-safe:active:not-data-disabled:scale-[0.94]",x,O,lo[r],io[e],t),...n})}),go=i.forwardRef(function({className:t,...r},e){return a.jsx(tt.ToggleGroup,{ref:e,className:s("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",t),...r})}),fo={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function yo({className:o,value:t,label:r,showValue:e=!1,tone:n="primary",...c}){return a.jsxs(V.Meter.Root,{value:t,className:s("gryt-meter flex w-full flex-col gap-1.5",o),...c,children:[(r||e)&&a.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[r?a.jsx(V.Meter.Label,{className:"text-sm text-gryt-muted",children:r}):a.jsx("span",{}),e&&a.jsx(V.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),a.jsx(V.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:a.jsx(V.Meter.Indicator,{className:s("h-full rounded-(--gryt-radius-full)","transition-[width] duration-120 ease-out motion-reduce:transition-none",fo[n])})})]})}const bo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Popup,{ref:e,className:s("gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text","outline-none","transition-[opacity,scale] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",t),...r})}),mo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Backdrop,{ref:e,className:s("gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:opacity-0 data-ending-style:opacity-0",t),...r})}),po=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Title,{ref:e,className:s("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",t),...r})}),xo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Description,{ref:e,className:s("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",t),...r})}),ho={Root:D.AlertDialog.Root,Trigger:D.AlertDialog.Trigger,Portal:D.AlertDialog.Portal,Backdrop:mo,Popup:bo,Title:po,Description:xo,Close:D.AlertDialog.Close},Xe=["flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-selected:text-gryt-accent-11","data-disabled:cursor-not-allowed data-disabled:opacity-50"].join(" "),Ke=[qe,Be.medium,"border-gryt-border",x].join(" "),wo=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Input,{ref:e,className:s("gryt-combobox-input",Ke,t),...r})}),vo=i.forwardRef(function({className:t,sideOffset:r=6,...e},n){return a.jsx(m.Combobox.Positioner,{ref:n,sideOffset:r,className:s("gryt-combobox-positioner outline-none",t),...e})}),Ro=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Popup,{ref:e,className:s("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",F,I,t),...r})}),jo=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Item,{ref:e,className:s("gryt-combobox-item",Xe,t),...r})}),No=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Empty,{ref:e,className:s("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",t),...r})}),To={Root:m.Combobox.Root,Input:wo,InputGroup:m.Combobox.InputGroup,Trigger:m.Combobox.Trigger,Icon:m.Combobox.Icon,Clear:m.Combobox.Clear,Value:m.Combobox.Value,Chips:m.Combobox.Chips,Chip:m.Combobox.Chip,ChipRemove:m.Combobox.ChipRemove,Portal:m.Combobox.Portal,Positioner:vo,Popup:Ro,List:m.Combobox.List,Item:jo,ItemIndicator:m.Combobox.ItemIndicator,Group:m.Combobox.Group,GroupLabel:m.Combobox.GroupLabel,Empty:No,Separator:m.Combobox.Separator},Po=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Input,{ref:e,className:s("gryt-autocomplete-input",Ke,t),...r})}),ko=i.forwardRef(function({className:t,sideOffset:r=6,...e},n){return a.jsx(p.Autocomplete.Positioner,{ref:n,sideOffset:r,className:s("gryt-autocomplete-positioner outline-none",t),...e})}),So=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Popup,{ref:e,className:s("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",F,I,t),...r})}),Co=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Item,{ref:e,className:s("gryt-autocomplete-item",Xe,t),...r})}),Lo=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Empty,{ref:e,className:s("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",t),...r})}),Ao={Root:p.Autocomplete.Root,Input:Po,InputGroup:p.Autocomplete.InputGroup,Trigger:p.Autocomplete.Trigger,Icon:p.Autocomplete.Icon,Clear:p.Autocomplete.Clear,Value:p.Autocomplete.Value,Portal:p.Autocomplete.Portal,Positioner:ko,Popup:So,List:p.Autocomplete.List,Item:Co,Group:p.Autocomplete.Group,GroupLabel:p.Autocomplete.GroupLabel,Empty:Lo,Separator:p.Autocomplete.Separator},Mo=i.forwardRef(function({className:t,...r},e){return a.jsx(rt.CheckboxGroup,{ref:e,className:s("gryt-checkbox-group flex flex-col gap-2",t),...r})}),Do=i.forwardRef(function({className:t,...r},e){return a.jsx(ye.Collapsible.Trigger,{ref:e,className:s("gryt-collapsible-trigger flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left","text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",x,t),...r})}),Io=i.forwardRef(function({className:t,...r},e){return a.jsx(ye.Collapsible.Panel,{ref:e,className:s("gryt-collapsible-panel overflow-hidden","h-(--collapsible-panel-height) transition-[height] duration-(--gryt-dur-spring) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",t),...r})}),$o={Root:ye.Collapsible.Root,Trigger:Do,Panel:Io},Ho=i.forwardRef(function({className:t,...r},e){return a.jsx(ot.Form,{ref:e,className:s("gryt-form flex flex-col gap-(--gryt-space-lg)",t),...r})}),Go=i.forwardRef(function({className:t,...r},e){return a.jsx(Ce.Fieldset.Root,{ref:e,className:s("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",t),...r})}),Eo=i.forwardRef(function({className:t,...r},e){return a.jsx(Ce.Fieldset.Legend,{ref:e,className:s("gryt-fieldset-legend text-sm font-semibold text-gryt-text",t),...r})}),Fo={Root:Go,Legend:Eo},_o=i.forwardRef(function({className:t,...r},e){return a.jsx(at.Menubar,{ref:e,className:s("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",t),...r})}),qo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Trigger,{ref:e,className:s("gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)","border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none","data-popup-open:bg-gryt-surface-raised",x,t),...r})}),Bo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Popup,{ref:e,className:s("gryt-navigation-menu-popup outline-none",F,I,t),...r})}),zo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Viewport,{ref:e,className:s("gryt-navigation-menu-viewport relative overflow-hidden",t),...r})}),Oo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Link,{ref:e,className:s("gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2","text-sm text-gryt-text no-underline outline-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",x,t),...r})}),Uo={Root:v.NavigationMenu.Root,List:v.NavigationMenu.List,Item:v.NavigationMenu.Item,Trigger:qo,Content:v.NavigationMenu.Content,Portal:v.NavigationMenu.Portal,Positioner:v.NavigationMenu.Positioner,Viewport:zo,Popup:Bo,Link:Oo,Icon:v.NavigationMenu.Icon,Arrow:v.NavigationMenu.Arrow},ke="flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50",Vo=i.forwardRef(function({className:t,label:r,scrubbable:e=!1,...n},c){return a.jsxs($.NumberField.Root,{ref:c,className:s("gryt-number-field flex flex-col gap-1.5",t),...n,children:[r&&(e?a.jsxs($.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[r,a.jsx($.NumberField.ScrubAreaCursor,{})]}):a.jsx("span",{className:"text-sm text-gryt-muted",children:r})),a.jsxs($.NumberField.Group,{className:s("flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)","border border-gryt-border bg-gryt-surface-raised","focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",O),children:[a.jsx($.NumberField.Decrement,{"aria-label":"Decrease",className:s(ke,"rounded-l-(--gryt-radius-full)"),children:a.jsx(S.Minus,{size:14,weight:"bold"})}),a.jsx($.NumberField.Input,{className:s("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",x)}),a.jsx($.NumberField.Increment,{"aria-label":"Increase",className:s(ke,"rounded-r-(--gryt-radius-full)"),children:a.jsx(S.Plus,{size:14,weight:"bold"})})]})]})}),Yo=i.forwardRef(function({className:t,length:r=6,...e},n){return a.jsx(je.OTPField.Root,{ref:n,length:r,className:s("gryt-otp-field flex gap-2",t),...e,children:Array.from({length:r},(c,d)=>a.jsx(je.OTPField.Input,{className:s("gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center","border border-gryt-border bg-gryt-surface-raised","font-mono text-lg text-gryt-text tabular-nums outline-none","transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none","data-filled:border-gryt-accent",x)},d))})}),Xo=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(_.PreviewCard.Positioner,{ref:n,sideOffset:r,className:s("gryt-preview-card-positioner outline-none",t),...e})}),Ko=i.forwardRef(function({className:t,...r},e){return a.jsx(_.PreviewCard.Popup,{ref:e,className:s("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",F,I,t),...r})}),Wo={Root:_.PreviewCard.Root,Trigger:_.PreviewCard.Trigger,Portal:_.PreviewCard.Portal,Positioner:Xo,Popup:Ko,Arrow:_.PreviewCard.Arrow},Qo=i.forwardRef(function({className:t,...r},e){return a.jsx(q.Toolbar.Root,{ref:e,className:s("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",t),...r})}),Jo=i.forwardRef(function({className:t,...r},e){return a.jsx(q.Toolbar.Separator,{ref:e,className:s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",t),...r})}),Zo={Root:Qo,Group:q.Toolbar.Group,Button:q.Toolbar.Button,Link:q.Toolbar.Link,Input:q.Toolbar.Input,Separator:Jo};exports.Accordion=qr;exports.Alert=sr;exports.AlertDialog=ho;exports.Autocomplete=Ao;exports.Avatar=Oe;exports.Badge=Bt;exports.Button=_e;exports.Card=tr;exports.CardActions=ar;exports.CardContent=or;exports.CardHeader=rr;exports.Checkbox=Ut;exports.CheckboxGroup=Mo;exports.Chip=Ot;exports.Collapsible=$o;exports.Combobox=To;exports.Composer=Ft;exports.ContextMenu=zr;exports.ConversationItem=qt;exports.Dialog=mr;exports.Divider=er;exports.Drawer=kr;exports.Fieldset=Fo;exports.Form=Ho;exports.GRYT_HUE_KEYS=J;exports.GRYT_NEUTRAL_KEYS=be;exports.GRYT_RADIUS_KEYS=oe;exports.GRYT_THEME_NAME_MAX=He;exports.GrytProvider=pt;exports.IconButton=$t;exports.Menu=te;exports.Menubar=_o;exports.MessageBubble=Gt;exports.Meter=yo;exports.NavigationMenu=Uo;exports.NumberField=Vo;exports.OtpField=Yo;exports.Popover=Xr;exports.PreviewCard=Wo;exports.Progress=cr;exports.Radio=Vt;exports.RadioGroup=Yt;exports.ScrollArea=co;exports.Select=Qt;exports.Skeleton=lr;exports.Slider=Kt;exports.Spinner=ir;exports.Surface=Ht;exports.Switch=Xt;exports.Tab=Ye;exports.Tabs=Hr;exports.TextField=Et;exports.Toast=ro;exports.Toggle=uo;exports.ToggleGroup=go;exports.Toolbar=Zo;exports.Tooltip=Jt;exports.TooltipProvider=Zt;exports.cloneGrytTheme=me;exports.cn=s;exports.contrast=ft;exports.createGrytTheme=$e;exports.decodeGrytTheme=vt;exports.encodeGrytTheme=wt;exports.grytAlphaScales=yt;exports.grytAlphaScalesLight=bt;exports.grytLightTokens=j;exports.grytPresets=Fe;exports.grytPresetsById=Pt;exports.grytScales=fe;exports.grytScalesLight=re;exports.grytTheme=E;exports.grytThemeHues=Ge;exports.grytThemeToOptions=xt;exports.grytTokens=u;exports.hexToOklch=z;exports.isHexColor=pe;exports.normalizeHexColor=ne;exports.normalizeThemeName=ae;exports.oklchToHex=k;exports.useMediaQuery=Ve;exports.useToastManager=oo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),H=require("@base-ui/react/tooltip"),Se=require("@base-ui/react/button"),i=require("react"),We=require("clsx"),Qe=require("tailwind-merge"),ee=require("@base-ui/react/field"),S=require("@phosphor-icons/react"),ie=require("@base-ui/react/avatar"),we=require("@base-ui/react/checkbox"),ve=require("@base-ui/react/radio"),Je=require("@base-ui/react/radio-group"),Re=require("@base-ui/react/switch"),U=require("@base-ui/react/slider"),w=require("@base-ui/react/select"),Ze=require("@base-ui/react/separator"),de=require("@base-ui/react/progress"),M=require("@base-ui/react/dialog"),N=require("@base-ui/react/drawer"),G=require("@base-ui/react/menu"),Z=require("@base-ui/react/tabs"),W=require("@base-ui/react/accordion"),A=require("@base-ui/react/context-menu"),C=require("@base-ui/react/popover"),L=require("@base-ui/react/toast"),B=require("@base-ui/react/scroll-area"),et=require("@base-ui/react/toggle"),tt=require("@base-ui/react/toggle-group"),V=require("@base-ui/react/meter"),D=require("@base-ui/react/alert-dialog"),p=require("@base-ui/react/autocomplete"),m=require("@base-ui/react/combobox"),rt=require("@base-ui/react/checkbox-group"),ye=require("@base-ui/react/collapsible"),ot=require("@base-ui/react/form"),Ce=require("@base-ui/react/fieldset"),at=require("@base-ui/react/menubar"),v=require("@base-ui/react/navigation-menu"),$=require("@base-ui/react/number-field"),je=require("@base-ui/react/otp-field"),_=require("@base-ui/react/preview-card"),q=require("@base-ui/react/toolbar");function Le(o){return o<=.04045?o/12.92:((o+.055)/1.055)**2.4}function le(o){return o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055}function Y(o){return Math.min(1,Math.max(0,o))}function X(o){const t=o.replace("#",""),r=t.length===3?t.split("").map(e=>e+e).join(""):t;return[parseInt(r.slice(0,2),16)/255,parseInt(r.slice(2,4),16)/255,parseInt(r.slice(4,6),16)/255]}function Ae([o,t,r]){const e=n=>Math.round(Y(n)*255).toString(16).padStart(2,"0");return`#${e(o)}${e(t)}${e(r)}`}function z(o){const[t,r,e]=X(o).map(Le),n=Math.cbrt(.4122214708*t+.5363325363*r+.0514459929*e),c=Math.cbrt(.2119034982*t+.6806995451*r+.1073969566*e),d=Math.cbrt(.0883024619*t+.2817188376*r+.6299787005*e),l=.2104542553*n+.793617785*c-.0040720468*d,g=1.9779984951*n-2.428592205*c+.4505937099*d,y=.0259040371*n+.7827717662*c-.808675766*d;return{l,c:Math.hypot(g,y),h:(Math.atan2(y,g)*180/Math.PI+360)%360}}function k({l:o,c:t,h:r}){const e=t*Math.cos(r*Math.PI/180),n=t*Math.sin(r*Math.PI/180),c=(o+.3963377774*e+.2158037573*n)**3,d=(o-.1055613458*e-.0638541728*n)**3,l=(o-.0894841775*e-1.291485548*n)**3;return Ae([le(Y(4.0767416621*c-3.3077115913*d+.2309699292*l)),le(Y(-1.2684380046*c+2.6097574011*d-.3413193965*l)),le(Y(-.0041960863*c-.7034186147*d+1.707614701*l))])}const nt=[.195,.24,.27,.3,.33,.37,.43,.52],st=[.014,.026,.04,.052,.062,.072,.084,.1];function T(o,t){const{h:r}=z(o),e=nt.map((l,g)=>k({l,c:st[g],h:r}));e.push(o,t);const n=z(t).l,c=Math.min(.95,Math.max(.84,n+.04)),d=Math.min(.98,Math.max(c+.06,.93));return e.push(k({l:c,c:.11,h:r})),e.push(k({l:d,c:.055,h:r})),e}const ct=[.187,.231,.245,.268,.289,.31,.355,.425,.52,.57,.627,.908],it=[.011,.014,.016,.019,.022,.024,.026,.026,.02,.012,0,.008];function Me(o){const t={0:o.bg,1:o.surface,2:o.surfaceRaised,5:o.border,10:o.muted,11:o.text},r=z(o.border).h;return ct.map((e,n)=>t[n]??k({l:e,c:it[n],h:r}))}function Q(o,t){const r=X(t);return o.map(e=>{const n=X(e);let c=0;for(let f=0;f<3;f++){const b=n[f],R=r[f];b>R?c=Math.max(c,R<1?(b-R)/(1-R):0):b<R&&(c=Math.max(c,R>0?(R-b)/R:0))}if(c<1e-6)return"transparent";const d=Ae(n.map((f,b)=>Y(r[b]+(f-r[b])/c))),[l,g,y]=X(d).map(f=>Math.round(f*255));return`rgb(${l} ${g} ${y} / ${(c*100).toFixed(1)}%)`})}const dt=[.962,1,.978,.952,.928,.898,.855,.79,.66,.61,.48,.25],lt=[.006,0,.004,.007,.01,.013,.016,.018,.016,.014,.012,.014],ut=[.975,.955,.93,.905,.878,.845,.795,.72],gt=[.012,.024,.038,.05,.062,.074,.09,.11];function De(o){const t={0:o.bg,1:o.surface,2:o.surfaceRaised,5:o.border,10:o.muted,11:o.text},r=z(o.border).h;return dt.map((e,n)=>t[n]??k({l:e,c:lt[n],h:r}))}function P(o){const{l:t,c:r,h:e}=z(o),n=ut.map((c,d)=>k({l:c,c:gt[d],h:e}));return n.push(o),n.push(k({l:Math.max(0,t-.07),c:r,h:e})),n.push(k({l:.46,c:.15,h:e})),n.push(k({l:.33,c:.1,h:e})),n}function Ne(o){const[t,r,e]=X(o).map(Le);return .2126*t+.7152*r+.0722*e}function ft(o,t){const r=Ne(o),e=Ne(t);return(Math.max(r,e)+.05)/(Math.min(r,e)+.05)}const u={color:{bg:"#111318",surface:"#1a1d24",surfaceRaised:"#1e2028",surfaceHover:"#334155",border:"#2b303d",text:"#e0e0e6",muted:"#888888",accent:"#968ff8",accentLight:"#b4afff",secondary:"#7dd3fc",secondaryLight:"#bae6fd",success:"#4ade80",danger:"#f87171",dangerLight:"#fca5a5",warning:"#fbbf24",onAccent:"#0c0a20",onSecondary:"#02121a",onDanger:"#1f0405"},radius:{sm:8,md:12,lg:20,xl:28,full:999}},j={bg:"#f1f2f7",surface:"#ffffff",surfaceRaised:"#f7f8fb",border:"#dadde6",muted:"#5b5d65",text:"#1f2129"},fe={neutral:Me({bg:u.color.bg,surface:u.color.surface,surfaceRaised:u.color.surfaceRaised,border:u.color.border,muted:u.color.muted,text:u.color.text}),accent:T(u.color.accent,u.color.accentLight),secondary:T(u.color.secondary,u.color.secondaryLight),success:T(u.color.success,u.color.success),danger:T(u.color.danger,u.color.dangerLight),warning:T(u.color.warning,u.color.warning)},re={neutral:De(j),accent:P(u.color.accent),secondary:P(u.color.secondary),success:P(u.color.success),danger:P(u.color.danger),warning:P(u.color.warning)},Ie=re.neutral[3],yt={neutral:Q(fe.neutral,u.color.bg),accent:Q(fe.accent,u.color.bg)},bt={neutral:Q(re.neutral,j.bg),accent:Q(re.accent,j.bg)};function $e(o={}){const t=o.appearance==="light",e={...t?{...u.color,...j,surfaceHover:Ie}:u.color,...o.color},n={...u.radius,...o.radius},c={bg:e.bg,surface:e.surface,surfaceRaised:e.surfaceRaised,border:e.border,muted:e.muted,text:e.text},d=t?{neutral:De(c),accent:P(e.accent),secondary:P(e.secondary),success:P(e.success),danger:P(e.danger),warning:P(e.warning)}:{neutral:Me(c),accent:T(e.accent,e.accentLight),secondary:T(e.secondary,e.secondaryLight),success:T(e.success,e.success),danger:T(e.danger,e.dangerLight),warning:T(e.warning,e.warning)},l={};for(const[g,y]of Object.entries(d))y.forEach((f,b)=>{l[`--gryt-${g}-${b+1}`]=f,l[`--color-gryt-${g}-${b+1}`]=f});for(const g of["neutral","accent"])Q(d[g],e.bg).forEach((y,f)=>{l[`--gryt-${g}-a${f+1}`]=y,l[`--color-gryt-${g}-a${f+1}`]=y});return{...l,"--gryt-bg":e.bg,"--gryt-surface":e.surface,"--gryt-surface-raised":e.surfaceRaised,"--gryt-surface-hover":e.surfaceHover,"--gryt-border":e.border,"--gryt-text":e.text,"--gryt-muted":e.muted,"--gryt-accent":e.accent,"--gryt-accent-light":e.accentLight,"--gryt-secondary":e.secondary,"--gryt-secondary-light":e.secondaryLight,"--gryt-success":e.success,"--gryt-danger":e.danger,"--gryt-danger-light":e.dangerLight,"--gryt-warning":e.warning,"--gryt-on-accent":e.onAccent,"--gryt-on-secondary":e.onSecondary,"--gryt-on-danger":e.onDanger,"--color-gryt-bg":e.bg,"--color-gryt-surface":e.surface,"--color-gryt-surface-raised":e.surfaceRaised,"--color-gryt-surface-hover":e.surfaceHover,"--color-gryt-border":e.border,"--color-gryt-text":e.text,"--color-gryt-muted":e.muted,"--color-gryt-accent":e.accent,"--color-gryt-accent-light":e.accentLight,"--color-gryt-secondary":e.secondary,"--color-gryt-secondary-light":e.secondaryLight,"--color-gryt-success":e.success,"--color-gryt-danger":e.danger,"--color-gryt-danger-light":e.dangerLight,"--color-gryt-warning":e.warning,"--color-gryt-on-accent":e.onAccent,"--color-gryt-on-secondary":e.onSecondary,"--color-gryt-on-danger":e.onDanger,"--gryt-radius-sm":`${n.sm}px`,"--gryt-radius-md":`${n.md}px`,"--gryt-radius-lg":`${n.lg}px`,"--gryt-radius-xl":`${n.xl}px`,"--gryt-radius-full":`${n.full}px`}}function mt(o){return Object.keys(o).some(t=>t.startsWith("--"))}function pt({children:o,className:t,theme:r,tooltipDelay:e=400}){const n=r===void 0?void 0:mt(r)?r:$e(r);return a.jsx("div",{className:t,style:n,children:a.jsx(H.Tooltip.Provider,{delay:e,children:o})})}const J=["accent","accentLight","secondary","secondaryLight","success","danger","dangerLight","warning","onAccent","onSecondary","onDanger"],be=["bg","surface","surfaceRaised","surfaceHover","border","muted","text"],oe=["sm","md","lg","xl","full"],He=60;function ae(o){return o.replace(/\s+/g," ").trim().slice(0,He)}const E={hue:{accent:u.color.accent,accentLight:u.color.accentLight,secondary:u.color.secondary,secondaryLight:u.color.secondaryLight,success:u.color.success,danger:u.color.danger,dangerLight:u.color.dangerLight,warning:u.color.warning,onAccent:u.color.onAccent,onSecondary:u.color.onSecondary,onDanger:u.color.onDanger},lightHue:null,dark:{bg:u.color.bg,surface:u.color.surface,surfaceRaised:u.color.surfaceRaised,surfaceHover:u.color.surfaceHover,border:u.color.border,muted:u.color.muted,text:u.color.text},light:{bg:j.bg,surface:j.surface,surfaceRaised:j.surfaceRaised,surfaceHover:Ie,border:j.border,muted:j.muted,text:j.text},radius:{...u.radius}};function me(o){return{...o.name===void 0?{}:{name:o.name},hue:{...o.hue},lightHue:o.lightHue===null?null:{...o.lightHue},dark:{...o.dark},light:{...o.light},radius:{...o.radius}}}function Ge(o,t){return t==="light"&&o.lightHue!==null?o.lightHue:o.hue}function xt(o,t){return{appearance:t,color:{...Ge(o,t),...o[t]},radius:{...o.radius}}}const K={accent:"accent",accentLight:"accent-light",secondary:"secondary",secondaryLight:"secondary-light",success:"success",danger:"danger",dangerLight:"danger-light",warning:"warning",onAccent:"on-accent",onSecondary:"on-secondary",onDanger:"on-danger"},Ee={bg:"bg",surface:"surface",surfaceRaised:"raised",surfaceHover:"hover",border:"border",muted:"muted",text:"text"},ht=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;function pe(o){return ht.test(o.trim())}function ne(o){const t=o.trim().toLowerCase();return t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function wt(o,t){const r=new URLSearchParams,e=c=>ne(c).slice(1),n=ae(o.name??"");n!==""&&r.set("name",n);for(const c of J)o.hue[c]!==E.hue[c]&&r.set(K[c],e(o.hue[c]));if(o.lightHue!==null)for(const c of J)r.set(`lh-${K[c]}`,e(o.lightHue[c]));for(const c of["dark","light"]){const d=c==="dark"?"d":"l";for(const l of be)o[c][l]!==E[c][l]&&r.set(`${d}-${Ee[l]}`,e(o[c][l]))}for(const c of oe)o.radius[c]!==E.radius[c]&&r.set(`r-${c}`,String(o.radius[c]));return t==="light"&&r.set("mode","light"),r}function vt(o){const t=o.trim();if(t==="")return null;if(t.startsWith("{"))return jt(t);const r=t.includes("?")?t.slice(t.indexOf("?")+1):t;return Rt(new URLSearchParams(r))}function Rt(o){const t=me(E);let r=!1;const e=c=>{const d=o.get(c);if(d===null)return null;const l=d.startsWith("#")?d:`#${d}`;return pe(l)?(r=!0,ne(l)):null},n=ae(o.get("name")??"");n!==""&&(t.name=n,r=!0);for(const c of J){const d=e(K[c]);d!==null&&(t.hue[c]=d)}if(o.has(`lh-${K.accent}`)){const c={...t.hue};for(const d of J){const l=e(`lh-${K[d]}`);l!==null&&(c[d]=l)}t.lightHue=c}for(const c of["dark","light"]){const d=c==="dark"?"d":"l";for(const l of be){const g=e(`${d}-${Ee[l]}`);g!==null&&(t[c][l]=g)}}for(const c of oe){const d=Number(o.get(`r-${c}`));Number.isFinite(d)&&d>=0&&d<=999&&o.has(`r-${c}`)&&(t.radius[c]=Math.round(d),r=!0)}return r?{theme:t,appearance:o.get("mode")==="light"?"light":"dark"}:null}function jt(o){let t;try{t=JSON.parse(o)}catch{return null}if(typeof t!="object"||t===null)return null;const r=t,e=me(E);let n=!1;const c=(d,l)=>{if(!(typeof d!="object"||d===null))for(const[g,y]of Object.entries(d))typeof y=="string"&&pe(y)&&g in l&&(l[g]=ne(y),n=!0)};if(typeof r.name=="string"){const d=ae(r.name);d!==""&&(e.name=d,n=!0)}if(c(r.hue,e.hue),c(r.dark,e.dark),c(r.light,e.light),typeof r.lightHue=="object"&&r.lightHue!==null){const d={...e.hue};c(r.lightHue,d),e.lightHue=d}if(typeof r.radius=="object"&&r.radius!==null)for(const[d,l]of Object.entries(r.radius)){const g=Number(l);oe.includes(d)&&Number.isFinite(g)&&g>=0&&g<=999&&(e.radius[d]=Math.round(g),n=!0)}return n?{theme:e,appearance:"dark"}:null}const ue={sm:8,md:12,lg:20,xl:28,full:999},ge={sm:6,md:8,lg:14,xl:18,full:999},Nt={sm:4,md:6,lg:10,xl:14,full:6},Tt={sm:6,md:8,lg:10,xl:14,full:10},Te={sm:2,md:4,lg:6,xl:8,full:4},Fe=[{id:"gryt",name:"Gryt",note:"What the library ships, from the Gryt code-theme.",group:"Gryt",source:"github.com/Gryt-chat/code-theme",theme:E},{id:"ember",name:"Ember",note:"Warm all the way down — the neutrals are brown, not blue.",group:"Gryt",theme:{name:"Ember",hue:{accent:"#f0803c",accentLight:"#ff9f66",secondary:"#d9a441",secondaryLight:"#ecc06a",success:"#8bb056",danger:"#e35d55",dangerLight:"#ef8079",warning:"#e8b33e",onAccent:"#231004",onSecondary:"#241a04",onDanger:"#2b0a08"},lightHue:null,dark:{bg:"#17110e",surface:"#1f1815",surfaceRaised:"#251d19",surfaceHover:"#33261f",border:"#352822",muted:"#a48f81",text:"#f5ece5"},light:{bg:"#f6efe8",surface:"#fffdfb",surfaceRaised:"#faf3ec",surfaceHover:"#efe3d8",border:"#e0d2c4",muted:"#6b5b50",text:"#241a14"},radius:ue}},{id:"paper",name:"Paper",note:"Near-monochrome. One quiet slate accent and nothing else.",group:"Gryt",theme:{name:"Paper",hue:{accent:"#8390a8",accentLight:"#a3aec2",secondary:"#93a0a0",secondaryLight:"#b1bcbc",success:"#7f9b7f",danger:"#b56b6b",dangerLight:"#c98d8d",warning:"#b39a6a",onAccent:"#11151c",onSecondary:"#121717",onDanger:"#1d0e0e"},lightHue:null,dark:{bg:"#101011",surface:"#17171a",surfaceRaised:"#1d1d20",surfaceHover:"#282a2e",border:"#2a2a2e",muted:"#8e8e94",text:"#ededf0"},light:{bg:"#f0f0f2",surface:"#ffffff",surfaceRaised:"#f7f7f9",surfaceHover:"#e6e6ea",border:"#d6d6dc",muted:"#5b5b63",text:"#17171a"},radius:ge}},{id:"signal",name:"Signal",note:"Black, white, and a yellow that cannot be missed.",group:"Gryt",theme:{name:"Signal",hue:{accent:"#ffd400",accentLight:"#ffe454",secondary:"#00d0ff",secondaryLight:"#66e2ff",success:"#00e06a",danger:"#ff453a",dangerLight:"#ff7a72",warning:"#ffab00",onAccent:"#161200",onSecondary:"#001a20",onDanger:"#1a0300"},lightHue:null,dark:{bg:"#000000",surface:"#0c0c0c",surfaceRaised:"#151515",surfaceHover:"#242424",border:"#454545",muted:"#bcbcbc",text:"#ffffff"},light:{bg:"#f0f0f0",surface:"#ffffff",surfaceRaised:"#f8f8f8",surfaceHover:"#e3e3e3",border:"#6f6f6f",muted:"#3d3d3d",text:"#000000"},radius:Te}},{id:"dracula",name:"Dracula",note:"The purple-and-pink dark theme, with Alucard as its light half.",group:"Ported",source:"draculatheme.com, MIT",theme:{name:"Dracula",hue:{accent:"#bd93f9",accentLight:"#d0b3fb",secondary:"#8be9fd",secondaryLight:"#aff0fe",success:"#50fa7b",danger:"#ff5555",dangerLight:"#ff7979",warning:"#ffb86c",onAccent:"#282a36",onSecondary:"#282a36",onDanger:"#282a36"},lightHue:{accent:"#644ac9",accentLight:"#7b64d6",secondary:"#036a96",secondaryLight:"#0b83b5",success:"#14710a",danger:"#cb3a2a",dangerLight:"#d95445",warning:"#a34d14",onAccent:"#fffbeb",onSecondary:"#fffbeb",onDanger:"#fffbeb"},dark:{bg:"#282a36",surface:"#31323f",surfaceRaised:"#383a49",surfaceHover:"#44475a",border:"#44475a",muted:"#6272a4",text:"#f8f8f2"},light:{bg:"#f5f1e1",surface:"#fffbeb",surfaceRaised:"#faf6e6",surfaceHover:"#ece7d4",border:"#dcd6bf",muted:"#6c664b",text:"#1f1f1f"},radius:ge}},{id:"nord",name:"Nord",note:"Polar Night and Snow Storm, with Frost on top.",group:"Ported",source:"nordtheme.com, MIT",theme:{name:"Nord",hue:{accent:"#88c0d0",accentLight:"#8fbcbb",secondary:"#81a1c1",secondaryLight:"#a3b8d4",success:"#a3be8c",danger:"#bf616a",dangerLight:"#d08770",warning:"#ebcb8b",onAccent:"#2e3440",onSecondary:"#2e3440",onDanger:"#eceff4"},lightHue:{accent:"#5e81ac",accentLight:"#81a1c1",secondary:"#8fbcbb",secondaryLight:"#88c0d0",success:"#a3be8c",danger:"#bf616a",dangerLight:"#d08770",warning:"#ebcb8b",onAccent:"#eceff4",onSecondary:"#2e3440",onDanger:"#eceff4"},dark:{bg:"#2e3440",surface:"#3b4252",surfaceRaised:"#434c5e",surfaceHover:"#4c566a",border:"#4c566a",muted:"#d8dee9",text:"#eceff4"},light:{bg:"#e5e9f0",surface:"#eceff4",surfaceRaised:"#e9edf2",surfaceHover:"#d8dee9",border:"#c9d1de",muted:"#4c566a",text:"#2e3440"},radius:ge}},{id:"catppuccin",name:"Catppuccin",note:"Mocha for dark, Latte for light. Mauve does the accent work.",group:"Ported",source:"catppuccin/palette, MIT",theme:{name:"Catppuccin",hue:{accent:"#cba6f7",accentLight:"#dcc0fa",secondary:"#89b4fa",secondaryLight:"#a8c8fb",success:"#a6e3a1",danger:"#f38ba8",dangerLight:"#eba0ac",warning:"#f9e2af",onAccent:"#1e1e2e",onSecondary:"#1e1e2e",onDanger:"#1e1e2e"},lightHue:{accent:"#8839ef",accentLight:"#9a55f2",secondary:"#1e66f5",secondaryLight:"#4680f7",success:"#40a02b",danger:"#d20f39",dangerLight:"#e64553",warning:"#df8e1d",onAccent:"#eff1f5",onSecondary:"#eff1f5",onDanger:"#eff1f5"},dark:{bg:"#1e1e2e",surface:"#313244",surfaceRaised:"#45475a",surfaceHover:"#585b70",border:"#45475a",muted:"#a6adc8",text:"#cdd6f4"},light:{bg:"#e6e9ef",surface:"#eff1f5",surfaceRaised:"#eaedf3",surfaceHover:"#dce0e8",border:"#ccd0da",muted:"#6c6f85",text:"#4c4f69"},radius:ue}},{id:"github",name:"GitHub",note:"Primer's own tokens, six-pixel corners included.",group:"Ported",source:"@primer/primitives",theme:{name:"GitHub",hue:{accent:"#1f6feb",accentLight:"#4493f8",secondary:"#8957e5",secondaryLight:"#a371f7",success:"#238636",danger:"#da3633",dangerLight:"#f85149",warning:"#9e6a03",onAccent:"#ffffff",onSecondary:"#ffffff",onDanger:"#ffffff"},lightHue:{accent:"#0969da",accentLight:"#218bff",secondary:"#8250df",secondaryLight:"#a475f9",success:"#1f883d",danger:"#cf222e",dangerLight:"#d1242f",warning:"#9a6700",onAccent:"#ffffff",onSecondary:"#ffffff",onDanger:"#ffffff"},dark:{bg:"#0d1117",surface:"#151b23",surfaceRaised:"#1c222b",surfaceHover:"#262c36",border:"#3d444d",muted:"#9198a1",text:"#f0f6fc"},light:{bg:"#f6f8fa",surface:"#ffffff",surfaceRaised:"#fbfcfd",surfaceHover:"#eef1f4",border:"#d1d9e0",muted:"#59636e",text:"#1f2328"},radius:Nt}},{id:"claude",name:"Claude",note:"Anthropic's clay orange on cream and near-black.",group:"Ported",source:"anthropic.com — a likeness, not a published palette",theme:{name:"Claude",hue:{accent:"#d97757",accentLight:"#e59275",secondary:"#7d9ec4",secondaryLight:"#9db8d6",success:"#6ba368",danger:"#bf4d43",dangerLight:"#d4726a",warning:"#d9a441",onAccent:"#241009",onSecondary:"#0c1720",onDanger:"#faf9f5"},lightHue:null,dark:{bg:"#141413",surface:"#1f1e1d",surfaceRaised:"#262624",surfaceHover:"#3d3d3a",border:"#3d3d3a",muted:"#b0aea5",text:"#faf9f5"},light:{bg:"#f0eee6",surface:"#faf9f5",surfaceRaised:"#f5f3ec",surfaceHover:"#e8e6dc",border:"#d5d2c5",muted:"#87867f",text:"#141413"},radius:ue}},{id:"shadcn",name:"shadcn/ui",note:"Zinc neutrals and a ten-pixel radius. No pills anywhere.",group:"Ported",source:"ui.shadcn.com, MIT — accent adapted",theme:{name:"shadcn/ui",hue:{accent:"#a1a1aa",accentLight:"#d4d4d8",secondary:"#71717a",secondaryLight:"#a1a1aa",success:"#4ade80",danger:"#e7000b",dangerLight:"#fb2c36",warning:"#fd9a00",onAccent:"#18181b",onSecondary:"#fafafa",onDanger:"#fafafa"},lightHue:{accent:"#3f3f46",accentLight:"#52525b",secondary:"#71717a",secondaryLight:"#a1a1aa",success:"#00a63e",danger:"#e7000b",dangerLight:"#fb2c36",warning:"#e17100",onAccent:"#fafafa",onSecondary:"#fafafa",onDanger:"#fafafa"},dark:{bg:"#18181b",surface:"#27272a",surfaceRaised:"#3f3f46",surfaceHover:"#3f3f46",border:"#3f3f46",muted:"#a1a1aa",text:"#fafafa"},light:{bg:"#f4f4f5",surface:"#ffffff",surfaceRaised:"#fafafa",surfaceHover:"#e4e4e7",border:"#e4e4e7",muted:"#71717a",text:"#18181b"},radius:Tt}},{id:"solarized",name:"Solarized",note:"Both halves on one set of accents, as designed.",group:"Ported",source:"ethanschoonover.com/solarized, MIT",theme:{name:"Solarized",hue:{accent:"#268bd2",accentLight:"#4ba3e3",secondary:"#2aa198",secondaryLight:"#43bbb1",success:"#859900",danger:"#dc322f",dangerLight:"#cb4b16",warning:"#b58900",onAccent:"#fdf6e3",onSecondary:"#002b36",onDanger:"#fdf6e3"},lightHue:null,dark:{bg:"#002b36",surface:"#073642",surfaceRaised:"#0b414f",surfaceHover:"#134b5a",border:"#0f4757",muted:"#93a1a1",text:"#eee8d5"},light:{bg:"#eee8d5",surface:"#fdf6e3",surfaceRaised:"#f7f0dc",surfaceHover:"#e4dcc4",border:"#d9d0b4",muted:"#586e75",text:"#073642"},radius:Te}}],Pt=new Map(Fe.map(o=>[o.id,o]));function s(...o){return Qe.twMerge(We.clsx(o))}const kt={primary:"bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",secondary:"bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",neutral:"bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",danger:"bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",ghost:"bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},St={xsmall:"min-h-8 px-3 text-xs",small:"min-h-9 px-4 text-sm",medium:"min-h-10 px-5 text-sm",large:"min-h-12 px-6 text-base"},_e=i.forwardRef(function({children:t,className:r,endIcon:e,size:n="medium",startIcon:c,tone:d="primary",...l},g){return a.jsxs(Se.Button,{ref:g,className:s("gryt-button","inline-flex cursor-pointer items-center justify-center gap-2 border-0 shadow-none","rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none","transition-[scale,background-color,color]","duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.03]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-50",St[n],kt[d],r),...l,children:[c,t,e]})}),x="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",Ct="has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light",qe=["w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised","text-gryt-text outline-none placeholder:text-gryt-muted","transition-colors duration-150 motion-reduce:transition-none","hover:border-gryt-accent-light focus:border-gryt-accent","disabled:cursor-not-allowed disabled:opacity-60"].join(" "),Be={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},F="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",I=["transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0"].join(" "),O="cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",Lt={primary:"data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",secondary:"data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",neutral:"data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",danger:"data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",success:"data-checked:bg-gryt-success data-checked:text-gryt-on-accent",warning:"data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"},ze={primary:"bg-gryt-accent",secondary:"bg-gryt-secondary",neutral:"bg-gryt-surface-hover",danger:"bg-gryt-danger",success:"bg-gryt-success",warning:"bg-gryt-warning"},At={primary:"data-checked:border-gryt-accent",secondary:"data-checked:border-gryt-secondary",neutral:"data-checked:border-gryt-muted",danger:"data-checked:border-gryt-danger",success:"data-checked:border-gryt-success",warning:"data-checked:border-gryt-warning"},Mt={primary:"data-checked:bg-gryt-accent",secondary:"data-checked:bg-gryt-secondary",neutral:"data-checked:bg-gryt-surface-hover",danger:"data-checked:bg-gryt-danger",success:"data-checked:bg-gryt-success",warning:"data-checked:bg-gryt-warning"},Dt={primary:"text-gryt-accent-11 hover:not-data-disabled:bg-gryt-accent-3",secondary:"text-gryt-secondary-11 hover:not-data-disabled:bg-gryt-secondary-3",neutral:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",danger:"text-gryt-danger-11 hover:not-data-disabled:bg-gryt-danger-3",ghost:"text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"},It={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},$t=i.forwardRef(function({className:t,size:r="medium",tone:e="neutral",...n},c){return a.jsx(Se.Button,{ref:c,className:s("gryt-icon-button","inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0","rounded-(--gryt-radius-full) select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]","motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",x,O,It[r],Dt[e],t),...n})}),Ht=i.forwardRef(function({className:t,elevated:r=!1,...e},n){return a.jsx("div",{ref:n,className:s("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",r?"bg-gryt-surface-raised":"bg-gryt-surface",t),...e})}),Gt=i.forwardRef(function({children:t,className:r,from:e="assistant",...n},c){return a.jsx("div",{ref:c,className:s("gryt-message-bubble",e==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",e==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",e==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",r),...n,children:t})}),Et=i.forwardRef(function({className:t,error:r=!1,fieldClassName:e,helperText:n,label:c,minRows:d=3,multiline:l=!1,size:g="medium",...y},f){const b=a.jsx(ee.Field.Control,{ref:f,render:l?a.jsx("textarea",{rows:d}):void 0,className:s("gryt-text-field-control",qe,l&&"resize-y leading-6",r?"border-gryt-danger":"border-gryt-border",Be[g],t),...y});return a.jsxs(ee.Field.Root,{className:s("gryt-text-field flex w-full flex-col gap-1.5",e),children:[c?a.jsx(ee.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:c}):null,b,n?a.jsx(ee.Field.Description,{className:s("text-xs",r?"text-gryt-danger-11":"text-gryt-muted"),children:n}):null]})}),Ft=i.forwardRef(function({className:t,disabled:r=!1,maxRows:e=8,minRows:n=1,onSubmit:c,placeholder:d="Message Gryt",submitLabel:l="Send",...g},y){const f=i.useRef(null),b=i.useCallback(()=>{const h=f.current;if(!h)return;const ce=window.getComputedStyle(h),xe=parseFloat(ce.lineHeight)||24,he=parseFloat(ce.paddingTop)+parseFloat(ce.paddingBottom);h.style.height="auto",h.style.height=`${Math.min(Math.max(h.scrollHeight,xe*n+he),xe*e+he)}px`},[e,n]);i.useLayoutEffect(b,[b,g.value]);function R(h){if(!c){h.preventDefault();return}c(h)}return a.jsxs("form",{className:s("gryt-composer",t),onSubmit:R,children:[a.jsx("textarea",{ref:h=>{f.current=h,typeof y=="function"?y(h):y&&(y.current=h)},rows:n,disabled:r,placeholder:d,onInput:b,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...g}),a.jsx(_e,{type:"submit",disabled:r,size:"small",endIcon:a.jsx(S.PaperPlaneTilt,{size:14,weight:"fill"}),children:l})]})}),_t={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},Oe=i.forwardRef(function({alt:t,children:r,className:e,fallback:n,size:c="medium",src:d,...l},g){return a.jsxs(ie.Avatar.Root,{ref:g,className:s("gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none","rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",_t[c],e),...l,children:[d?a.jsx(ie.Avatar.Image,{src:d,alt:t,className:"h-full w-full object-cover"}):null,a.jsx(ie.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:n??r})]})}),qt=i.forwardRef(function({active:t=!1,avatar:r,className:e,subtitle:n,title:c,...d},l){return a.jsxs("button",{ref:l,type:"button",className:s("gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",e),...d,children:[r??a.jsx(Oe,{size:"small",className:s(t?"bg-gryt-on-accent text-gryt-accent-9 ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:c.slice(0,1).toUpperCase()}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block truncate text-sm font-semibold",children:c}),n?a.jsx("span",{className:s("block truncate text-xs",t?"text-gryt-on-accent/85":"text-gryt-muted"),children:n}):null]})]})}),Bt=i.forwardRef(function({badgeContent:t,children:r,className:e,max:n=99,showZero:c=!1,...d},l){const g=typeof t=="number"?t:null,y=g!==null&&g===0&&!c,f=g!==null&&g>n?`${n}+`:t;return a.jsxs("span",{ref:l,className:s("gryt-badge relative inline-flex",e),...d,children:[r,t!==void 0&&!y?a.jsx("span",{className:s("gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center","min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5","bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent","ring-2 ring-gryt-bg"),children:f}):null]})}),zt={neutral:"border-gryt-border bg-gryt-surface-raised text-gryt-text",primary:"border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",secondary:"border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",success:"border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",warning:"border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",danger:"border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"},Ot=i.forwardRef(function({children:t,className:r,icon:e,label:n,onDelete:c,tone:d="neutral",...l},g){return a.jsxs("span",{ref:g,className:s("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",zt[d],r),...l,children:[e,n??t,c?a.jsx("button",{type:"button","aria-label":"Remove",onClick:c,className:s("-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)","opacity-70 transition-opacity hover:opacity-100",x),children:a.jsx(S.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),Ut=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(we.Checkbox.Root,{ref:n,className:s("gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",x,O,Lt[r],t),...e,children:a.jsx(we.Checkbox.Indicator,{keepMounted:!0,className:s("flex origin-center","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none"),children:a.jsx(S.Check,{size:12,weight:"bold"})})})}),Vt=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(ve.Radio.Root,{ref:n,className:s("gryt-radio flex h-5 w-5 shrink-0 items-center justify-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.08]","motion-safe:active:not-data-disabled:scale-[0.92]",x,O,At[r],t),...e,children:a.jsx(ve.Radio.Indicator,{keepMounted:!0,className:s("h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)","transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring","data-unchecked:scale-0 data-unchecked:opacity-0","motion-reduce:transition-none",ze[r])})})}),Yt=i.forwardRef(function({className:t,...r},e){return a.jsx(Je.RadioGroup,{ref:e,className:s("gryt-radio-group flex flex-col gap-2",t),...r})}),Xt=i.forwardRef(function({className:t,tone:r="primary",...e},n){return a.jsx(Re.Switch.Root,{ref:n,className:s("gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5","transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring","data-checked:border-transparent","hover:not-data-disabled:border-gryt-accent-light","motion-safe:hover:not-data-disabled:scale-[1.05]","motion-safe:active:not-data-disabled:scale-[0.95]",x,O,Mt[r],t),...e,children:a.jsx(Re.Switch.Thumb,{className:s("h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text","transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-checked:translate-x-4 data-checked:bg-gryt-bg")})})}),Pe=3;function Kt({className:o,tone:t="primary","aria-label":r,...e}){const[n,c]=i.useState(!1),d=i.useRef(null);i.useEffect(()=>{if(!n&&d.current===null)return;const f=()=>{d.current=null,c(!1)};return window.addEventListener("pointerup",f),window.addEventListener("pointercancel",f),()=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f)}},[n]);function l(f){d.current={x:f.clientX,y:f.clientY}}function g(f){const b=d.current;if(b===null||n)return;(Math.abs(f.clientX-b.x)>Pe||Math.abs(f.clientY-b.y)>Pe)&&c(!0)}const y=n?"transition-none":"duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";return a.jsx(U.Slider.Root,{className:s("gryt-slider w-full",o),...e,children:a.jsx(U.Slider.Control,{className:"flex w-full cursor-pointer touch-none items-center py-2 select-none",onPointerDown:l,onPointerMove:g,children:a.jsxs(U.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[a.jsx(U.Slider.Indicator,{className:s("h-full rounded-(--gryt-radius-full) select-none","transition-[width]",y,ze[t])}),a.jsx(U.Slider.Thumb,{"aria-label":r,className:s("group h-4 w-4 rounded-(--gryt-radius-full) select-none","transition-[inset-inline-start]",y,Ct),children:a.jsx("span",{className:s("block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]","motion-reduce:transition-none")})})]})})})}const Wt={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function Qt({className:o,label:t,options:r=[],placeholder:e="Select",size:n="medium",portalContainer:c,...d}){return a.jsxs(w.Select.Root,{items:r,...d,children:[a.jsxs("div",{className:s("gryt-select flex w-full flex-col gap-1.5",o),children:[t?a.jsx(w.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:t}):null,a.jsxs(w.Select.Trigger,{className:s("flex w-full cursor-pointer items-center justify-between gap-2","rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised","text-gryt-text select-none","transition-colors duration-150 hover:border-gryt-accent-light","data-disabled:cursor-not-allowed data-disabled:opacity-60",x,Wt[n]),children:[a.jsx(w.Select.Value,{placeholder:e}),a.jsx(w.Select.Icon,{className:"shrink-0 text-gryt-muted",children:a.jsx(S.CaretUpDown,{size:16})})]})]}),a.jsx(w.Select.Portal,{container:c,children:a.jsx(w.Select.Positioner,{sideOffset:6,className:"outline-none",children:a.jsx(w.Select.Popup,{className:s("min-w-(--anchor-width) p-1",F,I),children:a.jsx(w.Select.List,{children:r.map(l=>a.jsxs(w.Select.Item,{value:l.value,disabled:l.disabled,className:s("flex cursor-pointer items-center justify-between gap-2","rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text","outline-none select-none data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50"),children:[a.jsx(w.Select.ItemText,{children:l.label}),a.jsx(w.Select.ItemIndicator,{className:"text-gryt-accent-11",children:a.jsx(S.Check,{size:14,weight:"bold"})})]},String(l.value)))})})})})]})}function Jt({children:o,className:t,side:r="top",sideOffset:e=8,title:n}){return a.jsxs(H.Tooltip.Root,{children:[a.jsx(H.Tooltip.Trigger,{render:o}),a.jsx(H.Tooltip.Portal,{children:a.jsx(H.Tooltip.Positioner,{side:r,sideOffset:e,children:a.jsx(H.Tooltip.Popup,{className:s("gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised","px-2.5 py-1.5 text-xs text-gryt-text",I,t),children:n})})})]})}const Zt=H.Tooltip.Provider,er=i.forwardRef(function({className:t,orientation:r="horizontal",...e},n){return a.jsx(Ze.Separator,{ref:n,orientation:r,className:s("gryt-divider bg-gryt-border",r==="vertical"?"h-full w-px":"h-px w-full",t),...e})}),tr=i.forwardRef(function({className:t,...r},e){return a.jsx("div",{ref:e,className:s("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",t),...r})});function rr({children:o,className:t,subheader:r,title:e,...n}){return a.jsxs("div",{className:s("gryt-card-header flex flex-col gap-1 p-4",t),...n,children:[e?a.jsx("span",{className:"text-base font-semibold text-gryt-text",children:e}):null,r?a.jsx("span",{className:"text-sm text-gryt-muted",children:r}):null,o]})}function or({className:o,...t}){return a.jsx("div",{className:s("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",o),...t})}function ar({className:o,...t}){return a.jsx("div",{className:s("gryt-card-actions flex items-center gap-2 px-4 pb-4",o),...t})}const nr={info:"border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",success:"border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",warning:"border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",error:"border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"},sr=i.forwardRef(function({className:t,severity:r="info",...e},n){return a.jsx("div",{ref:n,role:"alert",className:s("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",nr[r],t),...e})});function cr({className:o,value:t=null,...r}){return a.jsx(de.Progress.Root,{value:t,className:s("gryt-progress w-full",o),...r,children:a.jsx(de.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:a.jsx(de.Progress.Indicator,{className:"h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none"})})})}function ir({className:o,size:t=24,"aria-label":r="Loading"}){return a.jsx(S.CircleNotch,{role:"status","aria-label":r,size:t,weight:"bold",className:s("gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",o)})}const dr={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function lr({className:o,height:t,style:r,variant:e="text",width:n,...c}){const d={width:n,height:t,...r};return a.jsx("div",{"aria-hidden":"true",className:s("gryt-skeleton bg-white/9 motion-safe:animate-pulse",dr[e],o),style:d,...c})}const Ue="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",ur=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Backdrop,{ref:e,className:s("gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)",Ue,"data-starting-style:opacity-0 data-ending-style:opacity-0",t),...r})}),gr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Popup,{ref:e,className:s("gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",Ue,"data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",t),...r})}),fr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Title,{ref:e,className:s("gryt-dialog-title text-base font-semibold text-gryt-text",t),...r})}),yr=i.forwardRef(function({className:t,...r},e){return a.jsx(M.Dialog.Description,{ref:e,className:s("gryt-dialog-description text-sm text-gryt-muted",t),...r})}),br=i.forwardRef(function({className:t,...r},e){return a.jsx("div",{ref:e,className:s("gryt-dialog-footer flex justify-end gap-3",t),...r})}),mr={Root:M.Dialog.Root,Trigger:M.Dialog.Trigger,Portal:M.Dialog.Portal,Close:M.Dialog.Close,Backdrop:ur,Popup:gr,Title:fr,Description:yr,Footer:br},pr=()=>()=>{};function Ve(o){const t=i.useCallback(e=>{if(typeof window>"u"||!window.matchMedia)return pr();const n=window.matchMedia(o);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)},[o]),r=i.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(o).matches,[o]);return i.useSyncExternalStore(t,r,()=>!1)}const xr={left:"left",right:"right",top:"up",bottom:"down"},se=i.createContext("right"),hr={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},wr={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},vr={left:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),right:["h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]","-mr-(--gryt-drawer-bleed) border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateX(var(--drawer-swipe-movement-x))]","data-starting-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]"].join(" "),top:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mt-(--gryt-drawer-bleed) border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]"].join(" "),bottom:["w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]","-mb-(--gryt-drawer-bleed) border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))]","[transform:translateY(var(--drawer-swipe-movement-y))]","data-starting-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]","data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"].join(" ")};function Rr({side:o="right",sheetOnMobile:t=!0,children:r,...e}){const n=Ve("(max-width: 767px)"),c=t&&n?"bottom":o;return a.jsx(se.Provider,{value:c,children:a.jsx(N.Drawer.Root,{swipeDirection:xr[c],...e,children:r})})}const jr=i.forwardRef(function({className:t,...r},e){const n=i.useContext(se);return a.jsx(N.Drawer.Viewport,{ref:e,className:s("gryt-drawer-viewport fixed inset-0 z-50 flex",hr[n],t),...r})}),Nr=i.forwardRef(function({className:t,...r},e){const n=i.useContext(se);return a.jsx(N.Drawer.Popup,{ref:e,className:s("gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text","overflow-y-auto overscroll-contain outline-none","transition-transform duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0 data-swiping:select-none","motion-reduce:transition-none",vr[n],wr[n],t),...r})}),Tr=i.forwardRef(function({className:t,...r},e){return a.jsx(N.Drawer.Backdrop,{ref:e,className:s("gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","[opacity:calc(1-var(--drawer-swipe-progress,0))]","transition-opacity duration-(--gryt-dur-spring-soft) ease-spring","data-swiping:duration-0","data-starting-style:opacity-0 data-ending-style:opacity-0","motion-reduce:transition-none",t),...r})});function Pr({className:o}){const t=i.useContext(se);return t!=="bottom"&&t!=="top"?null:a.jsx("div",{"aria-hidden":!0,className:s("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",t==="top"&&"order-last",o)})}const kr={Root:Rr,Trigger:N.Drawer.Trigger,Portal:N.Drawer.Portal,Backdrop:Tr,Viewport:jr,Popup:Nr,Content:N.Drawer.Content,Grabber:Pr,Close:N.Drawer.Close,Title:N.Drawer.Title,Description:N.Drawer.Description},Sr=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(G.Menu.Positioner,{ref:n,sideOffset:r,className:s("gryt-menu-positioner outline-none",t),...e})}),Cr=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Popup,{ref:e,className:s("gryt-menu min-w-44 p-1 outline-none",F,I,t),...r})}),Lr=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Item,{ref:e,className:s("gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",t),...r})}),Ar=i.forwardRef(function({className:t,...r},e){return a.jsx(G.Menu.Separator,{ref:e,className:s("gryt-menu-separator my-1 h-px bg-gryt-border",t),...r})}),te={Root:G.Menu.Root,Trigger:G.Menu.Trigger,Portal:G.Menu.Portal,Positioner:Sr,Popup:Cr,Item:Lr,Separator:Ar},Mr=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Root,{ref:e,className:s("gryt-tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",t),...r})}),Dr=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.List,{ref:e,className:s("gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1","data-[orientation=vertical]:flex data-[orientation=vertical]:shrink-0","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch","data-[orientation=vertical]:rounded-(--gryt-radius-lg)",t),...r})}),Ye=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Tab,{ref:e,className:s("gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap","rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5","text-sm font-medium text-gryt-muted select-none","relative z-10 transition-colors duration-150 hover:text-gryt-text","data-active:text-gryt-on-accent","data-[orientation=vertical]:min-h-9 data-[orientation=vertical]:justify-start","data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3","data-[orientation=vertical]:rounded-(--gryt-radius-md)","data-disabled:cursor-not-allowed data-disabled:opacity-50",x,t),...r})}),Ir=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Indicator,{ref:e,renderBeforeHydration:!0,className:s("gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]","w-(--active-tab-width) translate-x-(--active-tab-left)","rounded-(--gryt-radius-full) bg-gryt-accent","transition-[translate,width] duration-(--gryt-dur-spring) ease-spring","motion-reduce:transition-none","[[data-orientation=vertical]_&]:top-0 [[data-orientation=vertical]_&]:left-1","[[data-orientation=vertical]_&]:h-(--active-tab-height)","[[data-orientation=vertical]_&]:w-[calc(100%-0.5rem)]","[[data-orientation=vertical]_&]:translate-x-0","[[data-orientation=vertical]_&]:translate-y-(--active-tab-top)","[[data-orientation=vertical]_&]:rounded-(--gryt-radius-md)","[[data-orientation=vertical]_&]:transition-[translate,height]",t),...r})}),$r=i.forwardRef(function({className:t,...r},e){return a.jsx(Z.Tabs.Panel,{ref:e,className:s("gryt-tabs-panel pt-3 text-sm text-gryt-text","data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:flex-1","data-[orientation=vertical]:pt-0 data-[orientation=vertical]:pl-4",t),...r})}),Hr=Object.assign(Mr,{List:Dr,Tab:Ye,Panel:$r,Indicator:Ir}),Gr=i.forwardRef(function({className:t,...r},e){return a.jsx(W.Accordion.Root,{ref:e,className:s("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",t),...r})}),Er=i.forwardRef(function({className:t,...r},e){return a.jsx(W.Accordion.Item,{ref:e,className:s("gryt-accordion-item",t),...r})}),Fr=i.forwardRef(function({children:t,className:r,expandIcon:e,...n},c){return a.jsx(W.Accordion.Header,{className:"gryt-accordion-header m-0",children:a.jsxs(W.Accordion.Trigger,{ref:c,className:s("gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3","rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5","text-left text-sm font-medium text-gryt-text select-none","transition-colors duration-150 hover:bg-gryt-surface-raised","data-disabled:cursor-not-allowed data-disabled:opacity-50",x,r),...n,children:[t,e===void 0?a.jsx(S.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):e]})})}),_r=i.forwardRef(function({children:t,className:r,...e},n){return a.jsx(W.Accordion.Panel,{ref:n,className:s("gryt-accordion-panel overflow-hidden text-sm text-gryt-muted","h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",r),...e,children:a.jsx("div",{className:"px-3 pt-1 pb-3",children:t})})}),qr=Object.assign(Gr,{Item:Er,Trigger:Fr,Panel:_r}),Br=i.forwardRef(function({className:t,sideOffset:r=2,...e},n){return a.jsx(A.ContextMenu.Positioner,{ref:n,sideOffset:r,className:s("gryt-context-menu-positioner outline-none",t),...e})}),zr={Root:A.ContextMenu.Root,Trigger:A.ContextMenu.Trigger,Portal:A.ContextMenu.Portal,Positioner:Br,Popup:te.Popup,Item:te.Item,Separator:te.Separator,Group:A.ContextMenu.Group,GroupLabel:A.ContextMenu.GroupLabel,SubmenuRoot:A.ContextMenu.SubmenuRoot,SubmenuTrigger:A.ContextMenu.SubmenuTrigger},Or=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(C.Popover.Positioner,{ref:n,sideOffset:r,className:s("gryt-popover-positioner outline-none",t),...e})}),Ur=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Popup,{ref:e,className:s("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",F,I,t),...r})}),Vr=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Title,{ref:e,className:s("gryt-popover-title text-sm font-semibold text-gryt-text",t),...r})}),Yr=i.forwardRef(function({className:t,...r},e){return a.jsx(C.Popover.Description,{ref:e,className:s("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",t),...r})}),Xr={Root:C.Popover.Root,Trigger:C.Popover.Trigger,Portal:C.Popover.Portal,Positioner:Or,Popup:Ur,Title:Vr,Description:Yr,Close:C.Popover.Close,Arrow:C.Popover.Arrow},Kr={neutral:"border-white/8 bg-gryt-surface",info:"border-gryt-secondary-6 bg-gryt-secondary-2",success:"border-gryt-success-6 bg-gryt-success-2",warning:"border-gryt-warning-6 bg-gryt-warning-2",danger:"border-gryt-danger-6 bg-gryt-danger-2"},Wr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Viewport,{ref:e,className:s("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",t),...r})}),Qr=i.forwardRef(function({className:t,severity:r="neutral",...e},n){return a.jsx(L.Toast.Root,{ref:n,className:s("gryt-toast relative flex flex-col p-3 pr-9","rounded-(--gryt-radius-xl) border text-gryt-text",Kr[r],"transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring","data-starting-style:translate-y-2 data-starting-style:opacity-0","data-ending-style:translate-y-2 data-ending-style:opacity-0","motion-reduce:transition-none",t),...e})}),Jr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Title,{ref:e,className:s("gryt-toast-title text-sm font-semibold text-gryt-text",t),...r})}),Zr=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Description,{ref:e,className:s("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",t),...r})}),eo=i.forwardRef(function({className:t,children:r,...e},n){return a.jsx(L.Toast.Close,{ref:n,"aria-label":"Close",className:s("gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center","rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted","transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",t),...e,children:r??a.jsx(S.X,{size:14,weight:"bold"})})}),to=i.forwardRef(function({className:t,...r},e){return a.jsx(L.Toast.Action,{ref:e,className:s("gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0","bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent","transition-[scale] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:scale-[1.04] motion-safe:active:scale-[0.96]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",t),...r})}),ro={Provider:L.Toast.Provider,Portal:L.Toast.Portal,Viewport:Wr,Root:Qr,Title:Jr,Description:Zr,Close:eo,Action:to},oo=L.Toast.useToastManager,ao=i.forwardRef(function({className:t,...r},e){return a.jsx(B.ScrollArea.Root,{ref:e,className:s("gryt-scroll-area relative",t),...r})}),no=i.forwardRef(function({className:t,...r},e){return a.jsx(B.ScrollArea.Viewport,{ref:e,className:s("gryt-scroll-area-viewport h-full w-full overscroll-contain","focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",t),...r})}),so=i.forwardRef(function({className:t,orientation:r,...e},n){return a.jsx(B.ScrollArea.Scrollbar,{ref:n,orientation:r,className:s("gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none","opacity-0 transition-opacity duration-(--gryt-dur-fast)","data-hovering:opacity-100 data-scrolling:opacity-100","motion-reduce:transition-none",r==="horizontal"?"h-2 flex-col":"w-2",t),...e,children:a.jsx(B.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),co={Root:ao,Viewport:no,Scrollbar:so,Content:B.ScrollArea.Content,Corner:B.ScrollArea.Corner},io={primary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent","data-pressed:hover:not-data-disabled:bg-gryt-accent"].join(" "),secondary:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-secondary data-pressed:text-gryt-on-secondary","data-pressed:hover:not-data-disabled:bg-gryt-secondary"].join(" "),neutral:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-surface-hover data-pressed:text-gryt-text"].join(" "),danger:["text-gryt-muted hover:not-data-disabled:bg-white/8","data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger","data-pressed:hover:not-data-disabled:bg-gryt-danger"].join(" ")},lo={xsmall:"h-8 min-w-8 px-2 text-xs",small:"h-9 min-w-9 px-2.5 text-sm",medium:"h-10 min-w-10 px-3 text-sm",large:"h-12 min-w-12 px-4 text-base"},uo=i.forwardRef(function({className:t,size:r="medium",tone:e="primary",...n},c){return a.jsx(et.Toggle,{ref:c,className:s("gryt-toggle","inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent","rounded-(--gryt-radius-full) font-medium select-none","transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring","motion-safe:hover:not-data-disabled:scale-[1.06]","motion-safe:active:not-data-disabled:scale-[0.94]",x,O,lo[r],io[e],t),...n})}),go=i.forwardRef(function({className:t,...r},e){return a.jsx(tt.ToggleGroup,{ref:e,className:s("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",t),...r})}),fo={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function yo({className:o,value:t,label:r,showValue:e=!1,tone:n="primary",...c}){return a.jsxs(V.Meter.Root,{value:t,className:s("gryt-meter flex w-full flex-col gap-1.5",o),...c,children:[(r||e)&&a.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[r?a.jsx(V.Meter.Label,{className:"text-sm text-gryt-muted",children:r}):a.jsx("span",{}),e&&a.jsx(V.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),a.jsx(V.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:a.jsx(V.Meter.Indicator,{className:s("h-full rounded-(--gryt-radius-full)","transition-[width] duration-120 ease-out motion-reduce:transition-none",fo[n])})})]})}const bo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Popup,{ref:e,className:s("gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4","rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text","outline-none","transition-[opacity,scale] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:scale-[0.98] data-starting-style:opacity-0","data-ending-style:scale-[0.98] data-ending-style:opacity-0",t),...r})}),mo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Backdrop,{ref:e,className:s("gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60","backdrop-blur-(--gryt-backdrop-blur)","transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none","data-starting-style:opacity-0 data-ending-style:opacity-0",t),...r})}),po=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Title,{ref:e,className:s("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",t),...r})}),xo=i.forwardRef(function({className:t,...r},e){return a.jsx(D.AlertDialog.Description,{ref:e,className:s("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",t),...r})}),ho={Root:D.AlertDialog.Root,Trigger:D.AlertDialog.Trigger,Portal:D.AlertDialog.Portal,Backdrop:mo,Popup:bo,Title:po,Description:xo,Close:D.AlertDialog.Close},Xe=["flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)","px-3 py-2 text-sm text-gryt-text outline-none select-none","data-highlighted:bg-gryt-surface-raised","data-selected:text-gryt-accent-11","data-disabled:cursor-not-allowed data-disabled:opacity-50"].join(" "),Ke=[qe,Be.medium,"border-gryt-border",x].join(" "),wo=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Input,{ref:e,className:s("gryt-combobox-input",Ke,t),...r})}),vo=i.forwardRef(function({className:t,sideOffset:r=6,...e},n){return a.jsx(m.Combobox.Positioner,{ref:n,sideOffset:r,className:s("gryt-combobox-positioner outline-none",t),...e})}),Ro=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Popup,{ref:e,className:s("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",F,I,t),...r})}),jo=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Item,{ref:e,className:s("gryt-combobox-item",Xe,t),...r})}),No=i.forwardRef(function({className:t,...r},e){return a.jsx(m.Combobox.Empty,{ref:e,className:s("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",t),...r})}),To={Root:m.Combobox.Root,Input:wo,InputGroup:m.Combobox.InputGroup,Trigger:m.Combobox.Trigger,Icon:m.Combobox.Icon,Clear:m.Combobox.Clear,Value:m.Combobox.Value,Chips:m.Combobox.Chips,Chip:m.Combobox.Chip,ChipRemove:m.Combobox.ChipRemove,Portal:m.Combobox.Portal,Positioner:vo,Popup:Ro,List:m.Combobox.List,Item:jo,ItemIndicator:m.Combobox.ItemIndicator,Group:m.Combobox.Group,GroupLabel:m.Combobox.GroupLabel,Empty:No,Separator:m.Combobox.Separator},Po=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Input,{ref:e,className:s("gryt-autocomplete-input",Ke,t),...r})}),ko=i.forwardRef(function({className:t,sideOffset:r=6,...e},n){return a.jsx(p.Autocomplete.Positioner,{ref:n,sideOffset:r,className:s("gryt-autocomplete-positioner outline-none",t),...e})}),So=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Popup,{ref:e,className:s("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",F,I,t),...r})}),Co=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Item,{ref:e,className:s("gryt-autocomplete-item",Xe,t),...r})}),Lo=i.forwardRef(function({className:t,...r},e){return a.jsx(p.Autocomplete.Empty,{ref:e,className:s("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",t),...r})}),Ao={Root:p.Autocomplete.Root,Input:Po,InputGroup:p.Autocomplete.InputGroup,Trigger:p.Autocomplete.Trigger,Icon:p.Autocomplete.Icon,Clear:p.Autocomplete.Clear,Value:p.Autocomplete.Value,Portal:p.Autocomplete.Portal,Positioner:ko,Popup:So,List:p.Autocomplete.List,Item:Co,Group:p.Autocomplete.Group,GroupLabel:p.Autocomplete.GroupLabel,Empty:Lo,Separator:p.Autocomplete.Separator},Mo=i.forwardRef(function({className:t,...r},e){return a.jsx(rt.CheckboxGroup,{ref:e,className:s("gryt-checkbox-group flex flex-col gap-2",t),...r})}),Do=i.forwardRef(function({className:t,...r},e){return a.jsx(ye.Collapsible.Trigger,{ref:e,className:s("gryt-collapsible-trigger flex w-full items-center justify-between gap-2","rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left","text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",x,t),...r})}),Io=i.forwardRef(function({className:t,...r},e){return a.jsx(ye.Collapsible.Panel,{ref:e,className:s("gryt-collapsible-panel overflow-hidden","h-(--collapsible-panel-height) transition-[height] duration-(--gryt-dur-spring) ease-spring","data-starting-style:h-0 data-ending-style:h-0","motion-reduce:transition-none",t),...r})}),$o={Root:ye.Collapsible.Root,Trigger:Do,Panel:Io},Ho=i.forwardRef(function({className:t,...r},e){return a.jsx(ot.Form,{ref:e,className:s("gryt-form flex flex-col gap-(--gryt-space-lg)",t),...r})}),Go=i.forwardRef(function({className:t,...r},e){return a.jsx(Ce.Fieldset.Root,{ref:e,className:s("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",t),...r})}),Eo=i.forwardRef(function({className:t,...r},e){return a.jsx(Ce.Fieldset.Legend,{ref:e,className:s("gryt-fieldset-legend text-sm font-semibold text-gryt-text",t),...r})}),Fo={Root:Go,Legend:Eo},_o=i.forwardRef(function({className:t,...r},e){return a.jsx(at.Menubar,{ref:e,className:s("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",t),...r})}),qo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Trigger,{ref:e,className:s("gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)","border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none","data-popup-open:bg-gryt-surface-raised",x,t),...r})}),Bo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Popup,{ref:e,className:s("gryt-navigation-menu-popup outline-none",F,I,t),...r})}),zo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Viewport,{ref:e,className:s("gryt-navigation-menu-viewport relative overflow-hidden",t),...r})}),Oo=i.forwardRef(function({className:t,...r},e){return a.jsx(v.NavigationMenu.Link,{ref:e,className:s("gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2","text-sm text-gryt-text no-underline outline-none","transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",x,t),...r})}),Uo={Root:v.NavigationMenu.Root,List:v.NavigationMenu.List,Item:v.NavigationMenu.Item,Trigger:qo,Content:v.NavigationMenu.Content,Portal:v.NavigationMenu.Portal,Positioner:v.NavigationMenu.Positioner,Viewport:zo,Popup:Bo,Link:Oo,Icon:v.NavigationMenu.Icon,Arrow:v.NavigationMenu.Arrow},ke="flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50",Vo=i.forwardRef(function({className:t,label:r,scrubbable:e=!1,...n},c){return a.jsxs($.NumberField.Root,{ref:c,className:s("gryt-number-field flex flex-col gap-1.5",t),...n,children:[r&&(e?a.jsxs($.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[r,a.jsx($.NumberField.ScrubAreaCursor,{})]}):a.jsx("span",{className:"text-sm text-gryt-muted",children:r})),a.jsxs($.NumberField.Group,{className:s("flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)","border border-gryt-border bg-gryt-surface-raised","focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",O),children:[a.jsx($.NumberField.Decrement,{"aria-label":"Decrease",className:s(ke,"rounded-l-(--gryt-radius-full)"),children:a.jsx(S.Minus,{size:14,weight:"bold"})}),a.jsx($.NumberField.Input,{className:s("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",x)}),a.jsx($.NumberField.Increment,{"aria-label":"Increase",className:s(ke,"rounded-r-(--gryt-radius-full)"),children:a.jsx(S.Plus,{size:14,weight:"bold"})})]})]})}),Yo=i.forwardRef(function({className:t,length:r=6,...e},n){return a.jsx(je.OTPField.Root,{ref:n,length:r,className:s("gryt-otp-field flex gap-2",t),...e,children:Array.from({length:r},(c,d)=>a.jsx(je.OTPField.Input,{className:s("gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center","border border-gryt-border bg-gryt-surface-raised","font-mono text-lg text-gryt-text tabular-nums outline-none","transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none","data-filled:border-gryt-accent",x)},d))})}),Xo=i.forwardRef(function({className:t,sideOffset:r=8,...e},n){return a.jsx(_.PreviewCard.Positioner,{ref:n,sideOffset:r,className:s("gryt-preview-card-positioner outline-none",t),...e})}),Ko=i.forwardRef(function({className:t,...r},e){return a.jsx(_.PreviewCard.Popup,{ref:e,className:s("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",F,I,t),...r})}),Wo={Root:_.PreviewCard.Root,Trigger:_.PreviewCard.Trigger,Portal:_.PreviewCard.Portal,Positioner:Xo,Popup:Ko,Arrow:_.PreviewCard.Arrow},Qo=i.forwardRef(function({className:t,...r},e){return a.jsx(q.Toolbar.Root,{ref:e,className:s("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",t),...r})}),Jo=i.forwardRef(function({className:t,...r},e){return a.jsx(q.Toolbar.Separator,{ref:e,className:s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",t),...r})}),Zo={Root:Qo,Group:q.Toolbar.Group,Button:q.Toolbar.Button,Link:q.Toolbar.Link,Input:q.Toolbar.Input,Separator:Jo};exports.Accordion=qr;exports.Alert=sr;exports.AlertDialog=ho;exports.Autocomplete=Ao;exports.Avatar=Oe;exports.Badge=Bt;exports.Button=_e;exports.Card=tr;exports.CardActions=ar;exports.CardContent=or;exports.CardHeader=rr;exports.Checkbox=Ut;exports.CheckboxGroup=Mo;exports.Chip=Ot;exports.Collapsible=$o;exports.Combobox=To;exports.Composer=Ft;exports.ContextMenu=zr;exports.ConversationItem=qt;exports.Dialog=mr;exports.Divider=er;exports.Drawer=kr;exports.Fieldset=Fo;exports.Form=Ho;exports.GRYT_HUE_KEYS=J;exports.GRYT_NEUTRAL_KEYS=be;exports.GRYT_RADIUS_KEYS=oe;exports.GRYT_THEME_NAME_MAX=He;exports.GrytProvider=pt;exports.IconButton=$t;exports.Menu=te;exports.Menubar=_o;exports.MessageBubble=Gt;exports.Meter=yo;exports.NavigationMenu=Uo;exports.NumberField=Vo;exports.OtpField=Yo;exports.Popover=Xr;exports.PreviewCard=Wo;exports.Progress=cr;exports.Radio=Vt;exports.RadioGroup=Yt;exports.ScrollArea=co;exports.Select=Qt;exports.Skeleton=lr;exports.Slider=Kt;exports.Spinner=ir;exports.Surface=Ht;exports.Switch=Xt;exports.Tab=Ye;exports.Tabs=Hr;exports.TextField=Et;exports.Toast=ro;exports.Toggle=uo;exports.ToggleGroup=go;exports.Toolbar=Zo;exports.Tooltip=Jt;exports.TooltipProvider=Zt;exports.cloneGrytTheme=me;exports.cn=s;exports.contrast=ft;exports.createGrytTheme=$e;exports.decodeGrytTheme=vt;exports.encodeGrytTheme=wt;exports.grytAlphaScales=yt;exports.grytAlphaScalesLight=bt;exports.grytLightTokens=j;exports.grytPresets=Fe;exports.grytPresetsById=Pt;exports.grytScales=fe;exports.grytScalesLight=re;exports.grytTheme=E;exports.grytThemeHues=Ge;exports.grytThemeToOptions=xt;exports.grytTokens=u;exports.hexToOklch=z;exports.isHexColor=pe;exports.normalizeHexColor=ne;exports.normalizeThemeName=ae;exports.oklchToHex=k;exports.useMediaQuery=Ve;exports.useToastManager=oo;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|