@gryt/ui 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +3 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAClD,WAAW,GAAG,OAAO,CACtB;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EAClD,WAAW,GAAG,OAAO,CACtB;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BA8B5E;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,IAAS,EACT,YAAY,EAAE,SAAqB,EACpC,EAAE,YAAY,+BAad"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),M=require("@base-ui/react/tooltip"),c=require("@gryt/theme"),ae=require("@base-ui/react/button"),s=require("react"),be=require("clsx"),fe=require("tailwind-merge"),E=require("@base-ui/react/field"),j=require("@phosphor-icons/react"),V=require("@base-ui/react/avatar"),J=require("@base-ui/react/checkbox"),Z=require("@base-ui/react/radio"),xe=require("@base-ui/react/radio-group"),ee=require("@base-ui/react/switch"),F=require("@base-ui/react/slider"),x=require("@base-ui/react/select"),he=require("@base-ui/react/separator"),X=require("@base-ui/react/progress"),C=require("@base-ui/react/dialog"),v=require("@base-ui/react/drawer"),D=require("@base-ui/react/menu"),z=require("@base-ui/react/tabs"),B=require("@base-ui/react/accordion"),T=require("@base-ui/react/context-menu"),N=require("@base-ui/react/popover"),R=require("@base-ui/react/toast"),$=require("@base-ui/react/scroll-area"),we=require("@base-ui/react/toggle"),ve=require("@base-ui/react/toggle-group"),q=require("@base-ui/react/meter"),S=require("@base-ui/react/alert-dialog"),m=require("@base-ui/react/autocomplete"),u=require("@base-ui/react/combobox"),je=require("@base-ui/react/checkbox-group"),U=require("@base-ui/react/collapsible"),Pe=require("@base-ui/react/form"),ne=require("@base-ui/react/fieldset"),Ne=require("@base-ui/react/menubar"),h=require("@base-ui/react/navigation-menu"),A=require("@base-ui/react/number-field"),te=require("@base-ui/react/otp-field"),G=require("@base-ui/react/preview-card"),L=require("@base-ui/react/toolbar");function Re(a){return Object.keys(a).some(e=>e.startsWith("--"))}function Te({children:a,className:e,theme:t,tooltipDelay:r=400}){const i=t===void 0?void 0:Re(t)?t:c.createGrytTheme(t);return o.jsx("div",{className:e,style:i,children:o.jsx(M.Tooltip.Provider,{delay:r,children:a})})}function n(...a){return fe.twMerge(be.clsx(a))}const Ce={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"},Se={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"},se=s.forwardRef(function({children:e,className:t,endIcon:r,size:i="medium",startIcon:l,tone:d="primary",...p},g){return o.jsxs(ae.Button,{ref:g,className:n("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",Se[i],Ce[d],t),...p,children:[l,e,r]})}),b="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",ke="has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light",ie=["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(" "),le={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},I="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",k=["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",Ae={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"},ce={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"},Me={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"},De={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"},Ie={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"},Ge={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},Le=s.forwardRef(function({className:e,size:t="medium",tone:r="neutral",...i},l){return o.jsx(ae.Button,{ref:l,className:n("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]",b,O,Ge[t],Ie[r],e),...i})}),$e=s.forwardRef(function({className:e,elevated:t=!1,...r},i){return o.jsx("div",{ref:i,className:n("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",t?"bg-gryt-surface-raised":"bg-gryt-surface",e),...r})}),Oe=s.forwardRef(function({children:e,className:t,from:r="assistant",...i},l){return o.jsx("div",{ref:l,className:n("gryt-message-bubble",r==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",r==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",r==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",t),...i,children:e})}),Fe=s.forwardRef(function({className:e,error:t=!1,fieldClassName:r,helperText:i,label:l,minRows:d=3,multiline:p=!1,size:g="medium",...w},y){const P=o.jsx(E.Field.Control,{ref:y,render:p?o.jsx("textarea",{rows:d}):void 0,className:n("gryt-text-field-control",ie,p&&"resize-y leading-6",t?"border-gryt-danger":"border-gryt-border",le[g],e),...w});return o.jsxs(E.Field.Root,{className:n("gryt-text-field flex w-full flex-col gap-1.5",r),children:[l?o.jsx(E.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:l}):null,P,i?o.jsx(E.Field.Description,{className:n("text-xs",t?"text-gryt-danger-11":"text-gryt-muted"),children:i}):null]})}),qe=s.forwardRef(function({className:e,disabled:t=!1,maxRows:r=8,minRows:i=1,onSubmit:l,placeholder:d="Message Gryt",submitLabel:p="Send",...g},w){const y=s.useRef(null),P=s.useCallback(()=>{const f=y.current;if(!f)return;const H=window.getComputedStyle(f),Q=parseFloat(H.lineHeight)||24,W=parseFloat(H.paddingTop)+parseFloat(H.paddingBottom);f.style.height="auto",f.style.height=`${Math.min(Math.max(f.scrollHeight,Q*i+W),Q*r+W)}px`},[r,i]);s.useLayoutEffect(P,[P,g.value]);function K(f){if(!l){f.preventDefault();return}l(f)}return o.jsxs("form",{className:n("gryt-composer",e),onSubmit:K,children:[o.jsx("textarea",{ref:f=>{y.current=f,typeof w=="function"?w(f):w&&(w.current=f)},rows:i,disabled:t,placeholder:d,onInput:P,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...g}),o.jsx(se,{type:"submit",disabled:t,size:"small",endIcon:o.jsx(j.PaperPlaneTilt,{size:14,weight:"fill"}),children:p})]})}),Be={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},de=s.forwardRef(function({alt:e,children:t,className:r,fallback:i,size:l="medium",src:d,...p},g){return o.jsxs(V.Avatar.Root,{ref:g,className:n("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",Be[l],r),...p,children:[d?o.jsx(V.Avatar.Image,{src:d,alt:e,className:"h-full w-full object-cover"}):null,o.jsx(V.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:i??t})]})}),ze=s.forwardRef(function({active:e=!1,avatar:t,className:r,subtitle:i,title:l,...d},p){return o.jsxs("button",{ref:p,type:"button",className:n("gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",r),...d,children:[t??o.jsx(de,{size:"small",className:n(e?"bg-gryt-on-accent text-gryt-accent-9 ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:l.slice(0,1).toUpperCase()}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-semibold",children:l}),i?o.jsx("span",{className:n("block truncate text-xs",e?"text-gryt-on-accent/85":"text-gryt-muted"),children:i}):null]})]})}),Ee=s.forwardRef(function({badgeContent:e,children:t,className:r,max:i=99,showZero:l=!1,...d},p){const g=typeof e=="number"?e:null,w=g!==null&&g===0&&!l,y=g!==null&&g>i?`${i}+`:e;return o.jsxs("span",{ref:p,className:n("gryt-badge relative inline-flex",r),...d,children:[t,e!==void 0&&!w?o.jsx("span",{className:n("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:y}):null]})}),_e={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"},Ye=s.forwardRef(function({children:e,className:t,icon:r,label:i,onDelete:l,tone:d="neutral",...p},g){return o.jsxs("span",{ref:g,className:n("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",_e[d],t),...p,children:[r,i??e,l?o.jsx("button",{type:"button","aria-label":"Remove",onClick:l,className:n("-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",b),children:o.jsx(j.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),He=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(J.Checkbox.Root,{ref:i,className:n("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]",b,O,Ae[t],e),...r,children:o.jsx(J.Checkbox.Indicator,{keepMounted:!0,className:n("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:o.jsx(j.Check,{size:12,weight:"bold"})})})}),Ve=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(Z.Radio.Root,{ref:i,className:n("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]",b,O,Me[t],e),...r,children:o.jsx(Z.Radio.Indicator,{keepMounted:!0,className:n("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",ce[t])})})}),Xe=s.forwardRef(function({className:e,...t},r){return o.jsx(xe.RadioGroup,{ref:r,className:n("gryt-radio-group flex flex-col gap-2",e),...t})}),Ue=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(ee.Switch.Root,{ref:i,className:n("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]",b,O,De[t],e),...r,children:o.jsx(ee.Switch.Thumb,{className:n("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")})})}),re=3;function Ke({className:a,tone:e="primary","aria-label":t,...r}){const[i,l]=s.useState(!1),d=s.useRef(null);s.useEffect(()=>{if(!i&&d.current===null)return;const y=()=>{d.current=null,l(!1)};return window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y),()=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y)}},[i]);function p(y){d.current={x:y.clientX,y:y.clientY}}function g(y){const P=d.current;if(P===null||i)return;(Math.abs(y.clientX-P.x)>re||Math.abs(y.clientY-P.y)>re)&&l(!0)}const w=i?"transition-none":"duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";return o.jsx(F.Slider.Root,{className:n("gryt-slider w-full",a),...r,children:o.jsx(F.Slider.Control,{className:"flex w-full cursor-pointer touch-none items-center py-2 select-none",onPointerDown:p,onPointerMove:g,children:o.jsxs(F.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[o.jsx(F.Slider.Indicator,{className:n("h-full rounded-(--gryt-radius-full) select-none","transition-[width]",w,ce[e])}),o.jsx(F.Slider.Thumb,{"aria-label":t,className:n("group h-4 w-4 rounded-(--gryt-radius-full) select-none","transition-[inset-inline-start]",w,ke),children:o.jsx("span",{className:n("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 Qe={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function We({className:a,label:e,options:t=[],placeholder:r="Select",size:i="medium",...l}){return o.jsxs(x.Select.Root,{items:t,...l,children:[o.jsxs("div",{className:n("gryt-select flex w-full flex-col gap-1.5",a),children:[e?o.jsx(x.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:e}):null,o.jsxs(x.Select.Trigger,{className:n("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",b,Qe[i]),children:[o.jsx(x.Select.Value,{placeholder:r}),o.jsx(x.Select.Icon,{className:"shrink-0 text-gryt-muted",children:o.jsx(j.CaretUpDown,{size:16})})]})]}),o.jsx(x.Select.Portal,{children:o.jsx(x.Select.Positioner,{sideOffset:6,className:"gryt-select-positioner outline-none",children:o.jsx(x.Select.Popup,{className:n("min-w-(--anchor-width) p-1",I,k),children:o.jsx(x.Select.List,{children:t.map(d=>o.jsxs(x.Select.Item,{value:d.value,disabled:d.disabled,className:n("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:[o.jsx(x.Select.ItemText,{children:d.label}),o.jsx(x.Select.ItemIndicator,{className:"text-gryt-accent-11",children:o.jsx(j.Check,{size:14,weight:"bold"})})]},String(d.value)))})})})})]})}function Je({children:a,className:e,side:t="top",sideOffset:r=8,title:i}){return o.jsxs(M.Tooltip.Root,{children:[o.jsx(M.Tooltip.Trigger,{render:a}),o.jsx(M.Tooltip.Portal,{children:o.jsx(M.Tooltip.Positioner,{side:t,sideOffset:r,className:"gryt-tooltip-positioner",children:o.jsx(M.Tooltip.Popup,{className:n("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",k,e),children:i})})})]})}const Ze=M.Tooltip.Provider,et=s.forwardRef(function({className:e,orientation:t="horizontal",...r},i){return o.jsx(he.Separator,{ref:i,orientation:t,className:n("gryt-divider bg-gryt-border",t==="vertical"?"h-full w-px":"h-px w-full",e),...r})}),tt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",e),...t})});function rt({children:a,className:e,subheader:t,title:r,...i}){return o.jsxs("div",{className:n("gryt-card-header flex flex-col gap-1 p-4",e),...i,children:[r?o.jsx("span",{className:"text-base font-semibold text-gryt-text",children:r}):null,t?o.jsx("span",{className:"text-sm text-gryt-muted",children:t}):null,a]})}function ot({className:a,...e}){return o.jsx("div",{className:n("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",a),...e})}function at({className:a,...e}){return o.jsx("div",{className:n("gryt-card-actions flex items-center gap-2 px-4 pb-4",a),...e})}const nt={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"},st=s.forwardRef(function({className:e,severity:t="info",...r},i){return o.jsx("div",{ref:i,role:"alert",className:n("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",nt[t],e),...r})});function it({className:a,value:e=null,...t}){return o.jsx(X.Progress.Root,{value:e,className:n("gryt-progress w-full",a),...t,children:o.jsx(X.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(X.Progress.Indicator,{className:"h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none"})})})}function lt({className:a,size:e=24,"aria-label":t="Loading"}){return o.jsx(j.CircleNotch,{role:"status","aria-label":t,size:e,weight:"bold",className:n("gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",a)})}const ct={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function dt({className:a,height:e,style:t,variant:r="text",width:i,...l}){const d={width:i,height:e,...t};return o.jsx("div",{"aria-hidden":"true",className:n("gryt-skeleton bg-white/9 motion-safe:animate-pulse",ct[r],a),style:d,...l})}const ue="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",ut=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Backdrop,{ref:r,className:n("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",e),...t})}),gt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Popup,{ref:r,className:n("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",e),...t})}),yt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Title,{ref:r,className:n("gryt-dialog-title text-base font-semibold text-gryt-text",e),...t})}),pt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Description,{ref:r,className:n("gryt-dialog-description text-sm text-gryt-muted",e),...t})}),mt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-dialog-footer flex justify-end gap-3",e),...t})}),bt={Root:C.Dialog.Root,Trigger:C.Dialog.Trigger,Portal:C.Dialog.Portal,Close:C.Dialog.Close,Backdrop:ut,Popup:gt,Title:yt,Description:pt,Footer:mt},ft=()=>()=>{};function ge(a){const e=s.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return ft();const i=window.matchMedia(a);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[a]),t=s.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(a).matches,[a]);return s.useSyncExternalStore(e,t,()=>!1)}const xt={left:"left",right:"right",top:"up",bottom:"down"},Y=s.createContext("right"),ht={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},wt={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},vt={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 jt({side:a="right",sheetOnMobile:e=!0,children:t,...r}){const i=ge("(max-width: 767px)"),l=e&&i?"bottom":a;return o.jsx(Y.Provider,{value:l,children:o.jsx(v.Drawer.Root,{swipeDirection:xt[l],...r,children:t})})}const Pt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(Y);return o.jsx(v.Drawer.Viewport,{ref:r,className:n("gryt-drawer-viewport fixed inset-0 z-50 flex",ht[i],e),...t})}),Nt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(Y);return o.jsx(v.Drawer.Popup,{ref:r,className:n("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",vt[i],wt[i],e),...t})}),Rt=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Drawer.Backdrop,{ref:r,className:n("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",e),...t})});function Tt({className:a}){const e=s.useContext(Y);return e!=="bottom"&&e!=="top"?null:o.jsx("div",{"aria-hidden":!0,className:n("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",e==="top"&&"order-last",a)})}const Ct={Root:jt,Trigger:v.Drawer.Trigger,Portal:v.Drawer.Portal,Backdrop:Rt,Viewport:Pt,Popup:Nt,Content:v.Drawer.Content,Grabber:Tt,Close:v.Drawer.Close,Title:v.Drawer.Title,Description:v.Drawer.Description},St=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(D.Menu.Positioner,{ref:i,sideOffset:t,className:n("gryt-menu-positioner outline-none",e),...r})}),kt=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Popup,{ref:r,className:n("gryt-menu min-w-44 p-1 outline-none",I,k,e),...t})}),At=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Item,{ref:r,className:n("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",e),...t})}),Mt=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Separator,{ref:r,className:n("gryt-menu-separator my-1 h-px bg-gryt-border",e),...t})}),_={Root:D.Menu.Root,Trigger:D.Menu.Trigger,Portal:D.Menu.Portal,Positioner:St,Popup:kt,Item:At,Separator:Mt},Dt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Root,{ref:r,className:n("gryt-tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",e),...t})}),It=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.List,{ref:r,className:n("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)",e),...t})}),ye=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Tab,{ref:r,className:n("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",b,e),...t})}),Gt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Indicator,{ref:r,renderBeforeHydration:!0,className:n("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]",e),...t})}),Lt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Panel,{ref:r,className:n("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",e),...t})}),$t=Object.assign(Dt,{List:It,Tab:ye,Panel:Lt,Indicator:Gt}),Ot=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Root,{ref:r,className:n("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",e),...t})}),Ft=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Item,{ref:r,className:n("gryt-accordion-item",e),...t})}),qt=s.forwardRef(function({children:e,className:t,expandIcon:r,...i},l){return o.jsx(B.Accordion.Header,{className:"gryt-accordion-header m-0",children:o.jsxs(B.Accordion.Trigger,{ref:l,className:n("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",b,t),...i,children:[e,r===void 0?o.jsx(j.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):r]})})}),Bt=s.forwardRef(function({children:e,className:t,...r},i){return o.jsx(B.Accordion.Panel,{ref:i,className:n("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",t),...r,children:o.jsx("div",{className:"px-3 pt-1 pb-3",children:e})})}),zt=Object.assign(Ot,{Item:Ft,Trigger:qt,Panel:Bt}),Et=s.forwardRef(function({className:e,sideOffset:t=2,...r},i){return o.jsx(T.ContextMenu.Positioner,{ref:i,sideOffset:t,className:n("gryt-context-menu-positioner outline-none",e),...r})}),_t={Root:T.ContextMenu.Root,Trigger:T.ContextMenu.Trigger,Portal:T.ContextMenu.Portal,Positioner:Et,Popup:_.Popup,Item:_.Item,Separator:_.Separator,Group:T.ContextMenu.Group,GroupLabel:T.ContextMenu.GroupLabel,SubmenuRoot:T.ContextMenu.SubmenuRoot,SubmenuTrigger:T.ContextMenu.SubmenuTrigger},Yt=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(N.Popover.Positioner,{ref:i,sideOffset:t,className:n("gryt-popover-positioner outline-none",e),...r})}),Ht=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Popup,{ref:r,className:n("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",I,k,e),...t})}),Vt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Title,{ref:r,className:n("gryt-popover-title text-sm font-semibold text-gryt-text",e),...t})}),Xt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Description,{ref:r,className:n("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",e),...t})}),Ut={Root:N.Popover.Root,Trigger:N.Popover.Trigger,Portal:N.Popover.Portal,Positioner:Yt,Popup:Ht,Title:Vt,Description:Xt,Close:N.Popover.Close,Arrow:N.Popover.Arrow},Kt={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"},Qt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Viewport,{ref:r,className:n("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",e),...t})}),Wt=s.forwardRef(function({className:e,severity:t="neutral",...r},i){return o.jsx(R.Toast.Root,{ref:i,className:n("gryt-toast relative flex flex-col p-3 pr-9","rounded-(--gryt-radius-xl) border text-gryt-text",Kt[t],"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",e),...r})}),Jt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Title,{ref:r,className:n("gryt-toast-title text-sm font-semibold text-gryt-text",e),...t})}),Zt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Description,{ref:r,className:n("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",e),...t})}),er=s.forwardRef(function({className:e,children:t,...r},i){return o.jsx(R.Toast.Close,{ref:i,"aria-label":"Close",className:n("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",e),...r,children:t??o.jsx(j.X,{size:14,weight:"bold"})})}),tr=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Action,{ref:r,className:n("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",e),...t})}),rr={Provider:R.Toast.Provider,Portal:R.Toast.Portal,Viewport:Qt,Root:Wt,Title:Jt,Description:Zt,Close:er,Action:tr},or=R.Toast.useToastManager,ar=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Root,{ref:r,className:n("gryt-scroll-area relative",e),...t})}),nr=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Viewport,{ref:r,className:n("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",e),...t})}),sr=s.forwardRef(function({className:e,orientation:t,...r},i){return o.jsx($.ScrollArea.Scrollbar,{ref:i,orientation:t,className:n("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",t==="horizontal"?"h-2 flex-col":"w-2",e),...r,children:o.jsx($.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),ir={Root:ar,Viewport:nr,Scrollbar:sr,Content:$.ScrollArea.Content,Corner:$.ScrollArea.Corner},lr={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(" ")},cr={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"},dr=s.forwardRef(function({className:e,size:t="medium",tone:r="primary",...i},l){return o.jsx(we.Toggle,{ref:l,className:n("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]",b,O,cr[t],lr[r],e),...i})}),ur=s.forwardRef(function({className:e,...t},r){return o.jsx(ve.ToggleGroup,{ref:r,className:n("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),gr={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function yr({className:a,value:e,label:t,showValue:r=!1,tone:i="primary",...l}){return o.jsxs(q.Meter.Root,{value:e,className:n("gryt-meter flex w-full flex-col gap-1.5",a),...l,children:[(t||r)&&o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t?o.jsx(q.Meter.Label,{className:"text-sm text-gryt-muted",children:t}):o.jsx("span",{}),r&&o.jsx(q.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),o.jsx(q.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(q.Meter.Indicator,{className:n("h-full rounded-(--gryt-radius-full)","transition-[width] duration-120 ease-out motion-reduce:transition-none",gr[i])})})]})}const pr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Popup,{ref:r,className:n("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",e),...t})}),mr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Backdrop,{ref:r,className:n("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",e),...t})}),br=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Title,{ref:r,className:n("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",e),...t})}),fr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Description,{ref:r,className:n("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",e),...t})}),xr={Root:S.AlertDialog.Root,Trigger:S.AlertDialog.Trigger,Portal:S.AlertDialog.Portal,Backdrop:mr,Popup:pr,Title:br,Description:fr,Close:S.AlertDialog.Close},pe=["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(" "),me=[ie,le.medium,"border-gryt-border",b].join(" "),hr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Input,{ref:r,className:n("gryt-combobox-input",me,e),...t})}),wr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(u.Combobox.Positioner,{ref:i,sideOffset:t,className:n("gryt-combobox-positioner outline-none",e),...r})}),vr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Popup,{ref:r,className:n("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",I,k,e),...t})}),jr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Item,{ref:r,className:n("gryt-combobox-item",pe,e),...t})}),Pr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Empty,{ref:r,className:n("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Nr={Root:u.Combobox.Root,Input:hr,InputGroup:u.Combobox.InputGroup,Trigger:u.Combobox.Trigger,Icon:u.Combobox.Icon,Clear:u.Combobox.Clear,Value:u.Combobox.Value,Chips:u.Combobox.Chips,Chip:u.Combobox.Chip,ChipRemove:u.Combobox.ChipRemove,Portal:u.Combobox.Portal,Positioner:wr,Popup:vr,List:u.Combobox.List,Item:jr,ItemIndicator:u.Combobox.ItemIndicator,Group:u.Combobox.Group,GroupLabel:u.Combobox.GroupLabel,Empty:Pr,Separator:u.Combobox.Separator},Rr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Input,{ref:r,className:n("gryt-autocomplete-input",me,e),...t})}),Tr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(m.Autocomplete.Positioner,{ref:i,sideOffset:t,className:n("gryt-autocomplete-positioner outline-none",e),...r})}),Cr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Popup,{ref:r,className:n("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",I,k,e),...t})}),Sr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Item,{ref:r,className:n("gryt-autocomplete-item",pe,e),...t})}),kr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Empty,{ref:r,className:n("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Ar={Root:m.Autocomplete.Root,Input:Rr,InputGroup:m.Autocomplete.InputGroup,Trigger:m.Autocomplete.Trigger,Icon:m.Autocomplete.Icon,Clear:m.Autocomplete.Clear,Value:m.Autocomplete.Value,Portal:m.Autocomplete.Portal,Positioner:Tr,Popup:Cr,List:m.Autocomplete.List,Item:Sr,Group:m.Autocomplete.Group,GroupLabel:m.Autocomplete.GroupLabel,Empty:kr,Separator:m.Autocomplete.Separator},Mr=s.forwardRef(function({className:e,...t},r){return o.jsx(je.CheckboxGroup,{ref:r,className:n("gryt-checkbox-group flex flex-col gap-2",e),...t})}),Dr=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Trigger,{ref:r,className:n("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",b,e),...t})}),Ir=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Panel,{ref:r,className:n("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",e),...t})}),Gr={Root:U.Collapsible.Root,Trigger:Dr,Panel:Ir},Lr=s.forwardRef(function({className:e,...t},r){return o.jsx(Pe.Form,{ref:r,className:n("gryt-form flex flex-col gap-(--gryt-space-lg)",e),...t})}),$r=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Root,{ref:r,className:n("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",e),...t})}),Or=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Legend,{ref:r,className:n("gryt-fieldset-legend text-sm font-semibold text-gryt-text",e),...t})}),Fr={Root:$r,Legend:Or},qr=s.forwardRef(function({className:e,...t},r){return o.jsx(Ne.Menubar,{ref:r,className:n("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Br=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Trigger,{ref:r,className:n("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",b,e),...t})}),zr=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Popup,{ref:r,className:n("gryt-navigation-menu-popup outline-none",I,k,e),...t})}),Er=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Positioner,{ref:r,className:n("gryt-navigation-menu-positioner outline-none",e),...t})}),_r=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Viewport,{ref:r,className:n("gryt-navigation-menu-viewport relative overflow-hidden",e),...t})}),Yr=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Link,{ref:r,className:n("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",b,e),...t})}),Hr={Root:h.NavigationMenu.Root,List:h.NavigationMenu.List,Item:h.NavigationMenu.Item,Trigger:Br,Content:h.NavigationMenu.Content,Portal:h.NavigationMenu.Portal,Positioner:Er,Viewport:_r,Popup:zr,Link:Yr,Icon:h.NavigationMenu.Icon,Arrow:h.NavigationMenu.Arrow},oe="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",Vr=s.forwardRef(function({className:e,label:t,scrubbable:r=!1,...i},l){return o.jsxs(A.NumberField.Root,{ref:l,className:n("gryt-number-field flex flex-col gap-1.5",e),...i,children:[t&&(r?o.jsxs(A.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[t,o.jsx(A.NumberField.ScrubAreaCursor,{})]}):o.jsx("span",{className:"text-sm text-gryt-muted",children:t})),o.jsxs(A.NumberField.Group,{className:n("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:[o.jsx(A.NumberField.Decrement,{"aria-label":"Decrease",className:n(oe,"rounded-l-(--gryt-radius-full)"),children:o.jsx(j.Minus,{size:14,weight:"bold"})}),o.jsx(A.NumberField.Input,{className:n("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",b)}),o.jsx(A.NumberField.Increment,{"aria-label":"Increase",className:n(oe,"rounded-r-(--gryt-radius-full)"),children:o.jsx(j.Plus,{size:14,weight:"bold"})})]})]})}),Xr=s.forwardRef(function({className:e,length:t=6,...r},i){return o.jsx(te.OTPField.Root,{ref:i,length:t,className:n("gryt-otp-field flex gap-2",e),...r,children:Array.from({length:t},(l,d)=>o.jsx(te.OTPField.Input,{className:n("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",b)},d))})}),Ur=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(G.PreviewCard.Positioner,{ref:i,sideOffset:t,className:n("gryt-preview-card-positioner outline-none",e),...r})}),Kr=s.forwardRef(function({className:e,...t},r){return o.jsx(G.PreviewCard.Popup,{ref:r,className:n("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",I,k,e),...t})}),Qr={Root:G.PreviewCard.Root,Trigger:G.PreviewCard.Trigger,Portal:G.PreviewCard.Portal,Positioner:Ur,Popup:Kr,Arrow:G.PreviewCard.Arrow},Wr=s.forwardRef(function({className:e,...t},r){return o.jsx(L.Toolbar.Root,{ref:r,className:n("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Jr=s.forwardRef(function({className:e,...t},r){return o.jsx(L.Toolbar.Separator,{ref:r,className:n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",e),...t})}),Zr={Root:Wr,Group:L.Toolbar.Group,Button:L.Toolbar.Button,Link:L.Toolbar.Link,Input:L.Toolbar.Input,Separator:Jr};Object.defineProperty(exports,"GRYT_HUE_KEYS",{enumerable:!0,get:()=>c.GRYT_HUE_KEYS});Object.defineProperty(exports,"GRYT_NEUTRAL_KEYS",{enumerable:!0,get:()=>c.GRYT_NEUTRAL_KEYS});Object.defineProperty(exports,"GRYT_RADIUS_KEYS",{enumerable:!0,get:()=>c.GRYT_RADIUS_KEYS});Object.defineProperty(exports,"GRYT_THEME_NAME_MAX",{enumerable:!0,get:()=>c.GRYT_THEME_NAME_MAX});Object.defineProperty(exports,"alphaScale",{enumerable:!0,get:()=>c.alphaScale});Object.defineProperty(exports,"cloneGrytTheme",{enumerable:!0,get:()=>c.cloneGrytTheme});Object.defineProperty(exports,"contrast",{enumerable:!0,get:()=>c.contrast});Object.defineProperty(exports,"createGrytTheme",{enumerable:!0,get:()=>c.createGrytTheme});Object.defineProperty(exports,"decodeGrytTheme",{enumerable:!0,get:()=>c.decodeGrytTheme});Object.defineProperty(exports,"encodeGrytTheme",{enumerable:!0,get:()=>c.encodeGrytTheme});Object.defineProperty(exports,"grytAlphaScales",{enumerable:!0,get:()=>c.grytAlphaScales});Object.defineProperty(exports,"grytAlphaScalesLight",{enumerable:!0,get:()=>c.grytAlphaScalesLight});Object.defineProperty(exports,"grytLightTokens",{enumerable:!0,get:()=>c.grytLightTokens});Object.defineProperty(exports,"grytPresets",{enumerable:!0,get:()=>c.grytPresets});Object.defineProperty(exports,"grytPresetsById",{enumerable:!0,get:()=>c.grytPresetsById});Object.defineProperty(exports,"grytScales",{enumerable:!0,get:()=>c.grytScales});Object.defineProperty(exports,"grytScalesLight",{enumerable:!0,get:()=>c.grytScalesLight});Object.defineProperty(exports,"grytTheme",{enumerable:!0,get:()=>c.grytTheme});Object.defineProperty(exports,"grytThemeHues",{enumerable:!0,get:()=>c.grytThemeHues});Object.defineProperty(exports,"grytThemeToOptions",{enumerable:!0,get:()=>c.grytThemeToOptions});Object.defineProperty(exports,"grytTokens",{enumerable:!0,get:()=>c.grytTokens});Object.defineProperty(exports,"hexToOklch",{enumerable:!0,get:()=>c.hexToOklch});Object.defineProperty(exports,"hexToRgb",{enumerable:!0,get:()=>c.hexToRgb});Object.defineProperty(exports,"hueScale",{enumerable:!0,get:()=>c.hueScale});Object.defineProperty(exports,"hueScaleLight",{enumerable:!0,get:()=>c.hueScaleLight});Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:()=>c.isHexColor});Object.defineProperty(exports,"neutralScale",{enumerable:!0,get:()=>c.neutralScale});Object.defineProperty(exports,"neutralScaleLight",{enumerable:!0,get:()=>c.neutralScaleLight});Object.defineProperty(exports,"normalizeHexColor",{enumerable:!0,get:()=>c.normalizeHexColor});Object.defineProperty(exports,"normalizeThemeName",{enumerable:!0,get:()=>c.normalizeThemeName});Object.defineProperty(exports,"oklchToHex",{enumerable:!0,get:()=>c.oklchToHex});Object.defineProperty(exports,"rgbToHex",{enumerable:!0,get:()=>c.rgbToHex});exports.Accordion=zt;exports.Alert=st;exports.AlertDialog=xr;exports.Autocomplete=Ar;exports.Avatar=de;exports.Badge=Ee;exports.Button=se;exports.Card=tt;exports.CardActions=at;exports.CardContent=ot;exports.CardHeader=rt;exports.Checkbox=He;exports.CheckboxGroup=Mr;exports.Chip=Ye;exports.Collapsible=Gr;exports.Combobox=Nr;exports.Composer=qe;exports.ContextMenu=_t;exports.ConversationItem=ze;exports.Dialog=bt;exports.Divider=et;exports.Drawer=Ct;exports.Fieldset=Fr;exports.Form=Lr;exports.GrytProvider=Te;exports.IconButton=Le;exports.Menu=_;exports.Menubar=qr;exports.MessageBubble=Oe;exports.Meter=yr;exports.NavigationMenu=Hr;exports.NumberField=Vr;exports.OtpField=Xr;exports.Popover=Ut;exports.PreviewCard=Qr;exports.Progress=it;exports.Radio=Ve;exports.RadioGroup=Xe;exports.ScrollArea=ir;exports.Select=We;exports.Skeleton=dt;exports.Slider=Ke;exports.Spinner=lt;exports.Surface=$e;exports.Switch=Ue;exports.Tab=ye;exports.Tabs=$t;exports.TextField=Fe;exports.Toast=rr;exports.Toggle=dr;exports.ToggleGroup=ur;exports.Toolbar=Zr;exports.Tooltip=Je;exports.TooltipProvider=Ze;exports.cn=n;exports.useMediaQuery=ge;exports.useToastManager=or;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),M=require("@base-ui/react/tooltip"),c=require("@gryt/theme"),ae=require("@base-ui/react/button"),s=require("react"),be=require("clsx"),fe=require("tailwind-merge"),E=require("@base-ui/react/field"),j=require("@phosphor-icons/react"),V=require("@base-ui/react/avatar"),J=require("@base-ui/react/checkbox"),Z=require("@base-ui/react/radio"),xe=require("@base-ui/react/radio-group"),ee=require("@base-ui/react/switch"),F=require("@base-ui/react/slider"),x=require("@base-ui/react/select"),he=require("@base-ui/react/separator"),X=require("@base-ui/react/progress"),C=require("@base-ui/react/dialog"),v=require("@base-ui/react/drawer"),D=require("@base-ui/react/menu"),z=require("@base-ui/react/tabs"),B=require("@base-ui/react/accordion"),T=require("@base-ui/react/context-menu"),N=require("@base-ui/react/popover"),R=require("@base-ui/react/toast"),$=require("@base-ui/react/scroll-area"),we=require("@base-ui/react/toggle"),ve=require("@base-ui/react/toggle-group"),q=require("@base-ui/react/meter"),S=require("@base-ui/react/alert-dialog"),m=require("@base-ui/react/autocomplete"),u=require("@base-ui/react/combobox"),je=require("@base-ui/react/checkbox-group"),U=require("@base-ui/react/collapsible"),Pe=require("@base-ui/react/form"),ne=require("@base-ui/react/fieldset"),Ne=require("@base-ui/react/menubar"),h=require("@base-ui/react/navigation-menu"),A=require("@base-ui/react/number-field"),te=require("@base-ui/react/otp-field"),G=require("@base-ui/react/preview-card"),L=require("@base-ui/react/toolbar");function Re(a){return Object.keys(a).some(e=>e.startsWith("--"))}function Te({children:a,className:e,theme:t,tooltipDelay:r=400}){const i=t===void 0?void 0:Re(t)?t:c.createGrytTheme(t);return o.jsx("div",{className:e,style:i,children:o.jsx(M.Tooltip.Provider,{delay:r,children:a})})}function n(...a){return fe.twMerge(be.clsx(a))}const Ce={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"},Se={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"},se=s.forwardRef(function({children:e,className:t,endIcon:r,size:i="medium",startIcon:l,tone:d="primary",...p},g){return o.jsxs(ae.Button,{ref:g,className:n("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",Se[i],Ce[d],t),...p,children:[l,e,r]})}),b="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",ke="has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light",ie=["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(" "),le={small:"min-h-9 px-3 py-1.5 text-sm",medium:"min-h-11 px-4 py-2.5 text-sm"},I="rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",k=["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",Ae={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"},ce={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"},Me={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"},De={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"},Ie={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"},Ge={xsmall:"h-8 w-8",small:"h-9 w-9",medium:"h-10 w-10",large:"h-12 w-12"},Le=s.forwardRef(function({className:e,size:t="medium",tone:r="neutral",...i},l){return o.jsx(ae.Button,{ref:l,className:n("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]",b,O,Ge[t],Ie[r],e),...i})}),$e=s.forwardRef(function({className:e,elevated:t=!1,...r},i){return o.jsx("div",{ref:i,className:n("gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",t?"bg-gryt-surface-raised":"bg-gryt-surface",e),...r})}),Oe=s.forwardRef(function({children:e,className:t,from:r="assistant",...i},l){return o.jsx("div",{ref:l,className:n("gryt-message-bubble",r==="user"&&"ml-auto bg-gryt-accent text-gryt-on-accent",r==="assistant"&&"mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",r==="system"&&"mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",t),...i,children:e})}),Fe=s.forwardRef(function({className:e,error:t=!1,fieldClassName:r,helperText:i,label:l,minRows:d=3,multiline:p=!1,size:g="medium",...w},y){const P=o.jsx(E.Field.Control,{ref:y,render:p?o.jsx("textarea",{rows:d}):void 0,className:n("gryt-text-field-control",ie,p&&"resize-y leading-6",t?"border-gryt-danger":"border-gryt-border",le[g],e),...w});return o.jsxs(E.Field.Root,{className:n("gryt-text-field flex w-full flex-col gap-1.5",r),children:[l?o.jsx(E.Field.Label,{className:"text-xs font-medium text-gryt-muted",children:l}):null,P,i?o.jsx(E.Field.Description,{className:n("text-xs",t?"text-gryt-danger-11":"text-gryt-muted"),children:i}):null]})}),qe=s.forwardRef(function({className:e,disabled:t=!1,maxRows:r=8,minRows:i=1,onSubmit:l,placeholder:d="Message Gryt",submitLabel:p="Send",...g},w){const y=s.useRef(null),P=s.useCallback(()=>{const f=y.current;if(!f)return;const H=window.getComputedStyle(f),Q=parseFloat(H.lineHeight)||24,W=parseFloat(H.paddingTop)+parseFloat(H.paddingBottom);f.style.height="auto",f.style.height=`${Math.min(Math.max(f.scrollHeight,Q*i+W),Q*r+W)}px`},[r,i]);s.useLayoutEffect(P,[P,g.value]);function K(f){if(!l){f.preventDefault();return}l(f)}return o.jsxs("form",{className:n("gryt-composer",e),onSubmit:K,children:[o.jsx("textarea",{ref:f=>{y.current=f,typeof w=="function"?w(f):w&&(w.current=f)},rows:i,disabled:t,placeholder:d,onInput:P,className:"gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",...g}),o.jsx(se,{type:"submit",disabled:t,size:"small",endIcon:o.jsx(j.PaperPlaneTilt,{size:14,weight:"fill"}),children:p})]})}),Be={small:"h-8 w-8 text-xs",medium:"h-10 w-10 text-sm",large:"h-12 w-12 text-base"},de=s.forwardRef(function({alt:e,children:t,className:r,fallback:i,size:l="medium",src:d,...p},g){return o.jsxs(V.Avatar.Root,{ref:g,className:n("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",Be[l],r),...p,children:[d?o.jsx(V.Avatar.Image,{src:d,alt:e,className:"h-full w-full object-cover"}):null,o.jsx(V.Avatar.Fallback,{className:"flex h-full w-full items-center justify-center",children:i??t})]})}),ze=s.forwardRef(function({active:e=!1,avatar:t,className:r,subtitle:i,title:l,...d},p){return o.jsxs("button",{ref:p,type:"button",className:n("gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e?"bg-gryt-accent text-gryt-on-accent":"text-gryt-text hover:bg-white/5",r),...d,children:[t??o.jsx(de,{size:"small",className:n(e?"bg-gryt-on-accent text-gryt-accent-9 ring-transparent":"bg-gryt-surface-raised text-gryt-text"),children:l.slice(0,1).toUpperCase()}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-semibold",children:l}),i?o.jsx("span",{className:n("block truncate text-xs",e?"text-gryt-on-accent/85":"text-gryt-muted"),children:i}):null]})]})}),Ee=s.forwardRef(function({badgeContent:e,children:t,className:r,max:i=99,showZero:l=!1,...d},p){const g=typeof e=="number"?e:null,w=g!==null&&g===0&&!l,y=g!==null&&g>i?`${i}+`:e;return o.jsxs("span",{ref:p,className:n("gryt-badge relative inline-flex",r),...d,children:[t,e!==void 0&&!w?o.jsx("span",{className:n("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:y}):null]})}),_e={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"},Ye=s.forwardRef(function({children:e,className:t,icon:r,label:i,onDelete:l,tone:d="neutral",...p},g){return o.jsxs("span",{ref:g,className:n("gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",_e[d],t),...p,children:[r,i??e,l?o.jsx("button",{type:"button","aria-label":"Remove",onClick:l,className:n("-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",b),children:o.jsx(j.X,{size:10,weight:"bold","aria-hidden":"true"})}):null]})}),He=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(J.Checkbox.Root,{ref:i,className:n("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]",b,O,Ae[t],e),...r,children:o.jsx(J.Checkbox.Indicator,{keepMounted:!0,className:n("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:o.jsx(j.Check,{size:12,weight:"bold"})})})}),Ve=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(Z.Radio.Root,{ref:i,className:n("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]",b,O,Me[t],e),...r,children:o.jsx(Z.Radio.Indicator,{keepMounted:!0,className:n("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",ce[t])})})}),Xe=s.forwardRef(function({className:e,...t},r){return o.jsx(xe.RadioGroup,{ref:r,className:n("gryt-radio-group flex flex-col gap-2",e),...t})}),Ue=s.forwardRef(function({className:e,tone:t="primary",...r},i){return o.jsx(ee.Switch.Root,{ref:i,className:n("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]",b,O,De[t],e),...r,children:o.jsx(ee.Switch.Thumb,{className:n("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")})})}),re=3;function Ke({className:a,tone:e="primary","aria-label":t,...r}){const[i,l]=s.useState(!1),d=s.useRef(null);s.useEffect(()=>{if(!i&&d.current===null)return;const y=()=>{d.current=null,l(!1)};return window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y),()=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y)}},[i]);function p(y){d.current={x:y.clientX,y:y.clientY}}function g(y){const P=d.current;if(P===null||i)return;(Math.abs(y.clientX-P.x)>re||Math.abs(y.clientY-P.y)>re)&&l(!0)}const w=i?"transition-none":"duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";return o.jsx(F.Slider.Root,{className:n("gryt-slider w-full",a),...r,children:o.jsx(F.Slider.Control,{className:"flex w-full cursor-pointer touch-none items-center py-2 select-none",onPointerDown:p,onPointerMove:g,children:o.jsxs(F.Slider.Track,{className:"h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none",children:[o.jsx(F.Slider.Indicator,{className:n("h-full rounded-(--gryt-radius-full) select-none","transition-[width]",w,ce[e])}),o.jsx(F.Slider.Thumb,{"aria-label":t,className:n("group h-4 w-4 rounded-(--gryt-radius-full) select-none","transition-[inset-inline-start]",w,ke),children:o.jsx("span",{className:n("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 Qe={small:"min-h-9 px-3 text-sm",medium:"min-h-11 px-4 text-sm"};function We({className:a,label:e,options:t=[],placeholder:r="Select",size:i="medium",...l}){return o.jsxs(x.Select.Root,{items:t,...l,children:[o.jsxs("div",{className:n("gryt-select flex w-full flex-col gap-1.5",a),children:[e?o.jsx(x.Select.Label,{className:"text-xs font-medium text-gryt-muted",children:e}):null,o.jsxs(x.Select.Trigger,{className:n("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",b,Qe[i]),children:[o.jsx(x.Select.Value,{placeholder:r}),o.jsx(x.Select.Icon,{className:"shrink-0 text-gryt-muted",children:o.jsx(j.CaretUpDown,{size:16})})]})]}),o.jsx(x.Select.Portal,{children:o.jsx(x.Select.Positioner,{sideOffset:6,className:"gryt-select-positioner outline-none",children:o.jsx(x.Select.Popup,{className:n("min-w-(--anchor-width) p-1",I,k),children:o.jsx(x.Select.List,{children:t.map(d=>o.jsxs(x.Select.Item,{value:d.value,disabled:d.disabled,className:n("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:[o.jsx(x.Select.ItemText,{children:d.label}),o.jsx(x.Select.ItemIndicator,{className:"text-gryt-accent-11",children:o.jsx(j.Check,{size:14,weight:"bold"})})]},String(d.value)))})})})})]})}function Je({children:a,className:e,side:t="top",sideOffset:r=8,title:i}){return o.jsxs(M.Tooltip.Root,{children:[o.jsx(M.Tooltip.Trigger,{render:a}),o.jsx(M.Tooltip.Portal,{children:o.jsx(M.Tooltip.Positioner,{side:t,sideOffset:r,className:"gryt-tooltip-positioner",children:o.jsx(M.Tooltip.Popup,{className:n("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",k,e),children:i})})})]})}const Ze=M.Tooltip.Provider,et=s.forwardRef(function({className:e,orientation:t="horizontal",...r},i){return o.jsx(he.Separator,{ref:i,orientation:t,className:n("gryt-divider bg-gryt-border",t==="vertical"?"h-full w-px":"h-px w-full",e),...r})}),tt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",e),...t})});function rt({children:a,className:e,subheader:t,title:r,...i}){return o.jsxs("div",{className:n("gryt-card-header flex flex-col gap-1 p-4",e),...i,children:[r?o.jsx("span",{className:"text-base font-semibold text-gryt-text",children:r}):null,t?o.jsx("span",{className:"text-sm text-gryt-muted",children:t}):null,a]})}function ot({className:a,...e}){return o.jsx("div",{className:n("gryt-card-content px-4 pb-4 text-sm text-gryt-muted",a),...e})}function at({className:a,...e}){return o.jsx("div",{className:n("gryt-card-actions flex items-center gap-2 px-4 pb-4",a),...e})}const nt={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"},st=s.forwardRef(function({className:e,severity:t="info",...r},i){return o.jsx("div",{ref:i,role:"alert",className:n("gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",nt[t],e),...r})});function it({className:a,value:e=null,...t}){return o.jsx(X.Progress.Root,{value:e,className:n("gryt-progress w-full",a),...t,children:o.jsx(X.Progress.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(X.Progress.Indicator,{className:n("h-full rounded-(--gryt-radius-full) bg-gryt-accent","transition-[width] duration-300 ease-out motion-reduce:transition-none",e===null&&"gryt-progress-indeterminate")})})})}function lt({className:a,size:e=24,"aria-label":t="Loading"}){return o.jsx(j.CircleNotch,{role:"status","aria-label":t,size:e,weight:"bold",className:n("gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",a)})}const ct={text:"h-4 rounded-(--gryt-radius-sm)",rounded:"rounded-(--gryt-radius-lg)",circular:"rounded-(--gryt-radius-full)",rectangular:"rounded-none"};function dt({className:a,height:e,style:t,variant:r="text",width:i,...l}){const d={width:i,height:e,...t};return o.jsx("div",{"aria-hidden":"true",className:n("gryt-skeleton bg-white/9 motion-safe:animate-pulse",ct[r],a),style:d,...l})}const ue="transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",ut=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Backdrop,{ref:r,className:n("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",e),...t})}),gt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Popup,{ref:r,className:n("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",e),...t})}),yt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Title,{ref:r,className:n("gryt-dialog-title text-base font-semibold text-gryt-text",e),...t})}),pt=s.forwardRef(function({className:e,...t},r){return o.jsx(C.Dialog.Description,{ref:r,className:n("gryt-dialog-description text-sm text-gryt-muted",e),...t})}),mt=s.forwardRef(function({className:e,...t},r){return o.jsx("div",{ref:r,className:n("gryt-dialog-footer flex justify-end gap-3",e),...t})}),bt={Root:C.Dialog.Root,Trigger:C.Dialog.Trigger,Portal:C.Dialog.Portal,Close:C.Dialog.Close,Backdrop:ut,Popup:gt,Title:yt,Description:pt,Footer:mt},ft=()=>()=>{};function ge(a){const e=s.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return ft();const i=window.matchMedia(a);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[a]),t=s.useCallback(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(a).matches,[a]);return s.useSyncExternalStore(e,t,()=>!1)}const xt={left:"left",right:"right",top:"up",bottom:"down"},Y=s.createContext("right"),ht={left:"items-stretch justify-start",right:"items-stretch justify-end",top:"items-start justify-center",bottom:"items-end justify-center"},wt={left:"rounded-r-(--gryt-radius-xl)",right:"rounded-l-(--gryt-radius-xl)",top:"rounded-b-(--gryt-radius-xl)",bottom:"rounded-t-(--gryt-radius-xl)"},vt={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 jt({side:a="right",sheetOnMobile:e=!0,children:t,...r}){const i=ge("(max-width: 767px)"),l=e&&i?"bottom":a;return o.jsx(Y.Provider,{value:l,children:o.jsx(v.Drawer.Root,{swipeDirection:xt[l],...r,children:t})})}const Pt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(Y);return o.jsx(v.Drawer.Viewport,{ref:r,className:n("gryt-drawer-viewport fixed inset-0 z-50 flex",ht[i],e),...t})}),Nt=s.forwardRef(function({className:e,...t},r){const i=s.useContext(Y);return o.jsx(v.Drawer.Popup,{ref:r,className:n("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-tight","data-swiping:duration-0 data-swiping:select-none","motion-reduce:transition-none",vt[i],wt[i],e),...t})}),Rt=s.forwardRef(function({className:e,...t},r){return o.jsx(v.Drawer.Backdrop,{ref:r,className:n("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-tight","data-swiping:duration-0","data-starting-style:opacity-0 data-ending-style:opacity-0","motion-reduce:transition-none",e),...t})});function Tt({className:a}){const e=s.useContext(Y);return e!=="bottom"&&e!=="top"?null:o.jsx("div",{"aria-hidden":!0,className:n("gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",e==="top"&&"order-last",a)})}const Ct={Root:jt,Trigger:v.Drawer.Trigger,Portal:v.Drawer.Portal,Backdrop:Rt,Viewport:Pt,Popup:Nt,Content:v.Drawer.Content,Grabber:Tt,Close:v.Drawer.Close,Title:v.Drawer.Title,Description:v.Drawer.Description},St=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(D.Menu.Positioner,{ref:i,sideOffset:t,className:n("gryt-menu-positioner outline-none",e),...r})}),kt=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Popup,{ref:r,className:n("gryt-menu min-w-44 p-1 outline-none",I,k,e),...t})}),At=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Item,{ref:r,className:n("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",e),...t})}),Mt=s.forwardRef(function({className:e,...t},r){return o.jsx(D.Menu.Separator,{ref:r,className:n("gryt-menu-separator my-1 h-px bg-gryt-border",e),...t})}),_={Root:D.Menu.Root,Trigger:D.Menu.Trigger,Portal:D.Menu.Portal,Positioner:St,Popup:kt,Item:At,Separator:Mt},Dt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Root,{ref:r,className:n("gryt-tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",e),...t})}),It=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.List,{ref:r,className:n("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)",e),...t})}),ye=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Tab,{ref:r,className:n("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",b,e),...t})}),Gt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Indicator,{ref:r,renderBeforeHydration:!0,className:n("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]",e),...t})}),Lt=s.forwardRef(function({className:e,...t},r){return o.jsx(z.Tabs.Panel,{ref:r,className:n("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",e),...t})}),$t=Object.assign(Dt,{List:It,Tab:ye,Panel:Lt,Indicator:Gt}),Ot=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Root,{ref:r,className:n("gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",e),...t})}),Ft=s.forwardRef(function({className:e,...t},r){return o.jsx(B.Accordion.Item,{ref:r,className:n("gryt-accordion-item",e),...t})}),qt=s.forwardRef(function({children:e,className:t,expandIcon:r,...i},l){return o.jsx(B.Accordion.Header,{className:"gryt-accordion-header m-0",children:o.jsxs(B.Accordion.Trigger,{ref:l,className:n("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",b,t),...i,children:[e,r===void 0?o.jsx(j.CaretDown,{size:16,className:"shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"}):r]})})}),Bt=s.forwardRef(function({children:e,className:t,...r},i){return o.jsx(B.Accordion.Panel,{ref:i,className:n("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",t),...r,children:o.jsx("div",{className:"px-3 pt-1 pb-3",children:e})})}),zt=Object.assign(Ot,{Item:Ft,Trigger:qt,Panel:Bt}),Et=s.forwardRef(function({className:e,sideOffset:t=2,...r},i){return o.jsx(T.ContextMenu.Positioner,{ref:i,sideOffset:t,className:n("gryt-context-menu-positioner outline-none",e),...r})}),_t={Root:T.ContextMenu.Root,Trigger:T.ContextMenu.Trigger,Portal:T.ContextMenu.Portal,Positioner:Et,Popup:_.Popup,Item:_.Item,Separator:_.Separator,Group:T.ContextMenu.Group,GroupLabel:T.ContextMenu.GroupLabel,SubmenuRoot:T.ContextMenu.SubmenuRoot,SubmenuTrigger:T.ContextMenu.SubmenuTrigger},Yt=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(N.Popover.Positioner,{ref:i,sideOffset:t,className:n("gryt-popover-positioner outline-none",e),...r})}),Ht=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Popup,{ref:r,className:n("gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",I,k,e),...t})}),Vt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Title,{ref:r,className:n("gryt-popover-title text-sm font-semibold text-gryt-text",e),...t})}),Xt=s.forwardRef(function({className:e,...t},r){return o.jsx(N.Popover.Description,{ref:r,className:n("gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",e),...t})}),Ut={Root:N.Popover.Root,Trigger:N.Popover.Trigger,Portal:N.Popover.Portal,Positioner:Yt,Popup:Ht,Title:Vt,Description:Xt,Close:N.Popover.Close,Arrow:N.Popover.Arrow},Kt={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"},Qt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Viewport,{ref:r,className:n("gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]","flex-col gap-2 outline-none",e),...t})}),Wt=s.forwardRef(function({className:e,severity:t="neutral",...r},i){return o.jsx(R.Toast.Root,{ref:i,className:n("gryt-toast relative flex flex-col p-3 pr-9","rounded-(--gryt-radius-xl) border text-gryt-text",Kt[t],"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",e),...r})}),Jt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Title,{ref:r,className:n("gryt-toast-title text-sm font-semibold text-gryt-text",e),...t})}),Zt=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Description,{ref:r,className:n("gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",e),...t})}),er=s.forwardRef(function({className:e,children:t,...r},i){return o.jsx(R.Toast.Close,{ref:i,"aria-label":"Close",className:n("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",e),...r,children:t??o.jsx(j.X,{size:14,weight:"bold"})})}),tr=s.forwardRef(function({className:e,...t},r){return o.jsx(R.Toast.Action,{ref:r,className:n("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",e),...t})}),rr={Provider:R.Toast.Provider,Portal:R.Toast.Portal,Viewport:Qt,Root:Wt,Title:Jt,Description:Zt,Close:er,Action:tr},or=R.Toast.useToastManager,ar=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Root,{ref:r,className:n("gryt-scroll-area relative",e),...t})}),nr=s.forwardRef(function({className:e,...t},r){return o.jsx($.ScrollArea.Viewport,{ref:r,className:n("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",e),...t})}),sr=s.forwardRef(function({className:e,orientation:t,...r},i){return o.jsx($.ScrollArea.Scrollbar,{ref:i,orientation:t,className:n("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",t==="horizontal"?"h-2 flex-col":"w-2",e),...r,children:o.jsx($.ScrollArea.Thumb,{className:"flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none"})})}),ir={Root:ar,Viewport:nr,Scrollbar:sr,Content:$.ScrollArea.Content,Corner:$.ScrollArea.Corner},lr={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(" ")},cr={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"},dr=s.forwardRef(function({className:e,size:t="medium",tone:r="primary",...i},l){return o.jsx(we.Toggle,{ref:l,className:n("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]",b,O,cr[t],lr[r],e),...i})}),ur=s.forwardRef(function({className:e,...t},r){return o.jsx(ve.ToggleGroup,{ref:r,className:n("gryt-toggle-group inline-flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),gr={primary:"bg-gryt-accent",success:"bg-gryt-success",warning:"bg-gryt-warning",danger:"bg-gryt-danger"};function yr({className:a,value:e,label:t,showValue:r=!1,tone:i="primary",...l}){return o.jsxs(q.Meter.Root,{value:e,className:n("gryt-meter flex w-full flex-col gap-1.5",a),...l,children:[(t||r)&&o.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t?o.jsx(q.Meter.Label,{className:"text-sm text-gryt-muted",children:t}):o.jsx("span",{}),r&&o.jsx(q.Meter.Value,{className:"font-mono text-xs text-gryt-muted tabular-nums"})]}),o.jsx(q.Meter.Track,{className:"h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised",children:o.jsx(q.Meter.Indicator,{className:n("h-full rounded-(--gryt-radius-full)","transition-[width] duration-120 ease-out motion-reduce:transition-none",gr[i])})})]})}const pr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Popup,{ref:r,className:n("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",e),...t})}),mr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Backdrop,{ref:r,className:n("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",e),...t})}),br=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Title,{ref:r,className:n("gryt-alert-dialog-title text-lg font-semibold text-gryt-text",e),...t})}),fr=s.forwardRef(function({className:e,...t},r){return o.jsx(S.AlertDialog.Description,{ref:r,className:n("gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",e),...t})}),xr={Root:S.AlertDialog.Root,Trigger:S.AlertDialog.Trigger,Portal:S.AlertDialog.Portal,Backdrop:mr,Popup:pr,Title:br,Description:fr,Close:S.AlertDialog.Close},pe=["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(" "),me=[ie,le.medium,"border-gryt-border",b].join(" "),hr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Input,{ref:r,className:n("gryt-combobox-input",me,e),...t})}),wr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(u.Combobox.Positioner,{ref:i,sideOffset:t,className:n("gryt-combobox-positioner outline-none",e),...r})}),vr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Popup,{ref:r,className:n("gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",I,k,e),...t})}),jr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Item,{ref:r,className:n("gryt-combobox-item",pe,e),...t})}),Pr=s.forwardRef(function({className:e,...t},r){return o.jsx(u.Combobox.Empty,{ref:r,className:n("gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Nr={Root:u.Combobox.Root,Input:hr,InputGroup:u.Combobox.InputGroup,Trigger:u.Combobox.Trigger,Icon:u.Combobox.Icon,Clear:u.Combobox.Clear,Value:u.Combobox.Value,Chips:u.Combobox.Chips,Chip:u.Combobox.Chip,ChipRemove:u.Combobox.ChipRemove,Portal:u.Combobox.Portal,Positioner:wr,Popup:vr,List:u.Combobox.List,Item:jr,ItemIndicator:u.Combobox.ItemIndicator,Group:u.Combobox.Group,GroupLabel:u.Combobox.GroupLabel,Empty:Pr,Separator:u.Combobox.Separator},Rr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Input,{ref:r,className:n("gryt-autocomplete-input",me,e),...t})}),Tr=s.forwardRef(function({className:e,sideOffset:t=6,...r},i){return o.jsx(m.Autocomplete.Positioner,{ref:i,sideOffset:t,className:n("gryt-autocomplete-positioner outline-none",e),...r})}),Cr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Popup,{ref:r,className:n("gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",I,k,e),...t})}),Sr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Item,{ref:r,className:n("gryt-autocomplete-item",pe,e),...t})}),kr=s.forwardRef(function({className:e,...t},r){return o.jsx(m.Autocomplete.Empty,{ref:r,className:n("gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",e),...t})}),Ar={Root:m.Autocomplete.Root,Input:Rr,InputGroup:m.Autocomplete.InputGroup,Trigger:m.Autocomplete.Trigger,Icon:m.Autocomplete.Icon,Clear:m.Autocomplete.Clear,Value:m.Autocomplete.Value,Portal:m.Autocomplete.Portal,Positioner:Tr,Popup:Cr,List:m.Autocomplete.List,Item:Sr,Group:m.Autocomplete.Group,GroupLabel:m.Autocomplete.GroupLabel,Empty:kr,Separator:m.Autocomplete.Separator},Mr=s.forwardRef(function({className:e,...t},r){return o.jsx(je.CheckboxGroup,{ref:r,className:n("gryt-checkbox-group flex flex-col gap-2",e),...t})}),Dr=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Trigger,{ref:r,className:n("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",b,e),...t})}),Ir=s.forwardRef(function({className:e,...t},r){return o.jsx(U.Collapsible.Panel,{ref:r,className:n("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",e),...t})}),Gr={Root:U.Collapsible.Root,Trigger:Dr,Panel:Ir},Lr=s.forwardRef(function({className:e,...t},r){return o.jsx(Pe.Form,{ref:r,className:n("gryt-form flex flex-col gap-(--gryt-space-lg)",e),...t})}),$r=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Root,{ref:r,className:n("gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",e),...t})}),Or=s.forwardRef(function({className:e,...t},r){return o.jsx(ne.Fieldset.Legend,{ref:r,className:n("gryt-fieldset-legend text-sm font-semibold text-gryt-text",e),...t})}),Fr={Root:$r,Legend:Or},qr=s.forwardRef(function({className:e,...t},r){return o.jsx(Ne.Menubar,{ref:r,className:n("gryt-menubar flex items-center gap-1","rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Br=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Trigger,{ref:r,className:n("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",b,e),...t})}),zr=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Popup,{ref:r,className:n("gryt-navigation-menu-popup outline-none",I,k,e),...t})}),Er=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Positioner,{ref:r,className:n("gryt-navigation-menu-positioner outline-none",e),...t})}),_r=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Viewport,{ref:r,className:n("gryt-navigation-menu-viewport relative overflow-hidden",e),...t})}),Yr=s.forwardRef(function({className:e,...t},r){return o.jsx(h.NavigationMenu.Link,{ref:r,className:n("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",b,e),...t})}),Hr={Root:h.NavigationMenu.Root,List:h.NavigationMenu.List,Item:h.NavigationMenu.Item,Trigger:Br,Content:h.NavigationMenu.Content,Portal:h.NavigationMenu.Portal,Positioner:Er,Viewport:_r,Popup:zr,Link:Yr,Icon:h.NavigationMenu.Icon,Arrow:h.NavigationMenu.Arrow},oe="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",Vr=s.forwardRef(function({className:e,label:t,scrubbable:r=!1,...i},l){return o.jsxs(A.NumberField.Root,{ref:l,className:n("gryt-number-field flex flex-col gap-1.5",e),...i,children:[t&&(r?o.jsxs(A.NumberField.ScrubArea,{className:"cursor-ew-resize text-sm text-gryt-muted select-none",children:[t,o.jsx(A.NumberField.ScrubAreaCursor,{})]}):o.jsx("span",{className:"text-sm text-gryt-muted",children:t})),o.jsxs(A.NumberField.Group,{className:n("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:[o.jsx(A.NumberField.Decrement,{"aria-label":"Decrease",className:n(oe,"rounded-l-(--gryt-radius-full)"),children:o.jsx(j.Minus,{size:14,weight:"bold"})}),o.jsx(A.NumberField.Input,{className:n("w-16 border-0 bg-transparent px-1 py-2 text-center","font-mono text-sm text-gryt-text tabular-nums outline-none",b)}),o.jsx(A.NumberField.Increment,{"aria-label":"Increase",className:n(oe,"rounded-r-(--gryt-radius-full)"),children:o.jsx(j.Plus,{size:14,weight:"bold"})})]})]})}),Xr=s.forwardRef(function({className:e,length:t=6,...r},i){return o.jsx(te.OTPField.Root,{ref:i,length:t,className:n("gryt-otp-field flex gap-2",e),...r,children:Array.from({length:t},(l,d)=>o.jsx(te.OTPField.Input,{className:n("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",b)},d))})}),Ur=s.forwardRef(function({className:e,sideOffset:t=8,...r},i){return o.jsx(G.PreviewCard.Positioner,{ref:i,sideOffset:t,className:n("gryt-preview-card-positioner outline-none",e),...r})}),Kr=s.forwardRef(function({className:e,...t},r){return o.jsx(G.PreviewCard.Popup,{ref:r,className:n("gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",I,k,e),...t})}),Qr={Root:G.PreviewCard.Root,Trigger:G.PreviewCard.Trigger,Portal:G.PreviewCard.Portal,Positioner:Ur,Popup:Kr,Arrow:G.PreviewCard.Arrow},Wr=s.forwardRef(function({className:e,...t},r){return o.jsx(L.Toolbar.Root,{ref:r,className:n("gryt-toolbar flex items-center gap-1","rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",e),...t})}),Jr=s.forwardRef(function({className:e,...t},r){return o.jsx(L.Toolbar.Separator,{ref:r,className:n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border",e),...t})}),Zr={Root:Wr,Group:L.Toolbar.Group,Button:L.Toolbar.Button,Link:L.Toolbar.Link,Input:L.Toolbar.Input,Separator:Jr};Object.defineProperty(exports,"GRYT_HUE_KEYS",{enumerable:!0,get:()=>c.GRYT_HUE_KEYS});Object.defineProperty(exports,"GRYT_NEUTRAL_KEYS",{enumerable:!0,get:()=>c.GRYT_NEUTRAL_KEYS});Object.defineProperty(exports,"GRYT_RADIUS_KEYS",{enumerable:!0,get:()=>c.GRYT_RADIUS_KEYS});Object.defineProperty(exports,"GRYT_THEME_NAME_MAX",{enumerable:!0,get:()=>c.GRYT_THEME_NAME_MAX});Object.defineProperty(exports,"alphaScale",{enumerable:!0,get:()=>c.alphaScale});Object.defineProperty(exports,"cloneGrytTheme",{enumerable:!0,get:()=>c.cloneGrytTheme});Object.defineProperty(exports,"contrast",{enumerable:!0,get:()=>c.contrast});Object.defineProperty(exports,"createGrytTheme",{enumerable:!0,get:()=>c.createGrytTheme});Object.defineProperty(exports,"decodeGrytTheme",{enumerable:!0,get:()=>c.decodeGrytTheme});Object.defineProperty(exports,"encodeGrytTheme",{enumerable:!0,get:()=>c.encodeGrytTheme});Object.defineProperty(exports,"grytAlphaScales",{enumerable:!0,get:()=>c.grytAlphaScales});Object.defineProperty(exports,"grytAlphaScalesLight",{enumerable:!0,get:()=>c.grytAlphaScalesLight});Object.defineProperty(exports,"grytLightTokens",{enumerable:!0,get:()=>c.grytLightTokens});Object.defineProperty(exports,"grytPresets",{enumerable:!0,get:()=>c.grytPresets});Object.defineProperty(exports,"grytPresetsById",{enumerable:!0,get:()=>c.grytPresetsById});Object.defineProperty(exports,"grytScales",{enumerable:!0,get:()=>c.grytScales});Object.defineProperty(exports,"grytScalesLight",{enumerable:!0,get:()=>c.grytScalesLight});Object.defineProperty(exports,"grytTheme",{enumerable:!0,get:()=>c.grytTheme});Object.defineProperty(exports,"grytThemeHues",{enumerable:!0,get:()=>c.grytThemeHues});Object.defineProperty(exports,"grytThemeToOptions",{enumerable:!0,get:()=>c.grytThemeToOptions});Object.defineProperty(exports,"grytTokens",{enumerable:!0,get:()=>c.grytTokens});Object.defineProperty(exports,"hexToOklch",{enumerable:!0,get:()=>c.hexToOklch});Object.defineProperty(exports,"hexToRgb",{enumerable:!0,get:()=>c.hexToRgb});Object.defineProperty(exports,"hueScale",{enumerable:!0,get:()=>c.hueScale});Object.defineProperty(exports,"hueScaleLight",{enumerable:!0,get:()=>c.hueScaleLight});Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:()=>c.isHexColor});Object.defineProperty(exports,"neutralScale",{enumerable:!0,get:()=>c.neutralScale});Object.defineProperty(exports,"neutralScaleLight",{enumerable:!0,get:()=>c.neutralScaleLight});Object.defineProperty(exports,"normalizeHexColor",{enumerable:!0,get:()=>c.normalizeHexColor});Object.defineProperty(exports,"normalizeThemeName",{enumerable:!0,get:()=>c.normalizeThemeName});Object.defineProperty(exports,"oklchToHex",{enumerable:!0,get:()=>c.oklchToHex});Object.defineProperty(exports,"rgbToHex",{enumerable:!0,get:()=>c.rgbToHex});exports.Accordion=zt;exports.Alert=st;exports.AlertDialog=xr;exports.Autocomplete=Ar;exports.Avatar=de;exports.Badge=Ee;exports.Button=se;exports.Card=tt;exports.CardActions=at;exports.CardContent=ot;exports.CardHeader=rt;exports.Checkbox=He;exports.CheckboxGroup=Mr;exports.Chip=Ye;exports.Collapsible=Gr;exports.Combobox=Nr;exports.Composer=qe;exports.ContextMenu=_t;exports.ConversationItem=ze;exports.Dialog=bt;exports.Divider=et;exports.Drawer=Ct;exports.Fieldset=Fr;exports.Form=Lr;exports.GrytProvider=Te;exports.IconButton=Le;exports.Menu=_;exports.Menubar=qr;exports.MessageBubble=Oe;exports.Meter=yr;exports.NavigationMenu=Hr;exports.NumberField=Vr;exports.OtpField=Xr;exports.Popover=Ut;exports.PreviewCard=Qr;exports.Progress=it;exports.Radio=Ve;exports.RadioGroup=Xe;exports.ScrollArea=ir;exports.Select=We;exports.Skeleton=dt;exports.Slider=Ke;exports.Spinner=lt;exports.Surface=$e;exports.Switch=Ue;exports.Tab=ye;exports.Tabs=$t;exports.TextField=Fe;exports.Toast=rr;exports.Toggle=dr;exports.ToggleGroup=ur;exports.Toolbar=Zr;exports.Tooltip=Je;exports.TooltipProvider=Ze;exports.cn=n;exports.useMediaQuery=ge;exports.useToastManager=or;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|