@usevyre/react 1.3.0 → 1.4.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/Carousel/Carousel.d.ts +52 -0
- package/dist/components/EmptyState/EmptyState.d.ts +50 -0
- package/dist/components/Form/Form.d.ts +96 -0
- package/dist/components/NumberInput/NumberInput.d.ts +52 -0
- package/dist/components/OTPInput/OTPInput.d.ts +55 -0
- package/dist/components/Stat/Stat.d.ts +55 -0
- package/dist/components/Stepper/Stepper.d.ts +76 -0
- package/dist/components/Timeline/Timeline.d.ts +70 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +79 -0
- package/dist/components/Tree/Tree.d.ts +62 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +3051 -2027
- package/dist/styles/components.css +689 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),G=require("react-dom");function f(...e){const r=[];for(const a of e)if(a){if(typeof a=="string")r.push(a);else if(Array.isArray(a)){const n=f(...a);n&&r.push(n)}else if(typeof a=="object")for(const[n,o]of Object.entries(a))o&&r.push(n)}return r.join(" ")}const Tr={primary:"vyre-btn--primary",secondary:"vyre-btn--secondary",ghost:"vyre-btn--ghost",accent:"vyre-btn--accent",teal:"vyre-btn--teal",danger:"vyre-btn--danger"},Er={sm:"vyre-btn--sm",md:"vyre-btn--md",lg:"vyre-btn--lg",icon:"vyre-btn--icon"},Ne=s.forwardRef(({variant:e="secondary",size:r="md",loading:a=!1,disabled:n,leftIcon:o,rightIcon:i,className:l,children:d,as:c="button",...h},v)=>{const y=n||a;return t.jsxs(c,{ref:v,className:f("vyre-btn",Tr[e],Er[r],a&&"vyre-btn--loading",l),disabled:c==="button"?y:void 0,"aria-disabled":y,"data-variant":e,"data-size":r,...h,children:[a&&t.jsx("span",{className:"vyre-btn__spinner","aria-hidden":"true",children:t.jsx(Ar,{})}),!a&&o&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--left","aria-hidden":"true",children:o}),d&&t.jsx("span",{className:"vyre-btn__label",children:d}),i&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--right","aria-hidden":"true",children:i})]})});Ne.displayName="VyreButton";function Ar(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"vyre-spinner","aria-hidden":"true",children:t.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"10"})})}const ke=s.forwardRef(({variant:e="default",dot:r=!1,className:a,children:n,...o},i)=>t.jsxs("span",{ref:i,className:f("vyre-badge",`vyre-badge--${e}`,a),"data-variant":e,...o,children:[r&&t.jsx("span",{className:"vyre-badge__dot","aria-hidden":"true"}),n]}));ke.displayName="VyreBadge";const ue=s.forwardRef(({variant:e="default",hoverable:r=!1,clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:f("vyre-card",`vyre-card--${e}`,r&&"vyre-card--hoverable",a&&"vyre-card--clickable",n),"data-variant":e,role:a?"button":void 0,tabIndex:a?0:void 0,...i,children:o}));ue.displayName="VyreCard";const Ce=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-card__header",e),...a,children:r}));Ce.displayName="VyreCardHeader";const me=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-card__body",e),...a,children:r}));me.displayName="VyreCardBody";const Re=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-card__footer",e),...a,children:r}));Re.displayName="VyreCardFooter";const Le=s.forwardRef(({label:e,hint:r,state:a="idle",required:n=!1,htmlFor:o,className:i,children:l,...d},c)=>t.jsxs("div",{ref:c,className:f("vyre-field",a!=="idle"&&`vyre-field--${a}`,i),"data-state":a,...d,children:[e&&t.jsxs("label",{className:"vyre-field__label",htmlFor:o,children:[e,n&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}),l,r&&t.jsx("span",{className:"vyre-field__hint",role:a==="error"?"alert":void 0,children:r})]}));Le.displayName="VyreField";const De=s.forwardRef(({required:e=!1,className:r,children:a,...n},o)=>t.jsxs("label",{ref:o,className:f("vyre-field__label",r),...n,children:[a,e&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}));De.displayName="VyreFieldLabel";const Se=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:f("vyre-field__description",e),...a,children:r}));Se.displayName="VyreFieldDescription";const Ie=s.forwardRef(({className:e,children:r,...a},n)=>r?t.jsx("p",{ref:n,role:"alert",className:f("vyre-field__error",e),...a,children:r}):null);Ie.displayName="VyreFieldError";const Me=s.forwardRef(({orientation:e="vertical",className:r,children:a,...n},o)=>t.jsx("div",{ref:o,className:f("vyre-field-group",`vyre-field-group--${e}`,r),...n,children:a}));Me.displayName="VyreFieldGroup";const Te=s.forwardRef(({legend:e,className:r,children:a,...n},o)=>t.jsxs("fieldset",{ref:o,className:f("vyre-field-set",r),...n,children:[e&&t.jsx("legend",{className:"vyre-field-set__legend",children:e}),a]}));Te.displayName="VyreFieldSet";const Ee=s.forwardRef(({size:e="md",leftElement:r,rightElement:a,className:n,...o},i)=>r||a?t.jsxs("div",{className:f("vyre-input-wrapper",`vyre-input-wrapper--${e}`),children:[r&&t.jsx("span",{className:"vyre-input__element vyre-input__element--left","aria-hidden":"true",children:r}),t.jsx("input",{ref:i,className:f("vyre-input",`vyre-input--${e}`,!!r&&"vyre-input--has-left",!!a&&"vyre-input--has-right",n),...o}),a&&t.jsx("span",{className:"vyre-input__element vyre-input__element--right","aria-hidden":"true",children:a})]}):t.jsx("input",{ref:i,className:f("vyre-input",`vyre-input--${e}`,n),...o}));Ee.displayName="VyreInput";const Ae=s.forwardRef(({size:e="md",resize:r="vertical",className:a,style:n,...o},i)=>t.jsx("textarea",{ref:i,className:f("vyre-textarea",`vyre-textarea--${e}`,a),style:{resize:r,...n},...o}));Ae.displayName="VyreTextarea";const Br=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Be=s.forwardRef(({open:e,onClose:r,size:a="md",closeOnBackdrop:n=!0,closeOnEsc:o=!0,initialFocus:i,className:l,children:d,"aria-label":c,"aria-labelledby":h,...v},y)=>{const p=s.useRef(null),b=s.useRef(null),u=s.useCallback(g=>{p.current=g,typeof y=="function"?y(g):y&&(y.current=g)},[y]),m=s.useCallback(g=>{if(g.key!=="Tab")return;const k=p.current;if(!k)return;const _=Array.from(k.querySelectorAll(Br));if(!_.length)return;const L=_[0],j=_[_.length-1];g.shiftKey&&document.activeElement===L?(g.preventDefault(),j.focus()):!g.shiftKey&&document.activeElement===j&&(g.preventDefault(),L.focus())},[]),x=s.useCallback(g=>{g.key==="Escape"&&o&&r()},[o,r]);return s.useEffect(()=>{if(!e)return;document.addEventListener("keydown",x),document.addEventListener("keydown",m);const g=document.body.style.overflow;document.body.style.overflow="hidden";const k=setTimeout(()=>{var _;i!=null&&i.current?i.current.focus():(_=p.current)==null||_.focus()},0);return()=>{document.removeEventListener("keydown",x),document.removeEventListener("keydown",m),document.body.style.overflow=g,clearTimeout(k)}},[e,x,m,i]),e?G.createPortal(t.jsx("div",{ref:b,className:"vyre-modal-backdrop",onClick:g=>{n&&g.target===b.current&&r()},role:"presentation",children:t.jsx("div",{ref:u,className:f("vyre-modal",`vyre-modal--${a}`,l),role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":h,tabIndex:-1,...v,children:d})}),document.body):null});Be.displayName="VyreModal";const Ve=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-modal__header",e),...a,children:r}));Ve.displayName="VyreModalHeader";const $e=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-modal__body",e),...a,children:r}));$e.displayName="VyreModalBody";const Fe=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-modal__footer",e),...a,children:r}));Fe.displayName="VyreModalFooter";const We=s.createContext(null);function Vr(e,r){switch(r.type){case"ADD":return[...e,r.payload];case"REMOVE":return e.filter(a=>a.id!==r.id);default:return e}}let $r=0;const Fr=()=>`vyre-t-${++$r}`;function Wr({children:e}){const[r,a]=s.useReducer(Vr,[]),n=s.useCallback(i=>{const l=Fr();return a({type:"ADD",payload:{...i,id:l}}),l},[]),o=s.useCallback(i=>{a({type:"REMOVE",id:i})},[]);return t.jsxs(We.Provider,{value:{toast:n,dismiss:o},children:[e,typeof document<"u"&&G.createPortal(t.jsx("div",{className:"vyre-toast-viewport","aria-live":"polite","aria-atomic":"false","aria-label":"Notifications",children:r.map(i=>t.jsx(Pr,{...i,onDismiss:()=>o(i.id)},i.id))}),document.body)]})}function Hr(){const e=s.useContext(We);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function Pr({title:e,description:r,variant:a="default",duration:n=4e3,onDismiss:o}){return s.useEffect(()=>{if(n===1/0)return;const i=setTimeout(o,n);return()=>clearTimeout(i)},[n,o]),t.jsxs("div",{className:f("vyre-toast",`vyre-toast--${a}`),role:"alert","data-variant":a,children:[t.jsxs("div",{className:"vyre-toast__content",children:[e&&t.jsx("p",{className:"vyre-toast__title",children:e}),r&&t.jsx("p",{className:"vyre-toast__description",children:r})]}),t.jsx("button",{className:"vyre-toast__close",onClick:o,"aria-label":"Dismiss notification",type:"button",children:t.jsx(Gr,{})})]})}function Gr(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const He=s.forwardRef(({options:e,value:r,defaultValue:a,onChange:n,placeholder:o="Select an option",disabled:i=!1,size:l="md",className:d,...c},h)=>{const v=r!==void 0,[y,p]=s.useState(a??""),b=v?r:y,[u,m]=s.useState(!1),[x,g]=s.useState(-1),k=s.useRef(null),_=s.useRef(null),j=`${s.useId()}-listbox`,I=e.find(w=>w.value===b),A=e.filter(w=>!w.disabled),T=s.useCallback(()=>{m(!1),g(-1)},[]),M=s.useCallback(w=>{var N;w.disabled||(v||p(w.value),n==null||n(w.value),T(),(N=k.current)==null||N.focus())},[v,n,T]);s.useEffect(()=>{if(!u)return;const w=N=>{const D=h==null?void 0:h.current;D&&!D.contains(N.target)&&T()};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[u,h,T]),s.useEffect(()=>{var N;if(!u||x<0)return;const w=(N=_.current)==null?void 0:N.children[x];w==null||w.scrollIntoView({block:"nearest"})},[x,u]);const B=w=>{switch(w.key){case"Enter":case" ":case"ArrowDown":{if(w.preventDefault(),!u){m(!0);const N=e.findIndex(D=>D.value===b);g(N>=0?N:0)}break}case"ArrowUp":{w.preventDefault(),u||(m(!0),g(e.length-1));break}case"Escape":{T();break}}},R=w=>{var N;switch(w.key){case"ArrowDown":{w.preventDefault(),g(D=>{let E=D+1;for(;E<e.length&&e[E].disabled;)E++;return E<e.length?E:D});break}case"ArrowUp":{w.preventDefault(),g(D=>{let E=D-1;for(;E>=0&&e[E].disabled;)E--;return E>=0?E:D});break}case"Enter":case" ":{w.preventDefault(),x>=0&&M(e[x]);break}case"Escape":case"Tab":{T(),(N=k.current)==null||N.focus();break}case"Home":{w.preventDefault();const D=e.findIndex(E=>!E.disabled);D>=0&&g(D);break}case"End":{w.preventDefault();const D=[...e].reverse().findIndex(E=>!E.disabled);D>=0&&g(e.length-1-D);break}}};return t.jsxs("div",{ref:h,className:f("vyre-select",`vyre-select--${l}`,d),"data-open":u,...c,children:[t.jsxs("button",{ref:k,type:"button",className:"vyre-select__trigger","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":j,"aria-disabled":i,disabled:i,onClick:()=>{i||m(w=>{if(!w){const N=e.findIndex(D=>D.value===b);g(N>=0?N:0)}return!w})},onKeyDown:B,children:[I?t.jsx("span",{className:"vyre-select__value",children:I.label}):t.jsx("span",{className:"vyre-select__placeholder",children:o}),t.jsx(Or,{})]}),u&&t.jsxs("ul",{ref:_,id:j,role:"listbox",className:"vyre-select__dropdown","aria-label":"Options",tabIndex:-1,onKeyDown:R,children:[e.map((w,N)=>t.jsxs("li",{role:"option","aria-selected":w.value===b,"aria-disabled":w.disabled,"data-highlighted":N===x,className:"vyre-select__option",onMouseEnter:()=>!w.disabled&&g(N),onMouseDown:D=>{D.preventDefault(),M(w)},children:[w.label,w.value===b&&t.jsx(Yr,{})]},w.value)),A.length===0&&t.jsx("li",{className:"vyre-select__empty",role:"presentation",children:"No options available"})]})]})});He.displayName="VyreSelect";function Or(){return t.jsx("svg",{className:"vyre-select__chevron",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M3 5L7 9L11 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Yr(){return t.jsx("svg",{className:"vyre-select__check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2.5 7L5.5 10L11.5 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Pe=s.createContext(null);function Ge(){const e=s.useContext(Pe);if(!e)throw new Error("Tab components must be used inside <Tabs>");return e}const Oe=s.forwardRef(({defaultValue:e="",value:r,onChange:a,className:n,children:o,...i},l)=>{const d=r!==void 0,[c,h]=s.useState(e),v=d?r:c,y=s.useId(),p=s.useCallback(b=>{d||h(b),a==null||a(b)},[d,a]);return t.jsx(Pe.Provider,{value:{value:v,onChange:p,baseId:y},children:t.jsx("div",{ref:l,className:f("vyre-tabs",n),...i,children:o})})});Oe.displayName="VyreTabs";const Ye=s.forwardRef(({className:e,children:r,"aria-label":a,...n},o)=>{const i=s.useRef(null),l=d=>{var y;const c=Array.from(((y=i.current)==null?void 0:y.querySelectorAll('[role="tab"]:not([disabled])'))??[]),h=c.findIndex(p=>p===document.activeElement);if(h<0)return;let v=h;if(d.key==="ArrowRight")v=(h+1)%c.length;else if(d.key==="ArrowLeft")v=(h-1+c.length)%c.length;else if(d.key==="Home")v=0;else if(d.key==="End")v=c.length-1;else return;d.preventDefault(),c[v].focus(),c[v].click()};return t.jsx("div",{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d)},role:"tablist",className:f("vyre-tabs__list",e),"aria-label":a,onKeyDown:l,...n,children:r})});Ye.displayName="VyreTabList";const Ke=s.forwardRef(({value:e,disabled:r=!1,className:a,children:n,...o},i)=>{const{value:l,onChange:d,baseId:c}=Ge(),h=e===l;return t.jsx("button",{ref:i,role:"tab",type:"button",id:`${c}-tab-${e}`,"aria-controls":`${c}-panel-${e}`,"aria-selected":h,disabled:r,tabIndex:h?0:-1,className:f("vyre-tabs__tab",h&&"vyre-tabs__tab--active",a),"data-selected":h,onClick:()=>!r&&d(e),...o,children:n})});Ke.displayName="VyreTab";const qe=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-tabs__panels",e),...a,children:r}));qe.displayName="VyreTabPanels";const Ue=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i,baseId:l}=Ge();return e===i?t.jsx("div",{ref:o,role:"tabpanel",id:`${l}-panel-${e}`,"aria-labelledby":`${l}-tab-${e}`,tabIndex:0,className:f("vyre-tabs__panel",r),...n,children:a}):null});Ue.displayName="VyreTabPanel";const Kr=120,ze=({content:e,placement:r="top",delay:a=300,children:n,className:o})=>{const[i,l]=s.useState("hidden"),d=s.useRef(null),c=s.useRef(null),h=s.useId(),v=s.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current=setTimeout(()=>l("visible"),a)},[a]),y=s.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),l("leaving"),c.current=setTimeout(()=>l("hidden"),Kr)},[]),p=s.Children.only(n),b=s.cloneElement(p,{onMouseEnter:u=>{var m,x;v(),(x=(m=p.props).onMouseEnter)==null||x.call(m,u)},onMouseLeave:u=>{var m,x;y(),(x=(m=p.props).onMouseLeave)==null||x.call(m,u)},onFocus:u=>{var m,x;l("visible"),(x=(m=p.props).onFocus)==null||x.call(m,u)},onBlur:u=>{var m,x;y(),(x=(m=p.props).onBlur)==null||x.call(m,u)},"aria-describedby":i!=="hidden"?h:void 0});return t.jsxs("span",{className:f("vyre-tooltip-wrapper",o),children:[b,i!=="hidden"&&t.jsxs("span",{id:h,role:"tooltip",className:f("vyre-tooltip",`vyre-tooltip--${r}`,i==="leaving"&&"vyre-tooltip--leaving"),"data-placement":r,children:[e,t.jsx("span",{className:"vyre-tooltip__arrow","aria-hidden":"true"})]})]})};ze.displayName="VyreTooltip";const Xe=s.createContext(null);function Ze(){const e=s.useContext(Xe);if(!e)throw new Error("AccordionItem must be used within Accordion");return e}const Qe=s.forwardRef(({type:e="single",defaultValue:r,value:a,onValueChange:n,className:o,children:i,...l},d)=>{const c=b=>b===void 0?[]:Array.isArray(b)?b:[b],[h,v]=s.useState(c(r)),y=a!==void 0?c(a):h,p=s.useCallback(b=>{let u;e==="single"?u=y.includes(b)?[]:[b]:u=y.includes(b)?y.filter(m=>m!==b):[...y,b],a===void 0&&v(u),n==null||n(e==="single"?u[0]??"":u)},[e,y,a,n]);return t.jsx(Xe.Provider,{value:{type:e,value:y,toggle:p},children:t.jsx("div",{ref:d,className:["vyre-accordion",o].filter(Boolean).join(" "),...l,children:i})})});Qe.displayName="Accordion";const ve=s.createContext(null),Je=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i}=Ze(),l=i.includes(e);return t.jsx(ve.Provider,{value:{itemValue:e,isOpen:l},children:t.jsx("div",{ref:o,"data-state":l?"open":"closed",className:["vyre-accordion__item",r].filter(Boolean).join(" "),...n,children:a})})});Je.displayName="AccordionItem";const et=s.forwardRef(({className:e,children:r,...a},n)=>{const{toggle:o}=Ze(),i=s.useContext(ve);if(!i)throw new Error("AccordionTrigger must be used within AccordionItem");const{itemValue:l,isOpen:d}=i;return t.jsxs("button",{ref:n,type:"button","aria-expanded":d,"data-state":d?"open":"closed",className:["vyre-accordion__trigger",e].filter(Boolean).join(" "),onClick:()=>o(l),...a,children:[t.jsx("span",{className:"vyre-accordion__trigger-text",children:r}),t.jsx("svg",{className:"vyre-accordion__chevron",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})});et.displayName="AccordionTrigger";const tt=s.forwardRef(({className:e,children:r,...a},n)=>{const o=s.useContext(ve);if(!o)throw new Error("AccordionContent must be used within AccordionItem");const{isOpen:i}=o;return t.jsx("div",{ref:n,hidden:!i,"data-state":i?"open":"closed",className:["vyre-accordion__content",e].filter(Boolean).join(" "),...a,children:t.jsx("div",{className:"vyre-accordion__content-inner",children:r})})});tt.displayName="AccordionContent";const ye=s.forwardRef(({src:e,alt:r="",fallback:a,size:n="md",status:o,className:i,...l},d)=>{var y;const[c,h]=s.useState(!1),v=e&&!c;return t.jsxs("span",{ref:d,"data-size":n,className:["vyre-avatar",i].filter(Boolean).join(" "),...l,children:[v?t.jsx("img",{src:e,alt:r,className:"vyre-avatar__img",onError:()=>h(!0)}):t.jsx("span",{className:"vyre-avatar__fallback","aria-label":r||a,children:a??((y=r==null?void 0:r.charAt(0))==null?void 0:y.toUpperCase())??"?"}),o&&t.jsx("span",{className:`vyre-avatar__status vyre-avatar__status--${o}`,"aria-label":o})]})});ye.displayName="Avatar";const rt=s.forwardRef(({checked:e,defaultChecked:r,indeterminate:a=!1,onCheckedChange:n,disabled:o,size:i="md",className:l,id:d,...c},h)=>{const v=s.useRef(null),y=h??v;return s.useEffect(()=>{y.current&&(y.current.indeterminate=a)},[a,y]),t.jsxs("span",{className:["vyre-checkbox",`vyre-checkbox--${i}`,l].filter(Boolean).join(" "),"data-disabled":o||void 0,"data-checked":e||void 0,"data-indeterminate":a||void 0,children:[t.jsx("input",{ref:y,type:"checkbox",id:d,checked:e,defaultChecked:r,disabled:o,className:"vyre-checkbox__input",onChange:p=>n==null?void 0:n(p.target.checked),...c}),t.jsx("span",{className:"vyre-checkbox__box","aria-hidden":"true",children:a?t.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:t.jsx("path",{d:"M1 1h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}):t.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:t.jsx("path",{d:"M1 4l3 3 5-6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});rt.displayName="Checkbox";const at=s.createContext(null);let qr=0;const nt=s.forwardRef(({value:e,defaultValue:r,onChange:a,name:n,disabled:o=!1,size:i="md",orientation:l="vertical",options:d,className:c,children:h,...v},y)=>{const[p,b]=s.useState(r),u=e!==void 0,m=u?e:p,x=s.useMemo(()=>n??`vyre-radio-${++qr}`,[n]),g=s.useCallback(_=>{u||b(_),a==null||a(_)},[u,a]),k={name:x,value:m,onChange:g,groupDisabled:o,size:i};return t.jsx(at.Provider,{value:k,children:t.jsx("div",{ref:y,role:"radiogroup","aria-orientation":l,className:f("vyre-radio-group",`vyre-radio-group--${l}`,c),"data-disabled":o||void 0,...v,children:d?d.map(_=>t.jsx(fe,{value:_.value,label:_.label,description:_.description,disabled:_.disabled},_.value)):h})})});nt.displayName="VyreRadioGroup";const fe=s.forwardRef(({value:e,label:r,description:a,disabled:n,className:o,id:i,...l},d)=>{const c=s.useContext(at);if(!c)throw new Error("Radio must be used inside a <RadioGroup>.");const h=c.value===e,v=n||c.groupDisabled,y=i??`${c.name}-${e}`.replace(/\s+/g,"-");return t.jsxs("label",{className:f("vyre-radio",`vyre-radio--${c.size}`,v&&"vyre-radio--disabled",o),"data-checked":h||void 0,"data-disabled":v||void 0,htmlFor:y,children:[t.jsx("input",{ref:d,type:"radio",id:y,name:c.name,value:e,checked:h,disabled:v,className:"vyre-radio__input",onChange:()=>{var p;return(p=c.onChange)==null?void 0:p.call(c,e)},...l}),t.jsx("span",{className:"vyre-radio__control","aria-hidden":"true",children:t.jsx("span",{className:"vyre-radio__dot"})}),(r||a)&&t.jsxs("span",{className:"vyre-radio__content",children:[r&&t.jsx("span",{className:"vyre-radio__label",children:r}),a&&t.jsx("span",{className:"vyre-radio__description",children:a})]})]})});fe.displayName="VyreRadio";const Ur=["bold","italic","underline","strike","h1","h2","h3","ul","ol","quote","code","link","clear"];function H(e,r){document.execCommand(e,!1,r)}const st=s.forwardRef(({value:e,onChange:r,placeholder:a="Write something…",disabled:n=!1,readOnly:o=!1,toolbar:i=Ur,minHeight:l="10rem",className:d,...c},h)=>{const v=s.useRef(null),y=!n&&!o;s.useEffect(()=>{const m=v.current;m&&m.innerHTML!==e&&(m.innerHTML=e)},[e]);const p=s.useCallback(()=>{v.current&&r(v.current.innerHTML)},[r]),b=s.useCallback(m=>{var x;y&&((x=v.current)==null||x.focus(),m(),p())},[y,p]),u={bold:{label:"Bold",icon:t.jsx("b",{children:"B"}),run:()=>H("bold")},italic:{label:"Italic",icon:t.jsx("i",{children:"I"}),run:()=>H("italic")},underline:{label:"Underline",icon:t.jsx("u",{children:"U"}),run:()=>H("underline")},strike:{label:"Strikethrough",icon:t.jsx("s",{children:"S"}),run:()=>H("strikeThrough")},h1:{label:"Heading 1",icon:t.jsx(t.Fragment,{children:"H1"}),run:()=>H("formatBlock","<h1>")},h2:{label:"Heading 2",icon:t.jsx(t.Fragment,{children:"H2"}),run:()=>H("formatBlock","<h2>")},h3:{label:"Heading 3",icon:t.jsx(t.Fragment,{children:"H3"}),run:()=>H("formatBlock","<h3>")},ul:{label:"Bullet list",icon:t.jsx(t.Fragment,{children:"•≡"}),run:()=>H("insertUnorderedList")},ol:{label:"Numbered list",icon:t.jsx(t.Fragment,{children:"1.≡"}),run:()=>H("insertOrderedList")},quote:{label:"Quote",icon:t.jsx(t.Fragment,{children:"“”"}),run:()=>H("formatBlock","<blockquote>")},code:{label:"Code block",icon:t.jsx(t.Fragment,{children:"</>"}),run:()=>H("formatBlock","<pre>")},link:{label:"Link",icon:t.jsx(t.Fragment,{children:"🔗"}),run:()=>{const m=window.prompt("Link URL");m&&H("createLink",m)}},clear:{label:"Clear formatting",icon:t.jsx(t.Fragment,{children:"⌫"}),run:()=>H("removeFormat")}};return t.jsxs("div",{ref:h,className:f("vyre-rte",n&&"vyre-rte--disabled",o&&"vyre-rte--readonly",d),...c,children:[!o&&t.jsx("div",{className:"vyre-rte__toolbar",role:"toolbar","aria-label":"Formatting",children:i.map(m=>{const x=u[m];return x?t.jsx("button",{type:"button",className:"vyre-rte__tool",title:x.label,"aria-label":x.label,disabled:!y,onMouseDown:g=>g.preventDefault(),onClick:()=>b(x.run),children:x.icon},m):null})}),t.jsx("div",{ref:v,className:"vyre-rte__content",contentEditable:y,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":a,"data-placeholder":a,style:{minHeight:l},onInput:p,onBlur:p})]})});st.displayName="VyreRichTextEditor";const ot=s.forwardRef(({checked:e,defaultChecked:r=!1,onCheckedChange:a,disabled:n,size:o="md",className:i,...l},d)=>{const[c,h]=s.useState(r),v=e!==void 0?e:c,y=()=>{if(n)return;const p=!v;e===void 0&&h(p),a==null||a(p)};return t.jsx("button",{ref:d,type:"button",role:"switch","aria-checked":v,disabled:n,"data-checked":v||void 0,"data-size":o,className:["vyre-switch",i].filter(Boolean).join(" "),onClick:y,...l,children:t.jsx("span",{className:"vyre-switch__thumb"})})});ot.displayName="Switch";const it=s.forwardRef(({value:e,defaultValue:r=0,min:a=0,max:n=100,step:o=1,onValueChange:i,disabled:l,size:d="md",className:c,style:h,...v},y)=>{const[p,b]=s.useState(r),u=e!==void 0?e:p,m=(u-a)/(n-a)*100;return t.jsxs("div",{className:["vyre-slider",`vyre-slider--${d}`,c].filter(Boolean).join(" "),"data-disabled":l||void 0,style:{"--vyre-slider-pct":`${m}%`,...h},children:[t.jsx("input",{ref:y,type:"range",min:a,max:n,step:o,value:u,disabled:l,className:"vyre-slider__input",onChange:x=>{const g=Number(x.target.value);e===void 0&&b(g),i==null||i(g)},...v}),t.jsxs("div",{className:"vyre-slider__track",children:[t.jsx("div",{className:"vyre-slider__fill",style:{width:`${m}%`}}),t.jsx("div",{className:"vyre-slider__thumb",style:{left:`${m}%`}})]})]})});it.displayName="Slider";const lt=s.forwardRef(({value:e,max:r=100,indeterminate:a=!1,size:n="md",variant:o="default",className:i,...l},d)=>{const c=a?void 0:Math.min(100,Math.max(0,(e??0)/r*100));return t.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":a?void 0:e??0,"data-size":n,"data-variant":o,"data-indeterminate":a||void 0,className:["vyre-progress",i].filter(Boolean).join(" "),...l,children:t.jsx("div",{className:"vyre-progress__bar",style:c!==void 0?{width:`${c}%`}:void 0})})});lt.displayName="Progress";const dt=s.forwardRef(({orientation:e="horizontal",decorative:r=!0,className:a,...n},o)=>t.jsx("div",{ref:o,role:r?"none":"separator","aria-orientation":r?void 0:e,"data-orientation":e,className:["vyre-separator",a].filter(Boolean).join(" "),...n}));dt.displayName="Separator";const ct=s.forwardRef(({required:e,disabled:r,className:a,children:n,...o},i)=>t.jsxs("label",{ref:i,"data-required":e||void 0,"data-disabled":r||void 0,className:["vyre-label",a].filter(Boolean).join(" "),...o,children:[n,e&&t.jsx("span",{className:"vyre-label__required","aria-hidden":"true",children:"*"})]}));ct.displayName="Label";const he=s.forwardRef(({variant:e="rect",width:r,height:a,className:n,style:o,...i},l)=>t.jsx("div",{ref:l,"aria-hidden":"true","data-variant":e,className:["vyre-skeleton",n].filter(Boolean).join(" "),style:{width:typeof r=="number"?`${r}px`:r,height:typeof a=="number"?`${a}px`:a,...o},...i}));he.displayName="Skeleton";const ae=8,zr=120;function Xr(e){const[r,a]=e.split("-");return{side:r,align:a??"center"}}function Zr(e,r,a,n,o,i){const l=e.width,d=e.height,c=r.width,h=r.height,v=e.left+o,y=e.top+i;let p=0,b=0;switch(a){case"top":p=y-h-ae;break;case"bottom":p=y+d+ae;break;case"left":b=v-c-ae;break;case"right":b=v+l+ae;break}if(a==="top"||a==="bottom")switch(n){case"start":b=v;break;case"center":b=v+l/2-c/2;break;case"end":b=v+l-c;break}else switch(n){case"start":p=y;break;case"center":p=y+d/2-h/2;break;case"end":p=y+d-h;break}return{top:p,left:b}}const ut=({trigger:e,children:r,open:a,onOpenChange:n,placement:o="bottom",closeOnOutside:i=!0,className:l})=>{const d=a!==void 0,[c,h]=s.useState(!1),[v,y]=s.useState(!1),[p,b]=s.useState(!1),[u,m]=s.useState({top:0,left:0}),x=d?a:c,g=s.useRef(null),k=s.useRef(null),_=s.useRef(null),L=s.useId(),{side:j,align:I}=Xr(o),A=s.useCallback(R=>{d||h(R),n==null||n(R)},[d,n]),T=s.useCallback(()=>A(!x),[x,A]),M=s.useCallback(()=>{y(!0),_.current=setTimeout(()=>{y(!1),b(!1),A(!1)},zr)},[A]);s.useEffect(()=>{x?(_.current&&(clearTimeout(_.current),_.current=null),y(!1),b(!0)):p&&!v&&M()},[x]),s.useEffect(()=>{if(!p||!g.current||!k.current)return;const R=g.current.getBoundingClientRect(),w=k.current.getBoundingClientRect(),N=Zr(R,w,j,I,window.scrollX,window.scrollY);m(N)},[p,j,I]),s.useEffect(()=>{if(!p||!i)return;const R=w=>{k.current&&!k.current.contains(w.target)&&g.current&&!g.current.contains(w.target)&&M()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[p,i,M]),s.useEffect(()=>{if(!p)return;const R=w=>{w.key==="Escape"&&M()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[p,M]);const B=s.cloneElement(e,{ref:g,onClick:R=>{var w,N;T(),(N=(w=e.props).onClick)==null||N.call(w,R)},"aria-expanded":x,"aria-controls":L,"aria-haspopup":"dialog"});return t.jsxs(t.Fragment,{children:[B,p&&G.createPortal(t.jsx("div",{ref:k,id:L,role:"dialog","aria-modal":"false",className:f("vyre-popover",`vyre-popover--${j}`,v&&"vyre-popover--leaving",l),style:{top:u.top,left:u.left},children:r}),document.body)]})};ut.displayName="VyrePopover";const ne=s.createContext(null),mt=s.createContext(null),Qr=120,vt=({trigger:e,children:r,placement:a="bottom-start",className:n})=>{const[o,i]=s.useState(!1),[l,d]=s.useState(!1),[c,h]=s.useState(!1),[v,y]=s.useState({top:0,left:0}),[p,b]=s.useState(-1),u=s.useRef(null),m=s.useRef(null),x=s.useRef(null),g=s.useId(),k=s.useCallback(()=>{var M;return Array.from(((M=m.current)==null?void 0:M.querySelectorAll("[role=menuitem]:not([aria-disabled=true]):not([disabled]),[role=menuitemcheckbox]:not([aria-disabled=true]):not([disabled]),[role=menuitemradio]:not([aria-disabled=true]):not([disabled])"))??[])},[]),_=s.useCallback(()=>{d(!0),x.current=setTimeout(()=>{var M;d(!1),h(!1),i(!1),b(-1),(M=u.current)==null||M.focus({preventScroll:!0})},Qr)},[]),L=s.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null),d(!1),i(!0),h(!0)},[]),j=s.useCallback(()=>{o?_():L()},[o,L,_]);s.useEffect(()=>{if(!c||!u.current)return;const M=u.current.getBoundingClientRect(),B=4,R=window.scrollX,w=window.scrollY;let N=0,D=0;a.startsWith("bottom")?(N=M.bottom+w+B,D=a==="bottom-start"?M.left+R:M.right+R):(N=M.top+w-B,D=a==="top-start"?M.left+R:M.right+R),y({top:N,left:D}),requestAnimationFrame(()=>{var V;(V=k()[0])==null||V.focus({preventScroll:!0}),b(0)})},[c,a,k]),s.useEffect(()=>{if(!c)return;const M=R=>{m.current&&!m.current.contains(R.target)&&u.current&&!u.current.contains(R.target)&&_()},B=R=>{var w,N,D;if(R.key==="Escape"){_();return}if(R.key==="ArrowDown"||R.key==="ArrowUp"){R.preventDefault();const E=k();if(!E.length)return;const V=R.key==="ArrowDown"?1:-1,Z=(p+V+E.length)%E.length;(w=E[Z])==null||w.focus({preventScroll:!0}),b(Z)}if(R.key==="Home"&&((N=k()[0])==null||N.focus({preventScroll:!0}),b(0)),R.key==="End"){const E=k();(D=E[E.length-1])==null||D.focus({preventScroll:!0}),b(E.length-1)}};return document.addEventListener("mousedown",M),document.addEventListener("keydown",B),()=>{document.removeEventListener("mousedown",M),document.removeEventListener("keydown",B)}},[c,p,_,k]);const I=s.cloneElement(e,{ref:u,onClick:M=>{var B,R;j(),(R=(B=e.props).onClick)==null||R.call(B,M)},"aria-expanded":o,"aria-haspopup":"menu","aria-controls":g}),A=a.endsWith("-end"),T=a.startsWith("top");return t.jsxs(ne.Provider,{value:{close:_},children:[I,c&&G.createPortal(t.jsx("div",{ref:m,id:g,role:"menu","aria-orientation":"vertical",className:f("vyre-dropdown",A&&"vyre-dropdown--end",T&&"vyre-dropdown--top",l&&"vyre-dropdown--leaving",n),style:{top:v.top,left:v.left,transform:A?"translateX(-100%)":void 0},children:r}),document.body)]})};vt.displayName="VyreDropdownMenu";const yt=({children:e,className:r})=>t.jsx("div",{className:f("vyre-dropdown__label",r),children:e});yt.displayName="VyreDropdownLabel";const ft=({children:e,onSelect:r,disabled:a=!1,variant:n="default",icon:o,shortcut:i,className:l})=>{const d=s.useContext(ne);return t.jsxs("button",{role:"menuitem",className:f("vyre-dropdown__item",n==="danger"&&"vyre-dropdown__item--danger",l),"aria-disabled":a||void 0,disabled:a,tabIndex:-1,onClick:()=>{a||(r==null||r(),d==null||d.close())},children:[o&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:o}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),i&&t.jsx("kbd",{className:"vyre-dropdown__item-shortcut",children:i})]})};ft.displayName="VyreDropdownItem";const ht=({children:e,checked:r,onCheckedChange:a,disabled:n=!1,shortcut:o,className:i})=>{const l=s.useContext(ne);return t.jsxs("button",{role:"menuitemcheckbox","aria-checked":r,"aria-disabled":n||void 0,disabled:n,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--checkbox",i),onClick:()=>{n||(a(!r),l==null||l.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:r&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M2 6l3 3 5-5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),o&&t.jsx("kbd",{className:"vyre-dropdown__item-shortcut",children:o})]})};ht.displayName="VyreDropdownCheckboxItem";const pt=({value:e,onValueChange:r,children:a})=>t.jsx(mt.Provider,{value:{value:e,onValueChange:r},children:t.jsx("div",{role:"group",children:a})});pt.displayName="VyreDropdownRadioGroup";const bt=({children:e,value:r,disabled:a=!1,className:n})=>{const o=s.useContext(ne),i=s.useContext(mt),l=(i==null?void 0:i.value)===r;return t.jsxs("button",{role:"menuitemradio","aria-checked":l,"aria-disabled":a||void 0,disabled:a,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--radio",n),onClick:()=>{a||(i==null||i.onValueChange(r),o==null||o.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:l&&t.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",children:t.jsx("circle",{cx:"4",cy:"4",r:"3",fill:"currentColor"})})}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e})]})};bt.displayName="VyreDropdownRadioItem";const xt=({trigger:e,children:r,icon:a,placement:n="right",disabled:o=!1,className:i})=>{const[l,d]=s.useState(!1),[c,h]=s.useState({top:0,left:0}),v=s.useRef(null),y=s.useRef(null),p=s.useCallback(()=>{if(!v.current)return;const m=v.current.getBoundingClientRect(),x=window.scrollX,g=window.scrollY,k=2;h({top:m.top+g,left:n==="right"?m.right+x+k:m.left+x-k}),d(!0)},[n]),b=s.useCallback(()=>d(!1),[]),u=m=>{var g;const x=m.relatedTarget;(g=y.current)!=null&&g.contains(x)||b()};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{ref:v,role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"aria-disabled":o||void 0,disabled:o,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--sub",i),onMouseEnter:p,onMouseLeave:u,onFocus:p,children:[a&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:a}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),t.jsx("span",{className:"vyre-dropdown__item-chevron","aria-hidden":"true",children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:n==="right"?"M4 2l4 4-4 4":"M8 2L4 6l4 4",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l&&G.createPortal(t.jsx("div",{ref:y,role:"menu",className:f("vyre-dropdown vyre-dropdown--sub",n==="left"&&"vyre-dropdown--sub-left"),style:{position:"absolute",top:c.top,left:n==="right"?c.left:void 0,right:n==="left"?`calc(100vw - ${c.left}px)`:void 0,transform:n==="left"?"translateX(-100%)":void 0},onMouseLeave:m=>{var g;const x=m.relatedTarget;(g=v.current)!=null&&g.contains(x)||b()},children:r}),document.body)]})};xt.displayName="VyreDropdownSub";const _t=({className:e})=>t.jsx("div",{role:"separator",className:f("vyre-dropdown__separator",e)});_t.displayName="VyreDropdownSeparator";const Jr=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M8 7v4M8 5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ea=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M5 8l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ta=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M8 2L14.5 13H1.5L8 2Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),t.jsx("path",{d:"M8 6v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ra=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),gt={info:Jr,success:ea,warning:ta,danger:ra},jt=({variant:e="info",title:r,icon:a,onClose:n,children:o,className:i})=>{const l=gt[e];return t.jsxs("div",{role:"alert",className:f("vyre-alert",`vyre-alert--${e}`,i),children:[t.jsx("span",{className:"vyre-alert__icon","aria-hidden":"true",children:a??t.jsx(l,{})}),t.jsxs("div",{className:"vyre-alert__body",children:[r&&t.jsx("p",{className:"vyre-alert__title",children:r}),o&&t.jsx("div",{className:"vyre-alert__description",children:o})]}),n&&t.jsx("button",{type:"button",className:"vyre-alert__close","aria-label":"Dismiss",onClick:n,children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M3 3l8 8M11 3l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})};jt.displayName="VyreAlert";const aa=["button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),wt=({open:e,onOpenChange:r,title:a,description:n,variant:o="danger",confirmLabel:i="Confirm",cancelLabel:l="Cancel",onConfirm:d,onCancel:c,className:h})=>{const v=s.useRef(null),y=s.useRef(null),p=s.useRef(null),b=s.useCallback(()=>{c==null||c(),r(!1)},[c,r]),u=s.useCallback(()=>{d==null||d(),r(!1)},[d,r]),m=s.useCallback(g=>{if(g.key!=="Tab")return;const k=v.current;if(!k)return;const _=Array.from(k.querySelectorAll(aa));if(!_.length)return;const L=_[0],j=_[_.length-1];g.shiftKey&&document.activeElement===L?(g.preventDefault(),j.focus()):!g.shiftKey&&document.activeElement===j&&(g.preventDefault(),L.focus())},[]);if(s.useEffect(()=>{if(!e)return;document.addEventListener("keydown",m);const g=document.body.style.overflow;document.body.style.overflow="hidden";const k=_=>{_.key==="Escape"&&b()};return document.addEventListener("keydown",k),setTimeout(()=>{var _;return(_=p.current)==null?void 0:_.focus()},0),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keydown",k),document.body.style.overflow=g}},[e,m,b]),!e)return null;const x=gt[o];return G.createPortal(t.jsx("div",{ref:y,className:"vyre-alert-dialog-backdrop",onClick:g=>{g.target===y.current&&b()},role:"presentation",children:t.jsxs("div",{ref:v,role:"alertdialog","aria-modal":"true","aria-labelledby":"vyre-ad-title","aria-describedby":n?"vyre-ad-desc":void 0,className:f("vyre-alert-dialog",`vyre-alert-dialog--${o}`,h),tabIndex:-1,children:[t.jsx("div",{className:"vyre-alert-dialog__icon-wrap",children:t.jsx("span",{className:f("vyre-alert-dialog__icon",`vyre-alert-dialog__icon--${o}`),children:t.jsx(x,{})})}),t.jsxs("div",{className:"vyre-alert-dialog__body",children:[t.jsx("h2",{id:"vyre-ad-title",className:"vyre-alert-dialog__title",children:a}),n&&t.jsx("p",{id:"vyre-ad-desc",className:"vyre-alert-dialog__description",children:n})]}),t.jsxs("div",{className:"vyre-alert-dialog__footer",children:[t.jsx("button",{ref:p,type:"button",className:"vyre-btn vyre-btn--ghost vyre-btn--sm",onClick:b,children:l}),t.jsx("button",{type:"button",className:f("vyre-btn vyre-btn--sm",o==="danger"&&"vyre-btn--danger",o==="warning"&&"vyre-btn--primary",o==="info"&&"vyre-btn--accent"),onClick:u,children:i})]})]})}),document.body)};wt.displayName="VyreAlertDialog";const na=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Nt=s.forwardRef(({open:e,onClose:r,side:a="right",size:n="md",closeOnBackdrop:o=!0,closeOnEsc:i=!0,className:l,children:d,"aria-label":c,"aria-labelledby":h,...v},y)=>{const p=s.useRef(null),b=s.useRef(null),u=s.useCallback(m=>{if(m.key!=="Tab")return;const x=p.current;if(!x)return;const g=Array.from(x.querySelectorAll(na));if(!g.length)return;const k=g[0],_=g[g.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),_.focus()):!m.shiftKey&&document.activeElement===_&&(m.preventDefault(),k.focus())},[]);return s.useEffect(()=>{if(!e)return;if(document.addEventListener("keydown",u),i){const x=k=>{k.key==="Escape"&&r()};document.addEventListener("keydown",x);const g=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var k;return(k=p.current)==null?void 0:k.focus()},0),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keydown",x),document.body.style.overflow=g}}const m=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var x;return(x=p.current)==null?void 0:x.focus()},0),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=m}},[e,u,i,r]),e?G.createPortal(t.jsx("div",{ref:b,className:"vyre-sheet-backdrop",onClick:m=>{o&&m.target===b.current&&r()},role:"presentation",children:t.jsx("div",{ref:m=>{p.current=m,typeof y=="function"?y(m):y&&(y.current=m)},role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":h,tabIndex:-1,className:f("vyre-sheet",`vyre-sheet--${a}`,`vyre-sheet--${n}`,l),...v,children:d})}),document.body):null});Nt.displayName="VyreSheet";const kt=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-sheet__header",e),...a,children:r}));kt.displayName="VyreSheetHeader";const Ct=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-sheet__body",e),...a,children:r}));Ct.displayName="VyreSheetBody";const Rt=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-sheet__footer",e),...a,children:r}));Rt.displayName="VyreSheetFooter";const Lt=({children:e,separator:r="/",className:a})=>{const n=s.Children.toArray(e).filter(Boolean);return t.jsx("nav",{"aria-label":"Breadcrumb",className:f("vyre-breadcrumb",a),children:t.jsx("ol",{className:"vyre-breadcrumb__list",children:n.map((o,i)=>t.jsxs("li",{className:"vyre-breadcrumb__item",children:[o,i<n.length-1&&t.jsx("span",{className:"vyre-breadcrumb__separator","aria-hidden":"true",children:r})]},i))})})};Lt.displayName="VyreBreadcrumb";const Dt=({children:e,href:r,current:a=!1,className:n})=>a||!r?t.jsx("span",{className:f("vyre-breadcrumb__link vyre-breadcrumb__link--current",n),"aria-current":a?"page":void 0,children:e}):t.jsx("a",{href:r,className:f("vyre-breadcrumb__link",n),children:e});Dt.displayName="VyreBreadcrumbItem";const St=({children:e,href:r,className:a})=>t.jsx("a",{href:r,className:f("vyre-breadcrumb__link",a),children:e});St.displayName="VyreBreadcrumbLink";const It=({children:e="/",className:r})=>t.jsx("span",{className:f("vyre-breadcrumb__separator",r),"aria-hidden":"true",children:e});It.displayName="VyreBreadcrumbSeparator";function _e(e,r){return Array.from({length:r-e+1},(a,n)=>e+n)}function sa(e,r,a){const n=a*2+5;if(r<=n)return _e(1,r);const o=Math.max(e-a,2),i=Math.min(e+a,r-1),l=o>2,d=i<r-1,c=[1];return l&&c.push("..."),c.push(..._e(o,i)),d&&c.push("..."),c.push(r),c}const oa=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M9 2L4 7l5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ia=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M5 2l5 5-5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),la=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M7 2L2 7l5 5M12 2L7 7l5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),da=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l5 5-5 5M7 2l5 5-5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Mt=({page:e,totalPages:r,onPageChange:a,siblings:n=1,showEdges:o=!0,showInfo:i=!1,totalItems:l,pageSize:d,className:c})=>{const h=sa(e,r,n),v=e>1,y=e<r,p=s.useMemo(()=>{if(!i)return null;if(l!=null&&d!=null){const u=(e-1)*d+1,m=Math.min(e*d,l);return`Showing ${u}–${m} of ${l}`}return`Page ${e} of ${r}`},[i,e,r,l,d]),b=t.jsxs(t.Fragment,{children:[o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(1),disabled:!v,"aria-label":"First page",children:t.jsx(la,{})}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(e-1),disabled:!v,"aria-label":"Previous page",children:t.jsx(oa,{})}),t.jsx("ol",{className:"vyre-pagination__list",children:h.map((u,m)=>u==="..."?t.jsx("li",{children:t.jsx("span",{className:"vyre-pagination__dots","aria-hidden":"true",children:"···"})},`dots-${m}`):t.jsx("li",{children:t.jsx("button",{className:f("vyre-pagination__btn",u===e&&"vyre-pagination__btn--active"),onClick:()=>a(u),"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,children:u})},u))}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(e+1),disabled:!y,"aria-label":"Next page",children:t.jsx(ia,{})}),o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(r),disabled:!y,"aria-label":"Last page",children:t.jsx(da,{})})]});return i?t.jsxs("div",{className:f("vyre-pagination-row",c),children:[t.jsx("span",{className:"vyre-pagination__info",children:p}),t.jsx("nav",{"aria-label":"Pagination",className:"vyre-pagination",children:b})]}):t.jsx("nav",{"aria-label":"Pagination",className:f("vyre-pagination",c),children:b})};Mt.displayName="VyrePagination";const Tt=({children:e,striped:r=!1,bordered:a=!1,compact:n=!1,hoverable:o=!0,className:i})=>t.jsx("div",{className:"vyre-table-wrapper",children:t.jsx("table",{className:f("vyre-table",r&&"vyre-table--striped",a&&"vyre-table--bordered",n&&"vyre-table--compact",o&&"vyre-table--hoverable",i),children:e})});Tt.displayName="VyreTable";const Et=s.forwardRef(({className:e,...r},a)=>t.jsx("thead",{ref:a,className:f("vyre-table__head",e),...r}));Et.displayName="VyreTableHead";const At=s.forwardRef(({className:e,...r},a)=>t.jsx("tbody",{ref:a,className:f("vyre-table__body",e),...r}));At.displayName="VyreTableBody";const Bt=s.forwardRef(({className:e,selected:r,...a},n)=>t.jsx("tr",{ref:n,className:f("vyre-table__row",r&&"vyre-table__row--selected",e),"aria-selected":r,...a}));Bt.displayName="VyreTableRow";const ca=({dir:e})=>t.jsx("span",{className:"vyre-table__sort-icon","aria-hidden":"true",children:t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[t.jsx("path",{d:"M6 2v8M3 5l3-3 3 3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:e==="desc"?.3:1}),t.jsx("path",{d:"M3 7l3 3 3-3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:e==="asc"?.3:1})]})}),Vt=s.forwardRef(({className:e,sortable:r,sortDir:a=null,onSort:n,align:o="left",children:i,...l},d)=>r?t.jsx("th",{ref:d,className:f("vyre-table__th vyre-table__th--sortable",`vyre-table__th--${o}`,a&&`vyre-table__th--sort-${a}`,e),"aria-sort":a==="asc"?"ascending":a==="desc"?"descending":"none",...l,children:t.jsxs("button",{className:"vyre-table__sort-btn",onClick:n,type:"button",children:[i,t.jsx(ca,{dir:a})]})}):t.jsx("th",{ref:d,className:f("vyre-table__th",`vyre-table__th--${o}`,e),...l,children:i}));Vt.displayName="VyreTableHeader";const $t=s.forwardRef(({className:e,align:r="left",...a},n)=>t.jsx("td",{ref:n,className:f("vyre-table__td",`vyre-table__td--${r}`,e),...a}));$t.displayName="VyreTableCell";const Ft=s.forwardRef(({className:e,...r},a)=>t.jsx("caption",{ref:a,className:f("vyre-table__caption",e),...r}));Ft.displayName="VyreTableCaption";const Wt=s.createContext(null),se=()=>{const e=s.useContext(Wt);if(!e)throw new Error("Command components must be used inside <Command>");return e};function ie(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function ua(e,r,a=[]){if(!e)return!0;const n=ie(e);return ie(r).includes(n)||a.some(o=>ie(o).includes(n))}let ma=0;function va(){return`cmd-${++ma}`}const pe=s.forwardRef(({value:e,onValueChange:r,className:a,children:n},o)=>{const[i,l]=s.useState(""),[d,c]=s.useState(0),[h,v]=s.useState(0),y=e!==void 0?e:i,p=s.useCallback(_=>{l(_),r==null||r(_),c(0)},[r]),b=s.useRef(new Map),u=s.useRef(new Map),m=s.useCallback((_,L,j)=>{b.current.set(_,{el:L,disabled:j})},[]),x=s.useCallback(_=>{b.current.delete(_),u.current.delete(_)},[]),g=s.useCallback(_=>{var L;(L=u.current.get(_))==null||L()},[]),k=s.useMemo(()=>({search:y,setSearch:p,activeIndex:d,setActiveIndex:c,items:b,registerItem:m,unregisterItem:x,selectItem:g,onSelectRef:u,visibleCount:h,setVisibleCount:v}),[y,p,d,m,x,g,h]);return t.jsx(Wt.Provider,{value:k,children:t.jsx("div",{ref:o,className:f("vyre-command",a),role:"combobox","aria-expanded":"true","aria-haspopup":"listbox",children:n})})});pe.displayName="VyreCommand";const Ht=s.forwardRef(({placeholder:e="Search...",className:r},a)=>{const{search:n,setSearch:o}=se();return t.jsxs("div",{className:"vyre-command__input-wrapper",children:[t.jsx("svg",{className:"vyre-command__search-icon",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M10 6.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM9.5 10.207l3.146 3.147",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),t.jsx("input",{ref:a,className:f("vyre-command__input",r),type:"text",placeholder:e,value:n,onChange:i=>o(i.target.value),autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list","aria-controls":"vyre-command-list"}),n&&t.jsx("button",{className:"vyre-command__clear",type:"button","aria-label":"Clear search",onClick:()=>o(""),children:t.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l9 9M11 2l-9 9",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]})});Ht.displayName="VyreCommandInput";const Pt=s.forwardRef(({className:e,children:r},a)=>{const{activeIndex:n,setActiveIndex:o,items:i,selectItem:l}=se(),d=s.useCallback(c=>{var v,y;const h=Array.from((i.current??new Map).entries()).filter(([,p])=>!p.disabled&&p.el.closest("[data-cmd-item]")!==null&&!p.el.hasAttribute("data-cmd-hidden"));if(c.key==="ArrowDown")c.preventDefault(),o(Math.min(n+1,h.length-1)),(v=h[Math.min(n+1,h.length-1)])==null||v[1].el.scrollIntoView({block:"nearest"});else if(c.key==="ArrowUp")c.preventDefault(),o(Math.max(n-1,0)),(y=h[Math.max(n-1,0)])==null||y[1].el.scrollIntoView({block:"nearest"});else if(c.key==="Enter"){c.preventDefault();const[p]=h[n]??[];p&&l(p)}},[n,o,i,l]);return t.jsx("div",{ref:a,id:"vyre-command-list",role:"listbox",className:f("vyre-command__list",e),onKeyDown:d,children:r})});Pt.displayName="VyreCommandList";const Gt=({className:e,children:r})=>{const{search:a,visibleCount:n}=se();return!a||n>0?null:t.jsx("div",{className:f("vyre-command__empty",e),role:"presentation",children:r??"No results found."})};Gt.displayName="VyreCommandEmpty";const Ot=({heading:e,className:r,children:a})=>t.jsxs("div",{className:f("vyre-command__group",r),role:"presentation",children:[e&&t.jsx("div",{className:"vyre-command__group-heading","aria-hidden":"true",children:e}),t.jsx("div",{role:"group","aria-label":e,children:a})]});Ot.displayName="VyreCommandGroup";const Yt=({onSelect:e,disabled:r=!1,keywords:a,className:n,children:o,icon:i,shortcut:l})=>{const{search:d,setActiveIndex:c,registerItem:h,unregisterItem:v,onSelectRef:y,setVisibleCount:p}=se(),b=s.useMemo(()=>va(),[]),u=s.useRef(null),x=ua(d,typeof o=="string"?o:"",a);return s.useEffect(()=>(p(g=>g+(x?1:0)),()=>{p(g=>g-(x?1:0))}),[x,p]),s.useEffect(()=>{const g=u.current;if(!(!g||!x))return h(b,g,r),()=>v(b)},[b,r,x,h,v]),s.useEffect(()=>{var g;return e&&((g=y.current)==null||g.set(b,e)),()=>{var k;(k=y.current)==null||k.delete(b)}},[b,e,y]),x?t.jsxs("div",{ref:u,"data-cmd-item":!0,role:"option","aria-disabled":r||void 0,className:f("vyre-command__item",r&&"vyre-command__item--disabled",n),onClick:()=>{r||e==null||e()},onMouseEnter:()=>{!r&&u.current&&c(-1)},children:[i&&t.jsx("span",{className:"vyre-command__item-icon","aria-hidden":"true",children:i}),t.jsx("span",{className:"vyre-command__item-label",children:o}),l&&t.jsx("kbd",{className:"vyre-command__item-shortcut",children:l})]}):null};Yt.displayName="VyreCommandItem";const Kt=({className:e})=>t.jsx("div",{className:f("vyre-command__separator",e),role:"separator","aria-hidden":"true"});Kt.displayName="VyreCommandSeparator";const qt=({open:e,onOpenChange:r,value:a,onValueChange:n,className:o,children:i})=>{const l=s.useRef(null);return s.useEffect(()=>{var h;if(!e)return;const d=document.activeElement,c=(h=l.current)==null?void 0:h.querySelector(".vyre-command__input");return c==null||c.focus(),()=>{d==null||d.focus({preventScroll:!0})}},[e]),s.useEffect(()=>{if(!e)return;const d=c=>{c.key==="Escape"&&r(!1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,r]),e?G.createPortal(t.jsx("div",{className:"vyre-command-backdrop",ref:l,onClick:d=>{d.target===d.currentTarget&&r(!1)},role:"dialog","aria-modal":"true","aria-label":"Command palette",children:t.jsx(pe,{value:a,onValueChange:n,className:f("vyre-command--dialog",o),children:i})}),document.body):null};qt.displayName="VyreCommandDialog";const Ut=s.forwardRef(({orientation:e="horizontal",attached:r=!1,size:a,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,role:"group",className:f("vyre-btn-group",e==="vertical"&&"vyre-btn-group--vertical",r&&"vyre-btn-group--attached",n),"data-orientation":e,"data-size":a,...i,children:o}));Ut.displayName="VyreButtonGroup";const be=s.forwardRef(({variant:e="default",size:r="md",onRemove:a,onClick:n,disabled:o=!1,className:i,children:l,...d},c)=>{const h=!!n&&!o;return t.jsxs("span",{ref:c,className:f("vyre-tag",`vyre-tag--${e}`,`vyre-tag--${r}`,h&&"vyre-tag--clickable",o&&"vyre-tag--disabled",i),"data-variant":e,"data-size":r,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-disabled":o||void 0,onClick:h?n:void 0,onKeyDown:h?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),n==null||n())}:void 0,...d,children:[t.jsx("span",{className:"vyre-tag__label",children:l}),a&&t.jsx("button",{type:"button",className:"vyre-tag__remove","aria-label":"Remove",disabled:o,onClick:v=>{v.stopPropagation(),a()},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})});be.displayName="VyreTag";const zt=s.forwardRef(({value:e,onChange:r,placeholder:a="Add tag…",disabled:n=!1,max:o,size:i="md",className:l,style:d,"data-testid":c},h)=>{const[v,y]=s.useState(""),p=s.useRef(null),b=o!==void 0&&e.length>=o,u=n||b;function m(_){const L=_.trim();if(!L||e.includes(L)||b){y("");return}r([...e,L]),y("")}function x(_){n||r(e.filter((L,j)=>j!==_))}function g(_){if(_.key==="Enter"||_.key===","){_.preventDefault(),m(v);return}_.key==="Backspace"&&v===""&&e.length>0&&x(e.length-1)}function k(_){const L=_.target.value;if(L.includes(",")){const j=L.split(",");j.slice(0,-1).forEach(A=>m(A)),y(j[j.length-1])}else y(L)}return t.jsxs("div",{ref:h,className:f("vyre-tags-input",`vyre-tags-input--${i}`,n&&"vyre-tags-input--disabled",l),"data-testid":c,style:d,onClick:()=>{var _;return(_=p.current)==null?void 0:_.focus()},children:[e.map((_,L)=>t.jsx(be,{size:i,disabled:n,onRemove:n?void 0:()=>x(L),children:_},`${_}-${L}`)),t.jsx("input",{ref:p,type:"text",className:"vyre-tags-input__field",value:v,onChange:k,onKeyDown:g,placeholder:b?"":a,disabled:u,"aria-label":"Add tag"})]})});zt.displayName="VyreTagsInput";const Xt=s.forwardRef(({options:e,value:r,onChange:a,placeholder:n="Search…",disabled:o=!1,size:i="md",emptyText:l="No results",className:d,...c},h)=>{const[v,y]=s.useState(!1),[p,b]=s.useState(""),[u,m]=s.useState(-1),x=s.useRef(null),g=s.useRef(null),k=s.useRef(null),L=`${s.useId()}-listbox`,j=e.find(N=>N.value===r)??null,I=e.filter(N=>N.label.toLowerCase().includes(p.toLowerCase())),A=s.useCallback(()=>{y(!1),m(-1),b("")},[]),T=s.useCallback(N=>{var D;N.disabled||(a(N.value),A(),(D=x.current)==null||D.blur())},[a,A]);s.useEffect(()=>{if(!v)return;const N=D=>{const E=k.current;E&&!E.contains(D.target)&&A()};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[v,A]),s.useEffect(()=>{var D;if(!v||u<0)return;const N=(D=g.current)==null?void 0:D.children[u];N==null||N.scrollIntoView({block:"nearest"})},[u,v]),s.useEffect(()=>{m(I.length>0?0:-1)},[p]);function M(){o||(y(!0),b(""))}function B(N){b(N.target.value),v||y(!0)}function R(N){var D;switch(N.key){case"ArrowDown":{if(N.preventDefault(),!v){y(!0);return}m(E=>{let V=E+1;for(;V<I.length&&I[V].disabled;)V++;return V<I.length?V:E});break}case"ArrowUp":{if(N.preventDefault(),!v){y(!0);return}m(E=>{let V=E-1;for(;V>=0&&I[V].disabled;)V--;return V>=0?V:E});break}case"Enter":{N.preventDefault(),v&&u>=0&&I[u]&&T(I[u]);break}case"Escape":{A(),(D=x.current)==null||D.blur();break}}}const w=v?p:(j==null?void 0:j.label)??"";return t.jsxs("div",{ref:N=>{k.current=N,typeof h=="function"?h(N):h&&(h.current=N)},className:f("vyre-combobox",`vyre-combobox--${i}`,o&&"vyre-combobox--disabled",d),"data-open":v,...c,children:[t.jsx("input",{ref:x,type:"text",role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-controls":L,"aria-autocomplete":"list","aria-disabled":o,disabled:o,className:"vyre-combobox__input",placeholder:n,value:w,onFocus:M,onChange:B,onKeyDown:R}),t.jsx("span",{className:"vyre-combobox__chevron","aria-hidden":"true",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M3 5L7 9L11 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v&&t.jsx("ul",{ref:g,id:L,role:"listbox",className:"vyre-combobox__dropdown","aria-label":"Options",children:I.length>0?I.map((N,D)=>t.jsx("li",{role:"option","aria-selected":N.value===r,"aria-disabled":N.disabled,"data-highlighted":D===u,className:f("vyre-combobox__option",D===u&&"vyre-combobox__option--highlighted",N.value===r&&"vyre-combobox__option--selected"),onMouseEnter:()=>!N.disabled&&m(D),onMouseDown:E=>{E.preventDefault(),T(N)},children:N.label},N.value)):t.jsx("li",{className:"vyre-combobox__empty",role:"presentation",children:l})})]})});Xt.displayName="VyreCombobox";function ya({col:e,sortKey:r,sortDir:a}){const o=r===e.key?a:void 0;return t.jsx("span",{className:"vyre-data-grid__sort-icon","aria-hidden":"true",children:t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[t.jsx("path",{d:"M6 2v4M3.5 4.5L6 2l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:o==="desc"?.3:1}),t.jsx("path",{d:"M6 10V6M3.5 7.5L6 10l2.5-2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:o==="asc"?.3:1})]})})}const fa=5,Zt=s.forwardRef(({columns:e,rows:r,sortKey:a,sortDir:n,onSort:o,loading:i=!1,emptyText:l="No data",stickyHeader:d=!1,className:c,style:h,"data-testid":v},y)=>{function p(u){if(!u.sortable||!o)return;const m=a===u.key&&n==="asc"?"desc":"asc";o(u.key,m)}function b(u){return a!==u.key?"none":n==="asc"?"ascending":"descending"}return t.jsx("div",{ref:y,className:f("vyre-data-grid",d&&"vyre-data-grid--sticky-header",c),style:h,"data-testid":v,children:t.jsxs("table",{className:"vyre-data-grid__table",children:[t.jsx("thead",{className:"vyre-data-grid__thead",children:t.jsx("tr",{children:e.map(u=>t.jsx("th",{className:f("vyre-data-grid__th",u.sortable&&"vyre-data-grid__th--sortable",a===u.key&&`vyre-data-grid__th--sort-${n}`),style:u.width?{width:u.width}:void 0,"aria-sort":u.sortable?b(u):void 0,children:u.sortable?t.jsxs("button",{type:"button",className:"vyre-data-grid__sort-btn",onClick:()=>p(u),children:[u.label,t.jsx(ya,{col:u,sortKey:a,sortDir:n})]}):u.label},u.key))})}),t.jsx("tbody",{className:"vyre-data-grid__tbody",children:i?Array.from({length:fa}).map((u,m)=>t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--skeleton",children:e.map(x=>t.jsx("td",{className:"vyre-data-grid__td",children:t.jsx(he,{height:16})},x.key))},`skel-${m}`)):r.length===0?t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--empty",children:t.jsx("td",{className:"vyre-data-grid__td vyre-data-grid__empty",colSpan:e.length,children:l})}):r.map((u,m)=>t.jsx("tr",{className:"vyre-data-grid__row",children:e.map(x=>t.jsx("td",{className:"vyre-data-grid__td",children:u[x.key]!=null?String(u[x.key]):""},x.key))},m))})]})})});Zt.displayName="VyreDataGrid";const Qt=s.forwardRef(({gap:e="md",wrap:r=!0,className:a,children:n,...o},i)=>t.jsx("div",{ref:i,className:f("vyre-tag-group",`vyre-tag-group--gap-${e}`,!r&&"vyre-tag-group--nowrap",a),role:"list",...o,children:n}));Qt.displayName="VyreTagGroup";function X(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Y(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function J(e,r){return X(e)<X(r)}function ge(e,r){return X(e)>X(r)}function ha(e,r){return new Date(e,r+1,0).getDate()}function pa(e,r,a){return(new Date(e,r,1).getDay()-a+7)%7}function K(e,r){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}function ba(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}const je=Array.from({length:12},(e,r)=>new Intl.DateTimeFormat("default",{month:"long"}).format(new Date(2e3,r,1))),ee=12,te=s.forwardRef((e,r)=>{const{showTime:a=!1,minDate:n,maxDate:o,disabled:i,className:l,weekStartsOn:d=1,defaultMonth:c}=e,h=X(new Date),v=()=>{var C,S;return e.mode==="range"?((C=e.value)==null?void 0:C[0])??c??h:e.mode==="multiple"?((S=e.value)==null?void 0:S[0])??c??h:e.value??c??h},[y,p]=s.useState(()=>(v()??h).getFullYear()),[b,u]=s.useState(()=>(v()??h).getMonth()),[m,x]=s.useState("days"),[g,k]=s.useState(null),[_,L]=s.useState(()=>{const C=e.mode==="single"?e.value:null;return C?C.getHours():0}),[j,I]=s.useState(()=>{const C=e.mode==="single"?e.value:null;return C?C.getMinutes():0}),A=s.useMemo(()=>{const C=ha(y,b),S=pa(y,b,d);return{count:C,offset:S}},[y,b,d]),T=s.useMemo(()=>d===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],[d]),M=s.useCallback(C=>{if(e.mode==="single")return!!e.value&&Y(C,e.value);if(e.mode==="range"){const[S,F]=e.value??[null,null];return!!S&&Y(C,S)||!!F&&Y(C,F)}return e.mode==="multiple"?(e.value??[]).some(S=>Y(C,S)):!1},[e]),B=s.useCallback(C=>{if(e.mode!=="range")return!1;const[S,F]=e.value??[null,null],W=F??g;if(!S||!W)return!1;const q=J(S,W)?S:W,U=J(S,W)?W:S;return ge(C,q)&&J(C,U)},[e,g]),R=s.useCallback(C=>{if(e.mode!=="range")return!1;const[S]=e.value??[null,null];return!!S&&Y(C,S)},[e]),w=s.useCallback(C=>{if(e.mode!=="range")return!1;const[,S]=e.value??[null,null];return!!S&&Y(C,S)},[e]),N=s.useCallback(C=>!!(n&&J(C,n)||o&&ge(C,o)||i!=null&&i(C)),[n,o,i]),D=s.useCallback(C=>{var F,W,q,U,Q,re;const S=new Date(y,b,C,_,j);if(!N(X(S))){if(e.mode==="single"||!e.mode)(F=e.onChange)==null||F.call(e,S);else if(e.mode==="range"){const[P,z]=e.value??[null,null];!P||P&&z?(W=e.onChange)==null||W.call(e,[S,null]):J(S,P)?(q=e.onChange)==null||q.call(e,[S,P]):(U=e.onChange)==null||U.call(e,[P,S])}else if(e.mode==="multiple"){const P=e.value??[],z=P.findIndex(xe=>Y(xe,S));z>=0?(Q=e.onChange)==null||Q.call(e,P.filter((xe,Mr)=>Mr!==z)):(re=e.onChange)==null||re.call(e,[...P,S])}}},[y,b,_,j,e,N]),E=()=>{b===0?(u(11),p(C=>C-1)):u(C=>C-1)},V=()=>{b===11?(u(0),p(C=>C+1)):u(C=>C+1)},Z=(C,S)=>{var F;if(L(C),I(S),e.mode==="single"&&e.value){const W=new Date(e.value);W.setHours(C,S),(F=e.onChange)==null||F.call(e,W)}},Ir=Math.floor(y/ee)*ee;return t.jsxs("div",{ref:r,className:f("vyre-calendar",l),children:[t.jsxs("div",{className:"vyre-calendar__header",children:[m==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:E,"aria-label":"Previous month",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),m==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>p(C=>C-ee),"aria-label":"Previous years",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsxs("div",{className:"vyre-calendar__header-center",children:[t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>x(m==="months"?"days":"months"),children:je[b]}),t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>x(m==="years"?"days":"years"),children:y})]}),m==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:V,"aria-label":"Next month",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M5 3l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),m==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>p(C=>C+ee),"aria-label":"Next years",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M5 3l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),m==="months"&&t.jsx("div",{className:"vyre-calendar__month-grid",children:je.map((C,S)=>t.jsx("button",{className:f("vyre-calendar__month-cell",S===b&&"vyre-calendar__month-cell--active"),onClick:()=>{u(S),x("days")},children:C.slice(0,3)},C))}),m==="years"&&t.jsx("div",{className:"vyre-calendar__year-grid",children:Array.from({length:ee},(C,S)=>Ir+S).map(C=>t.jsx("button",{className:f("vyre-calendar__year-cell",C===y&&"vyre-calendar__year-cell--active"),onClick:()=>{p(C),x("days")},children:C},C))}),m==="days"&&t.jsxs("div",{className:"vyre-calendar__grid",children:[T.map(C=>t.jsx("div",{className:"vyre-calendar__weekday",children:C},C)),Array.from({length:A.offset}).map((C,S)=>t.jsx("div",{},`empty-${S}`)),Array.from({length:A.count},(C,S)=>S+1).map(C=>{const S=new Date(y,b,C),F=M(S),W=B(S),q=R(S),U=w(S),Q=N(S),re=Y(S,h);return t.jsx("button",{className:f("vyre-calendar__day",re&&"vyre-calendar__day--today",F&&"vyre-calendar__day--selected",W&&"vyre-calendar__day--in-range",q&&"vyre-calendar__day--range-start",U&&"vyre-calendar__day--range-end",Q&&"vyre-calendar__day--disabled"),onClick:()=>D(C),onMouseEnter:()=>{if(e.mode==="range"){const[P,z]=e.value??[null,null];P&&!z&&k(S)}},onMouseLeave:()=>k(null),disabled:Q,"aria-selected":F,"aria-label":K(S),children:C},C)})]}),a&&m==="days"&&t.jsxs("div",{className:"vyre-calendar__time",children:[t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M7 4v3.5l2 1.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("input",{type:"number",className:"vyre-calendar__time-input",min:0,max:23,value:_,onChange:C=>Z(Number(C.target.value),j),"aria-label":"Hours"}),t.jsx("span",{className:"vyre-calendar__time-sep",children:":"}),t.jsx("input",{type:"number",className:"vyre-calendar__time-input",min:0,max:59,value:j,onChange:C=>Z(_,Number(C.target.value)),"aria-label":"Minutes"})]})]})});te.displayName="VyreCalendar";function xa(e){if(e.mode==="range"){const[n,o]=e.value??[null,null];return n?o?`${K(n)} – ${K(o)}`:K(n):""}if(e.mode==="multiple"){const n=e.value??[];return n.length===0?"":n.length===1?K(n[0]):`${n.length} dates selected`}const r=e.value,a=e.showTime;return r?a?`${K(r)} ${ba(r)}`:K(r):""}const Jt=s.forwardRef(({placeholder:e="Pick a date",inputClassName:r,...a},n)=>{const[o,i]=s.useState(!1),l=s.useRef(null),d=s.useRef(null),[c,h]=s.useState({top:0,left:0,width:0}),v=xa(a),y=s.useCallback(()=>{if(!l.current)return;const u=l.current.getBoundingClientRect();h({top:u.bottom+window.scrollY+6,left:u.left+window.scrollX,width:u.width})},[]);s.useEffect(()=>{if(!o)return;y();const u=()=>y(),m=()=>y();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",m),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",m)}},[o,y]),s.useEffect(()=>{if(!o)return;const u=x=>{var g,k;!((g=d.current)!=null&&g.contains(x.target))&&!((k=l.current)!=null&&k.contains(x.target))&&i(!1)},m=x=>{x.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",m),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",m)}},[o]);const p=a.mode!=="range"&&a.mode!=="multiple"&&!a.showTime,b=s.useMemo(()=>a.mode==="range"?{...a,onChange:u=>{var m;(m=a.onChange)==null||m.call(a,u),u[0]&&u[1]&&i(!1)}}:a.mode==="multiple"?a:{...a,onChange:u=>{var m;(m=a.onChange)==null||m.call(a,u),p&&i(!1)}},[a,p]);return t.jsxs("div",{ref:n,className:"vyre-datepicker",children:[t.jsxs("button",{ref:l,type:"button",className:f("vyre-datepicker__trigger",!v&&"vyre-datepicker__trigger--placeholder",r),onClick:()=>{y(),i(u=>!u)},"aria-expanded":o,"aria-haspopup":"dialog",children:[t.jsxs("svg",{className:"vyre-datepicker__icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M1.5 6h11M4.5 1v3M9.5 1v3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("span",{children:v||e}),v&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:u=>{var m,x,g;u.stopPropagation(),a.mode==="range"?(m=a.onChange)==null||m.call(a,[null,null]):a.mode==="multiple"?(x=a.onChange)==null||x.call(a,[]):(g=a.onChange)==null||g.call(a,null)},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l8 8M10 2l-8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]}),o&&G.createPortal(t.jsx("div",{ref:d,className:"vyre-datepicker__popover",role:"dialog","aria-label":"Date picker",style:{top:c.top,left:c.left,minWidth:c.width},children:t.jsx(te,{...b})}),document.body)]})});Jt.displayName="VyreDatePicker";function O(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function le(e,r){const a=new Date(e);return a.setDate(a.getDate()+r),O(a)}function de(e){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}const _a=[{label:"Today",range:()=>{const e=O(new Date);return{from:e,to:e}}},{label:"Yesterday",range:()=>{const e=le(new Date,-1);return{from:e,to:e}}},{label:"Last 7 days",range:()=>({from:le(new Date,-6),to:O(new Date)})},{label:"Last 30 days",range:()=>({from:le(new Date,-29),to:O(new Date)})},{label:"This month",range:()=>{const e=new Date;return{from:O(new Date(e.getFullYear(),e.getMonth(),1)),to:O(new Date(e.getFullYear(),e.getMonth()+1,0))}}},{label:"Last month",range:()=>{const e=new Date;return{from:O(new Date(e.getFullYear(),e.getMonth()-1,1)),to:O(new Date(e.getFullYear(),e.getMonth(),0))}}}],er=s.forwardRef(({value:e,onChange:r,placeholder:a="Pick a date range",numberOfMonths:n=2,presets:o=!1,minDate:i,maxDate:l,disabled:d,weekStartsOn:c=1,className:h,inputClassName:v},y)=>{const[p,b]=s.useState(!1),u=s.useRef(null),m=s.useRef(null),[x,g]=s.useState({top:0,left:0,width:0}),k=(e==null?void 0:e.from)??null,_=(e==null?void 0:e.to)??null,L=s.useMemo(()=>o===!0?_a:Array.isArray(o)?o:[],[o]),j=s.useMemo(()=>k?_?`${de(k)} – ${de(_)}`:de(k):"",[k,_]),I=s.useCallback(()=>{if(!u.current)return;const w=u.current.getBoundingClientRect();g({top:w.bottom+window.scrollY+6,left:w.left+window.scrollX,width:w.width})},[]);s.useEffect(()=>{if(!p)return;I();const w=()=>I(),N=()=>I();return window.addEventListener("scroll",w,!0),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",N)}},[p,I]),s.useEffect(()=>{if(!p)return;const w=D=>{var E,V;!((E=m.current)!=null&&E.contains(D.target))&&!((V=u.current)!=null&&V.contains(D.target))&&b(!1)},N=D=>{D.key==="Escape"&&b(!1)};return document.addEventListener("pointerdown",w),document.addEventListener("keydown",N),()=>{document.removeEventListener("pointerdown",w),document.removeEventListener("keydown",N)}},[p]);const A=s.useCallback(w=>{const N={from:w[0],to:w[1]};r==null||r(N),N.from&&N.to&&b(!1)},[r]),T=s.useCallback(w=>{r==null||r(w.range()),b(!1)},[r]),M=s.useCallback(()=>{r==null||r({from:null,to:null})},[r]),B=s.useMemo(()=>{const w=k??O(new Date);return new Date(w.getFullYear(),w.getMonth()+1,1)},[k]),R=[k,_];return t.jsxs("div",{ref:y,className:f("vyre-date-range-picker",h),children:[t.jsxs("button",{ref:u,type:"button",className:f("vyre-datepicker__trigger",!j&&"vyre-datepicker__trigger--placeholder",v),onClick:()=>{I(),b(w=>!w)},"aria-expanded":p,"aria-haspopup":"dialog",children:[t.jsxs("svg",{className:"vyre-datepicker__icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M1.5 6h11M4.5 1v3M9.5 1v3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("span",{children:j||a}),j&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:w=>{w.stopPropagation(),M()},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l8 8M10 2l-8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]}),p&&G.createPortal(t.jsxs("div",{ref:m,className:"vyre-date-range-picker__popover",role:"dialog","aria-label":"Date range picker",style:{top:x.top,left:x.left},children:[L.length>0&&t.jsx("div",{className:"vyre-date-range-picker__presets",children:L.map(w=>t.jsx("button",{type:"button",className:"vyre-date-range-picker__preset",onClick:()=>T(w),children:w.label},w.label))}),t.jsxs("div",{className:"vyre-date-range-picker__calendars",children:[t.jsx(te,{mode:"range",value:R,onChange:A,minDate:i,maxDate:l,disabled:d,weekStartsOn:c}),n===2&&t.jsx(te,{mode:"range",value:R,defaultMonth:B,onChange:A,minDate:i,maxDate:l,disabled:d,weekStartsOn:c},B.toISOString())]})]}),document.body)]})});er.displayName="VyreDateRangePicker";const tr=s.forwardRef(({variant:e="default",size:r="md",clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:f("vyre-item",`vyre-item--${e}`,`vyre-item--${r}`,a&&"vyre-item--clickable",n),"data-variant":e,"data-size":r,role:a?"button":void 0,tabIndex:a?0:void 0,...i,children:o}));tr.displayName="VyreItem";const rr=s.forwardRef(({separated:e=!1,className:r,children:a,...n},o)=>t.jsx("div",{ref:o,role:"list",className:f("vyre-item-group",e&&"vyre-item-group--separated",r),...n,children:a}));rr.displayName="VyreItemGroup";const ar=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-item__media",e),"aria-hidden":"true",...a,children:r}));ar.displayName="VyreItemMedia";const nr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-item__content",e),...a,children:r}));nr.displayName="VyreItemContent";const sr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-item__title",e),...a,children:r}));sr.displayName="VyreItemTitle";const or=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:f("vyre-item__description",e),...a,children:r}));or.displayName="VyreItemDescription";const ir=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:f("vyre-item__actions",e),...a,children:r}));ir.displayName="VyreItemActions";function ga(e,r,a,n){const o=e.find(l=>l.id===r.fromColumnId);if(!o)return e;const i=o.cards.find(l=>l.id===r.cardId);return i?e.map(l=>{if(l.id===r.fromColumnId&&l.id===a){const d=l.cards.filter(v=>v.id!==r.cardId),c=Math.max(0,Math.min(n,d.length)),h=[...d];return h.splice(c,0,i),{...l,cards:h}}if(l.id===r.fromColumnId)return{...l,cards:l.cards.filter(d=>d.id!==r.cardId)};if(l.id===a){const d=Math.max(0,Math.min(n,l.cards.length)),c=[...l.cards];return c.splice(d,0,i),{...l,cards:c}}return l}):e}const lr=s.forwardRef(({value:e,onChange:r,renderCard:a,onCardClick:n,className:o,...i},l)=>{const d=s.useRef(null),c=s.useRef(!1),[h,v]=s.useState(null),[y,p]=s.useState(null),[b,u]=s.useState(null),m=(_,L)=>{p(j=>j===_?j:_),u(j=>j===L?j:L)},x=(_,L)=>j=>{d.current={cardId:L,fromColumnId:_},c.current=!1,v(L),j.dataTransfer.effectAllowed="move",j.dataTransfer.setData("text/plain",L)},g=()=>{d.current=null,v(null),p(null),u(null)},k=(_,L)=>{const j=d.current;if(!j)return;const I=ga(e,j,_,L);I!==e&&(c.current=!0,r(I))};return t.jsx("div",{ref:l,className:f("vyre-kanban",o),role:"list","aria-label":"Kanban board",...i,children:e.map(_=>{const L=y===_.id,j=_.color&&_.color!=="default"?_.color:void 0,I=L&&d.current&&b!==null?b:null,A=t.jsx("div",{className:"vyre-kanban__placeholder","aria-hidden":"true"});return t.jsxs("div",{role:"listitem","data-color":j,className:f("vyre-kanban__column",L&&"vyre-kanban__column--over"),onDragOver:T=>{d.current&&(T.preventDefault(),T.dataTransfer.dropEffect="move",m(_.id,_.cards.length))},onDragLeave:T=>{T.currentTarget.contains(T.relatedTarget)||(p(M=>M===_.id?null:M),u(null))},onDrop:T=>{T.preventDefault(),k(_.id,b??_.cards.length),g()},children:[t.jsxs("div",{className:"vyre-kanban__column-header",children:[t.jsx("span",{className:"vyre-kanban__column-title",children:_.title}),t.jsx("span",{className:"vyre-kanban__column-count",children:_.cards.length})]}),t.jsxs("div",{className:"vyre-kanban__cards",children:[_.cards.map((T,M)=>{const B=T.color&&T.color!=="default"?T.color:void 0;return t.jsxs(s.Fragment,{children:[I===M&&A,t.jsx(ue,{variant:"outlined","data-color":B,className:f("vyre-kanban__card",h===T.id&&"vyre-kanban__card--dragging",n&&"vyre-kanban__card--clickable"),draggable:!0,role:n?"button":void 0,tabIndex:n?0:void 0,onDragStart:x(_.id,T.id),onDragEnd:g,onDragOver:R=>{if(!d.current)return;R.preventDefault(),R.stopPropagation();const w=R.currentTarget.getBoundingClientRect(),N=R.clientY-w.top>w.height/2;m(_.id,N?M+1:M)},onDrop:R=>{R.preventDefault(),R.stopPropagation(),k(_.id,b??M),g()},onClick:()=>{c.current||n==null||n(T,_)},onKeyDown:R=>{n&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),n(T,_))},children:t.jsx(me,{children:a?a(T,_):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"vyre-kanban__card-title",children:T.title}),T.description&&t.jsx("div",{className:"vyre-kanban__card-desc",children:T.description})]})})})]},T.id)}),I===_.cards.length&&A,_.cards.length===0&&I===null&&t.jsx("div",{className:"vyre-kanban__empty",children:"Drop cards here"})]})]},_.id)})})});lr.displayName="VyreKanban";function we(e){if(e==null)return null;const r=e instanceof Date?e:new Date(e);return Number.isNaN(r.getTime())?null:r}function ce(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function ja(e){const r=new Date,a=new Date;return a.setDate(r.getDate()-1),ce(e,r)?"Today":ce(e,a)?"Yesterday":new Intl.DateTimeFormat("default",{month:"short",day:"numeric",year:e.getFullYear()===r.getFullYear()?void 0:"numeric"}).format(e)}function wa(e){return new Intl.DateTimeFormat("default",{hour:"numeric",minute:"2-digit"}).format(e)}const Na={sending:"Sending…",sent:"Sent",delivered:"Delivered",read:"Read"};function ka(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M10 2H5a1.5 1.5 0 0 0-1.5 1.5v11A1.5 1.5 0 0 0 5 16h8a1.5 1.5 0 0 0 1.5-1.5V6.5L10 2z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),t.jsx("path",{d:"M10 2v4.5h4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})]})}function Ca({attachment:e}){const{kind:r,url:a,name:n,size:o}=e;return r==="image"?t.jsx("a",{className:"vyre-conversation__att vyre-conversation__att--image",href:a,target:"_blank",rel:"noopener noreferrer",children:t.jsx("img",{src:a,alt:n??"image attachment",loading:"lazy"})}):r==="audio"?t.jsx("audio",{className:"vyre-conversation__att vyre-conversation__att--audio",src:a,controls:!0,preload:"none"}):r==="video"?t.jsx("video",{className:"vyre-conversation__att vyre-conversation__att--video",src:a,controls:!0,preload:"none"}):t.jsxs("a",{className:"vyre-conversation__att vyre-conversation__att--file",href:a,target:"_blank",rel:"noopener noreferrer",download:n,children:[t.jsx("span",{className:"vyre-conversation__att-icon",children:t.jsx(ka,{})}),t.jsxs("span",{className:"vyre-conversation__att-info",children:[t.jsx("span",{className:"vyre-conversation__att-name",children:n??"Attachment"}),o&&t.jsx("span",{className:"vyre-conversation__att-size",children:o})]})]})}const dr=s.forwardRef(({value:e,currentUserId:r,composer:a=!1,onSend:n,placeholder:o="Write a message…",typing:i=!1,allowAttachments:l=!1,accept:d,renderMessage:c,renderComposer:h,className:v,...y},p)=>{const[b,u]=s.useState(""),[m,x]=s.useState([]),g=s.useRef(null),k=()=>{const j=b.trim();!j&&m.length===0||(n==null||n(j,m),u(""),x([]))},_=s.useMemo(()=>e.map((j,I)=>{const A=e[I-1],T=e[I+1],M=we(j.timestamp),B=A?we(A.timestamp):null,R=!!M&&(!B||!ce(M,B)),w=!A||A.authorId!==j.authorId||R,N=!T||T.authorId!==j.authorId,D=j.authorId===r;return{msg:j,date:M,showDaySeparator:R,isGroupStart:w,isGroupEnd:N,outgoing:D}}),[e,r]),L={value:b,setValue:u,files:m,setFiles:x,send:k};return t.jsxs("div",{ref:p,className:f("vyre-conversation",v),...y,children:[t.jsxs("div",{className:"vyre-conversation__thread",role:"log","aria-label":"Conversation","aria-live":"polite",children:[_.map(({msg:j,date:I,showDaySeparator:A,isGroupStart:T,isGroupEnd:M,outgoing:B})=>t.jsxs(s.Fragment,{children:[A&&I&&t.jsx("div",{className:"vyre-conversation__day",role:"separator",children:t.jsx("span",{children:ja(I)})}),t.jsxs("div",{className:f("vyre-conversation__row",B?"vyre-conversation__row--out":"vyre-conversation__row--in",M&&"vyre-conversation__row--group-end"),children:[t.jsx("div",{className:"vyre-conversation__avatar",children:!B&&M&&t.jsx(ye,{size:"sm",src:j.authorAvatar,fallback:(j.authorName??j.authorId).slice(0,1).toUpperCase(),alt:j.authorName??j.authorId})}),t.jsxs("div",{className:"vyre-conversation__stack",children:[!B&&T&&j.authorName&&t.jsx("span",{className:"vyre-conversation__author",children:j.authorName}),t.jsx("div",{className:"vyre-conversation__bubble",children:c?c(j,{outgoing:B,isGroupStart:T,isGroupEnd:M}):t.jsxs(t.Fragment,{children:[j.attachments&&j.attachments.length>0&&t.jsx("div",{className:"vyre-conversation__attachments",children:j.attachments.map((R,w)=>t.jsx(Ca,{attachment:R},w))}),j.text]})}),M&&t.jsxs("span",{className:"vyre-conversation__meta",children:[I&&wa(I),B&&j.status&&t.jsxs("span",{className:f("vyre-conversation__status",`vyre-conversation__status--${j.status}`),children:[I?" · ":"",Na[j.status]]})]})]})]})]},j.id)),i&&t.jsxs("div",{className:"vyre-conversation__row vyre-conversation__row--in",children:[t.jsx("div",{className:"vyre-conversation__avatar"}),t.jsx("div",{className:"vyre-conversation__stack",children:t.jsxs("div",{className:"vyre-conversation__bubble vyre-conversation__bubble--typing",children:[t.jsx("span",{className:"vyre-conversation__dot"}),t.jsx("span",{className:"vyre-conversation__dot"}),t.jsx("span",{className:"vyre-conversation__dot"}),typeof i=="string"&&t.jsx("span",{className:"vyre-conversation__typing-label",children:i})]})})]})]}),h?h(L):a&&t.jsxs("form",{className:"vyre-conversation__composer",onSubmit:j=>{j.preventDefault(),k()},children:[l&&m.length>0&&t.jsx("div",{className:"vyre-conversation__staged",children:m.map((j,I)=>t.jsxs("span",{className:"vyre-conversation__chip",children:[t.jsx("span",{className:"vyre-conversation__chip-name",children:j.name}),t.jsx("button",{type:"button",className:"vyre-conversation__chip-remove","aria-label":`Remove ${j.name}`,onClick:()=>x(m.filter((A,T)=>T!==I)),children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]},I))}),t.jsxs("div",{className:"vyre-conversation__composer-row",children:[l&&t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:g,type:"file",multiple:!0,accept:d,className:"vyre-conversation__file-input",onChange:j=>{const I=Array.from(j.target.files??[]);I.length&&x([...m,...I]),j.target.value=""}}),t.jsx("button",{type:"button",className:"vyre-conversation__attach","aria-label":"Attach files",onClick:()=>{var j;return(j=g.current)==null?void 0:j.click()},children:t.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M13.5 6.5l-5.6 5.6a2.5 2.5 0 0 1-3.5-3.5l6-6a3.5 3.5 0 0 1 5 5l-6 6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t.jsx("input",{className:"vyre-conversation__input",value:b,onChange:j=>u(j.target.value),placeholder:o,"aria-label":"Message"}),t.jsx("button",{type:"submit",className:"vyre-conversation__send",disabled:!b.trim()&&m.length===0,"aria-label":"Send message",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 8l12-5-4.5 12L7 9.5 2 8z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})})})]})]})]})});dr.displayName="VyreConversation";const cr=s.forwardRef(({as:e="p",size:r="md",weight:a,color:n="default",truncate:o,mono:i,className:l,children:d,...c},h)=>t.jsx(e,{ref:h,className:f("vyre-text",r!=="md"&&`vyre-text--${r}`,a&&`vyre-text--${a}`,n!=="default"&&`vyre-text--${n}`,o&&"vyre-text--truncate",i&&"vyre-text--mono",l),...c,children:d}));cr.displayName="VyreText";const ur=s.forwardRef(({as:e="h2",size:r="md",weight:a="bold",color:n="default",truncate:o,className:i,children:l,...d},c)=>t.jsx(e,{ref:c,className:f("vyre-heading",`vyre-heading--${r}`,a!=="bold"&&`vyre-heading--${a}`,n!=="default"&&`vyre-text--${n}`,o&&"vyre-text--truncate",i),...d,children:l}));ur.displayName="VyreHeading";const mr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:f("vyre-lead",e),...a,children:r}));mr.displayName="VyreLead";const vr=s.forwardRef(({block:e,className:r,children:a,...n},o)=>e?t.jsx("pre",{className:f("vyre-code-block",r),...n,children:t.jsx("code",{ref:o,children:a})}):t.jsx("code",{ref:o,className:f("vyre-code",r),...n,children:a}));vr.displayName="VyreCode";const yr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("blockquote",{ref:n,className:f("vyre-blockquote",e),...a,children:r}));yr.displayName="VyreBlockquote";const $=e=>e==null||e===!1?void 0:String(e),Ra={none:"var(--vyre-spacing-0)",xs:"var(--vyre-spacing-2)",sm:"var(--vyre-spacing-3)",md:"var(--vyre-spacing-4)",lg:"var(--vyre-spacing-6)",xl:"var(--vyre-spacing-8)","2xl":"var(--vyre-spacing-12)"},La=e=>e==="auto"||e==="content"?e:e==="0"?"0":Ra[e],fr=s.forwardRef(({as:e="div",direction:r="row",inline:a=!1,gap:n="md",rowGap:o,columnGap:i,align:l="stretch",justify:d="start",alignContent:c,alignSelf:h,wrap:v="nowrap",grow:y,shrink:p,basis:b,width:u,height:m,className:x,children:g,...k},_)=>{const L=e,{style:j,...I}=k;return t.jsx(L,{ref:_,className:f("vyre-stack",x),"data-inline":a?"":void 0,"data-w":u,"data-h":m,"data-direction":r,"data-gap":n,"data-row-gap":o,"data-column-gap":i,"data-align":l,"data-justify":d,"data-align-content":c,"data-align-self":h,"data-wrap":v===!0?"wrap":v===!1?"nowrap":v,...I,style:{...y!==void 0?{flexGrow:y}:null,...p!==void 0?{flexShrink:p}:null,...b!==void 0?{"--vyre-stack-basis":La(b)}:null,...j},children:g})});fr.displayName="VyreStack";const hr=s.forwardRef(({as:e="div",columns:r=1,rows:a,flow:n,gap:o="md",rowGap:i,columnGap:l,align:d="stretch",justify:c,width:h,height:v,className:y,children:p,...b},u)=>{const m=e,x=r==="auto-fit",{style:g,...k}=b;return t.jsx(m,{ref:u,className:f("vyre-grid",y),"data-w":h,"data-h":v,"data-columns":x?"auto-fit":void 0,"data-rows":a!==void 0?"":void 0,"data-flow":n,"data-gap":o,"data-row-gap":i,"data-column-gap":l,"data-align":d,"data-justify":c,...k,style:{...x?null:{"--vyre-grid-columns":String(r)},...a!==void 0&&a!=="auto"?{"--vyre-grid-rows":String(a)}:null,...g},children:p})});hr.displayName="VyreGrid";const pr=s.forwardRef(({as:e="div",colSpan:r,rowSpan:a,colStart:n,rowStart:o,className:i,children:l,...d},c)=>{const h=e,{style:v,...y}=d;return t.jsx(h,{ref:c,className:f("vyre-grid-item",i),"data-col-span":$(r),"data-row-span":$(a),"data-col-start":$(n),"data-row-start":$(o),...y,style:{...r!==void 0?{"--vyre-grid-item-col-span":String(r)}:null,...a!==void 0?{"--vyre-grid-item-row-span":String(a)}:null,...n!==void 0?{"--vyre-grid-item-col-start":String(n)}:null,...o!==void 0?{"--vyre-grid-item-row-start":String(o)}:null,...v},children:l})});pr.displayName="VyreGridItem";const br=s.forwardRef(({as:e="div",padding:r,paddingX:a,paddingY:n,paddingTop:o,paddingRight:i,paddingBottom:l,paddingLeft:d,margin:c,marginX:h,marginY:v,marginTop:y,marginRight:p,marginBottom:b,marginLeft:u,width:m,height:x,className:g,children:k,..._},L)=>{const j=e;return t.jsx(j,{ref:L,className:f("vyre-box",g),"data-w":$(m),"data-h":$(x),"data-p":$(r),"data-px":$(a),"data-py":$(n),"data-pt":$(o),"data-pr":$(i),"data-pb":$(l),"data-pl":$(d),"data-m":$(c),"data-mx":$(h),"data-my":$(v),"data-mt":$(y),"data-mr":$(p),"data-mb":$(b),"data-ml":$(u),..._,children:k})});br.displayName="VyreBox";const xr=s.createContext({collapsed:!1,toggleCollapsed:()=>{}}),oe=()=>s.useContext(xr),_r=s.forwardRef(({defaultCollapsed:e=!1,collapsed:r,onCollapsedChange:a,className:n,children:o},i)=>{const[l,d]=s.useState(e),c=r!==void 0?r:l,h=s.useCallback(()=>{const v=!c;d(v),a==null||a(v)},[c,a]);return t.jsx(xr.Provider,{value:{collapsed:c,toggleCollapsed:h},children:t.jsx("div",{ref:i,className:f("vyre-app-layout",n),children:o})})});_r.displayName="VyreAppLayout";const gr=s.forwardRef(({variant:e="default",className:r,children:a},n)=>{const{collapsed:o}=oe();return t.jsx("aside",{ref:n,className:f("vyre-sidebar",o&&"vyre-sidebar--collapsed",e==="floating"&&"vyre-sidebar--floating",r),"data-collapsed":o||void 0,children:a})});gr.displayName="VyreSidebar";const jr=s.forwardRef(({logo:e,title:r,className:a,children:n},o)=>t.jsxs("div",{ref:o,className:f("vyre-sidebar__header",a),children:[e&&t.jsx("span",{className:"vyre-sidebar__logo",children:e}),r&&t.jsx("span",{className:"vyre-sidebar__title",children:r}),n]}));jr.displayName="VyreSidebarHeader";const wr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:f("vyre-sidebar__content",e),children:r}));wr.displayName="VyreSidebarContent";const Nr=s.forwardRef(({label:e,className:r,children:a},n)=>t.jsxs("div",{ref:n,className:f("vyre-sidebar__section",r),children:[e&&t.jsx("div",{className:"vyre-sidebar__section-label",children:e}),a]}));Nr.displayName="VyreSidebarSection";const kr=({active:e,icon:r,badge:a,href:n,onClick:o,className:i,children:l})=>{const{collapsed:d}=oe(),c=f("vyre-sidebar__item",e&&"vyre-sidebar__item--active",i),h=t.jsxs(t.Fragment,{children:[r&&t.jsx("span",{className:"vyre-sidebar__item-icon",children:r}),t.jsx("span",{className:"vyre-sidebar__item-label",children:l}),a!==void 0&&t.jsx("span",{className:"vyre-sidebar__item-badge",children:a})]});return n?t.jsx("a",{href:n,className:c,"aria-current":e?"page":void 0,title:d?String(l):void 0,children:h}):t.jsx("button",{type:"button",className:c,onClick:o,"aria-pressed":e,title:d?String(l):void 0,children:h})};kr.displayName="VyreSidebarItem";const Cr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:f("vyre-sidebar__footer",e),children:r}));Cr.displayName="VyreSidebarFooter";const Rr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:f("vyre-app-shell",e),children:r}));Rr.displayName="VyreAppShell";const Lr=s.forwardRef(({className:e,children:r},a)=>t.jsx("header",{ref:a,className:f("vyre-app-bar",e),children:r}));Lr.displayName="VyreAppBar";const Da=t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"2",y:"4",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"}),t.jsx("rect",{x:"2",y:"7.25",width:"8",height:"1.5",rx:"0.75",fill:"currentColor"}),t.jsx("rect",{x:"2",y:"10.5",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"})]}),Dr=({className:e,icon:r,collapsedIcon:a})=>{const{collapsed:n,toggleCollapsed:o}=oe(),i=r??Da,l=a??i;return t.jsx("button",{type:"button",className:f("vyre-sidebar-trigger",e),onClick:o,"aria-label":n?"Expand sidebar":"Collapse sidebar","aria-expanded":!n,children:n?l:i})};Dr.displayName="VyreSidebarTrigger";const Sr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:f("vyre-page-content",e),children:r}));Sr.displayName="VyrePageContent";exports.Accordion=Qe;exports.AccordionContent=tt;exports.AccordionItem=Je;exports.AccordionTrigger=et;exports.Alert=jt;exports.AlertDialog=wt;exports.AppBar=Lr;exports.AppLayout=_r;exports.AppShell=Rr;exports.Avatar=ye;exports.Badge=ke;exports.Blockquote=yr;exports.Box=br;exports.Breadcrumb=Lt;exports.BreadcrumbItem=Dt;exports.BreadcrumbLink=St;exports.BreadcrumbSeparator=It;exports.Button=Ne;exports.ButtonGroup=Ut;exports.Calendar=te;exports.Card=ue;exports.CardBody=me;exports.CardFooter=Re;exports.CardHeader=Ce;exports.Checkbox=rt;exports.Code=vr;exports.Combobox=Xt;exports.Command=pe;exports.CommandDialog=qt;exports.CommandEmpty=Gt;exports.CommandGroup=Ot;exports.CommandInput=Ht;exports.CommandItem=Yt;exports.CommandList=Pt;exports.CommandSeparator=Kt;exports.Conversation=dr;exports.DataGrid=Zt;exports.DatePicker=Jt;exports.DateRangePicker=er;exports.DropdownCheckboxItem=ht;exports.DropdownItem=ft;exports.DropdownLabel=yt;exports.DropdownMenu=vt;exports.DropdownRadioGroup=pt;exports.DropdownRadioItem=bt;exports.DropdownSeparator=_t;exports.DropdownSub=xt;exports.Field=Le;exports.FieldDescription=Se;exports.FieldError=Ie;exports.FieldGroup=Me;exports.FieldLabel=De;exports.FieldSet=Te;exports.Grid=hr;exports.GridItem=pr;exports.Heading=ur;exports.Input=Ee;exports.Item=tr;exports.ItemActions=ir;exports.ItemContent=nr;exports.ItemDescription=or;exports.ItemGroup=rr;exports.ItemMedia=ar;exports.ItemTitle=sr;exports.Kanban=lr;exports.Label=ct;exports.Lead=mr;exports.Modal=Be;exports.ModalBody=$e;exports.ModalFooter=Fe;exports.ModalHeader=Ve;exports.PageContent=Sr;exports.Pagination=Mt;exports.Popover=ut;exports.Progress=lt;exports.Radio=fe;exports.RadioGroup=nt;exports.RichTextEditor=st;exports.Select=He;exports.Separator=dt;exports.Sheet=Nt;exports.SheetBody=Ct;exports.SheetFooter=Rt;exports.SheetHeader=kt;exports.Sidebar=gr;exports.SidebarContent=wr;exports.SidebarFooter=Cr;exports.SidebarHeader=jr;exports.SidebarItem=kr;exports.SidebarSection=Nr;exports.SidebarTrigger=Dr;exports.Skeleton=he;exports.Slider=it;exports.Stack=fr;exports.Switch=ot;exports.Tab=Ke;exports.TabList=Ye;exports.TabPanel=Ue;exports.TabPanels=qe;exports.Table=Tt;exports.TableBody=At;exports.TableCaption=Ft;exports.TableCell=$t;exports.TableHead=Et;exports.TableHeader=Vt;exports.TableRow=Bt;exports.Tabs=Oe;exports.Tag=be;exports.TagGroup=Qt;exports.TagsInput=zt;exports.Text=cr;exports.Textarea=Ae;exports.ToastProvider=Wr;exports.Tooltip=ze;exports.cn=f;exports.useAppLayout=oe;exports.useToast=Hr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),G=require("react-dom");function b(...e){const r=[];for(const a of e)if(a){if(typeof a=="string")r.push(a);else if(Array.isArray(a)){const n=b(...a);n&&r.push(n)}else if(typeof a=="object")for(const[n,o]of Object.entries(a))o&&r.push(n)}return r.join(" ")}const ca={primary:"vyre-btn--primary",secondary:"vyre-btn--secondary",ghost:"vyre-btn--ghost",accent:"vyre-btn--accent",teal:"vyre-btn--teal",danger:"vyre-btn--danger"},da={sm:"vyre-btn--sm",md:"vyre-btn--md",lg:"vyre-btn--lg",icon:"vyre-btn--icon"},Ve=s.forwardRef(({variant:e="secondary",size:r="md",loading:a=!1,disabled:n,leftIcon:o,rightIcon:i,className:l,children:d,as:c="button",...f},p)=>{const y=n||a;return t.jsxs(c,{ref:p,className:b("vyre-btn",ca[e],da[r],a&&"vyre-btn--loading",l),disabled:c==="button"?y:void 0,"aria-disabled":y,"data-variant":e,"data-size":r,...f,children:[a&&t.jsx("span",{className:"vyre-btn__spinner","aria-hidden":"true",children:t.jsx(ua,{})}),!a&&o&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--left","aria-hidden":"true",children:o}),d&&t.jsx("span",{className:"vyre-btn__label",children:d}),i&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--right","aria-hidden":"true",children:i})]})});Ve.displayName="VyreButton";function ua(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"vyre-spinner","aria-hidden":"true",children:t.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"10"})})}const $e=s.forwardRef(({variant:e="default",dot:r=!1,className:a,children:n,...o},i)=>t.jsxs("span",{ref:i,className:b("vyre-badge",`vyre-badge--${e}`,a),"data-variant":e,...o,children:[r&&t.jsx("span",{className:"vyre-badge__dot","aria-hidden":"true"}),n]}));$e.displayName="VyreBadge";const ve=s.forwardRef(({variant:e="default",hoverable:r=!1,clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:b("vyre-card",`vyre-card--${e}`,r&&"vyre-card--hoverable",a&&"vyre-card--clickable",n),"data-variant":e,role:a?"button":void 0,tabIndex:a?0:void 0,...i,children:o}));ve.displayName="VyreCard";const Fe=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-card__header",e),...a,children:r}));Fe.displayName="VyreCardHeader";const fe=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-card__body",e),...a,children:r}));fe.displayName="VyreCardBody";const We=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-card__footer",e),...a,children:r}));We.displayName="VyreCardFooter";const ye=s.forwardRef(({label:e,hint:r,state:a="idle",required:n=!1,htmlFor:o,className:i,children:l,...d},c)=>t.jsxs("div",{ref:c,className:b("vyre-field",a!=="idle"&&`vyre-field--${a}`,i),"data-state":a,...d,children:[e&&t.jsxs("label",{className:"vyre-field__label",htmlFor:o,children:[e,n&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}),l,r&&t.jsx("span",{className:"vyre-field__hint",role:a==="error"?"alert":void 0,children:r})]}));ye.displayName="VyreField";const Pe=s.forwardRef(({required:e=!1,className:r,children:a,...n},o)=>t.jsxs("label",{ref:o,className:b("vyre-field__label",r),...n,children:[a,e&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}));Pe.displayName="VyreFieldLabel";const He=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:b("vyre-field__description",e),...a,children:r}));He.displayName="VyreFieldDescription";const Ge=s.forwardRef(({className:e,children:r,...a},n)=>r?t.jsx("p",{ref:n,role:"alert",className:b("vyre-field__error",e),...a,children:r}):null);Ge.displayName="VyreFieldError";const Oe=s.forwardRef(({orientation:e="vertical",className:r,children:a,...n},o)=>t.jsx("div",{ref:o,className:b("vyre-field-group",`vyre-field-group--${e}`,r),...n,children:a}));Oe.displayName="VyreFieldGroup";const qe=s.forwardRef(({legend:e,className:r,children:a,...n},o)=>t.jsxs("fieldset",{ref:o,className:b("vyre-field-set",r),...n,children:[e&&t.jsx("legend",{className:"vyre-field-set__legend",children:e}),a]}));qe.displayName="VyreFieldSet";const Ke=s.forwardRef(({size:e="md",leftElement:r,rightElement:a,className:n,...o},i)=>r||a?t.jsxs("div",{className:b("vyre-input-wrapper",`vyre-input-wrapper--${e}`),children:[r&&t.jsx("span",{className:"vyre-input__element vyre-input__element--left","aria-hidden":"true",children:r}),t.jsx("input",{ref:i,className:b("vyre-input",`vyre-input--${e}`,!!r&&"vyre-input--has-left",!!a&&"vyre-input--has-right",n),...o}),a&&t.jsx("span",{className:"vyre-input__element vyre-input__element--right","aria-hidden":"true",children:a})]}):t.jsx("input",{ref:i,className:b("vyre-input",`vyre-input--${e}`,n),...o}));Ke.displayName="VyreInput";const Ye=s.forwardRef(({size:e="md",resize:r="vertical",className:a,style:n,...o},i)=>t.jsx("textarea",{ref:i,className:b("vyre-textarea",`vyre-textarea--${e}`,a),style:{resize:r,...n},...o}));Ye.displayName="VyreTextarea";const ma=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ue=s.forwardRef(({open:e,onClose:r,size:a="md",closeOnBackdrop:n=!0,closeOnEsc:o=!0,initialFocus:i,className:l,children:d,"aria-label":c,"aria-labelledby":f,...p},y)=>{const h=s.useRef(null),m=s.useRef(null),u=s.useCallback(g=>{h.current=g,typeof y=="function"?y(g):y&&(y.current=g)},[y]),v=s.useCallback(g=>{if(g.key!=="Tab")return;const j=h.current;if(!j)return;const _=Array.from(j.querySelectorAll(ma));if(!_.length)return;const L=_[0],w=_[_.length-1];g.shiftKey&&document.activeElement===L?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),L.focus())},[]),x=s.useCallback(g=>{g.key==="Escape"&&o&&r()},[o,r]);return s.useEffect(()=>{if(!e)return;document.addEventListener("keydown",x),document.addEventListener("keydown",v);const g=document.body.style.overflow;document.body.style.overflow="hidden";const j=setTimeout(()=>{var _;i!=null&&i.current?i.current.focus():(_=h.current)==null||_.focus()},0);return()=>{document.removeEventListener("keydown",x),document.removeEventListener("keydown",v),document.body.style.overflow=g,clearTimeout(j)}},[e,x,v,i]),e?G.createPortal(t.jsx("div",{ref:m,className:"vyre-modal-backdrop",onClick:g=>{n&&g.target===m.current&&r()},role:"presentation",children:t.jsx("div",{ref:u,className:b("vyre-modal",`vyre-modal--${a}`,l),role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":f,tabIndex:-1,...p,children:d})}),document.body):null});Ue.displayName="VyreModal";const ze=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-modal__header",e),...a,children:r}));ze.displayName="VyreModalHeader";const Xe=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-modal__body",e),...a,children:r}));Xe.displayName="VyreModalBody";const Ze=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-modal__footer",e),...a,children:r}));Ze.displayName="VyreModalFooter";const Qe=s.createContext(null);function va(e,r){switch(r.type){case"ADD":return[...e,r.payload];case"REMOVE":return e.filter(a=>a.id!==r.id);default:return e}}let fa=0;const ya=()=>`vyre-t-${++fa}`;function ha({children:e}){const[r,a]=s.useReducer(va,[]),n=s.useCallback(i=>{const l=ya();return a({type:"ADD",payload:{...i,id:l}}),l},[]),o=s.useCallback(i=>{a({type:"REMOVE",id:i})},[]);return t.jsxs(Qe.Provider,{value:{toast:n,dismiss:o},children:[e,typeof document<"u"&&G.createPortal(t.jsx("div",{className:"vyre-toast-viewport","aria-live":"polite","aria-atomic":"false","aria-label":"Notifications",children:r.map(i=>t.jsx(xa,{...i,onDismiss:()=>o(i.id)},i.id))}),document.body)]})}function pa(){const e=s.useContext(Qe);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function xa({title:e,description:r,variant:a="default",duration:n=4e3,onDismiss:o}){return s.useEffect(()=>{if(n===1/0)return;const i=setTimeout(o,n);return()=>clearTimeout(i)},[n,o]),t.jsxs("div",{className:b("vyre-toast",`vyre-toast--${a}`),role:"alert","data-variant":a,children:[t.jsxs("div",{className:"vyre-toast__content",children:[e&&t.jsx("p",{className:"vyre-toast__title",children:e}),r&&t.jsx("p",{className:"vyre-toast__description",children:r})]}),t.jsx("button",{className:"vyre-toast__close",onClick:o,"aria-label":"Dismiss notification",type:"button",children:t.jsx(ba,{})})]})}function ba(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const Je=s.forwardRef(({options:e,value:r,defaultValue:a,onChange:n,placeholder:o="Select an option",disabled:i=!1,size:l="md",className:d,...c},f)=>{const p=r!==void 0,[y,h]=s.useState(a??""),m=p?r:y,[u,v]=s.useState(!1),[x,g]=s.useState(-1),j=s.useRef(null),_=s.useRef(null),w=`${s.useId()}-listbox`,M=e.find(C=>C.value===m),E=e.filter(C=>!C.disabled),S=s.useCallback(()=>{v(!1),g(-1)},[]),k=s.useCallback(C=>{var N;C.disabled||(p||h(C.value),n==null||n(C.value),S(),(N=j.current)==null||N.focus())},[p,n,S]);s.useEffect(()=>{if(!u)return;const C=N=>{const D=f==null?void 0:f.current;D&&!D.contains(N.target)&&S()};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[u,f,S]),s.useEffect(()=>{var N;if(!u||x<0)return;const C=(N=_.current)==null?void 0:N.children[x];C==null||C.scrollIntoView({block:"nearest"})},[x,u]);const I=C=>{switch(C.key){case"Enter":case" ":case"ArrowDown":{if(C.preventDefault(),!u){v(!0);const N=e.findIndex(D=>D.value===m);g(N>=0?N:0)}break}case"ArrowUp":{C.preventDefault(),u||(v(!0),g(e.length-1));break}case"Escape":{S();break}}},R=C=>{var N;switch(C.key){case"ArrowDown":{C.preventDefault(),g(D=>{let B=D+1;for(;B<e.length&&e[B].disabled;)B++;return B<e.length?B:D});break}case"ArrowUp":{C.preventDefault(),g(D=>{let B=D-1;for(;B>=0&&e[B].disabled;)B--;return B>=0?B:D});break}case"Enter":case" ":{C.preventDefault(),x>=0&&k(e[x]);break}case"Escape":case"Tab":{S(),(N=j.current)==null||N.focus();break}case"Home":{C.preventDefault();const D=e.findIndex(B=>!B.disabled);D>=0&&g(D);break}case"End":{C.preventDefault();const D=[...e].reverse().findIndex(B=>!B.disabled);D>=0&&g(e.length-1-D);break}}};return t.jsxs("div",{ref:f,className:b("vyre-select",`vyre-select--${l}`,d),"data-open":u,...c,children:[t.jsxs("button",{ref:j,type:"button",className:"vyre-select__trigger","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":w,"aria-disabled":i,disabled:i,onClick:()=>{i||v(C=>{if(!C){const N=e.findIndex(D=>D.value===m);g(N>=0?N:0)}return!C})},onKeyDown:I,children:[M?t.jsx("span",{className:"vyre-select__value",children:M.label}):t.jsx("span",{className:"vyre-select__placeholder",children:o}),t.jsx(_a,{})]}),u&&t.jsxs("ul",{ref:_,id:w,role:"listbox",className:"vyre-select__dropdown","aria-label":"Options",tabIndex:-1,onKeyDown:R,children:[e.map((C,N)=>t.jsxs("li",{role:"option","aria-selected":C.value===m,"aria-disabled":C.disabled,"data-highlighted":N===x,className:"vyre-select__option",onMouseEnter:()=>!C.disabled&&g(N),onMouseDown:D=>{D.preventDefault(),k(C)},children:[C.label,C.value===m&&t.jsx(ga,{})]},C.value)),E.length===0&&t.jsx("li",{className:"vyre-select__empty",role:"presentation",children:"No options available"})]})]})});Je.displayName="VyreSelect";function _a(){return t.jsx("svg",{className:"vyre-select__chevron",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M3 5L7 9L11 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ga(){return t.jsx("svg",{className:"vyre-select__check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2.5 7L5.5 10L11.5 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const et=s.createContext(null);function tt(){const e=s.useContext(et);if(!e)throw new Error("Tab components must be used inside <Tabs>");return e}const rt=s.forwardRef(({defaultValue:e="",value:r,onChange:a,className:n,children:o,...i},l)=>{const d=r!==void 0,[c,f]=s.useState(e),p=d?r:c,y=s.useId(),h=s.useCallback(m=>{d||f(m),a==null||a(m)},[d,a]);return t.jsx(et.Provider,{value:{value:p,onChange:h,baseId:y},children:t.jsx("div",{ref:l,className:b("vyre-tabs",n),...i,children:o})})});rt.displayName="VyreTabs";const at=s.forwardRef(({className:e,children:r,"aria-label":a,...n},o)=>{const i=s.useRef(null),l=d=>{var y;const c=Array.from(((y=i.current)==null?void 0:y.querySelectorAll('[role="tab"]:not([disabled])'))??[]),f=c.findIndex(h=>h===document.activeElement);if(f<0)return;let p=f;if(d.key==="ArrowRight")p=(f+1)%c.length;else if(d.key==="ArrowLeft")p=(f-1+c.length)%c.length;else if(d.key==="Home")p=0;else if(d.key==="End")p=c.length-1;else return;d.preventDefault(),c[p].focus(),c[p].click()};return t.jsx("div",{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d)},role:"tablist",className:b("vyre-tabs__list",e),"aria-label":a,onKeyDown:l,...n,children:r})});at.displayName="VyreTabList";const nt=s.forwardRef(({value:e,disabled:r=!1,className:a,children:n,...o},i)=>{const{value:l,onChange:d,baseId:c}=tt(),f=e===l;return t.jsx("button",{ref:i,role:"tab",type:"button",id:`${c}-tab-${e}`,"aria-controls":`${c}-panel-${e}`,"aria-selected":f,disabled:r,tabIndex:f?0:-1,className:b("vyre-tabs__tab",f&&"vyre-tabs__tab--active",a),"data-selected":f,onClick:()=>!r&&d(e),...o,children:n})});nt.displayName="VyreTab";const st=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-tabs__panels",e),...a,children:r}));st.displayName="VyreTabPanels";const ot=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i,baseId:l}=tt();return e===i?t.jsx("div",{ref:o,role:"tabpanel",id:`${l}-panel-${e}`,"aria-labelledby":`${l}-tab-${e}`,tabIndex:0,className:b("vyre-tabs__panel",r),...n,children:a}):null});ot.displayName="VyreTabPanel";const ja=120,it=({content:e,placement:r="top",delay:a=300,children:n,className:o})=>{const[i,l]=s.useState("hidden"),d=s.useRef(null),c=s.useRef(null),f=s.useId(),p=s.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current=setTimeout(()=>l("visible"),a)},[a]),y=s.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),l("leaving"),c.current=setTimeout(()=>l("hidden"),ja)},[]),h=s.Children.only(n),m=s.cloneElement(h,{onMouseEnter:u=>{var v,x;p(),(x=(v=h.props).onMouseEnter)==null||x.call(v,u)},onMouseLeave:u=>{var v,x;y(),(x=(v=h.props).onMouseLeave)==null||x.call(v,u)},onFocus:u=>{var v,x;l("visible"),(x=(v=h.props).onFocus)==null||x.call(v,u)},onBlur:u=>{var v,x;y(),(x=(v=h.props).onBlur)==null||x.call(v,u)},"aria-describedby":i!=="hidden"?f:void 0});return t.jsxs("span",{className:b("vyre-tooltip-wrapper",o),children:[m,i!=="hidden"&&t.jsxs("span",{id:f,role:"tooltip",className:b("vyre-tooltip",`vyre-tooltip--${r}`,i==="leaving"&&"vyre-tooltip--leaving"),"data-placement":r,children:[e,t.jsx("span",{className:"vyre-tooltip__arrow","aria-hidden":"true"})]})]})};it.displayName="VyreTooltip";const lt=s.createContext(null);function ct(){const e=s.useContext(lt);if(!e)throw new Error("AccordionItem must be used within Accordion");return e}const dt=s.forwardRef(({type:e="single",defaultValue:r,value:a,onValueChange:n,className:o,children:i,...l},d)=>{const c=m=>m===void 0?[]:Array.isArray(m)?m:[m],[f,p]=s.useState(c(r)),y=a!==void 0?c(a):f,h=s.useCallback(m=>{let u;e==="single"?u=y.includes(m)?[]:[m]:u=y.includes(m)?y.filter(v=>v!==m):[...y,m],a===void 0&&p(u),n==null||n(e==="single"?u[0]??"":u)},[e,y,a,n]);return t.jsx(lt.Provider,{value:{type:e,value:y,toggle:h},children:t.jsx("div",{ref:d,className:["vyre-accordion",o].filter(Boolean).join(" "),...l,children:i})})});dt.displayName="Accordion";const he=s.createContext(null),ut=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i}=ct(),l=i.includes(e);return t.jsx(he.Provider,{value:{itemValue:e,isOpen:l},children:t.jsx("div",{ref:o,"data-state":l?"open":"closed",className:["vyre-accordion__item",r].filter(Boolean).join(" "),...n,children:a})})});ut.displayName="AccordionItem";const mt=s.forwardRef(({className:e,children:r,...a},n)=>{const{toggle:o}=ct(),i=s.useContext(he);if(!i)throw new Error("AccordionTrigger must be used within AccordionItem");const{itemValue:l,isOpen:d}=i;return t.jsxs("button",{ref:n,type:"button","aria-expanded":d,"data-state":d?"open":"closed",className:["vyre-accordion__trigger",e].filter(Boolean).join(" "),onClick:()=>o(l),...a,children:[t.jsx("span",{className:"vyre-accordion__trigger-text",children:r}),t.jsx("svg",{className:"vyre-accordion__chevron",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})});mt.displayName="AccordionTrigger";const vt=s.forwardRef(({className:e,children:r,...a},n)=>{const o=s.useContext(he);if(!o)throw new Error("AccordionContent must be used within AccordionItem");const{isOpen:i}=o;return t.jsx("div",{ref:n,hidden:!i,"data-state":i?"open":"closed",className:["vyre-accordion__content",e].filter(Boolean).join(" "),...a,children:t.jsx("div",{className:"vyre-accordion__content-inner",children:r})})});vt.displayName="AccordionContent";const pe=s.forwardRef(({src:e,alt:r="",fallback:a,size:n="md",status:o,className:i,...l},d)=>{var y;const[c,f]=s.useState(!1),p=e&&!c;return t.jsxs("span",{ref:d,"data-size":n,className:["vyre-avatar",i].filter(Boolean).join(" "),...l,children:[p?t.jsx("img",{src:e,alt:r,className:"vyre-avatar__img",onError:()=>f(!0)}):t.jsx("span",{className:"vyre-avatar__fallback","aria-label":r||a,children:a??((y=r==null?void 0:r.charAt(0))==null?void 0:y.toUpperCase())??"?"}),o&&t.jsx("span",{className:`vyre-avatar__status vyre-avatar__status--${o}`,"aria-label":o})]})});pe.displayName="Avatar";const ft=s.forwardRef(({checked:e,defaultChecked:r,indeterminate:a=!1,onCheckedChange:n,disabled:o,size:i="md",className:l,id:d,...c},f)=>{const p=s.useRef(null),y=f??p;return s.useEffect(()=>{y.current&&(y.current.indeterminate=a)},[a,y]),t.jsxs("span",{className:["vyre-checkbox",`vyre-checkbox--${i}`,l].filter(Boolean).join(" "),"data-disabled":o||void 0,"data-checked":e||void 0,"data-indeterminate":a||void 0,children:[t.jsx("input",{ref:y,type:"checkbox",id:d,checked:e,defaultChecked:r,disabled:o,className:"vyre-checkbox__input",onChange:h=>n==null?void 0:n(h.target.checked),...c}),t.jsx("span",{className:"vyre-checkbox__box","aria-hidden":"true",children:a?t.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:t.jsx("path",{d:"M1 1h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}):t.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:t.jsx("path",{d:"M1 4l3 3 5-6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});ft.displayName="Checkbox";const yt=s.createContext(null);let wa=0;const ht=s.forwardRef(({value:e,defaultValue:r,onChange:a,name:n,disabled:o=!1,size:i="md",orientation:l="vertical",options:d,className:c,children:f,...p},y)=>{const[h,m]=s.useState(r),u=e!==void 0,v=u?e:h,x=s.useMemo(()=>n??`vyre-radio-${++wa}`,[n]),g=s.useCallback(_=>{u||m(_),a==null||a(_)},[u,a]),j={name:x,value:v,onChange:g,groupDisabled:o,size:i};return t.jsx(yt.Provider,{value:j,children:t.jsx("div",{ref:y,role:"radiogroup","aria-orientation":l,className:b("vyre-radio-group",`vyre-radio-group--${l}`,c),"data-disabled":o||void 0,...p,children:d?d.map(_=>t.jsx(xe,{value:_.value,label:_.label,description:_.description,disabled:_.disabled},_.value)):f})})});ht.displayName="VyreRadioGroup";const xe=s.forwardRef(({value:e,label:r,description:a,disabled:n,className:o,id:i,...l},d)=>{const c=s.useContext(yt);if(!c)throw new Error("Radio must be used inside a <RadioGroup>.");const f=c.value===e,p=n||c.groupDisabled,y=i??`${c.name}-${e}`.replace(/\s+/g,"-");return t.jsxs("label",{className:b("vyre-radio",`vyre-radio--${c.size}`,p&&"vyre-radio--disabled",o),"data-checked":f||void 0,"data-disabled":p||void 0,htmlFor:y,children:[t.jsx("input",{ref:d,type:"radio",id:y,name:c.name,value:e,checked:f,disabled:p,className:"vyre-radio__input",onChange:()=>{var h;return(h=c.onChange)==null?void 0:h.call(c,e)},...l}),t.jsx("span",{className:"vyre-radio__control","aria-hidden":"true",children:t.jsx("span",{className:"vyre-radio__dot"})}),(r||a)&&t.jsxs("span",{className:"vyre-radio__content",children:[r&&t.jsx("span",{className:"vyre-radio__label",children:r}),a&&t.jsx("span",{className:"vyre-radio__description",children:a})]})]})});xe.displayName="VyreRadio";const Na=["bold","italic","underline","strike","h1","h2","h3","ul","ol","quote","code","link","clear"];function P(e,r){document.execCommand(e,!1,r)}const pt=s.forwardRef(({value:e,onChange:r,placeholder:a="Write something…",disabled:n=!1,readOnly:o=!1,toolbar:i=Na,minHeight:l="10rem",className:d,...c},f)=>{const p=s.useRef(null),y=!n&&!o;s.useEffect(()=>{const v=p.current;v&&v.innerHTML!==e&&(v.innerHTML=e)},[e]);const h=s.useCallback(()=>{p.current&&r(p.current.innerHTML)},[r]),m=s.useCallback(v=>{var x;y&&((x=p.current)==null||x.focus(),v(),h())},[y,h]),u={bold:{label:"Bold",icon:t.jsx("b",{children:"B"}),run:()=>P("bold")},italic:{label:"Italic",icon:t.jsx("i",{children:"I"}),run:()=>P("italic")},underline:{label:"Underline",icon:t.jsx("u",{children:"U"}),run:()=>P("underline")},strike:{label:"Strikethrough",icon:t.jsx("s",{children:"S"}),run:()=>P("strikeThrough")},h1:{label:"Heading 1",icon:t.jsx(t.Fragment,{children:"H1"}),run:()=>P("formatBlock","<h1>")},h2:{label:"Heading 2",icon:t.jsx(t.Fragment,{children:"H2"}),run:()=>P("formatBlock","<h2>")},h3:{label:"Heading 3",icon:t.jsx(t.Fragment,{children:"H3"}),run:()=>P("formatBlock","<h3>")},ul:{label:"Bullet list",icon:t.jsx(t.Fragment,{children:"•≡"}),run:()=>P("insertUnorderedList")},ol:{label:"Numbered list",icon:t.jsx(t.Fragment,{children:"1.≡"}),run:()=>P("insertOrderedList")},quote:{label:"Quote",icon:t.jsx(t.Fragment,{children:"“”"}),run:()=>P("formatBlock","<blockquote>")},code:{label:"Code block",icon:t.jsx(t.Fragment,{children:"</>"}),run:()=>P("formatBlock","<pre>")},link:{label:"Link",icon:t.jsx(t.Fragment,{children:"🔗"}),run:()=>{const v=window.prompt("Link URL");v&&P("createLink",v)}},clear:{label:"Clear formatting",icon:t.jsx(t.Fragment,{children:"⌫"}),run:()=>P("removeFormat")}};return t.jsxs("div",{ref:f,className:b("vyre-rte",n&&"vyre-rte--disabled",o&&"vyre-rte--readonly",d),...c,children:[!o&&t.jsx("div",{className:"vyre-rte__toolbar",role:"toolbar","aria-label":"Formatting",children:i.map(v=>{const x=u[v];return x?t.jsx("button",{type:"button",className:"vyre-rte__tool",title:x.label,"aria-label":x.label,disabled:!y,onMouseDown:g=>g.preventDefault(),onClick:()=>m(x.run),children:x.icon},v):null})}),t.jsx("div",{ref:p,className:"vyre-rte__content",contentEditable:y,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":a,"data-placeholder":a,style:{minHeight:l},onInput:h,onBlur:h})]})});pt.displayName="VyreRichTextEditor";const xt=s.forwardRef(({checked:e,defaultChecked:r=!1,onCheckedChange:a,disabled:n,size:o="md",className:i,...l},d)=>{const[c,f]=s.useState(r),p=e!==void 0?e:c,y=()=>{if(n)return;const h=!p;e===void 0&&f(h),a==null||a(h)};return t.jsx("button",{ref:d,type:"button",role:"switch","aria-checked":p,disabled:n,"data-checked":p||void 0,"data-size":o,className:["vyre-switch",i].filter(Boolean).join(" "),onClick:y,...l,children:t.jsx("span",{className:"vyre-switch__thumb"})})});xt.displayName="Switch";const bt=s.forwardRef(({value:e,defaultValue:r=0,min:a=0,max:n=100,step:o=1,onValueChange:i,disabled:l,size:d="md",className:c,style:f,...p},y)=>{const[h,m]=s.useState(r),u=e!==void 0?e:h,v=(u-a)/(n-a)*100;return t.jsxs("div",{className:["vyre-slider",`vyre-slider--${d}`,c].filter(Boolean).join(" "),"data-disabled":l||void 0,style:{"--vyre-slider-pct":`${v}%`,...f},children:[t.jsx("input",{ref:y,type:"range",min:a,max:n,step:o,value:u,disabled:l,className:"vyre-slider__input",onChange:x=>{const g=Number(x.target.value);e===void 0&&m(g),i==null||i(g)},...p}),t.jsxs("div",{className:"vyre-slider__track",children:[t.jsx("div",{className:"vyre-slider__fill",style:{width:`${v}%`}}),t.jsx("div",{className:"vyre-slider__thumb",style:{left:`${v}%`}})]})]})});bt.displayName="Slider";const _t=s.forwardRef(({value:e,max:r=100,indeterminate:a=!1,size:n="md",variant:o="default",className:i,...l},d)=>{const c=a?void 0:Math.min(100,Math.max(0,(e??0)/r*100));return t.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":a?void 0:e??0,"data-size":n,"data-variant":o,"data-indeterminate":a||void 0,className:["vyre-progress",i].filter(Boolean).join(" "),...l,children:t.jsx("div",{className:"vyre-progress__bar",style:c!==void 0?{width:`${c}%`}:void 0})})});_t.displayName="Progress";const gt=s.forwardRef(({orientation:e="horizontal",decorative:r=!0,className:a,...n},o)=>t.jsx("div",{ref:o,role:r?"none":"separator","aria-orientation":r?void 0:e,"data-orientation":e,className:["vyre-separator",a].filter(Boolean).join(" "),...n}));gt.displayName="Separator";const jt=s.forwardRef(({required:e,disabled:r,className:a,children:n,...o},i)=>t.jsxs("label",{ref:i,"data-required":e||void 0,"data-disabled":r||void 0,className:["vyre-label",a].filter(Boolean).join(" "),...o,children:[n,e&&t.jsx("span",{className:"vyre-label__required","aria-hidden":"true",children:"*"})]}));jt.displayName="Label";const be=s.forwardRef(({variant:e="rect",width:r,height:a,className:n,style:o,...i},l)=>t.jsx("div",{ref:l,"aria-hidden":"true","data-variant":e,className:["vyre-skeleton",n].filter(Boolean).join(" "),style:{width:typeof r=="number"?`${r}px`:r,height:typeof a=="number"?`${a}px`:a,...o},...i}));be.displayName="Skeleton";const ae=8,ka=120;function Ca(e){const[r,a]=e.split("-");return{side:r,align:a??"center"}}function Ra(e,r,a,n,o,i){const l=e.width,d=e.height,c=r.width,f=r.height,p=e.left+o,y=e.top+i;let h=0,m=0;switch(a){case"top":h=y-f-ae;break;case"bottom":h=y+d+ae;break;case"left":m=p-c-ae;break;case"right":m=p+l+ae;break}if(a==="top"||a==="bottom")switch(n){case"start":m=p;break;case"center":m=p+l/2-c/2;break;case"end":m=p+l-c;break}else switch(n){case"start":h=y;break;case"center":h=y+d/2-f/2;break;case"end":h=y+d-f;break}return{top:h,left:m}}const wt=({trigger:e,children:r,open:a,onOpenChange:n,placement:o="bottom",closeOnOutside:i=!0,className:l})=>{const d=a!==void 0,[c,f]=s.useState(!1),[p,y]=s.useState(!1),[h,m]=s.useState(!1),[u,v]=s.useState({top:0,left:0}),x=d?a:c,g=s.useRef(null),j=s.useRef(null),_=s.useRef(null),L=s.useId(),{side:w,align:M}=Ca(o),E=s.useCallback(R=>{d||f(R),n==null||n(R)},[d,n]),S=s.useCallback(()=>E(!x),[x,E]),k=s.useCallback(()=>{y(!0),_.current=setTimeout(()=>{y(!1),m(!1),E(!1)},ka)},[E]);s.useEffect(()=>{x?(_.current&&(clearTimeout(_.current),_.current=null),y(!1),m(!0)):h&&!p&&k()},[x]),s.useEffect(()=>{if(!h||!g.current||!j.current)return;const R=g.current.getBoundingClientRect(),C=j.current.getBoundingClientRect(),N=Ra(R,C,w,M,window.scrollX,window.scrollY);v(N)},[h,w,M]),s.useEffect(()=>{if(!h||!i)return;const R=C=>{j.current&&!j.current.contains(C.target)&&g.current&&!g.current.contains(C.target)&&k()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[h,i,k]),s.useEffect(()=>{if(!h)return;const R=C=>{C.key==="Escape"&&k()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[h,k]);const I=s.cloneElement(e,{ref:g,onClick:R=>{var C,N;S(),(N=(C=e.props).onClick)==null||N.call(C,R)},"aria-expanded":x,"aria-controls":L,"aria-haspopup":"dialog"});return t.jsxs(t.Fragment,{children:[I,h&&G.createPortal(t.jsx("div",{ref:j,id:L,role:"dialog","aria-modal":"false",className:b("vyre-popover",`vyre-popover--${w}`,p&&"vyre-popover--leaving",l),style:{top:u.top,left:u.left},children:r}),document.body)]})};wt.displayName="VyrePopover";const ne=s.createContext(null),Nt=s.createContext(null),Sa=120,kt=({trigger:e,children:r,placement:a="bottom-start",className:n})=>{const[o,i]=s.useState(!1),[l,d]=s.useState(!1),[c,f]=s.useState(!1),[p,y]=s.useState({top:0,left:0}),[h,m]=s.useState(-1),u=s.useRef(null),v=s.useRef(null),x=s.useRef(null),g=s.useId(),j=s.useCallback(()=>{var k;return Array.from(((k=v.current)==null?void 0:k.querySelectorAll("[role=menuitem]:not([aria-disabled=true]):not([disabled]),[role=menuitemcheckbox]:not([aria-disabled=true]):not([disabled]),[role=menuitemradio]:not([aria-disabled=true]):not([disabled])"))??[])},[]),_=s.useCallback(()=>{d(!0),x.current=setTimeout(()=>{var k;d(!1),f(!1),i(!1),m(-1),(k=u.current)==null||k.focus({preventScroll:!0})},Sa)},[]),L=s.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null),d(!1),i(!0),f(!0)},[]),w=s.useCallback(()=>{o?_():L()},[o,L,_]);s.useEffect(()=>{if(!c||!u.current)return;const k=u.current.getBoundingClientRect(),I=4,R=window.scrollX,C=window.scrollY;let N=0,D=0;a.startsWith("bottom")?(N=k.bottom+C+I,D=a==="bottom-start"?k.left+R:k.right+R):(N=k.top+C-I,D=a==="top-start"?k.left+R:k.right+R),y({top:N,left:D}),requestAnimationFrame(()=>{var V;(V=j()[0])==null||V.focus({preventScroll:!0}),m(0)})},[c,a,j]),s.useEffect(()=>{if(!c)return;const k=R=>{v.current&&!v.current.contains(R.target)&&u.current&&!u.current.contains(R.target)&&_()},I=R=>{var C,N,D;if(R.key==="Escape"){_();return}if(R.key==="ArrowDown"||R.key==="ArrowUp"){R.preventDefault();const B=j();if(!B.length)return;const V=R.key==="ArrowDown"?1:-1,Z=(h+V+B.length)%B.length;(C=B[Z])==null||C.focus({preventScroll:!0}),m(Z)}if(R.key==="Home"&&((N=j()[0])==null||N.focus({preventScroll:!0}),m(0)),R.key==="End"){const B=j();(D=B[B.length-1])==null||D.focus({preventScroll:!0}),m(B.length-1)}};return document.addEventListener("mousedown",k),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",I)}},[c,h,_,j]);const M=s.cloneElement(e,{ref:u,onClick:k=>{var I,R;w(),(R=(I=e.props).onClick)==null||R.call(I,k)},"aria-expanded":o,"aria-haspopup":"menu","aria-controls":g}),E=a.endsWith("-end"),S=a.startsWith("top");return t.jsxs(ne.Provider,{value:{close:_},children:[M,c&&G.createPortal(t.jsx("div",{ref:v,id:g,role:"menu","aria-orientation":"vertical",className:b("vyre-dropdown",E&&"vyre-dropdown--end",S&&"vyre-dropdown--top",l&&"vyre-dropdown--leaving",n),style:{top:p.top,left:p.left,transform:E?"translateX(-100%)":void 0},children:r}),document.body)]})};kt.displayName="VyreDropdownMenu";const Ct=({children:e,className:r})=>t.jsx("div",{className:b("vyre-dropdown__label",r),children:e});Ct.displayName="VyreDropdownLabel";const Rt=({children:e,onSelect:r,disabled:a=!1,variant:n="default",icon:o,shortcut:i,className:l})=>{const d=s.useContext(ne);return t.jsxs("button",{role:"menuitem",className:b("vyre-dropdown__item",n==="danger"&&"vyre-dropdown__item--danger",l),"aria-disabled":a||void 0,disabled:a,tabIndex:-1,onClick:()=>{a||(r==null||r(),d==null||d.close())},children:[o&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:o}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),i&&t.jsx("kbd",{className:"vyre-dropdown__item-shortcut",children:i})]})};Rt.displayName="VyreDropdownItem";const St=({children:e,checked:r,onCheckedChange:a,disabled:n=!1,shortcut:o,className:i})=>{const l=s.useContext(ne);return t.jsxs("button",{role:"menuitemcheckbox","aria-checked":r,"aria-disabled":n||void 0,disabled:n,tabIndex:-1,className:b("vyre-dropdown__item vyre-dropdown__item--checkbox",i),onClick:()=>{n||(a(!r),l==null||l.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:r&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M2 6l3 3 5-5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),o&&t.jsx("kbd",{className:"vyre-dropdown__item-shortcut",children:o})]})};St.displayName="VyreDropdownCheckboxItem";const Lt=({value:e,onValueChange:r,children:a})=>t.jsx(Nt.Provider,{value:{value:e,onValueChange:r},children:t.jsx("div",{role:"group",children:a})});Lt.displayName="VyreDropdownRadioGroup";const Dt=({children:e,value:r,disabled:a=!1,className:n})=>{const o=s.useContext(ne),i=s.useContext(Nt),l=(i==null?void 0:i.value)===r;return t.jsxs("button",{role:"menuitemradio","aria-checked":l,"aria-disabled":a||void 0,disabled:a,tabIndex:-1,className:b("vyre-dropdown__item vyre-dropdown__item--radio",n),onClick:()=>{a||(i==null||i.onValueChange(r),o==null||o.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:l&&t.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",children:t.jsx("circle",{cx:"4",cy:"4",r:"3",fill:"currentColor"})})}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e})]})};Dt.displayName="VyreDropdownRadioItem";const It=({trigger:e,children:r,icon:a,placement:n="right",disabled:o=!1,className:i})=>{const[l,d]=s.useState(!1),[c,f]=s.useState({top:0,left:0}),p=s.useRef(null),y=s.useRef(null),h=s.useCallback(()=>{if(!p.current)return;const v=p.current.getBoundingClientRect(),x=window.scrollX,g=window.scrollY,j=2;f({top:v.top+g,left:n==="right"?v.right+x+j:v.left+x-j}),d(!0)},[n]),m=s.useCallback(()=>d(!1),[]),u=v=>{var g;const x=v.relatedTarget;(g=y.current)!=null&&g.contains(x)||m()};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{ref:p,role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"aria-disabled":o||void 0,disabled:o,tabIndex:-1,className:b("vyre-dropdown__item vyre-dropdown__item--sub",i),onMouseEnter:h,onMouseLeave:u,onFocus:h,children:[a&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:a}),t.jsx("span",{className:"vyre-dropdown__item-label",children:e}),t.jsx("span",{className:"vyre-dropdown__item-chevron","aria-hidden":"true",children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:n==="right"?"M4 2l4 4-4 4":"M8 2L4 6l4 4",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l&&G.createPortal(t.jsx("div",{ref:y,role:"menu",className:b("vyre-dropdown vyre-dropdown--sub",n==="left"&&"vyre-dropdown--sub-left"),style:{position:"absolute",top:c.top,left:n==="right"?c.left:void 0,right:n==="left"?`calc(100vw - ${c.left}px)`:void 0,transform:n==="left"?"translateX(-100%)":void 0},onMouseLeave:v=>{var g;const x=v.relatedTarget;(g=p.current)!=null&&g.contains(x)||m()},children:r}),document.body)]})};It.displayName="VyreDropdownSub";const Mt=({className:e})=>t.jsx("div",{role:"separator",className:b("vyre-dropdown__separator",e)});Mt.displayName="VyreDropdownSeparator";const La=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M8 7v4M8 5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Da=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M5 8l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ia=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M8 2L14.5 13H1.5L8 2Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),t.jsx("path",{d:"M8 6v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Ma=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Tt={info:La,success:Da,warning:Ia,danger:Ma},Et=({variant:e="info",title:r,icon:a,onClose:n,children:o,className:i})=>{const l=Tt[e];return t.jsxs("div",{role:"alert",className:b("vyre-alert",`vyre-alert--${e}`,i),children:[t.jsx("span",{className:"vyre-alert__icon","aria-hidden":"true",children:a??t.jsx(l,{})}),t.jsxs("div",{className:"vyre-alert__body",children:[r&&t.jsx("p",{className:"vyre-alert__title",children:r}),o&&t.jsx("div",{className:"vyre-alert__description",children:o})]}),n&&t.jsx("button",{type:"button",className:"vyre-alert__close","aria-label":"Dismiss",onClick:n,children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M3 3l8 8M11 3l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})};Et.displayName="VyreAlert";const Ta=["button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),At=({open:e,onOpenChange:r,title:a,description:n,variant:o="danger",confirmLabel:i="Confirm",cancelLabel:l="Cancel",onConfirm:d,onCancel:c,className:f})=>{const p=s.useRef(null),y=s.useRef(null),h=s.useRef(null),m=s.useCallback(()=>{c==null||c(),r(!1)},[c,r]),u=s.useCallback(()=>{d==null||d(),r(!1)},[d,r]),v=s.useCallback(g=>{if(g.key!=="Tab")return;const j=p.current;if(!j)return;const _=Array.from(j.querySelectorAll(Ta));if(!_.length)return;const L=_[0],w=_[_.length-1];g.shiftKey&&document.activeElement===L?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),L.focus())},[]);if(s.useEffect(()=>{if(!e)return;document.addEventListener("keydown",v);const g=document.body.style.overflow;document.body.style.overflow="hidden";const j=_=>{_.key==="Escape"&&m()};return document.addEventListener("keydown",j),setTimeout(()=>{var _;return(_=h.current)==null?void 0:_.focus()},0),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keydown",j),document.body.style.overflow=g}},[e,v,m]),!e)return null;const x=Tt[o];return G.createPortal(t.jsx("div",{ref:y,className:"vyre-alert-dialog-backdrop",onClick:g=>{g.target===y.current&&m()},role:"presentation",children:t.jsxs("div",{ref:p,role:"alertdialog","aria-modal":"true","aria-labelledby":"vyre-ad-title","aria-describedby":n?"vyre-ad-desc":void 0,className:b("vyre-alert-dialog",`vyre-alert-dialog--${o}`,f),tabIndex:-1,children:[t.jsx("div",{className:"vyre-alert-dialog__icon-wrap",children:t.jsx("span",{className:b("vyre-alert-dialog__icon",`vyre-alert-dialog__icon--${o}`),children:t.jsx(x,{})})}),t.jsxs("div",{className:"vyre-alert-dialog__body",children:[t.jsx("h2",{id:"vyre-ad-title",className:"vyre-alert-dialog__title",children:a}),n&&t.jsx("p",{id:"vyre-ad-desc",className:"vyre-alert-dialog__description",children:n})]}),t.jsxs("div",{className:"vyre-alert-dialog__footer",children:[t.jsx("button",{ref:h,type:"button",className:"vyre-btn vyre-btn--ghost vyre-btn--sm",onClick:m,children:l}),t.jsx("button",{type:"button",className:b("vyre-btn vyre-btn--sm",o==="danger"&&"vyre-btn--danger",o==="warning"&&"vyre-btn--primary",o==="info"&&"vyre-btn--accent"),onClick:u,children:i})]})]})}),document.body)};At.displayName="VyreAlertDialog";const Ea=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Bt=s.forwardRef(({open:e,onClose:r,side:a="right",size:n="md",closeOnBackdrop:o=!0,closeOnEsc:i=!0,className:l,children:d,"aria-label":c,"aria-labelledby":f,...p},y)=>{const h=s.useRef(null),m=s.useRef(null),u=s.useCallback(v=>{if(v.key!=="Tab")return;const x=h.current;if(!x)return;const g=Array.from(x.querySelectorAll(Ea));if(!g.length)return;const j=g[0],_=g[g.length-1];v.shiftKey&&document.activeElement===j?(v.preventDefault(),_.focus()):!v.shiftKey&&document.activeElement===_&&(v.preventDefault(),j.focus())},[]);return s.useEffect(()=>{if(!e)return;if(document.addEventListener("keydown",u),i){const x=j=>{j.key==="Escape"&&r()};document.addEventListener("keydown",x);const g=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var j;return(j=h.current)==null?void 0:j.focus()},0),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keydown",x),document.body.style.overflow=g}}const v=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var x;return(x=h.current)==null?void 0:x.focus()},0),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=v}},[e,u,i,r]),e?G.createPortal(t.jsx("div",{ref:m,className:"vyre-sheet-backdrop",onClick:v=>{o&&v.target===m.current&&r()},role:"presentation",children:t.jsx("div",{ref:v=>{h.current=v,typeof y=="function"?y(v):y&&(y.current=v)},role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":f,tabIndex:-1,className:b("vyre-sheet",`vyre-sheet--${a}`,`vyre-sheet--${n}`,l),...p,children:d})}),document.body):null});Bt.displayName="VyreSheet";const Vt=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-sheet__header",e),...a,children:r}));Vt.displayName="VyreSheetHeader";const $t=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-sheet__body",e),...a,children:r}));$t.displayName="VyreSheetBody";const Ft=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-sheet__footer",e),...a,children:r}));Ft.displayName="VyreSheetFooter";const Wt=({children:e,separator:r="/",className:a})=>{const n=s.Children.toArray(e).filter(Boolean);return t.jsx("nav",{"aria-label":"Breadcrumb",className:b("vyre-breadcrumb",a),children:t.jsx("ol",{className:"vyre-breadcrumb__list",children:n.map((o,i)=>t.jsxs("li",{className:"vyre-breadcrumb__item",children:[o,i<n.length-1&&t.jsx("span",{className:"vyre-breadcrumb__separator","aria-hidden":"true",children:r})]},i))})})};Wt.displayName="VyreBreadcrumb";const Pt=({children:e,href:r,current:a=!1,className:n})=>a||!r?t.jsx("span",{className:b("vyre-breadcrumb__link vyre-breadcrumb__link--current",n),"aria-current":a?"page":void 0,children:e}):t.jsx("a",{href:r,className:b("vyre-breadcrumb__link",n),children:e});Pt.displayName="VyreBreadcrumbItem";const Ht=({children:e,href:r,className:a})=>t.jsx("a",{href:r,className:b("vyre-breadcrumb__link",a),children:e});Ht.displayName="VyreBreadcrumbLink";const Gt=({children:e="/",className:r})=>t.jsx("span",{className:b("vyre-breadcrumb__separator",r),"aria-hidden":"true",children:e});Gt.displayName="VyreBreadcrumbSeparator";function Le(e,r){return Array.from({length:r-e+1},(a,n)=>e+n)}function Aa(e,r,a){const n=a*2+5;if(r<=n)return Le(1,r);const o=Math.max(e-a,2),i=Math.min(e+a,r-1),l=o>2,d=i<r-1,c=[1];return l&&c.push("..."),c.push(...Le(o,i)),d&&c.push("..."),c.push(r),c}const Ba=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M9 2L4 7l5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Va=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M5 2l5 5-5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),$a=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M7 2L2 7l5 5M12 2L7 7l5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Fa=()=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l5 5-5 5M7 2l5 5-5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ot=({page:e,totalPages:r,onPageChange:a,siblings:n=1,showEdges:o=!0,showInfo:i=!1,totalItems:l,pageSize:d,className:c})=>{const f=Aa(e,r,n),p=e>1,y=e<r,h=s.useMemo(()=>{if(!i)return null;if(l!=null&&d!=null){const u=(e-1)*d+1,v=Math.min(e*d,l);return`Showing ${u}–${v} of ${l}`}return`Page ${e} of ${r}`},[i,e,r,l,d]),m=t.jsxs(t.Fragment,{children:[o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(1),disabled:!p,"aria-label":"First page",children:t.jsx($a,{})}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(e-1),disabled:!p,"aria-label":"Previous page",children:t.jsx(Ba,{})}),t.jsx("ol",{className:"vyre-pagination__list",children:f.map((u,v)=>u==="..."?t.jsx("li",{children:t.jsx("span",{className:"vyre-pagination__dots","aria-hidden":"true",children:"···"})},`dots-${v}`):t.jsx("li",{children:t.jsx("button",{className:b("vyre-pagination__btn",u===e&&"vyre-pagination__btn--active"),onClick:()=>a(u),"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,children:u})},u))}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(e+1),disabled:!y,"aria-label":"Next page",children:t.jsx(Va,{})}),o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(r),disabled:!y,"aria-label":"Last page",children:t.jsx(Fa,{})})]});return i?t.jsxs("div",{className:b("vyre-pagination-row",c),children:[t.jsx("span",{className:"vyre-pagination__info",children:h}),t.jsx("nav",{"aria-label":"Pagination",className:"vyre-pagination",children:m})]}):t.jsx("nav",{"aria-label":"Pagination",className:b("vyre-pagination",c),children:m})};Ot.displayName="VyrePagination";const qt=({children:e,striped:r=!1,bordered:a=!1,compact:n=!1,hoverable:o=!0,className:i})=>t.jsx("div",{className:"vyre-table-wrapper",children:t.jsx("table",{className:b("vyre-table",r&&"vyre-table--striped",a&&"vyre-table--bordered",n&&"vyre-table--compact",o&&"vyre-table--hoverable",i),children:e})});qt.displayName="VyreTable";const Kt=s.forwardRef(({className:e,...r},a)=>t.jsx("thead",{ref:a,className:b("vyre-table__head",e),...r}));Kt.displayName="VyreTableHead";const Yt=s.forwardRef(({className:e,...r},a)=>t.jsx("tbody",{ref:a,className:b("vyre-table__body",e),...r}));Yt.displayName="VyreTableBody";const Ut=s.forwardRef(({className:e,selected:r,...a},n)=>t.jsx("tr",{ref:n,className:b("vyre-table__row",r&&"vyre-table__row--selected",e),"aria-selected":r,...a}));Ut.displayName="VyreTableRow";const Wa=({dir:e})=>t.jsx("span",{className:"vyre-table__sort-icon","aria-hidden":"true",children:t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[t.jsx("path",{d:"M6 2v8M3 5l3-3 3 3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:e==="desc"?.3:1}),t.jsx("path",{d:"M3 7l3 3 3-3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:e==="asc"?.3:1})]})}),zt=s.forwardRef(({className:e,sortable:r,sortDir:a=null,onSort:n,align:o="left",children:i,...l},d)=>r?t.jsx("th",{ref:d,className:b("vyre-table__th vyre-table__th--sortable",`vyre-table__th--${o}`,a&&`vyre-table__th--sort-${a}`,e),"aria-sort":a==="asc"?"ascending":a==="desc"?"descending":"none",...l,children:t.jsxs("button",{className:"vyre-table__sort-btn",onClick:n,type:"button",children:[i,t.jsx(Wa,{dir:a})]})}):t.jsx("th",{ref:d,className:b("vyre-table__th",`vyre-table__th--${o}`,e),...l,children:i}));zt.displayName="VyreTableHeader";const Xt=s.forwardRef(({className:e,align:r="left",...a},n)=>t.jsx("td",{ref:n,className:b("vyre-table__td",`vyre-table__td--${r}`,e),...a}));Xt.displayName="VyreTableCell";const Zt=s.forwardRef(({className:e,...r},a)=>t.jsx("caption",{ref:a,className:b("vyre-table__caption",e),...r}));Zt.displayName="VyreTableCaption";const Qt=s.createContext(null),se=()=>{const e=s.useContext(Qt);if(!e)throw new Error("Command components must be used inside <Command>");return e};function ie(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function Pa(e,r,a=[]){if(!e)return!0;const n=ie(e);return ie(r).includes(n)||a.some(o=>ie(o).includes(n))}let Ha=0;function Ga(){return`cmd-${++Ha}`}const _e=s.forwardRef(({value:e,onValueChange:r,className:a,children:n},o)=>{const[i,l]=s.useState(""),[d,c]=s.useState(0),[f,p]=s.useState(0),y=e!==void 0?e:i,h=s.useCallback(_=>{l(_),r==null||r(_),c(0)},[r]),m=s.useRef(new Map),u=s.useRef(new Map),v=s.useCallback((_,L,w)=>{m.current.set(_,{el:L,disabled:w})},[]),x=s.useCallback(_=>{m.current.delete(_),u.current.delete(_)},[]),g=s.useCallback(_=>{var L;(L=u.current.get(_))==null||L()},[]),j=s.useMemo(()=>({search:y,setSearch:h,activeIndex:d,setActiveIndex:c,items:m,registerItem:v,unregisterItem:x,selectItem:g,onSelectRef:u,visibleCount:f,setVisibleCount:p}),[y,h,d,v,x,g,f]);return t.jsx(Qt.Provider,{value:j,children:t.jsx("div",{ref:o,className:b("vyre-command",a),role:"combobox","aria-expanded":"true","aria-haspopup":"listbox",children:n})})});_e.displayName="VyreCommand";const Jt=s.forwardRef(({placeholder:e="Search...",className:r},a)=>{const{search:n,setSearch:o}=se();return t.jsxs("div",{className:"vyre-command__input-wrapper",children:[t.jsx("svg",{className:"vyre-command__search-icon",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M10 6.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM9.5 10.207l3.146 3.147",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),t.jsx("input",{ref:a,className:b("vyre-command__input",r),type:"text",placeholder:e,value:n,onChange:i=>o(i.target.value),autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list","aria-controls":"vyre-command-list"}),n&&t.jsx("button",{className:"vyre-command__clear",type:"button","aria-label":"Clear search",onClick:()=>o(""),children:t.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l9 9M11 2l-9 9",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]})});Jt.displayName="VyreCommandInput";const er=s.forwardRef(({className:e,children:r},a)=>{const{activeIndex:n,setActiveIndex:o,items:i,selectItem:l}=se(),d=s.useCallback(c=>{var p,y;const f=Array.from((i.current??new Map).entries()).filter(([,h])=>!h.disabled&&h.el.closest("[data-cmd-item]")!==null&&!h.el.hasAttribute("data-cmd-hidden"));if(c.key==="ArrowDown")c.preventDefault(),o(Math.min(n+1,f.length-1)),(p=f[Math.min(n+1,f.length-1)])==null||p[1].el.scrollIntoView({block:"nearest"});else if(c.key==="ArrowUp")c.preventDefault(),o(Math.max(n-1,0)),(y=f[Math.max(n-1,0)])==null||y[1].el.scrollIntoView({block:"nearest"});else if(c.key==="Enter"){c.preventDefault();const[h]=f[n]??[];h&&l(h)}},[n,o,i,l]);return t.jsx("div",{ref:a,id:"vyre-command-list",role:"listbox",className:b("vyre-command__list",e),onKeyDown:d,children:r})});er.displayName="VyreCommandList";const tr=({className:e,children:r})=>{const{search:a,visibleCount:n}=se();return!a||n>0?null:t.jsx("div",{className:b("vyre-command__empty",e),role:"presentation",children:r??"No results found."})};tr.displayName="VyreCommandEmpty";const rr=({heading:e,className:r,children:a})=>t.jsxs("div",{className:b("vyre-command__group",r),role:"presentation",children:[e&&t.jsx("div",{className:"vyre-command__group-heading","aria-hidden":"true",children:e}),t.jsx("div",{role:"group","aria-label":e,children:a})]});rr.displayName="VyreCommandGroup";const ar=({onSelect:e,disabled:r=!1,keywords:a,className:n,children:o,icon:i,shortcut:l})=>{const{search:d,setActiveIndex:c,registerItem:f,unregisterItem:p,onSelectRef:y,setVisibleCount:h}=se(),m=s.useMemo(()=>Ga(),[]),u=s.useRef(null),x=Pa(d,typeof o=="string"?o:"",a);return s.useEffect(()=>(h(g=>g+(x?1:0)),()=>{h(g=>g-(x?1:0))}),[x,h]),s.useEffect(()=>{const g=u.current;if(!(!g||!x))return f(m,g,r),()=>p(m)},[m,r,x,f,p]),s.useEffect(()=>{var g;return e&&((g=y.current)==null||g.set(m,e)),()=>{var j;(j=y.current)==null||j.delete(m)}},[m,e,y]),x?t.jsxs("div",{ref:u,"data-cmd-item":!0,role:"option","aria-disabled":r||void 0,className:b("vyre-command__item",r&&"vyre-command__item--disabled",n),onClick:()=>{r||e==null||e()},onMouseEnter:()=>{!r&&u.current&&c(-1)},children:[i&&t.jsx("span",{className:"vyre-command__item-icon","aria-hidden":"true",children:i}),t.jsx("span",{className:"vyre-command__item-label",children:o}),l&&t.jsx("kbd",{className:"vyre-command__item-shortcut",children:l})]}):null};ar.displayName="VyreCommandItem";const nr=({className:e})=>t.jsx("div",{className:b("vyre-command__separator",e),role:"separator","aria-hidden":"true"});nr.displayName="VyreCommandSeparator";const sr=({open:e,onOpenChange:r,value:a,onValueChange:n,className:o,children:i})=>{const l=s.useRef(null);return s.useEffect(()=>{var f;if(!e)return;const d=document.activeElement,c=(f=l.current)==null?void 0:f.querySelector(".vyre-command__input");return c==null||c.focus(),()=>{d==null||d.focus({preventScroll:!0})}},[e]),s.useEffect(()=>{if(!e)return;const d=c=>{c.key==="Escape"&&r(!1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,r]),e?G.createPortal(t.jsx("div",{className:"vyre-command-backdrop",ref:l,onClick:d=>{d.target===d.currentTarget&&r(!1)},role:"dialog","aria-modal":"true","aria-label":"Command palette",children:t.jsx(_e,{value:a,onValueChange:n,className:b("vyre-command--dialog",o),children:i})}),document.body):null};sr.displayName="VyreCommandDialog";const or=s.forwardRef(({orientation:e="horizontal",attached:r=!1,size:a,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,role:"group",className:b("vyre-btn-group",e==="vertical"&&"vyre-btn-group--vertical",r&&"vyre-btn-group--attached",n),"data-orientation":e,"data-size":a,...i,children:o}));or.displayName="VyreButtonGroup";const ge=s.forwardRef(({variant:e="default",size:r="md",onRemove:a,onClick:n,disabled:o=!1,className:i,children:l,...d},c)=>{const f=!!n&&!o;return t.jsxs("span",{ref:c,className:b("vyre-tag",`vyre-tag--${e}`,`vyre-tag--${r}`,f&&"vyre-tag--clickable",o&&"vyre-tag--disabled",i),"data-variant":e,"data-size":r,role:f?"button":void 0,tabIndex:f?0:void 0,"aria-disabled":o||void 0,onClick:f?n:void 0,onKeyDown:f?p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),n==null||n())}:void 0,...d,children:[t.jsx("span",{className:"vyre-tag__label",children:l}),a&&t.jsx("button",{type:"button",className:"vyre-tag__remove","aria-label":"Remove",disabled:o,onClick:p=>{p.stopPropagation(),a()},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})});ge.displayName="VyreTag";const ir=s.forwardRef(({value:e,onChange:r,placeholder:a="Add tag…",disabled:n=!1,max:o,size:i="md",className:l,style:d,"data-testid":c},f)=>{const[p,y]=s.useState(""),h=s.useRef(null),m=o!==void 0&&e.length>=o,u=n||m;function v(_){const L=_.trim();if(!L||e.includes(L)||m){y("");return}r([...e,L]),y("")}function x(_){n||r(e.filter((L,w)=>w!==_))}function g(_){if(_.key==="Enter"||_.key===","){_.preventDefault(),v(p);return}_.key==="Backspace"&&p===""&&e.length>0&&x(e.length-1)}function j(_){const L=_.target.value;if(L.includes(",")){const w=L.split(",");w.slice(0,-1).forEach(E=>v(E)),y(w[w.length-1])}else y(L)}return t.jsxs("div",{ref:f,className:b("vyre-tags-input",`vyre-tags-input--${i}`,n&&"vyre-tags-input--disabled",l),"data-testid":c,style:d,onClick:()=>{var _;return(_=h.current)==null?void 0:_.focus()},children:[e.map((_,L)=>t.jsx(ge,{size:i,disabled:n,onRemove:n?void 0:()=>x(L),children:_},`${_}-${L}`)),t.jsx("input",{ref:h,type:"text",className:"vyre-tags-input__field",value:p,onChange:j,onKeyDown:g,placeholder:m?"":a,disabled:u,"aria-label":"Add tag"})]})});ir.displayName="VyreTagsInput";const lr=s.forwardRef(({options:e,value:r,onChange:a,placeholder:n="Search…",disabled:o=!1,size:i="md",emptyText:l="No results",className:d,...c},f)=>{const[p,y]=s.useState(!1),[h,m]=s.useState(""),[u,v]=s.useState(-1),x=s.useRef(null),g=s.useRef(null),j=s.useRef(null),L=`${s.useId()}-listbox`,w=e.find(N=>N.value===r)??null,M=e.filter(N=>N.label.toLowerCase().includes(h.toLowerCase())),E=s.useCallback(()=>{y(!1),v(-1),m("")},[]),S=s.useCallback(N=>{var D;N.disabled||(a(N.value),E(),(D=x.current)==null||D.blur())},[a,E]);s.useEffect(()=>{if(!p)return;const N=D=>{const B=j.current;B&&!B.contains(D.target)&&E()};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[p,E]),s.useEffect(()=>{var D;if(!p||u<0)return;const N=(D=g.current)==null?void 0:D.children[u];N==null||N.scrollIntoView({block:"nearest"})},[u,p]),s.useEffect(()=>{v(M.length>0?0:-1)},[h]);function k(){o||(y(!0),m(""))}function I(N){m(N.target.value),p||y(!0)}function R(N){var D;switch(N.key){case"ArrowDown":{if(N.preventDefault(),!p){y(!0);return}v(B=>{let V=B+1;for(;V<M.length&&M[V].disabled;)V++;return V<M.length?V:B});break}case"ArrowUp":{if(N.preventDefault(),!p){y(!0);return}v(B=>{let V=B-1;for(;V>=0&&M[V].disabled;)V--;return V>=0?V:B});break}case"Enter":{N.preventDefault(),p&&u>=0&&M[u]&&S(M[u]);break}case"Escape":{E(),(D=x.current)==null||D.blur();break}}}const C=p?h:(w==null?void 0:w.label)??"";return t.jsxs("div",{ref:N=>{j.current=N,typeof f=="function"?f(N):f&&(f.current=N)},className:b("vyre-combobox",`vyre-combobox--${i}`,o&&"vyre-combobox--disabled",d),"data-open":p,...c,children:[t.jsx("input",{ref:x,type:"text",role:"combobox","aria-expanded":p,"aria-haspopup":"listbox","aria-controls":L,"aria-autocomplete":"list","aria-disabled":o,disabled:o,className:"vyre-combobox__input",placeholder:n,value:C,onFocus:k,onChange:I,onKeyDown:R}),t.jsx("span",{className:"vyre-combobox__chevron","aria-hidden":"true",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M3 5L7 9L11 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),p&&t.jsx("ul",{ref:g,id:L,role:"listbox",className:"vyre-combobox__dropdown","aria-label":"Options",children:M.length>0?M.map((N,D)=>t.jsx("li",{role:"option","aria-selected":N.value===r,"aria-disabled":N.disabled,"data-highlighted":D===u,className:b("vyre-combobox__option",D===u&&"vyre-combobox__option--highlighted",N.value===r&&"vyre-combobox__option--selected"),onMouseEnter:()=>!N.disabled&&v(D),onMouseDown:B=>{B.preventDefault(),S(N)},children:N.label},N.value)):t.jsx("li",{className:"vyre-combobox__empty",role:"presentation",children:l})})]})});lr.displayName="VyreCombobox";function Oa({col:e,sortKey:r,sortDir:a}){const o=r===e.key?a:void 0;return t.jsx("span",{className:"vyre-data-grid__sort-icon","aria-hidden":"true",children:t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[t.jsx("path",{d:"M6 2v4M3.5 4.5L6 2l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:o==="desc"?.3:1}),t.jsx("path",{d:"M6 10V6M3.5 7.5L6 10l2.5-2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",opacity:o==="asc"?.3:1})]})})}const qa=5,cr=s.forwardRef(({columns:e,rows:r,sortKey:a,sortDir:n,onSort:o,loading:i=!1,emptyText:l="No data",stickyHeader:d=!1,className:c,style:f,"data-testid":p},y)=>{function h(u){if(!u.sortable||!o)return;const v=a===u.key&&n==="asc"?"desc":"asc";o(u.key,v)}function m(u){return a!==u.key?"none":n==="asc"?"ascending":"descending"}return t.jsx("div",{ref:y,className:b("vyre-data-grid",d&&"vyre-data-grid--sticky-header",c),style:f,"data-testid":p,children:t.jsxs("table",{className:"vyre-data-grid__table",children:[t.jsx("thead",{className:"vyre-data-grid__thead",children:t.jsx("tr",{children:e.map(u=>t.jsx("th",{className:b("vyre-data-grid__th",u.sortable&&"vyre-data-grid__th--sortable",a===u.key&&`vyre-data-grid__th--sort-${n}`),style:u.width?{width:u.width}:void 0,"aria-sort":u.sortable?m(u):void 0,children:u.sortable?t.jsxs("button",{type:"button",className:"vyre-data-grid__sort-btn",onClick:()=>h(u),children:[u.label,t.jsx(Oa,{col:u,sortKey:a,sortDir:n})]}):u.label},u.key))})}),t.jsx("tbody",{className:"vyre-data-grid__tbody",children:i?Array.from({length:qa}).map((u,v)=>t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--skeleton",children:e.map(x=>t.jsx("td",{className:"vyre-data-grid__td",children:t.jsx(be,{height:16})},x.key))},`skel-${v}`)):r.length===0?t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--empty",children:t.jsx("td",{className:"vyre-data-grid__td vyre-data-grid__empty",colSpan:e.length,children:l})}):r.map((u,v)=>t.jsx("tr",{className:"vyre-data-grid__row",children:e.map(x=>t.jsx("td",{className:"vyre-data-grid__td",children:u[x.key]!=null?String(u[x.key]):""},x.key))},v))})]})})});cr.displayName="VyreDataGrid";const dr=s.forwardRef(({gap:e="md",wrap:r=!0,className:a,children:n,...o},i)=>t.jsx("div",{ref:i,className:b("vyre-tag-group",`vyre-tag-group--gap-${e}`,!r&&"vyre-tag-group--nowrap",a),role:"list",...o,children:n}));dr.displayName="VyreTagGroup";function X(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function q(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function J(e,r){return X(e)<X(r)}function De(e,r){return X(e)>X(r)}function Ka(e,r){return new Date(e,r+1,0).getDate()}function Ya(e,r,a){return(new Date(e,r,1).getDay()-a+7)%7}function K(e,r){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}function Ua(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}const Ie=Array.from({length:12},(e,r)=>new Intl.DateTimeFormat("default",{month:"long"}).format(new Date(2e3,r,1))),ee=12,te=s.forwardRef((e,r)=>{const{showTime:a=!1,minDate:n,maxDate:o,disabled:i,className:l,weekStartsOn:d=1,defaultMonth:c}=e,f=X(new Date),p=()=>{var T,A;return e.mode==="range"?((T=e.value)==null?void 0:T[0])??c??f:e.mode==="multiple"?((A=e.value)==null?void 0:A[0])??c??f:e.value??c??f},[y,h]=s.useState(()=>(p()??f).getFullYear()),[m,u]=s.useState(()=>(p()??f).getMonth()),[v,x]=s.useState("days"),[g,j]=s.useState(null),[_,L]=s.useState(()=>{const T=e.mode==="single"?e.value:null;return T?T.getHours():0}),[w,M]=s.useState(()=>{const T=e.mode==="single"?e.value:null;return T?T.getMinutes():0}),E=s.useMemo(()=>{const T=Ka(y,m),A=Ya(y,m,d);return{count:T,offset:A}},[y,m,d]),S=s.useMemo(()=>d===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],[d]),k=s.useCallback(T=>{if(e.mode==="single")return!!e.value&&q(T,e.value);if(e.mode==="range"){const[A,F]=e.value??[null,null];return!!A&&q(T,A)||!!F&&q(T,F)}return e.mode==="multiple"?(e.value??[]).some(A=>q(T,A)):!1},[e]),I=s.useCallback(T=>{if(e.mode!=="range")return!1;const[A,F]=e.value??[null,null],W=F??g;if(!A||!W)return!1;const Y=J(A,W)?A:W,U=J(A,W)?W:A;return De(T,Y)&&J(T,U)},[e,g]),R=s.useCallback(T=>{if(e.mode!=="range")return!1;const[A]=e.value??[null,null];return!!A&&q(T,A)},[e]),C=s.useCallback(T=>{if(e.mode!=="range")return!1;const[,A]=e.value??[null,null];return!!A&&q(T,A)},[e]),N=s.useCallback(T=>!!(n&&J(T,n)||o&&De(T,o)||i!=null&&i(T)),[n,o,i]),D=s.useCallback(T=>{var F,W,Y,U,Q,re;const A=new Date(y,m,T,_,w);if(!N(X(A))){if(e.mode==="single"||!e.mode)(F=e.onChange)==null||F.call(e,A);else if(e.mode==="range"){const[H,z]=e.value??[null,null];!H||H&&z?(W=e.onChange)==null||W.call(e,[A,null]):J(A,H)?(Y=e.onChange)==null||Y.call(e,[A,H]):(U=e.onChange)==null||U.call(e,[H,A])}else if(e.mode==="multiple"){const H=e.value??[],z=H.findIndex(Se=>q(Se,A));z>=0?(Q=e.onChange)==null||Q.call(e,H.filter((Se,la)=>la!==z)):(re=e.onChange)==null||re.call(e,[...H,A])}}},[y,m,_,w,e,N]),B=()=>{m===0?(u(11),h(T=>T-1)):u(T=>T-1)},V=()=>{m===11?(u(0),h(T=>T+1)):u(T=>T+1)},Z=(T,A)=>{var F;if(L(T),M(A),e.mode==="single"&&e.value){const W=new Date(e.value);W.setHours(T,A),(F=e.onChange)==null||F.call(e,W)}},ia=Math.floor(y/ee)*ee;return t.jsxs("div",{ref:r,className:b("vyre-calendar",l),children:[t.jsxs("div",{className:"vyre-calendar__header",children:[v==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:B,"aria-label":"Previous month",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>h(T=>T-ee),"aria-label":"Previous years",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsxs("div",{className:"vyre-calendar__header-center",children:[t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>x(v==="months"?"days":"months"),children:Ie[m]}),t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>x(v==="years"?"days":"years"),children:y})]}),v==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:V,"aria-label":"Next month",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M5 3l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>h(T=>T+ee),"aria-label":"Next years",children:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M5 3l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),v==="months"&&t.jsx("div",{className:"vyre-calendar__month-grid",children:Ie.map((T,A)=>t.jsx("button",{className:b("vyre-calendar__month-cell",A===m&&"vyre-calendar__month-cell--active"),onClick:()=>{u(A),x("days")},children:T.slice(0,3)},T))}),v==="years"&&t.jsx("div",{className:"vyre-calendar__year-grid",children:Array.from({length:ee},(T,A)=>ia+A).map(T=>t.jsx("button",{className:b("vyre-calendar__year-cell",T===y&&"vyre-calendar__year-cell--active"),onClick:()=>{h(T),x("days")},children:T},T))}),v==="days"&&t.jsxs("div",{className:"vyre-calendar__grid",children:[S.map(T=>t.jsx("div",{className:"vyre-calendar__weekday",children:T},T)),Array.from({length:E.offset}).map((T,A)=>t.jsx("div",{},`empty-${A}`)),Array.from({length:E.count},(T,A)=>A+1).map(T=>{const A=new Date(y,m,T),F=k(A),W=I(A),Y=R(A),U=C(A),Q=N(A),re=q(A,f);return t.jsx("button",{className:b("vyre-calendar__day",re&&"vyre-calendar__day--today",F&&"vyre-calendar__day--selected",W&&"vyre-calendar__day--in-range",Y&&"vyre-calendar__day--range-start",U&&"vyre-calendar__day--range-end",Q&&"vyre-calendar__day--disabled"),onClick:()=>D(T),onMouseEnter:()=>{if(e.mode==="range"){const[H,z]=e.value??[null,null];H&&!z&&j(A)}},onMouseLeave:()=>j(null),disabled:Q,"aria-selected":F,"aria-label":K(A),children:T},T)})]}),a&&v==="days"&&t.jsxs("div",{className:"vyre-calendar__time",children:[t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M7 4v3.5l2 1.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("input",{type:"number",className:"vyre-calendar__time-input",min:0,max:23,value:_,onChange:T=>Z(Number(T.target.value),w),"aria-label":"Hours"}),t.jsx("span",{className:"vyre-calendar__time-sep",children:":"}),t.jsx("input",{type:"number",className:"vyre-calendar__time-input",min:0,max:59,value:w,onChange:T=>Z(_,Number(T.target.value)),"aria-label":"Minutes"})]})]})});te.displayName="VyreCalendar";function za(e){if(e.mode==="range"){const[n,o]=e.value??[null,null];return n?o?`${K(n)} – ${K(o)}`:K(n):""}if(e.mode==="multiple"){const n=e.value??[];return n.length===0?"":n.length===1?K(n[0]):`${n.length} dates selected`}const r=e.value,a=e.showTime;return r?a?`${K(r)} ${Ua(r)}`:K(r):""}const ur=s.forwardRef(({placeholder:e="Pick a date",inputClassName:r,...a},n)=>{const[o,i]=s.useState(!1),l=s.useRef(null),d=s.useRef(null),[c,f]=s.useState({top:0,left:0,width:0}),p=za(a),y=s.useCallback(()=>{if(!l.current)return;const u=l.current.getBoundingClientRect();f({top:u.bottom+window.scrollY+6,left:u.left+window.scrollX,width:u.width})},[]);s.useEffect(()=>{if(!o)return;y();const u=()=>y(),v=()=>y();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",v)}},[o,y]),s.useEffect(()=>{if(!o)return;const u=x=>{var g,j;!((g=d.current)!=null&&g.contains(x.target))&&!((j=l.current)!=null&&j.contains(x.target))&&i(!1)},v=x=>{x.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",v)}},[o]);const h=a.mode!=="range"&&a.mode!=="multiple"&&!a.showTime,m=s.useMemo(()=>a.mode==="range"?{...a,onChange:u=>{var v;(v=a.onChange)==null||v.call(a,u),u[0]&&u[1]&&i(!1)}}:a.mode==="multiple"?a:{...a,onChange:u=>{var v;(v=a.onChange)==null||v.call(a,u),h&&i(!1)}},[a,h]);return t.jsxs("div",{ref:n,className:"vyre-datepicker",children:[t.jsxs("button",{ref:l,type:"button",className:b("vyre-datepicker__trigger",!p&&"vyre-datepicker__trigger--placeholder",r),onClick:()=>{y(),i(u=>!u)},"aria-expanded":o,"aria-haspopup":"dialog",children:[t.jsxs("svg",{className:"vyre-datepicker__icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M1.5 6h11M4.5 1v3M9.5 1v3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("span",{children:p||e}),p&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:u=>{var v,x,g;u.stopPropagation(),a.mode==="range"?(v=a.onChange)==null||v.call(a,[null,null]):a.mode==="multiple"?(x=a.onChange)==null||x.call(a,[]):(g=a.onChange)==null||g.call(a,null)},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l8 8M10 2l-8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]}),o&&G.createPortal(t.jsx("div",{ref:d,className:"vyre-datepicker__popover",role:"dialog","aria-label":"Date picker",style:{top:c.top,left:c.left,minWidth:c.width},children:t.jsx(te,{...m})}),document.body)]})});ur.displayName="VyreDatePicker";function O(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function le(e,r){const a=new Date(e);return a.setDate(a.getDate()+r),O(a)}function ce(e){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}const Xa=[{label:"Today",range:()=>{const e=O(new Date);return{from:e,to:e}}},{label:"Yesterday",range:()=>{const e=le(new Date,-1);return{from:e,to:e}}},{label:"Last 7 days",range:()=>({from:le(new Date,-6),to:O(new Date)})},{label:"Last 30 days",range:()=>({from:le(new Date,-29),to:O(new Date)})},{label:"This month",range:()=>{const e=new Date;return{from:O(new Date(e.getFullYear(),e.getMonth(),1)),to:O(new Date(e.getFullYear(),e.getMonth()+1,0))}}},{label:"Last month",range:()=>{const e=new Date;return{from:O(new Date(e.getFullYear(),e.getMonth()-1,1)),to:O(new Date(e.getFullYear(),e.getMonth(),0))}}}],mr=s.forwardRef(({value:e,onChange:r,placeholder:a="Pick a date range",numberOfMonths:n=2,presets:o=!1,minDate:i,maxDate:l,disabled:d,weekStartsOn:c=1,className:f,inputClassName:p},y)=>{const[h,m]=s.useState(!1),u=s.useRef(null),v=s.useRef(null),[x,g]=s.useState({top:0,left:0,width:0}),j=(e==null?void 0:e.from)??null,_=(e==null?void 0:e.to)??null,L=s.useMemo(()=>o===!0?Xa:Array.isArray(o)?o:[],[o]),w=s.useMemo(()=>j?_?`${ce(j)} – ${ce(_)}`:ce(j):"",[j,_]),M=s.useCallback(()=>{if(!u.current)return;const C=u.current.getBoundingClientRect();g({top:C.bottom+window.scrollY+6,left:C.left+window.scrollX,width:C.width})},[]);s.useEffect(()=>{if(!h)return;M();const C=()=>M(),N=()=>M();return window.addEventListener("scroll",C,!0),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",N)}},[h,M]),s.useEffect(()=>{if(!h)return;const C=D=>{var B,V;!((B=v.current)!=null&&B.contains(D.target))&&!((V=u.current)!=null&&V.contains(D.target))&&m(!1)},N=D=>{D.key==="Escape"&&m(!1)};return document.addEventListener("pointerdown",C),document.addEventListener("keydown",N),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",N)}},[h]);const E=s.useCallback(C=>{const N={from:C[0],to:C[1]};r==null||r(N),N.from&&N.to&&m(!1)},[r]),S=s.useCallback(C=>{r==null||r(C.range()),m(!1)},[r]),k=s.useCallback(()=>{r==null||r({from:null,to:null})},[r]),I=s.useMemo(()=>{const C=j??O(new Date);return new Date(C.getFullYear(),C.getMonth()+1,1)},[j]),R=[j,_];return t.jsxs("div",{ref:y,className:b("vyre-date-range-picker",f),children:[t.jsxs("button",{ref:u,type:"button",className:b("vyre-datepicker__trigger",!w&&"vyre-datepicker__trigger--placeholder",p),onClick:()=>{M(),m(C=>!C)},"aria-expanded":h,"aria-haspopup":"dialog",children:[t.jsxs("svg",{className:"vyre-datepicker__icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),t.jsx("path",{d:"M1.5 6h11M4.5 1v3M9.5 1v3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),t.jsx("span",{children:w||a}),w&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:C=>{C.stopPropagation(),k()},children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l8 8M10 2l-8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]}),h&&G.createPortal(t.jsxs("div",{ref:v,className:"vyre-date-range-picker__popover",role:"dialog","aria-label":"Date range picker",style:{top:x.top,left:x.left},children:[L.length>0&&t.jsx("div",{className:"vyre-date-range-picker__presets",children:L.map(C=>t.jsx("button",{type:"button",className:"vyre-date-range-picker__preset",onClick:()=>S(C),children:C.label},C.label))}),t.jsxs("div",{className:"vyre-date-range-picker__calendars",children:[t.jsx(te,{mode:"range",value:R,onChange:E,minDate:i,maxDate:l,disabled:d,weekStartsOn:c}),n===2&&t.jsx(te,{mode:"range",value:R,defaultMonth:I,onChange:E,minDate:i,maxDate:l,disabled:d,weekStartsOn:c},I.toISOString())]})]}),document.body)]})});mr.displayName="VyreDateRangePicker";const vr=s.forwardRef(({variant:e="default",size:r="md",clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:b("vyre-item",`vyre-item--${e}`,`vyre-item--${r}`,a&&"vyre-item--clickable",n),"data-variant":e,"data-size":r,role:a?"button":void 0,tabIndex:a?0:void 0,...i,children:o}));vr.displayName="VyreItem";const fr=s.forwardRef(({separated:e=!1,className:r,children:a,...n},o)=>t.jsx("div",{ref:o,role:"list",className:b("vyre-item-group",e&&"vyre-item-group--separated",r),...n,children:a}));fr.displayName="VyreItemGroup";const yr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-item__media",e),"aria-hidden":"true",...a,children:r}));yr.displayName="VyreItemMedia";const hr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-item__content",e),...a,children:r}));hr.displayName="VyreItemContent";const pr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-item__title",e),...a,children:r}));pr.displayName="VyreItemTitle";const xr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:b("vyre-item__description",e),...a,children:r}));xr.displayName="VyreItemDescription";const br=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:b("vyre-item__actions",e),...a,children:r}));br.displayName="VyreItemActions";function Za(e,r,a,n){const o=e.find(l=>l.id===r.fromColumnId);if(!o)return e;const i=o.cards.find(l=>l.id===r.cardId);return i?e.map(l=>{if(l.id===r.fromColumnId&&l.id===a){const d=l.cards.filter(p=>p.id!==r.cardId),c=Math.max(0,Math.min(n,d.length)),f=[...d];return f.splice(c,0,i),{...l,cards:f}}if(l.id===r.fromColumnId)return{...l,cards:l.cards.filter(d=>d.id!==r.cardId)};if(l.id===a){const d=Math.max(0,Math.min(n,l.cards.length)),c=[...l.cards];return c.splice(d,0,i),{...l,cards:c}}return l}):e}const _r=s.forwardRef(({value:e,onChange:r,renderCard:a,onCardClick:n,className:o,...i},l)=>{const d=s.useRef(null),c=s.useRef(!1),[f,p]=s.useState(null),[y,h]=s.useState(null),[m,u]=s.useState(null),v=(_,L)=>{h(w=>w===_?w:_),u(w=>w===L?w:L)},x=(_,L)=>w=>{d.current={cardId:L,fromColumnId:_},c.current=!1,p(L),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",L)},g=()=>{d.current=null,p(null),h(null),u(null)},j=(_,L)=>{const w=d.current;if(!w)return;const M=Za(e,w,_,L);M!==e&&(c.current=!0,r(M))};return t.jsx("div",{ref:l,className:b("vyre-kanban",o),role:"list","aria-label":"Kanban board",...i,children:e.map(_=>{const L=y===_.id,w=_.color&&_.color!=="default"?_.color:void 0,M=L&&d.current&&m!==null?m:null,E=t.jsx("div",{className:"vyre-kanban__placeholder","aria-hidden":"true"});return t.jsxs("div",{role:"listitem","data-color":w,className:b("vyre-kanban__column",L&&"vyre-kanban__column--over"),onDragOver:S=>{d.current&&(S.preventDefault(),S.dataTransfer.dropEffect="move",v(_.id,_.cards.length))},onDragLeave:S=>{S.currentTarget.contains(S.relatedTarget)||(h(k=>k===_.id?null:k),u(null))},onDrop:S=>{S.preventDefault(),j(_.id,m??_.cards.length),g()},children:[t.jsxs("div",{className:"vyre-kanban__column-header",children:[t.jsx("span",{className:"vyre-kanban__column-title",children:_.title}),t.jsx("span",{className:"vyre-kanban__column-count",children:_.cards.length})]}),t.jsxs("div",{className:"vyre-kanban__cards",children:[_.cards.map((S,k)=>{const I=S.color&&S.color!=="default"?S.color:void 0;return t.jsxs(s.Fragment,{children:[M===k&&E,t.jsx(ve,{variant:"outlined","data-color":I,className:b("vyre-kanban__card",f===S.id&&"vyre-kanban__card--dragging",n&&"vyre-kanban__card--clickable"),draggable:!0,role:n?"button":void 0,tabIndex:n?0:void 0,onDragStart:x(_.id,S.id),onDragEnd:g,onDragOver:R=>{if(!d.current)return;R.preventDefault(),R.stopPropagation();const C=R.currentTarget.getBoundingClientRect(),N=R.clientY-C.top>C.height/2;v(_.id,N?k+1:k)},onDrop:R=>{R.preventDefault(),R.stopPropagation(),j(_.id,m??k),g()},onClick:()=>{c.current||n==null||n(S,_)},onKeyDown:R=>{n&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),n(S,_))},children:t.jsx(fe,{children:a?a(S,_):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"vyre-kanban__card-title",children:S.title}),S.description&&t.jsx("div",{className:"vyre-kanban__card-desc",children:S.description})]})})})]},S.id)}),M===_.cards.length&&E,_.cards.length===0&&M===null&&t.jsx("div",{className:"vyre-kanban__empty",children:"Drop cards here"})]})]},_.id)})})});_r.displayName="VyreKanban";function Me(e){if(e==null)return null;const r=e instanceof Date?e:new Date(e);return Number.isNaN(r.getTime())?null:r}function me(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function Qa(e){const r=new Date,a=new Date;return a.setDate(r.getDate()-1),me(e,r)?"Today":me(e,a)?"Yesterday":new Intl.DateTimeFormat("default",{month:"short",day:"numeric",year:e.getFullYear()===r.getFullYear()?void 0:"numeric"}).format(e)}function Ja(e){return new Intl.DateTimeFormat("default",{hour:"numeric",minute:"2-digit"}).format(e)}const en={sending:"Sending…",sent:"Sent",delivered:"Delivered",read:"Read"};function tn(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M10 2H5a1.5 1.5 0 0 0-1.5 1.5v11A1.5 1.5 0 0 0 5 16h8a1.5 1.5 0 0 0 1.5-1.5V6.5L10 2z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),t.jsx("path",{d:"M10 2v4.5h4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})]})}function rn({attachment:e}){const{kind:r,url:a,name:n,size:o}=e;return r==="image"?t.jsx("a",{className:"vyre-conversation__att vyre-conversation__att--image",href:a,target:"_blank",rel:"noopener noreferrer",children:t.jsx("img",{src:a,alt:n??"image attachment",loading:"lazy"})}):r==="audio"?t.jsx("audio",{className:"vyre-conversation__att vyre-conversation__att--audio",src:a,controls:!0,preload:"none"}):r==="video"?t.jsx("video",{className:"vyre-conversation__att vyre-conversation__att--video",src:a,controls:!0,preload:"none"}):t.jsxs("a",{className:"vyre-conversation__att vyre-conversation__att--file",href:a,target:"_blank",rel:"noopener noreferrer",download:n,children:[t.jsx("span",{className:"vyre-conversation__att-icon",children:t.jsx(tn,{})}),t.jsxs("span",{className:"vyre-conversation__att-info",children:[t.jsx("span",{className:"vyre-conversation__att-name",children:n??"Attachment"}),o&&t.jsx("span",{className:"vyre-conversation__att-size",children:o})]})]})}const gr=s.forwardRef(({value:e,currentUserId:r,composer:a=!1,onSend:n,placeholder:o="Write a message…",typing:i=!1,allowAttachments:l=!1,accept:d,renderMessage:c,renderComposer:f,className:p,...y},h)=>{const[m,u]=s.useState(""),[v,x]=s.useState([]),g=s.useRef(null),j=()=>{const w=m.trim();!w&&v.length===0||(n==null||n(w,v),u(""),x([]))},_=s.useMemo(()=>e.map((w,M)=>{const E=e[M-1],S=e[M+1],k=Me(w.timestamp),I=E?Me(E.timestamp):null,R=!!k&&(!I||!me(k,I)),C=!E||E.authorId!==w.authorId||R,N=!S||S.authorId!==w.authorId,D=w.authorId===r;return{msg:w,date:k,showDaySeparator:R,isGroupStart:C,isGroupEnd:N,outgoing:D}}),[e,r]),L={value:m,setValue:u,files:v,setFiles:x,send:j};return t.jsxs("div",{ref:h,className:b("vyre-conversation",p),...y,children:[t.jsxs("div",{className:"vyre-conversation__thread",role:"log","aria-label":"Conversation","aria-live":"polite",children:[_.map(({msg:w,date:M,showDaySeparator:E,isGroupStart:S,isGroupEnd:k,outgoing:I})=>t.jsxs(s.Fragment,{children:[E&&M&&t.jsx("div",{className:"vyre-conversation__day",role:"separator",children:t.jsx("span",{children:Qa(M)})}),t.jsxs("div",{className:b("vyre-conversation__row",I?"vyre-conversation__row--out":"vyre-conversation__row--in",k&&"vyre-conversation__row--group-end"),children:[t.jsx("div",{className:"vyre-conversation__avatar",children:!I&&k&&t.jsx(pe,{size:"sm",src:w.authorAvatar,fallback:(w.authorName??w.authorId).slice(0,1).toUpperCase(),alt:w.authorName??w.authorId})}),t.jsxs("div",{className:"vyre-conversation__stack",children:[!I&&S&&w.authorName&&t.jsx("span",{className:"vyre-conversation__author",children:w.authorName}),t.jsx("div",{className:"vyre-conversation__bubble",children:c?c(w,{outgoing:I,isGroupStart:S,isGroupEnd:k}):t.jsxs(t.Fragment,{children:[w.attachments&&w.attachments.length>0&&t.jsx("div",{className:"vyre-conversation__attachments",children:w.attachments.map((R,C)=>t.jsx(rn,{attachment:R},C))}),w.text]})}),k&&t.jsxs("span",{className:"vyre-conversation__meta",children:[M&&Ja(M),I&&w.status&&t.jsxs("span",{className:b("vyre-conversation__status",`vyre-conversation__status--${w.status}`),children:[M?" · ":"",en[w.status]]})]})]})]})]},w.id)),i&&t.jsxs("div",{className:"vyre-conversation__row vyre-conversation__row--in",children:[t.jsx("div",{className:"vyre-conversation__avatar"}),t.jsx("div",{className:"vyre-conversation__stack",children:t.jsxs("div",{className:"vyre-conversation__bubble vyre-conversation__bubble--typing",children:[t.jsx("span",{className:"vyre-conversation__dot"}),t.jsx("span",{className:"vyre-conversation__dot"}),t.jsx("span",{className:"vyre-conversation__dot"}),typeof i=="string"&&t.jsx("span",{className:"vyre-conversation__typing-label",children:i})]})})]})]}),f?f(L):a&&t.jsxs("form",{className:"vyre-conversation__composer",onSubmit:w=>{w.preventDefault(),j()},children:[l&&v.length>0&&t.jsx("div",{className:"vyre-conversation__staged",children:v.map((w,M)=>t.jsxs("span",{className:"vyre-conversation__chip",children:[t.jsx("span",{className:"vyre-conversation__chip-name",children:w.name}),t.jsx("button",{type:"button",className:"vyre-conversation__chip-remove","aria-label":`Remove ${w.name}`,onClick:()=>x(v.filter((E,S)=>S!==M)),children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})]},M))}),t.jsxs("div",{className:"vyre-conversation__composer-row",children:[l&&t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:g,type:"file",multiple:!0,accept:d,className:"vyre-conversation__file-input",onChange:w=>{const M=Array.from(w.target.files??[]);M.length&&x([...v,...M]),w.target.value=""}}),t.jsx("button",{type:"button",className:"vyre-conversation__attach","aria-label":"Attach files",onClick:()=>{var w;return(w=g.current)==null?void 0:w.click()},children:t.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M13.5 6.5l-5.6 5.6a2.5 2.5 0 0 1-3.5-3.5l6-6a3.5 3.5 0 0 1 5 5l-6 6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t.jsx("input",{className:"vyre-conversation__input",value:m,onChange:w=>u(w.target.value),placeholder:o,"aria-label":"Message"}),t.jsx("button",{type:"submit",className:"vyre-conversation__send",disabled:!m.trim()&&v.length===0,"aria-label":"Send message",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 8l12-5-4.5 12L7 9.5 2 8z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})})})]})]})]})});gr.displayName="VyreConversation";const jr=s.forwardRef(({as:e="p",size:r="md",weight:a,color:n="default",truncate:o,mono:i,className:l,children:d,...c},f)=>t.jsx(e,{ref:f,className:b("vyre-text",r!=="md"&&`vyre-text--${r}`,a&&`vyre-text--${a}`,n!=="default"&&`vyre-text--${n}`,o&&"vyre-text--truncate",i&&"vyre-text--mono",l),...c,children:d}));jr.displayName="VyreText";const wr=s.forwardRef(({as:e="h2",size:r="md",weight:a="bold",color:n="default",truncate:o,className:i,children:l,...d},c)=>t.jsx(e,{ref:c,className:b("vyre-heading",`vyre-heading--${r}`,a!=="bold"&&`vyre-heading--${a}`,n!=="default"&&`vyre-text--${n}`,o&&"vyre-text--truncate",i),...d,children:l}));wr.displayName="VyreHeading";const Nr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:b("vyre-lead",e),...a,children:r}));Nr.displayName="VyreLead";const kr=s.forwardRef(({block:e,className:r,children:a,...n},o)=>e?t.jsx("pre",{className:b("vyre-code-block",r),...n,children:t.jsx("code",{ref:o,children:a})}):t.jsx("code",{ref:o,className:b("vyre-code",r),...n,children:a}));kr.displayName="VyreCode";const Cr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("blockquote",{ref:n,className:b("vyre-blockquote",e),...a,children:r}));Cr.displayName="VyreBlockquote";const $=e=>e==null||e===!1?void 0:String(e),an={none:"var(--vyre-spacing-0)",xs:"var(--vyre-spacing-2)",sm:"var(--vyre-spacing-3)",md:"var(--vyre-spacing-4)",lg:"var(--vyre-spacing-6)",xl:"var(--vyre-spacing-8)","2xl":"var(--vyre-spacing-12)"},nn=e=>e==="auto"||e==="content"?e:e==="0"?"0":an[e],Rr=s.forwardRef(({as:e="div",direction:r="row",inline:a=!1,gap:n="md",rowGap:o,columnGap:i,align:l="stretch",justify:d="start",alignContent:c,alignSelf:f,wrap:p="nowrap",grow:y,shrink:h,basis:m,width:u,height:v,className:x,children:g,...j},_)=>{const L=e,{style:w,...M}=j;return t.jsx(L,{ref:_,className:b("vyre-stack",x),"data-inline":a?"":void 0,"data-w":u,"data-h":v,"data-direction":r,"data-gap":n,"data-row-gap":o,"data-column-gap":i,"data-align":l,"data-justify":d,"data-align-content":c,"data-align-self":f,"data-wrap":p===!0?"wrap":p===!1?"nowrap":p,...M,style:{...y!==void 0?{flexGrow:y}:null,...h!==void 0?{flexShrink:h}:null,...m!==void 0?{"--vyre-stack-basis":nn(m)}:null,...w},children:g})});Rr.displayName="VyreStack";const Sr=s.forwardRef(({as:e="div",columns:r=1,rows:a,flow:n,gap:o="md",rowGap:i,columnGap:l,align:d="stretch",justify:c,width:f,height:p,className:y,children:h,...m},u)=>{const v=e,x=r==="auto-fit",{style:g,...j}=m;return t.jsx(v,{ref:u,className:b("vyre-grid",y),"data-w":f,"data-h":p,"data-columns":x?"auto-fit":void 0,"data-rows":a!==void 0?"":void 0,"data-flow":n,"data-gap":o,"data-row-gap":i,"data-column-gap":l,"data-align":d,"data-justify":c,...j,style:{...x?null:{"--vyre-grid-columns":String(r)},...a!==void 0&&a!=="auto"?{"--vyre-grid-rows":String(a)}:null,...g},children:h})});Sr.displayName="VyreGrid";const Lr=s.forwardRef(({as:e="div",colSpan:r,rowSpan:a,colStart:n,rowStart:o,className:i,children:l,...d},c)=>{const f=e,{style:p,...y}=d;return t.jsx(f,{ref:c,className:b("vyre-grid-item",i),"data-col-span":$(r),"data-row-span":$(a),"data-col-start":$(n),"data-row-start":$(o),...y,style:{...r!==void 0?{"--vyre-grid-item-col-span":String(r)}:null,...a!==void 0?{"--vyre-grid-item-row-span":String(a)}:null,...n!==void 0?{"--vyre-grid-item-col-start":String(n)}:null,...o!==void 0?{"--vyre-grid-item-row-start":String(o)}:null,...p},children:l})});Lr.displayName="VyreGridItem";const Dr=s.forwardRef(({as:e="div",padding:r,paddingX:a,paddingY:n,paddingTop:o,paddingRight:i,paddingBottom:l,paddingLeft:d,margin:c,marginX:f,marginY:p,marginTop:y,marginRight:h,marginBottom:m,marginLeft:u,width:v,height:x,className:g,children:j,..._},L)=>{const w=e;return t.jsx(w,{ref:L,className:b("vyre-box",g),"data-w":$(v),"data-h":$(x),"data-p":$(r),"data-px":$(a),"data-py":$(n),"data-pt":$(o),"data-pr":$(i),"data-pb":$(l),"data-pl":$(d),"data-m":$(c),"data-mx":$(f),"data-my":$(p),"data-mt":$(y),"data-mr":$(h),"data-mb":$(m),"data-ml":$(u),..._,children:j})});Dr.displayName="VyreBox";const Ir=s.createContext(null),sn=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Te(e,r,a){if(!r)return null;const n=e==null||e===""||Array.isArray(e)&&e.length===0;if(r.required&&n)return typeof r.required=="string"?r.required:"This field is required";if(n)return r.validate?r.validate(e,a)??null:null;const o=typeof e=="string"?e:String(e);return r.minLength!==void 0&&o.length<r.minLength?`Must be at least ${r.minLength} characters`:r.maxLength!==void 0&&o.length>r.maxLength?`Must be at most ${r.maxLength} characters`:r.email&&!sn.test(o)?"Enter a valid email address":r.pattern&&!r.pattern.test(o)?"Invalid format":r.min!==void 0&&Number(e)<r.min?`Must be at least ${r.min}`:r.max!==void 0&&Number(e)>r.max?`Must be at most ${r.max}`:r.validate?r.validate(e,a)??null:null}const Mr=s.forwardRef(({values:e,defaultValues:r,onChange:a,onSubmit:n,onInvalid:o,className:i,children:l,...d},c)=>{const f=e!==void 0,[p,y]=s.useState(r??{}),h=f?e:p,m=s.useRef(h);m.current=h;const u=s.useRef(new Map),[v,x]=s.useState({}),[g,j]=s.useState(!1),_=s.useCallback((E,S)=>{const k={...m.current,[E]:S};f||y(k),a==null||a(k)},[f,a]),L=s.useCallback(()=>{const E={};return u.current.forEach((S,k)=>{const I=Te(m.current[k],S,m.current);I&&(E[k]=I)}),E},[]),w=s.useMemo(()=>({getValue:E=>m.current[E],setValue:_,registerField:(E,S)=>{u.current.set(E,S)},unregisterField:E=>{u.current.delete(E)},getError:E=>v[E],validateField:E=>{if(!g)return;const S=Te(m.current[E],u.current.get(E),m.current);x(k=>{const I={...k};return S?I[E]=S:delete I[E],I})},submitted:g}),[_,v,g]),M=E=>{E.preventDefault(),j(!0);const S=L();if(x(S),Object.keys(S).length>0){o==null||o(S);return}n==null||n(m.current)};return t.jsx(Ir.Provider,{value:w,children:t.jsx("form",{ref:c,noValidate:!0,className:b("vyre-form",i),onSubmit:M,...d,children:l})})});Mr.displayName="VyreForm";const Tr=({name:e,label:r,hint:a,rules:n,children:o,className:i})=>{const l=s.useContext(Ir);if(!l)throw new Error("FormField must be used inside a <Form>");s.useEffect(()=>(l.registerField(e,n),()=>l.unregisterField(e)));const d=l.getError(e),c=l.getValue(e),f=s.Children.only(o),p=s.cloneElement(f,{name:e,value:c??"",onChange:y=>{var m,u;const h=y&&typeof y=="object"&&"target"in y?y.target.value:y;l.setValue(e,h),queueMicrotask(()=>l.validateField(e)),(u=(m=f.props).onChange)==null||u.call(m,y)},onBlur:y=>{var h,m;l.validateField(e),(m=(h=f.props).onBlur)==null||m.call(h,y)}});return t.jsx(ye,{label:r,hint:d??a,state:d?"error":"idle",className:b("vyre-form-field",i),children:p})};Tr.displayName="VyreFormField";const Ee=(e,r,a)=>r!==void 0&&e<r?r:a!==void 0&&e>a?a:e,de=(e,r)=>{if(r===void 0)return e;const a=10**r;return Math.round(e*a)/a},Er=s.forwardRef(({value:e,defaultValue:r=null,onChange:a,min:n,max:o,step:i=1,precision:l,size:d="md",disabled:c=!1,readOnly:f=!1,className:p,onBlur:y,onKeyDown:h,...m},u)=>{const v=e!==void 0,[x,g]=s.useState(r),j=v?e:x,[_,L]=s.useState(j==null?"":String(j));s.useEffect(()=>{const N=j==null?"":String(j);L(D=>Number(D)===j&&D!==""?D:N)},[j]);const w=N=>{v||g(N),a==null||a(N)},M=N=>{const D=de(Ee(N,n,o),l);L(String(D)),w(D)},E=(N,D=1)=>{M((j??0)+N*i*D)},S=N=>{const D=N.target.value;if(L(D),D===""||D==="-"){w(null);return}const B=Number(D);Number.isNaN(B)||w(de(B,l))},k=N=>{if(j!=null){const D=de(Ee(j,n,o),l);D!==j?M(D):L(String(D))}else L("");y==null||y(N)},I=N=>{!c&&!f&&(N.key==="ArrowUp"?(N.preventDefault(),E(1,N.shiftKey?10:1)):N.key==="ArrowDown"&&(N.preventDefault(),E(-1,N.shiftKey?10:1))),h==null||h(N)},R=n!==void 0&&j!==null&&(j??0)<=n,C=o!==void 0&&j!==null&&(j??0)>=o;return t.jsxs("div",{className:b("vyre-number-input",`vyre-number-input--${d}`,c&&"vyre-number-input--disabled",p),"data-disabled":c?"":void 0,children:[t.jsx("button",{type:"button",className:"vyre-number-input__btn vyre-number-input__btn--dec","aria-label":"Decrease",tabIndex:-1,disabled:c||f||R,onClick:()=>E(-1),children:t.jsx("span",{"aria-hidden":"true",children:"−"})}),t.jsx("input",{ref:u,type:"text",inputMode:"decimal",role:"spinbutton","aria-valuenow":j??void 0,"aria-valuemin":n,"aria-valuemax":o,className:"vyre-number-input__field",value:_,disabled:c,readOnly:f,onChange:S,onBlur:k,onKeyDown:I,...m}),t.jsx("button",{type:"button",className:"vyre-number-input__btn vyre-number-input__btn--inc","aria-label":"Increase",tabIndex:-1,disabled:c||f||C,onClick:()=>E(1),children:t.jsx("span",{"aria-hidden":"true",children:"+"})})]})});Er.displayName="VyreNumberInput";const Ar=s.createContext(null),Br=s.forwardRef((e,r)=>{const{options:a,size:n="md",disabled:o=!1,orientation:i="horizontal",className:l,children:d,...c}=e,f=e.type==="multiple",h={isSelected:m=>f?Array.isArray(e.value)&&e.value.includes(m):e.value===m,toggle:m=>{var u,v;if(f){const x=Array.isArray(e.value)?e.value:[],g=x.includes(m)?x.filter(j=>j!==m):[...x,m];(u=e.onChange)==null||u.call(e,g)}else{const x=e.value===m?null:m;(v=e.onChange)==null||v.call(e,x)}},size:n,groupDisabled:o};return t.jsx(Ar.Provider,{value:h,children:t.jsx("div",{ref:r,role:f?"group":"radiogroup","aria-orientation":i,"data-orientation":i,className:b("vyre-toggle-group",`vyre-toggle-group--${n}`,o&&"vyre-toggle-group--disabled",l),...c,children:a?a.map(m=>t.jsx(je,{value:m.value,disabled:m.disabled,icon:m.icon,children:m.label??m.value},m.value)):d})})});Br.displayName="VyreToggleGroup";const je=s.forwardRef(({value:e,icon:r,disabled:a=!1,className:n,children:o,onClick:i,...l},d)=>{const c=s.useContext(Ar);if(!c)throw new Error("ToggleItem must be used inside a <ToggleGroup>");const f=c.isSelected(e),p=a||c.groupDisabled,y=h=>{var v,x,g;const m=Array.from(((v=h.currentTarget.parentElement)==null?void 0:v.querySelectorAll(".vyre-toggle-item:not(:disabled)"))??[]),u=m.indexOf(h.currentTarget);h.key==="ArrowRight"||h.key==="ArrowDown"?(h.preventDefault(),(x=m[(u+1)%m.length])==null||x.focus()):(h.key==="ArrowLeft"||h.key==="ArrowUp")&&(h.preventDefault(),(g=m[(u-1+m.length)%m.length])==null||g.focus())};return t.jsxs("button",{ref:d,type:"button","aria-pressed":f,"data-state":f?"on":"off",disabled:p,className:b("vyre-toggle-item",f&&"vyre-toggle-item--selected",n),onClick:h=>{c.toggle(e),i==null||i(h)},onKeyDown:y,...l,children:[r&&t.jsx("span",{className:"vyre-toggle-item__icon","aria-hidden":"true",children:r}),o]})});je.displayName="VyreToggleItem";const Vr=s.createContext(null);function we(e){const r=s.useContext(Vr);if(!r)throw new Error(`${e} must be used inside <Stepper>`);return r}const $r=s.forwardRef(({value:e,defaultValue:r=0,onChange:a,orientation:n="horizontal",clickable:o=!1,className:i,children:l,...d},c)=>{const f=e!==void 0,[p,y]=s.useState(r),h=f?e:p,m=s.useCallback(x=>{f||y(x),a==null||a(x)},[f,a]);let u=-1;const v=s.Children.map(l,x=>s.isValidElement(x)&&x.type===ke?(u+=1,s.cloneElement(x,{__index:u})):x);return t.jsx(Vr.Provider,{value:{active:h,setActive:m,orientation:n,clickable:o},children:t.jsx("div",{ref:c,className:b("vyre-stepper",`vyre-stepper--${n}`,i),"data-orientation":n,...d,children:v})})});$r.displayName="VyreStepper";const Fr=s.forwardRef(({className:e,children:r,...a},n)=>{const{orientation:o}=we("StepperNav");let i=-1;const l=s.Children.map(r,d=>s.isValidElement(d)&&d.type===Ne?(i+=1,s.cloneElement(d,{__index:i})):d);return t.jsx("div",{ref:n,role:"list","aria-orientation":o,className:b("vyre-stepper__nav",e),...a,children:l})});Fr.displayName="VyreStepperNav";const Ne=s.forwardRef(({label:e,description:r,icon:a,index:n,__index:o=0,className:i,...l},d)=>{const c=n??o,{active:f,setActive:p,clickable:y}=we("Step"),h=c<f?"completed":c===f?"current":"upcoming",m=y&&c<f,u=a??(h==="completed"?"✓":c+1);return t.jsxs("div",{ref:d,role:"listitem","aria-current":h==="current"?"step":void 0,"data-state":h,className:b("vyre-step",`vyre-step--${h}`,m&&"vyre-step--clickable",i),...l,children:[t.jsx("button",{type:"button",className:"vyre-step__indicator",disabled:!m,tabIndex:m?0:-1,"aria-label":typeof e=="string"?e:`Step ${c+1}`,onClick:()=>m&&p(c),children:t.jsx("span",{"aria-hidden":"true",children:u})}),(e||r)&&t.jsxs("span",{className:"vyre-step__text",children:[e&&t.jsx("span",{className:"vyre-step__label",children:e}),r&&t.jsx("span",{className:"vyre-step__description",children:r})]}),t.jsx("span",{className:"vyre-step__connector","aria-hidden":"true"})]})});Ne.displayName="VyreStep";const ke=({className:e,children:r,index:a,__index:n=0})=>{const{active:o}=we("StepPanel");return(a??n)!==o?null:t.jsx("div",{role:"tabpanel",className:b("vyre-step-panel",e),children:r})};ke.displayName="VyreStepPanel";const on=()=>t.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M6 13l14-7 14 7v14l-14 7-14-7V13Z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),t.jsx("path",{d:"M6 13l14 7 14-7M20 20v14",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})]}),ln=()=>t.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[t.jsx("circle",{cx:"18",cy:"18",r:"11",stroke:"currentColor",strokeWidth:"2"}),t.jsx("path",{d:"M26 26l8 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),cn=()=>t.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[t.jsx("path",{d:"M20 5L37 34H3L20 5Z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),t.jsx("path",{d:"M20 16v9M20 29v.5",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round"})]}),dn={default:on,search:ln,error:cn},Wr=s.forwardRef(({title:e,description:r,variant:a="default",icon:n,size:o="md",className:i,children:l,...d},c)=>{const f=dn[a];return t.jsxs("div",{ref:c,role:"status","data-variant":a,className:b("vyre-empty-state",`vyre-empty-state--${o}`,i),...d,children:[t.jsx("span",{className:"vyre-empty-state__icon","aria-hidden":"true",children:n??t.jsx(f,{})}),t.jsx("span",{className:"vyre-empty-state__title",children:e}),r&&t.jsx("span",{className:"vyre-empty-state__description",children:r}),l&&t.jsx("div",{className:"vyre-empty-state__action",children:l})]})});Wr.displayName="VyreEmptyState";const un=e=>{if(e==null)return"flat";if(typeof e=="number")return e>0?"up":e<0?"down":"flat";const r=e.trim();if(r.startsWith("-")||r.startsWith("−"))return"down";if(r.startsWith("+"))return"up";const a=parseFloat(r.replace(/[^0-9.\-]/g,""));return Number.isNaN(a)?"flat":a>0?"up":a<0?"down":"flat"},mn=({direction:e})=>{if(e==="flat")return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M2 6h8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})});const r=e==="up";return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:r?"M6 2.5L10 7H2L6 2.5Z":"M6 9.5L2 5h8L6 9.5Z",fill:"currentColor"})})},Pr=s.forwardRef(({label:e,value:r,delta:a,trend:n="neutral",deltaLabel:o,icon:i,size:l="md",className:d,...c},f)=>t.jsxs("div",{ref:f,className:b("vyre-stat",`vyre-stat--${l}`,d),...c,children:[i&&t.jsx("span",{className:"vyre-stat__icon","aria-hidden":"true",children:i}),t.jsxs("div",{className:"vyre-stat__body",children:[t.jsx("span",{className:"vyre-stat__label",children:e}),t.jsx("span",{className:"vyre-stat__value",children:r}),a!==void 0&&t.jsxs("span",{className:"vyre-stat__delta","data-trend":n,children:[t.jsx(mn,{direction:un(a)}),t.jsx("span",{className:"vyre-stat__delta-value",children:a}),o&&t.jsx("span",{className:"vyre-stat__delta-label",children:o})]})]})]}));Pr.displayName="VyreStat";const Hr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,role:"group",className:b("vyre-stat-group",e),...a,children:r}));Hr.displayName="VyreStatGroup";const Gr=s.forwardRef(({items:e,className:r,children:a,...n},o)=>t.jsx("ol",{ref:o,className:b("vyre-timeline",r),...n,children:e?e.map((i,l)=>t.jsx(Ce,{title:i.title,time:i.time,status:i.status,icon:i.icon,children:i.description},l)):a}));Gr.displayName="VyreTimeline";const Ce=s.forwardRef(({title:e,time:r,status:a="default",icon:n,className:o,children:i,...l},d)=>t.jsxs("li",{ref:d,className:b("vyre-timeline-item",o),"data-status":a,...l,children:[t.jsxs("span",{className:"vyre-timeline-item__marker","aria-hidden":"true",children:[n?t.jsx("span",{className:"vyre-timeline-item__icon",children:n}):t.jsx("span",{className:"vyre-timeline-item__dot"}),t.jsx("span",{className:"vyre-timeline-item__connector"})]}),t.jsxs("div",{className:"vyre-timeline-item__body",children:[t.jsxs("div",{className:"vyre-timeline-item__head",children:[t.jsx("span",{className:"vyre-timeline-item__title",children:e}),r!==void 0&&t.jsx("span",{className:"vyre-timeline-item__time",children:r})]}),i&&t.jsx("div",{className:"vyre-timeline-item__content",children:i})]})]}));Ce.displayName="VyreTimelineItem";const vn=({open:e})=>t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"vyre-tree__chevron","data-open":e?"":void 0,children:t.jsx("path",{d:"M4.5 3l3 3-3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Or=s.createContext(null),qr=s.forwardRef(({data:e,expandedIds:r,defaultExpandedIds:a=[],onExpandedChange:n,selectedId:o,defaultSelectedId:i=null,onSelect:l,className:d,...c},f)=>{const p=r!==void 0,y=o!==void 0,[h,m]=s.useState(a),[u,v]=s.useState(i),x=s.useMemo(()=>new Set(p?r:h),[p,r,h]),g=y?o:u,j=s.useCallback(L=>{const w=new Set(x);w.has(L)?w.delete(L):w.add(L);const M=[...w];p||m(M),n==null||n(M)},[x,p,n]),_=s.useCallback(L=>{y||v(L),l==null||l(L)},[y,l]);return t.jsx(Or.Provider,{value:{expanded:x,toggle:j,selectedId:g,select:_},children:t.jsx("ul",{ref:f,role:"tree",className:b("vyre-tree",d),...c,children:e.map(L=>t.jsx(Kr,{node:L,level:0},L.id))})})});qr.displayName="VyreTree";function Ae(e,r){var i;const a=e.closest(".vyre-tree");if(!a)return;const n=Array.from(a.querySelectorAll('.vyre-tree__row:not([aria-disabled="true"])')).filter(l=>l.offsetParent!==null),o=n.indexOf(e);(i=n[o+r])==null||i.focus()}const Kr=({node:e,level:r})=>{const a=s.useContext(Or),n=!!e.children&&e.children.length>0,o=a.expanded.has(e.id),i=a.selectedId===e.id,l=()=>{e.disabled||(n&&a.toggle(e.id),a.select(e.id))},d=c=>{switch(c.key){case"ArrowDown":c.preventDefault(),Ae(c.currentTarget,1);break;case"ArrowUp":c.preventDefault(),Ae(c.currentTarget,-1);break;case"ArrowRight":n&&!o&&(c.preventDefault(),a.toggle(e.id));break;case"ArrowLeft":n&&o&&(c.preventDefault(),a.toggle(e.id));break;case"Enter":case" ":c.preventDefault(),l();break}};return t.jsxs("li",{role:"treeitem","aria-expanded":n?o:void 0,"aria-selected":i,className:"vyre-tree__item",children:[t.jsxs("div",{role:"button",tabIndex:e.disabled?-1:0,"aria-disabled":e.disabled||void 0,"data-selected":i?"":void 0,className:"vyre-tree__row",style:{paddingLeft:`calc(${r} * var(--vyre-spacing-5))`},onClick:l,onKeyDown:d,children:[t.jsx("span",{className:"vyre-tree__chevron-slot",children:n?t.jsx(vn,{open:o}):null}),e.icon&&t.jsx("span",{className:"vyre-tree__icon","aria-hidden":"true",children:e.icon}),t.jsx("span",{className:"vyre-tree__label",children:e.label})]}),n&&o&&t.jsx("ul",{role:"group",className:"vyre-tree__group",children:e.children.map(c=>t.jsx(Kr,{node:c,level:r+1},c.id))})]})},ue=(e,r)=>r==="numeric"?e.replace(/[^0-9]/g,""):e.replace(/[^0-9a-zA-Z]/g,""),Yr=s.forwardRef(({value:e,defaultValue:r="",onChange:a,onComplete:n,length:o=6,type:i="numeric",mask:l=!1,size:d="md",disabled:c=!1,autoFocus:f=!1,name:p,onBlur:y,className:h},m)=>{const u=e!==void 0,[v,x]=s.useState(r),g=(u?e:v).slice(0,o),j=s.useRef([]),_=s.useRef(!1),L=k=>{const I=ue(k,i).slice(0,o);u||x(I),a==null||a(I);const R=I.length===o;R&&!_.current&&(n==null||n(I)),_.current=R},w=k=>{const I=j.current[Math.max(0,Math.min(k,o-1))];I==null||I.focus(),I==null||I.select()},M=(k,I)=>{const R=ue(I,i);if(!R)return;const C=g.split("");C[k]=R[R.length-1];const N=C.join("").slice(0,o);L(N),w(k+1)},E=(k,I)=>{if(I.key==="Backspace"){I.preventDefault();const R=g.split("");R[k]?(R[k]="",L(R.join(""))):k>0&&(R[k-1]="",L(R.join("")),w(k-1))}else I.key==="ArrowLeft"?(I.preventDefault(),w(k-1)):I.key==="ArrowRight"&&(I.preventDefault(),w(k+1))},S=(k,I)=>{I.preventDefault();const R=ue(I.clipboardData.getData("text"),i);if(!R)return;const C=g.split("");for(let D=0;D<R.length&&k+D<o;D++)C[k+D]=R[D];const N=C.join("").slice(0,o);L(N),w(Math.min(k+R.length,o-1))};return t.jsx("div",{ref:m,className:b("vyre-otp",`vyre-otp--${d}`,c&&"vyre-otp--disabled",h),role:"group","aria-label":"One-time code",children:Array.from({length:o}).map((k,I)=>t.jsx("input",{ref:R=>{j.current[I]=R},className:"vyre-otp__slot",type:l?"password":"text",inputMode:i==="numeric"?"numeric":"text",autoComplete:I===0?"one-time-code":"off",maxLength:1,disabled:c,autoFocus:f&&I===0,name:I===0?p:void 0,"aria-label":`Digit ${I+1}`,value:g[I]??"",onChange:R=>M(I,R.target.value),onKeyDown:R=>E(I,R),onPaste:R=>S(I,R),onFocus:R=>R.target.select(),onBlur:y},I))})});Yr.displayName="VyreOTPInput";const Re=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:b("vyre-carousel__slide",e),...a,children:r}));Re.displayName="VyreCarouselSlide";const Be=({dir:e})=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:e==="prev"?"M10 3L5 8l5 5":"M6 3l5 5-5 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),Ur=s.forwardRef(({value:e,defaultValue:r=0,onChange:a,loop:n=!1,autoPlay:o=!1,interval:i=5e3,showArrows:l=!0,showIndicators:d=!0,className:c,children:f,"aria-label":p="Carousel",...y},h)=>{const m=s.Children.toArray(f).filter(S=>s.isValidElement(S)&&S.type===Re),u=m.length,v=e!==void 0,[x,g]=s.useState(r),j=Math.min(Math.max(v?e:x,0),Math.max(u-1,0)),_=s.useRef(null),[L,w]=s.useState(!1),M=s.useCallback(S=>{let k=S;k<0?k=n?u-1:0:k>u-1&&(k=n?0:u-1),v||g(k),a==null||a(k)},[u,n,v,a]);s.useEffect(()=>{const S=_.current;if(!S)return;const k=S.children[j];k&&S.scrollTo({left:k.offsetLeft-S.offsetLeft,behavior:"smooth"})},[j]),s.useEffect(()=>{if(!o||L||u<2)return;const S=window.setInterval(()=>M(j+1>u-1?n?0:j:j+1),i);return()=>window.clearInterval(S)},[o,L,u,j,i,n,M]);const E=S=>{S.key==="ArrowLeft"?(S.preventDefault(),M(j-1)):S.key==="ArrowRight"&&(S.preventDefault(),M(j+1))};return t.jsxs("div",{ref:h,className:b("vyre-carousel",c),role:"region","aria-roledescription":"carousel","aria-label":p,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onFocusCapture:()=>w(!0),onBlurCapture:()=>w(!1),onKeyDown:E,...y,children:[t.jsxs("div",{className:"vyre-carousel__viewport",children:[t.jsx("div",{ref:_,className:"vyre-carousel__track",tabIndex:0,"aria-live":o?"off":"polite",children:m.map((S,k)=>t.jsx(s.Fragment,{children:s.cloneElement(S,{"aria-hidden":k!==j||void 0,"aria-label":`${k+1} of ${u}`})},k))}),l&&u>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:"vyre-carousel__arrow vyre-carousel__arrow--prev","aria-label":"Previous slide",disabled:!n&&j===0,onClick:()=>M(j-1),children:t.jsx(Be,{dir:"prev"})}),t.jsx("button",{type:"button",className:"vyre-carousel__arrow vyre-carousel__arrow--next","aria-label":"Next slide",disabled:!n&&j===u-1,onClick:()=>M(j+1),children:t.jsx(Be,{dir:"next"})})]})]}),d&&u>1&&t.jsx("div",{className:"vyre-carousel__indicators",role:"tablist",children:m.map((S,k)=>t.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${k+1}`,"aria-selected":k===j,"data-active":k===j?"":void 0,className:"vyre-carousel__dot",onClick:()=>M(k)},k))})]})});Ur.displayName="VyreCarousel";const zr=s.createContext({collapsed:!1,toggleCollapsed:()=>{}}),oe=()=>s.useContext(zr),Xr=s.forwardRef(({defaultCollapsed:e=!1,collapsed:r,onCollapsedChange:a,className:n,children:o},i)=>{const[l,d]=s.useState(e),c=r!==void 0?r:l,f=s.useCallback(()=>{const p=!c;d(p),a==null||a(p)},[c,a]);return t.jsx(zr.Provider,{value:{collapsed:c,toggleCollapsed:f},children:t.jsx("div",{ref:i,className:b("vyre-app-layout",n),children:o})})});Xr.displayName="VyreAppLayout";const Zr=s.forwardRef(({variant:e="default",className:r,children:a},n)=>{const{collapsed:o}=oe();return t.jsx("aside",{ref:n,className:b("vyre-sidebar",o&&"vyre-sidebar--collapsed",e==="floating"&&"vyre-sidebar--floating",r),"data-collapsed":o||void 0,children:a})});Zr.displayName="VyreSidebar";const Qr=s.forwardRef(({logo:e,title:r,className:a,children:n},o)=>t.jsxs("div",{ref:o,className:b("vyre-sidebar__header",a),children:[e&&t.jsx("span",{className:"vyre-sidebar__logo",children:e}),r&&t.jsx("span",{className:"vyre-sidebar__title",children:r}),n]}));Qr.displayName="VyreSidebarHeader";const Jr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:b("vyre-sidebar__content",e),children:r}));Jr.displayName="VyreSidebarContent";const ea=s.forwardRef(({label:e,className:r,children:a},n)=>t.jsxs("div",{ref:n,className:b("vyre-sidebar__section",r),children:[e&&t.jsx("div",{className:"vyre-sidebar__section-label",children:e}),a]}));ea.displayName="VyreSidebarSection";const ta=({active:e,icon:r,badge:a,href:n,onClick:o,className:i,children:l})=>{const{collapsed:d}=oe(),c=b("vyre-sidebar__item",e&&"vyre-sidebar__item--active",i),f=t.jsxs(t.Fragment,{children:[r&&t.jsx("span",{className:"vyre-sidebar__item-icon",children:r}),t.jsx("span",{className:"vyre-sidebar__item-label",children:l}),a!==void 0&&t.jsx("span",{className:"vyre-sidebar__item-badge",children:a})]});return n?t.jsx("a",{href:n,className:c,"aria-current":e?"page":void 0,title:d?String(l):void 0,children:f}):t.jsx("button",{type:"button",className:c,onClick:o,"aria-pressed":e,title:d?String(l):void 0,children:f})};ta.displayName="VyreSidebarItem";const ra=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:b("vyre-sidebar__footer",e),children:r}));ra.displayName="VyreSidebarFooter";const aa=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:b("vyre-app-shell",e),children:r}));aa.displayName="VyreAppShell";const na=s.forwardRef(({className:e,children:r},a)=>t.jsx("header",{ref:a,className:b("vyre-app-bar",e),children:r}));na.displayName="VyreAppBar";const fn=t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[t.jsx("rect",{x:"2",y:"4",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"}),t.jsx("rect",{x:"2",y:"7.25",width:"8",height:"1.5",rx:"0.75",fill:"currentColor"}),t.jsx("rect",{x:"2",y:"10.5",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"})]}),sa=({className:e,icon:r,collapsedIcon:a})=>{const{collapsed:n,toggleCollapsed:o}=oe(),i=r??fn,l=a??i;return t.jsx("button",{type:"button",className:b("vyre-sidebar-trigger",e),onClick:o,"aria-label":n?"Expand sidebar":"Collapse sidebar","aria-expanded":!n,children:n?l:i})};sa.displayName="VyreSidebarTrigger";const oa=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:b("vyre-page-content",e),children:r}));oa.displayName="VyrePageContent";exports.Accordion=dt;exports.AccordionContent=vt;exports.AccordionItem=ut;exports.AccordionTrigger=mt;exports.Alert=Et;exports.AlertDialog=At;exports.AppBar=na;exports.AppLayout=Xr;exports.AppShell=aa;exports.Avatar=pe;exports.Badge=$e;exports.Blockquote=Cr;exports.Box=Dr;exports.Breadcrumb=Wt;exports.BreadcrumbItem=Pt;exports.BreadcrumbLink=Ht;exports.BreadcrumbSeparator=Gt;exports.Button=Ve;exports.ButtonGroup=or;exports.Calendar=te;exports.Card=ve;exports.CardBody=fe;exports.CardFooter=We;exports.CardHeader=Fe;exports.Carousel=Ur;exports.CarouselSlide=Re;exports.Checkbox=ft;exports.Code=kr;exports.Combobox=lr;exports.Command=_e;exports.CommandDialog=sr;exports.CommandEmpty=tr;exports.CommandGroup=rr;exports.CommandInput=Jt;exports.CommandItem=ar;exports.CommandList=er;exports.CommandSeparator=nr;exports.Conversation=gr;exports.DataGrid=cr;exports.DatePicker=ur;exports.DateRangePicker=mr;exports.DropdownCheckboxItem=St;exports.DropdownItem=Rt;exports.DropdownLabel=Ct;exports.DropdownMenu=kt;exports.DropdownRadioGroup=Lt;exports.DropdownRadioItem=Dt;exports.DropdownSeparator=Mt;exports.DropdownSub=It;exports.EmptyState=Wr;exports.Field=ye;exports.FieldDescription=He;exports.FieldError=Ge;exports.FieldGroup=Oe;exports.FieldLabel=Pe;exports.FieldSet=qe;exports.Form=Mr;exports.FormField=Tr;exports.Grid=Sr;exports.GridItem=Lr;exports.Heading=wr;exports.Input=Ke;exports.Item=vr;exports.ItemActions=br;exports.ItemContent=hr;exports.ItemDescription=xr;exports.ItemGroup=fr;exports.ItemMedia=yr;exports.ItemTitle=pr;exports.Kanban=_r;exports.Label=jt;exports.Lead=Nr;exports.Modal=Ue;exports.ModalBody=Xe;exports.ModalFooter=Ze;exports.ModalHeader=ze;exports.NumberInput=Er;exports.OTPInput=Yr;exports.PageContent=oa;exports.Pagination=Ot;exports.Popover=wt;exports.Progress=_t;exports.Radio=xe;exports.RadioGroup=ht;exports.RichTextEditor=pt;exports.Select=Je;exports.Separator=gt;exports.Sheet=Bt;exports.SheetBody=$t;exports.SheetFooter=Ft;exports.SheetHeader=Vt;exports.Sidebar=Zr;exports.SidebarContent=Jr;exports.SidebarFooter=ra;exports.SidebarHeader=Qr;exports.SidebarItem=ta;exports.SidebarSection=ea;exports.SidebarTrigger=sa;exports.Skeleton=be;exports.Slider=bt;exports.Stack=Rr;exports.Stat=Pr;exports.StatGroup=Hr;exports.Step=Ne;exports.StepPanel=ke;exports.Stepper=$r;exports.StepperNav=Fr;exports.Switch=xt;exports.Tab=nt;exports.TabList=at;exports.TabPanel=ot;exports.TabPanels=st;exports.Table=qt;exports.TableBody=Yt;exports.TableCaption=Zt;exports.TableCell=Xt;exports.TableHead=Kt;exports.TableHeader=zt;exports.TableRow=Ut;exports.Tabs=rt;exports.Tag=ge;exports.TagGroup=dr;exports.TagsInput=ir;exports.Text=jr;exports.Textarea=Ye;exports.Timeline=Gr;exports.TimelineItem=Ce;exports.ToastProvider=ha;exports.ToggleGroup=Br;exports.ToggleItem=je;exports.Tooltip=it;exports.Tree=qr;exports.cn=b;exports.useAppLayout=oe;exports.useToast=pa;
|