@usevyre/react 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Layout/Layout.d.ts +184 -0
- package/dist/components/Sidebar/Sidebar.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1660 -1462
- package/dist/styles/components.css +316 -59
- 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"),P=require("react-dom");function v(...e){const r=[];for(const a of e)if(a){if(typeof a=="string")r.push(a);else if(Array.isArray(a)){const n=v(...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 Lr={primary:"vyre-btn--primary",secondary:"vyre-btn--secondary",ghost:"vyre-btn--ghost",accent:"vyre-btn--accent",teal:"vyre-btn--teal",danger:"vyre-btn--danger"},Dr={sm:"vyre-btn--sm",md:"vyre-btn--md",lg:"vyre-btn--lg",icon:"vyre-btn--icon"},we=s.forwardRef(({variant:e="secondary",size:r="md",loading:a=!1,disabled:n,leftIcon:o,rightIcon:i,className:l,children:c,as:d="button",...h},f)=>{const y=n||a;return t.jsxs(d,{ref:f,className:v("vyre-btn",Lr[e],Dr[r],a&&"vyre-btn--loading",l),disabled:d==="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(Sr,{})}),!a&&o&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--left","aria-hidden":"true",children:o}),c&&t.jsx("span",{className:"vyre-btn__label",children:c}),i&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--right","aria-hidden":"true",children:i})]})});we.displayName="VyreButton";function Sr(){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:v("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 de=s.forwardRef(({variant:e="default",hoverable:r=!1,clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:v("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}));de.displayName="VyreCard";const Ne=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-card__header",e),...a,children:r}));Ne.displayName="VyreCardHeader";const ue=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-card__body",e),...a,children:r}));ue.displayName="VyreCardBody";const Ce=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-card__footer",e),...a,children:r}));Ce.displayName="VyreCardFooter";const Re=s.forwardRef(({label:e,hint:r,state:a="idle",required:n=!1,htmlFor:o,className:i,children:l,...c},d)=>t.jsxs("div",{ref:d,className:v("vyre-field",a!=="idle"&&`vyre-field--${a}`,i),"data-state":a,...c,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})]}));Re.displayName="VyreField";const Le=s.forwardRef(({required:e=!1,className:r,children:a,...n},o)=>t.jsxs("label",{ref:o,className:v("vyre-field__label",r),...n,children:[a,e&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}));Le.displayName="VyreFieldLabel";const De=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:v("vyre-field__description",e),...a,children:r}));De.displayName="VyreFieldDescription";const Se=s.forwardRef(({className:e,children:r,...a},n)=>r?t.jsx("p",{ref:n,role:"alert",className:v("vyre-field__error",e),...a,children:r}):null);Se.displayName="VyreFieldError";const Me=s.forwardRef(({orientation:e="vertical",className:r,children:a,...n},o)=>t.jsx("div",{ref:o,className:v("vyre-field-group",`vyre-field-group--${e}`,r),...n,children:a}));Me.displayName="VyreFieldGroup";const Ie=s.forwardRef(({legend:e,className:r,children:a,...n},o)=>t.jsxs("fieldset",{ref:o,className:v("vyre-field-set",r),...n,children:[e&&t.jsx("legend",{className:"vyre-field-set__legend",children:e}),a]}));Ie.displayName="VyreFieldSet";const Te=s.forwardRef(({size:e="md",leftElement:r,rightElement:a,className:n,...o},i)=>r||a?t.jsxs("div",{className:v("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:v("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:v("vyre-input",`vyre-input--${e}`,n),...o}));Te.displayName="VyreInput";const Ee=s.forwardRef(({size:e="md",resize:r="vertical",className:a,style:n,...o},i)=>t.jsx("textarea",{ref:i,className:v("vyre-textarea",`vyre-textarea--${e}`,a),style:{resize:r,...n},...o}));Ee.displayName="VyreTextarea";const Mr=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ae=s.forwardRef(({open:e,onClose:r,size:a="md",closeOnBackdrop:n=!0,closeOnEsc:o=!0,initialFocus:i,className:l,children:c,"aria-label":d,"aria-labelledby":h,...f},y)=>{const p=s.useRef(null),x=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 N=p.current;if(!N)return;const b=Array.from(N.querySelectorAll(Mr));if(!b.length)return;const L=b[0],w=b[b.length-1];g.shiftKey&&document.activeElement===L?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),L.focus())},[]),_=s.useCallback(g=>{g.key==="Escape"&&o&&r()},[o,r]);return s.useEffect(()=>{if(!e)return;document.addEventListener("keydown",_),document.addEventListener("keydown",m);const g=document.body.style.overflow;document.body.style.overflow="hidden";const N=setTimeout(()=>{var b;i!=null&&i.current?i.current.focus():(b=p.current)==null||b.focus()},0);return()=>{document.removeEventListener("keydown",_),document.removeEventListener("keydown",m),document.body.style.overflow=g,clearTimeout(N)}},[e,_,m,i]),e?P.createPortal(t.jsx("div",{ref:x,className:"vyre-modal-backdrop",onClick:g=>{n&&g.target===x.current&&r()},role:"presentation",children:t.jsx("div",{ref:u,className:v("vyre-modal",`vyre-modal--${a}`,l),role:"dialog","aria-modal":"true","aria-label":d,"aria-labelledby":h,tabIndex:-1,...f,children:c})}),document.body):null});Ae.displayName="VyreModal";const Be=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-modal__header",e),...a,children:r}));Be.displayName="VyreModalHeader";const Ve=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-modal__body",e),...a,children:r}));Ve.displayName="VyreModalBody";const $e=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-modal__footer",e),...a,children:r}));$e.displayName="VyreModalFooter";const Fe=s.createContext(null);function Ir(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 Tr=0;const Er=()=>`vyre-t-${++Tr}`;function Ar({children:e}){const[r,a]=s.useReducer(Ir,[]),n=s.useCallback(i=>{const l=Er();return a({type:"ADD",payload:{...i,id:l}}),l},[]),o=s.useCallback(i=>{a({type:"REMOVE",id:i})},[]);return t.jsxs(Fe.Provider,{value:{toast:n,dismiss:o},children:[e,typeof document<"u"&&P.createPortal(t.jsx("div",{className:"vyre-toast-viewport","aria-live":"polite","aria-atomic":"false","aria-label":"Notifications",children:r.map(i=>t.jsx(Vr,{...i,onDismiss:()=>o(i.id)},i.id))}),document.body)]})}function Br(){const e=s.useContext(Fe);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function Vr({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:v("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($r,{})})]})}function $r(){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 We=s.forwardRef(({options:e,value:r,defaultValue:a,onChange:n,placeholder:o="Select an option",disabled:i=!1,size:l="md",className:c,...d},h)=>{const f=r!==void 0,[y,p]=s.useState(a??""),x=f?r:y,[u,m]=s.useState(!1),[_,g]=s.useState(-1),N=s.useRef(null),b=s.useRef(null),w=`${s.useId()}-listbox`,I=e.find(j=>j.value===x),A=e.filter(j=>!j.disabled),T=s.useCallback(()=>{m(!1),g(-1)},[]),M=s.useCallback(j=>{var k;j.disabled||(f||p(j.value),n==null||n(j.value),T(),(k=N.current)==null||k.focus())},[f,n,T]);s.useEffect(()=>{if(!u)return;const j=k=>{const D=h==null?void 0:h.current;D&&!D.contains(k.target)&&T()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[u,h,T]),s.useEffect(()=>{var k;if(!u||_<0)return;const j=(k=b.current)==null?void 0:k.children[_];j==null||j.scrollIntoView({block:"nearest"})},[_,u]);const B=j=>{switch(j.key){case"Enter":case" ":case"ArrowDown":{if(j.preventDefault(),!u){m(!0);const k=e.findIndex(D=>D.value===x);g(k>=0?k:0)}break}case"ArrowUp":{j.preventDefault(),u||(m(!0),g(e.length-1));break}case"Escape":{T();break}}},R=j=>{var k;switch(j.key){case"ArrowDown":{j.preventDefault(),g(D=>{let E=D+1;for(;E<e.length&&e[E].disabled;)E++;return E<e.length?E:D});break}case"ArrowUp":{j.preventDefault(),g(D=>{let E=D-1;for(;E>=0&&e[E].disabled;)E--;return E>=0?E:D});break}case"Enter":case" ":{j.preventDefault(),_>=0&&M(e[_]);break}case"Escape":case"Tab":{T(),(k=N.current)==null||k.focus();break}case"Home":{j.preventDefault();const D=e.findIndex(E=>!E.disabled);D>=0&&g(D);break}case"End":{j.preventDefault();const D=[...e].reverse().findIndex(E=>!E.disabled);D>=0&&g(e.length-1-D);break}}};return t.jsxs("div",{ref:h,className:v("vyre-select",`vyre-select--${l}`,c),"data-open":u,...d,children:[t.jsxs("button",{ref:N,type:"button",className:"vyre-select__trigger","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":w,"aria-disabled":i,disabled:i,onClick:()=>{i||m(j=>{if(!j){const k=e.findIndex(D=>D.value===x);g(k>=0?k:0)}return!j})},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(Fr,{})]}),u&&t.jsxs("ul",{ref:b,id:w,role:"listbox",className:"vyre-select__dropdown","aria-label":"Options",tabIndex:-1,onKeyDown:R,children:[e.map((j,k)=>t.jsxs("li",{role:"option","aria-selected":j.value===x,"aria-disabled":j.disabled,"data-highlighted":k===_,className:"vyre-select__option",onMouseEnter:()=>!j.disabled&&g(k),onMouseDown:D=>{D.preventDefault(),M(j)},children:[j.label,j.value===x&&t.jsx(Wr,{})]},j.value)),A.length===0&&t.jsx("li",{className:"vyre-select__empty",role:"presentation",children:"No options available"})]})]})});We.displayName="VyreSelect";function Fr(){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 Wr(){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 He=s.createContext(null);function Pe(){const e=s.useContext(He);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 c=r!==void 0,[d,h]=s.useState(e),f=c?r:d,y=s.useId(),p=s.useCallback(x=>{c||h(x),a==null||a(x)},[c,a]);return t.jsx(He.Provider,{value:{value:f,onChange:p,baseId:y},children:t.jsx("div",{ref:l,className:v("vyre-tabs",n),...i,children:o})})});Oe.displayName="VyreTabs";const Ge=s.forwardRef(({className:e,children:r,"aria-label":a,...n},o)=>{const i=s.useRef(null),l=c=>{var y;const d=Array.from(((y=i.current)==null?void 0:y.querySelectorAll('[role="tab"]:not([disabled])'))??[]),h=d.findIndex(p=>p===document.activeElement);if(h<0)return;let f=h;if(c.key==="ArrowRight")f=(h+1)%d.length;else if(c.key==="ArrowLeft")f=(h-1+d.length)%d.length;else if(c.key==="Home")f=0;else if(c.key==="End")f=d.length-1;else return;c.preventDefault(),d[f].focus(),d[f].click()};return t.jsx("div",{ref:c=>{i.current=c,typeof o=="function"?o(c):o&&(o.current=c)},role:"tablist",className:v("vyre-tabs__list",e),"aria-label":a,onKeyDown:l,...n,children:r})});Ge.displayName="VyreTabList";const Ye=s.forwardRef(({value:e,disabled:r=!1,className:a,children:n,...o},i)=>{const{value:l,onChange:c,baseId:d}=Pe(),h=e===l;return t.jsx("button",{ref:i,role:"tab",type:"button",id:`${d}-tab-${e}`,"aria-controls":`${d}-panel-${e}`,"aria-selected":h,disabled:r,tabIndex:h?0:-1,className:v("vyre-tabs__tab",h&&"vyre-tabs__tab--active",a),"data-selected":h,onClick:()=>!r&&c(e),...o,children:n})});Ye.displayName="VyreTab";const Ke=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-tabs__panels",e),...a,children:r}));Ke.displayName="VyreTabPanels";const qe=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i,baseId:l}=Pe();return e===i?t.jsx("div",{ref:o,role:"tabpanel",id:`${l}-panel-${e}`,"aria-labelledby":`${l}-tab-${e}`,tabIndex:0,className:v("vyre-tabs__panel",r),...n,children:a}):null});qe.displayName="VyreTabPanel";const Hr=120,Ue=({content:e,placement:r="top",delay:a=300,children:n,className:o})=>{const[i,l]=s.useState("hidden"),c=s.useRef(null),d=s.useRef(null),h=s.useId(),f=s.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),c.current=setTimeout(()=>l("visible"),a)},[a]),y=s.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),l("leaving"),d.current=setTimeout(()=>l("hidden"),Hr)},[]),p=s.Children.only(n),x=s.cloneElement(p,{onMouseEnter:u=>{var m,_;f(),(_=(m=p.props).onMouseEnter)==null||_.call(m,u)},onMouseLeave:u=>{var m,_;y(),(_=(m=p.props).onMouseLeave)==null||_.call(m,u)},onFocus:u=>{var m,_;l("visible"),(_=(m=p.props).onFocus)==null||_.call(m,u)},onBlur:u=>{var m,_;y(),(_=(m=p.props).onBlur)==null||_.call(m,u)},"aria-describedby":i!=="hidden"?h:void 0});return t.jsxs("span",{className:v("vyre-tooltip-wrapper",o),children:[x,i!=="hidden"&&t.jsxs("span",{id:h,role:"tooltip",className:v("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"})]})]})};Ue.displayName="VyreTooltip";const ze=s.createContext(null);function Xe(){const e=s.useContext(ze);if(!e)throw new Error("AccordionItem must be used within Accordion");return e}const Ze=s.forwardRef(({type:e="single",defaultValue:r,value:a,onValueChange:n,className:o,children:i,...l},c)=>{const d=x=>x===void 0?[]:Array.isArray(x)?x:[x],[h,f]=s.useState(d(r)),y=a!==void 0?d(a):h,p=s.useCallback(x=>{let u;e==="single"?u=y.includes(x)?[]:[x]:u=y.includes(x)?y.filter(m=>m!==x):[...y,x],a===void 0&&f(u),n==null||n(e==="single"?u[0]??"":u)},[e,y,a,n]);return t.jsx(ze.Provider,{value:{type:e,value:y,toggle:p},children:t.jsx("div",{ref:c,className:["vyre-accordion",o].filter(Boolean).join(" "),...l,children:i})})});Ze.displayName="Accordion";const me=s.createContext(null),Qe=s.forwardRef(({value:e,className:r,children:a,...n},o)=>{const{value:i}=Xe(),l=i.includes(e);return t.jsx(me.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})})});Qe.displayName="AccordionItem";const Je=s.forwardRef(({className:e,children:r,...a},n)=>{const{toggle:o}=Xe(),i=s.useContext(me);if(!i)throw new Error("AccordionTrigger must be used within AccordionItem");const{itemValue:l,isOpen:c}=i;return t.jsxs("button",{ref:n,type:"button","aria-expanded":c,"data-state":c?"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"})})]})});Je.displayName="AccordionTrigger";const et=s.forwardRef(({className:e,children:r,...a},n)=>{const o=s.useContext(me);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})})});et.displayName="AccordionContent";const ve=s.forwardRef(({src:e,alt:r="",fallback:a,size:n="md",status:o,className:i,...l},c)=>{var y;const[d,h]=s.useState(!1),f=e&&!d;return t.jsxs("span",{ref:c,"data-size":n,className:["vyre-avatar",i].filter(Boolean).join(" "),...l,children:[f?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})]})});ve.displayName="Avatar";const tt=s.forwardRef(({checked:e,defaultChecked:r,indeterminate:a=!1,onCheckedChange:n,disabled:o,size:i="md",className:l,id:c,...d},h)=>{const f=s.useRef(null),y=h??f;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:c,checked:e,defaultChecked:r,disabled:o,className:"vyre-checkbox__input",onChange:p=>n==null?void 0:n(p.target.checked),...d}),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"})})})]})});tt.displayName="Checkbox";const rt=s.createContext(null);let Pr=0;const at=s.forwardRef(({value:e,defaultValue:r,onChange:a,name:n,disabled:o=!1,size:i="md",orientation:l="vertical",options:c,className:d,children:h,...f},y)=>{const[p,x]=s.useState(r),u=e!==void 0,m=u?e:p,_=s.useMemo(()=>n??`vyre-radio-${++Pr}`,[n]),g=s.useCallback(b=>{u||x(b),a==null||a(b)},[u,a]),N={name:_,value:m,onChange:g,groupDisabled:o,size:i};return t.jsx(rt.Provider,{value:N,children:t.jsx("div",{ref:y,role:"radiogroup","aria-orientation":l,className:v("vyre-radio-group",`vyre-radio-group--${l}`,d),"data-disabled":o||void 0,...f,children:c?c.map(b=>t.jsx(fe,{value:b.value,label:b.label,description:b.description,disabled:b.disabled},b.value)):h})})});at.displayName="VyreRadioGroup";const fe=s.forwardRef(({value:e,label:r,description:a,disabled:n,className:o,id:i,...l},c)=>{const d=s.useContext(rt);if(!d)throw new Error("Radio must be used inside a <RadioGroup>.");const h=d.value===e,f=n||d.groupDisabled,y=i??`${d.name}-${e}`.replace(/\s+/g,"-");return t.jsxs("label",{className:v("vyre-radio",`vyre-radio--${d.size}`,f&&"vyre-radio--disabled",o),"data-checked":h||void 0,"data-disabled":f||void 0,htmlFor:y,children:[t.jsx("input",{ref:c,type:"radio",id:y,name:d.name,value:e,checked:h,disabled:f,className:"vyre-radio__input",onChange:()=>{var p;return(p=d.onChange)==null?void 0:p.call(d,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 Or=["bold","italic","underline","strike","h1","h2","h3","ul","ol","quote","code","link","clear"];function W(e,r){document.execCommand(e,!1,r)}const nt=s.forwardRef(({value:e,onChange:r,placeholder:a="Write something…",disabled:n=!1,readOnly:o=!1,toolbar:i=Or,minHeight:l="10rem",className:c,...d},h)=>{const f=s.useRef(null),y=!n&&!o;s.useEffect(()=>{const m=f.current;m&&m.innerHTML!==e&&(m.innerHTML=e)},[e]);const p=s.useCallback(()=>{f.current&&r(f.current.innerHTML)},[r]),x=s.useCallback(m=>{var _;y&&((_=f.current)==null||_.focus(),m(),p())},[y,p]),u={bold:{label:"Bold",icon:t.jsx("b",{children:"B"}),run:()=>W("bold")},italic:{label:"Italic",icon:t.jsx("i",{children:"I"}),run:()=>W("italic")},underline:{label:"Underline",icon:t.jsx("u",{children:"U"}),run:()=>W("underline")},strike:{label:"Strikethrough",icon:t.jsx("s",{children:"S"}),run:()=>W("strikeThrough")},h1:{label:"Heading 1",icon:t.jsx(t.Fragment,{children:"H1"}),run:()=>W("formatBlock","<h1>")},h2:{label:"Heading 2",icon:t.jsx(t.Fragment,{children:"H2"}),run:()=>W("formatBlock","<h2>")},h3:{label:"Heading 3",icon:t.jsx(t.Fragment,{children:"H3"}),run:()=>W("formatBlock","<h3>")},ul:{label:"Bullet list",icon:t.jsx(t.Fragment,{children:"•≡"}),run:()=>W("insertUnorderedList")},ol:{label:"Numbered list",icon:t.jsx(t.Fragment,{children:"1.≡"}),run:()=>W("insertOrderedList")},quote:{label:"Quote",icon:t.jsx(t.Fragment,{children:"“”"}),run:()=>W("formatBlock","<blockquote>")},code:{label:"Code block",icon:t.jsx(t.Fragment,{children:"</>"}),run:()=>W("formatBlock","<pre>")},link:{label:"Link",icon:t.jsx(t.Fragment,{children:"🔗"}),run:()=>{const m=window.prompt("Link URL");m&&W("createLink",m)}},clear:{label:"Clear formatting",icon:t.jsx(t.Fragment,{children:"⌫"}),run:()=>W("removeFormat")}};return t.jsxs("div",{ref:h,className:v("vyre-rte",n&&"vyre-rte--disabled",o&&"vyre-rte--readonly",c),...d,children:[!o&&t.jsx("div",{className:"vyre-rte__toolbar",role:"toolbar","aria-label":"Formatting",children:i.map(m=>{const _=u[m];return _?t.jsx("button",{type:"button",className:"vyre-rte__tool",title:_.label,"aria-label":_.label,disabled:!y,onMouseDown:g=>g.preventDefault(),onClick:()=>x(_.run),children:_.icon},m):null})}),t.jsx("div",{ref:f,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})]})});nt.displayName="VyreRichTextEditor";const st=s.forwardRef(({checked:e,defaultChecked:r=!1,onCheckedChange:a,disabled:n,size:o="md",className:i,...l},c)=>{const[d,h]=s.useState(r),f=e!==void 0?e:d,y=()=>{if(n)return;const p=!f;e===void 0&&h(p),a==null||a(p)};return t.jsx("button",{ref:c,type:"button",role:"switch","aria-checked":f,disabled:n,"data-checked":f||void 0,"data-size":o,className:["vyre-switch",i].filter(Boolean).join(" "),onClick:y,...l,children:t.jsx("span",{className:"vyre-switch__thumb"})})});st.displayName="Switch";const ot=s.forwardRef(({value:e,defaultValue:r=0,min:a=0,max:n=100,step:o=1,onValueChange:i,disabled:l,size:c="md",className:d,style:h,...f},y)=>{const[p,x]=s.useState(r),u=e!==void 0?e:p,m=(u-a)/(n-a)*100;return t.jsxs("div",{className:["vyre-slider",`vyre-slider--${c}`,d].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:_=>{const g=Number(_.target.value);e===void 0&&x(g),i==null||i(g)},...f}),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}%`}})]})]})});ot.displayName="Slider";const it=s.forwardRef(({value:e,max:r=100,indeterminate:a=!1,size:n="md",variant:o="default",className:i,...l},c)=>{const d=a?void 0:Math.min(100,Math.max(0,(e??0)/r*100));return t.jsx("div",{ref:c,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:d!==void 0?{width:`${d}%`}:void 0})})});it.displayName="Progress";const lt=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}));lt.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 ye=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}));ye.displayName="Skeleton";const re=8,Gr=120;function Yr(e){const[r,a]=e.split("-");return{side:r,align:a??"center"}}function Kr(e,r,a,n,o,i){const l=e.width,c=e.height,d=r.width,h=r.height,f=e.left+o,y=e.top+i;let p=0,x=0;switch(a){case"top":p=y-h-re;break;case"bottom":p=y+c+re;break;case"left":x=f-d-re;break;case"right":x=f+l+re;break}if(a==="top"||a==="bottom")switch(n){case"start":x=f;break;case"center":x=f+l/2-d/2;break;case"end":x=f+l-d;break}else switch(n){case"start":p=y;break;case"center":p=y+c/2-h/2;break;case"end":p=y+c-h;break}return{top:p,left:x}}const dt=({trigger:e,children:r,open:a,onOpenChange:n,placement:o="bottom",closeOnOutside:i=!0,className:l})=>{const c=a!==void 0,[d,h]=s.useState(!1),[f,y]=s.useState(!1),[p,x]=s.useState(!1),[u,m]=s.useState({top:0,left:0}),_=c?a:d,g=s.useRef(null),N=s.useRef(null),b=s.useRef(null),L=s.useId(),{side:w,align:I}=Yr(o),A=s.useCallback(R=>{c||h(R),n==null||n(R)},[c,n]),T=s.useCallback(()=>A(!_),[_,A]),M=s.useCallback(()=>{y(!0),b.current=setTimeout(()=>{y(!1),x(!1),A(!1)},Gr)},[A]);s.useEffect(()=>{_?(b.current&&(clearTimeout(b.current),b.current=null),y(!1),x(!0)):p&&!f&&M()},[_]),s.useEffect(()=>{if(!p||!g.current||!N.current)return;const R=g.current.getBoundingClientRect(),j=N.current.getBoundingClientRect(),k=Kr(R,j,w,I,window.scrollX,window.scrollY);m(k)},[p,w,I]),s.useEffect(()=>{if(!p||!i)return;const R=j=>{N.current&&!N.current.contains(j.target)&&g.current&&!g.current.contains(j.target)&&M()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[p,i,M]),s.useEffect(()=>{if(!p)return;const R=j=>{j.key==="Escape"&&M()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[p,M]);const B=s.cloneElement(e,{ref:g,onClick:R=>{var j,k;T(),(k=(j=e.props).onClick)==null||k.call(j,R)},"aria-expanded":_,"aria-controls":L,"aria-haspopup":"dialog"});return t.jsxs(t.Fragment,{children:[B,p&&P.createPortal(t.jsx("div",{ref:N,id:L,role:"dialog","aria-modal":"false",className:v("vyre-popover",`vyre-popover--${w}`,f&&"vyre-popover--leaving",l),style:{top:u.top,left:u.left},children:r}),document.body)]})};dt.displayName="VyrePopover";const ae=s.createContext(null),ut=s.createContext(null),qr=120,mt=({trigger:e,children:r,placement:a="bottom-start",className:n})=>{const[o,i]=s.useState(!1),[l,c]=s.useState(!1),[d,h]=s.useState(!1),[f,y]=s.useState({top:0,left:0}),[p,x]=s.useState(-1),u=s.useRef(null),m=s.useRef(null),_=s.useRef(null),g=s.useId(),N=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])"))??[])},[]),b=s.useCallback(()=>{c(!0),_.current=setTimeout(()=>{var M;c(!1),h(!1),i(!1),x(-1),(M=u.current)==null||M.focus({preventScroll:!0})},qr)},[]),L=s.useCallback(()=>{_.current&&(clearTimeout(_.current),_.current=null),c(!1),i(!0),h(!0)},[]),w=s.useCallback(()=>{o?b():L()},[o,L,b]);s.useEffect(()=>{if(!d||!u.current)return;const M=u.current.getBoundingClientRect(),B=4,R=window.scrollX,j=window.scrollY;let k=0,D=0;a.startsWith("bottom")?(k=M.bottom+j+B,D=a==="bottom-start"?M.left+R:M.right+R):(k=M.top+j-B,D=a==="top-start"?M.left+R:M.right+R),y({top:k,left:D}),requestAnimationFrame(()=>{var V;(V=N()[0])==null||V.focus({preventScroll:!0}),x(0)})},[d,a,N]),s.useEffect(()=>{if(!d)return;const M=R=>{m.current&&!m.current.contains(R.target)&&u.current&&!u.current.contains(R.target)&&b()},B=R=>{var j,k,D;if(R.key==="Escape"){b();return}if(R.key==="ArrowDown"||R.key==="ArrowUp"){R.preventDefault();const E=N();if(!E.length)return;const V=R.key==="ArrowDown"?1:-1,X=(p+V+E.length)%E.length;(j=E[X])==null||j.focus({preventScroll:!0}),x(X)}if(R.key==="Home"&&((k=N()[0])==null||k.focus({preventScroll:!0}),x(0)),R.key==="End"){const E=N();(D=E[E.length-1])==null||D.focus({preventScroll:!0}),x(E.length-1)}};return document.addEventListener("mousedown",M),document.addEventListener("keydown",B),()=>{document.removeEventListener("mousedown",M),document.removeEventListener("keydown",B)}},[d,p,b,N]);const I=s.cloneElement(e,{ref:u,onClick:M=>{var B,R;w(),(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(ae.Provider,{value:{close:b},children:[I,d&&P.createPortal(t.jsx("div",{ref:m,id:g,role:"menu","aria-orientation":"vertical",className:v("vyre-dropdown",A&&"vyre-dropdown--end",T&&"vyre-dropdown--top",l&&"vyre-dropdown--leaving",n),style:{top:f.top,left:f.left,transform:A?"translateX(-100%)":void 0},children:r}),document.body)]})};mt.displayName="VyreDropdownMenu";const vt=({children:e,className:r})=>t.jsx("div",{className:v("vyre-dropdown__label",r),children:e});vt.displayName="VyreDropdownLabel";const ft=({children:e,onSelect:r,disabled:a=!1,variant:n="default",icon:o,shortcut:i,className:l})=>{const c=s.useContext(ae);return t.jsxs("button",{role:"menuitem",className:v("vyre-dropdown__item",n==="danger"&&"vyre-dropdown__item--danger",l),"aria-disabled":a||void 0,disabled:a,tabIndex:-1,onClick:()=>{a||(r==null||r(),c==null||c.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 yt=({children:e,checked:r,onCheckedChange:a,disabled:n=!1,shortcut:o,className:i})=>{const l=s.useContext(ae);return t.jsxs("button",{role:"menuitemcheckbox","aria-checked":r,"aria-disabled":n||void 0,disabled:n,tabIndex:-1,className:v("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})]})};yt.displayName="VyreDropdownCheckboxItem";const ht=({value:e,onValueChange:r,children:a})=>t.jsx(ut.Provider,{value:{value:e,onValueChange:r},children:t.jsx("div",{role:"group",children:a})});ht.displayName="VyreDropdownRadioGroup";const bt=({children:e,value:r,disabled:a=!1,className:n})=>{const o=s.useContext(ae),i=s.useContext(ut),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:v("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 pt=({trigger:e,children:r,icon:a,placement:n="right",disabled:o=!1,className:i})=>{const[l,c]=s.useState(!1),[d,h]=s.useState({top:0,left:0}),f=s.useRef(null),y=s.useRef(null),p=s.useCallback(()=>{if(!f.current)return;const m=f.current.getBoundingClientRect(),_=window.scrollX,g=window.scrollY,N=2;h({top:m.top+g,left:n==="right"?m.right+_+N:m.left+_-N}),c(!0)},[n]),x=s.useCallback(()=>c(!1),[]),u=m=>{var g;const _=m.relatedTarget;(g=y.current)!=null&&g.contains(_)||x()};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{ref:f,role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"aria-disabled":o||void 0,disabled:o,tabIndex:-1,className:v("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&&P.createPortal(t.jsx("div",{ref:y,role:"menu",className:v("vyre-dropdown vyre-dropdown--sub",n==="left"&&"vyre-dropdown--sub-left"),style:{position:"absolute",top:d.top,left:n==="right"?d.left:void 0,right:n==="left"?`calc(100vw - ${d.left}px)`:void 0,transform:n==="left"?"translateX(-100%)":void 0},onMouseLeave:m=>{var g;const _=m.relatedTarget;(g=f.current)!=null&&g.contains(_)||x()},children:r}),document.body)]})};pt.displayName="VyreDropdownSub";const xt=({className:e})=>t.jsx("div",{role:"separator",className:v("vyre-dropdown__separator",e)});xt.displayName="VyreDropdownSeparator";const Ur=()=>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"})]}),zr=()=>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"})]}),Xr=()=>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"})]}),Zr=()=>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"})]}),_t={info:Ur,success:zr,warning:Xr,danger:Zr},gt=({variant:e="info",title:r,icon:a,onClose:n,children:o,className:i})=>{const l=_t[e];return t.jsxs("div",{role:"alert",className:v("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"})})})]})};gt.displayName="VyreAlert";const Qr=["button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),jt=({open:e,onOpenChange:r,title:a,description:n,variant:o="danger",confirmLabel:i="Confirm",cancelLabel:l="Cancel",onConfirm:c,onCancel:d,className:h})=>{const f=s.useRef(null),y=s.useRef(null),p=s.useRef(null),x=s.useCallback(()=>{d==null||d(),r(!1)},[d,r]),u=s.useCallback(()=>{c==null||c(),r(!1)},[c,r]),m=s.useCallback(g=>{if(g.key!=="Tab")return;const N=f.current;if(!N)return;const b=Array.from(N.querySelectorAll(Qr));if(!b.length)return;const L=b[0],w=b[b.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",m);const g=document.body.style.overflow;document.body.style.overflow="hidden";const N=b=>{b.key==="Escape"&&x()};return document.addEventListener("keydown",N),setTimeout(()=>{var b;return(b=p.current)==null?void 0:b.focus()},0),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keydown",N),document.body.style.overflow=g}},[e,m,x]),!e)return null;const _=_t[o];return P.createPortal(t.jsx("div",{ref:y,className:"vyre-alert-dialog-backdrop",onClick:g=>{g.target===y.current&&x()},role:"presentation",children:t.jsxs("div",{ref:f,role:"alertdialog","aria-modal":"true","aria-labelledby":"vyre-ad-title","aria-describedby":n?"vyre-ad-desc":void 0,className:v("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:v("vyre-alert-dialog__icon",`vyre-alert-dialog__icon--${o}`),children:t.jsx(_,{})})}),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:x,children:l}),t.jsx("button",{type:"button",className:v("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)};jt.displayName="VyreAlertDialog";const Jr=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),wt=s.forwardRef(({open:e,onClose:r,side:a="right",size:n="md",closeOnBackdrop:o=!0,closeOnEsc:i=!0,className:l,children:c,"aria-label":d,"aria-labelledby":h,...f},y)=>{const p=s.useRef(null),x=s.useRef(null),u=s.useCallback(m=>{if(m.key!=="Tab")return;const _=p.current;if(!_)return;const g=Array.from(_.querySelectorAll(Jr));if(!g.length)return;const N=g[0],b=g[g.length-1];m.shiftKey&&document.activeElement===N?(m.preventDefault(),b.focus()):!m.shiftKey&&document.activeElement===b&&(m.preventDefault(),N.focus())},[]);return s.useEffect(()=>{if(!e)return;if(document.addEventListener("keydown",u),i){const _=N=>{N.key==="Escape"&&r()};document.addEventListener("keydown",_);const g=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var N;return(N=p.current)==null?void 0:N.focus()},0),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keydown",_),document.body.style.overflow=g}}const m=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var _;return(_=p.current)==null?void 0:_.focus()},0),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=m}},[e,u,i,r]),e?P.createPortal(t.jsx("div",{ref:x,className:"vyre-sheet-backdrop",onClick:m=>{o&&m.target===x.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":d,"aria-labelledby":h,tabIndex:-1,className:v("vyre-sheet",`vyre-sheet--${a}`,`vyre-sheet--${n}`,l),...f,children:c})}),document.body):null});wt.displayName="VyreSheet";const kt=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-sheet__header",e),...a,children:r}));kt.displayName="VyreSheetHeader";const Nt=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-sheet__body",e),...a,children:r}));Nt.displayName="VyreSheetBody";const Ct=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-sheet__footer",e),...a,children:r}));Ct.displayName="VyreSheetFooter";const Rt=({children:e,separator:r="/",className:a})=>{const n=s.Children.toArray(e).filter(Boolean);return t.jsx("nav",{"aria-label":"Breadcrumb",className:v("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))})})};Rt.displayName="VyreBreadcrumb";const Lt=({children:e,href:r,current:a=!1,className:n})=>a||!r?t.jsx("span",{className:v("vyre-breadcrumb__link vyre-breadcrumb__link--current",n),"aria-current":a?"page":void 0,children:e}):t.jsx("a",{href:r,className:v("vyre-breadcrumb__link",n),children:e});Lt.displayName="VyreBreadcrumbItem";const Dt=({children:e,href:r,className:a})=>t.jsx("a",{href:r,className:v("vyre-breadcrumb__link",a),children:e});Dt.displayName="VyreBreadcrumbLink";const St=({children:e="/",className:r})=>t.jsx("span",{className:v("vyre-breadcrumb__separator",r),"aria-hidden":"true",children:e});St.displayName="VyreBreadcrumbSeparator";function xe(e,r){return Array.from({length:r-e+1},(a,n)=>e+n)}function ea(e,r,a){const n=a*2+5;if(r<=n)return xe(1,r);const o=Math.max(e-a,2),i=Math.min(e+a,r-1),l=o>2,c=i<r-1,d=[1];return l&&d.push("..."),d.push(...xe(o,i)),c&&d.push("..."),d.push(r),d}const ta=()=>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"})}),ra=()=>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"})}),aa=()=>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"})}),na=()=>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:c,className:d})=>{const h=ea(e,r,n),f=e>1,y=e<r,p=s.useMemo(()=>{if(!i)return null;if(l!=null&&c!=null){const u=(e-1)*c+1,m=Math.min(e*c,l);return`Showing ${u}–${m} of ${l}`}return`Page ${e} of ${r}`},[i,e,r,l,c]),x=t.jsxs(t.Fragment,{children:[o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(1),disabled:!f,"aria-label":"First page",children:t.jsx(aa,{})}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(e-1),disabled:!f,"aria-label":"Previous page",children:t.jsx(ta,{})}),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:v("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(ra,{})}),o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>a(r),disabled:!y,"aria-label":"Last page",children:t.jsx(na,{})})]});return i?t.jsxs("div",{className:v("vyre-pagination-row",d),children:[t.jsx("span",{className:"vyre-pagination__info",children:p}),t.jsx("nav",{"aria-label":"Pagination",className:"vyre-pagination",children:x})]}):t.jsx("nav",{"aria-label":"Pagination",className:v("vyre-pagination",d),children:x})};Mt.displayName="VyrePagination";const It=({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:v("vyre-table",r&&"vyre-table--striped",a&&"vyre-table--bordered",n&&"vyre-table--compact",o&&"vyre-table--hoverable",i),children:e})});It.displayName="VyreTable";const Tt=s.forwardRef(({className:e,...r},a)=>t.jsx("thead",{ref:a,className:v("vyre-table__head",e),...r}));Tt.displayName="VyreTableHead";const Et=s.forwardRef(({className:e,...r},a)=>t.jsx("tbody",{ref:a,className:v("vyre-table__body",e),...r}));Et.displayName="VyreTableBody";const At=s.forwardRef(({className:e,selected:r,...a},n)=>t.jsx("tr",{ref:n,className:v("vyre-table__row",r&&"vyre-table__row--selected",e),"aria-selected":r,...a}));At.displayName="VyreTableRow";const sa=({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})]})}),Bt=s.forwardRef(({className:e,sortable:r,sortDir:a=null,onSort:n,align:o="left",children:i,...l},c)=>r?t.jsx("th",{ref:c,className:v("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(sa,{dir:a})]})}):t.jsx("th",{ref:c,className:v("vyre-table__th",`vyre-table__th--${o}`,e),...l,children:i}));Bt.displayName="VyreTableHeader";const Vt=s.forwardRef(({className:e,align:r="left",...a},n)=>t.jsx("td",{ref:n,className:v("vyre-table__td",`vyre-table__td--${r}`,e),...a}));Vt.displayName="VyreTableCell";const $t=s.forwardRef(({className:e,...r},a)=>t.jsx("caption",{ref:a,className:v("vyre-table__caption",e),...r}));$t.displayName="VyreTableCaption";const Ft=s.createContext(null),ne=()=>{const e=s.useContext(Ft);if(!e)throw new Error("Command components must be used inside <Command>");return e};function oe(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function oa(e,r,a=[]){if(!e)return!0;const n=oe(e);return oe(r).includes(n)||a.some(o=>oe(o).includes(n))}let ia=0;function la(){return`cmd-${++ia}`}const he=s.forwardRef(({value:e,onValueChange:r,className:a,children:n},o)=>{const[i,l]=s.useState(""),[c,d]=s.useState(0),[h,f]=s.useState(0),y=e!==void 0?e:i,p=s.useCallback(b=>{l(b),r==null||r(b),d(0)},[r]),x=s.useRef(new Map),u=s.useRef(new Map),m=s.useCallback((b,L,w)=>{x.current.set(b,{el:L,disabled:w})},[]),_=s.useCallback(b=>{x.current.delete(b),u.current.delete(b)},[]),g=s.useCallback(b=>{var L;(L=u.current.get(b))==null||L()},[]),N=s.useMemo(()=>({search:y,setSearch:p,activeIndex:c,setActiveIndex:d,items:x,registerItem:m,unregisterItem:_,selectItem:g,onSelectRef:u,visibleCount:h,setVisibleCount:f}),[y,p,c,m,_,g,h]);return t.jsx(Ft.Provider,{value:N,children:t.jsx("div",{ref:o,className:v("vyre-command",a),role:"combobox","aria-expanded":"true","aria-haspopup":"listbox",children:n})})});he.displayName="VyreCommand";const Wt=s.forwardRef(({placeholder:e="Search...",className:r},a)=>{const{search:n,setSearch:o}=ne();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:v("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"})})})]})});Wt.displayName="VyreCommandInput";const Ht=s.forwardRef(({className:e,children:r},a)=>{const{activeIndex:n,setActiveIndex:o,items:i,selectItem:l}=ne(),c=s.useCallback(d=>{var f,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(d.key==="ArrowDown")d.preventDefault(),o(Math.min(n+1,h.length-1)),(f=h[Math.min(n+1,h.length-1)])==null||f[1].el.scrollIntoView({block:"nearest"});else if(d.key==="ArrowUp")d.preventDefault(),o(Math.max(n-1,0)),(y=h[Math.max(n-1,0)])==null||y[1].el.scrollIntoView({block:"nearest"});else if(d.key==="Enter"){d.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:v("vyre-command__list",e),onKeyDown:c,children:r})});Ht.displayName="VyreCommandList";const Pt=({className:e,children:r})=>{const{search:a,visibleCount:n}=ne();return!a||n>0?null:t.jsx("div",{className:v("vyre-command__empty",e),role:"presentation",children:r??"No results found."})};Pt.displayName="VyreCommandEmpty";const Ot=({heading:e,className:r,children:a})=>t.jsxs("div",{className:v("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 Gt=({onSelect:e,disabled:r=!1,keywords:a,className:n,children:o,icon:i,shortcut:l})=>{const{search:c,setActiveIndex:d,registerItem:h,unregisterItem:f,onSelectRef:y,setVisibleCount:p}=ne(),x=s.useMemo(()=>la(),[]),u=s.useRef(null),_=oa(c,typeof o=="string"?o:"",a);return s.useEffect(()=>(p(g=>g+(_?1:0)),()=>{p(g=>g-(_?1:0))}),[_,p]),s.useEffect(()=>{const g=u.current;if(!(!g||!_))return h(x,g,r),()=>f(x)},[x,r,_,h,f]),s.useEffect(()=>{var g;return e&&((g=y.current)==null||g.set(x,e)),()=>{var N;(N=y.current)==null||N.delete(x)}},[x,e,y]),_?t.jsxs("div",{ref:u,"data-cmd-item":!0,role:"option","aria-disabled":r||void 0,className:v("vyre-command__item",r&&"vyre-command__item--disabled",n),onClick:()=>{r||e==null||e()},onMouseEnter:()=>{!r&&u.current&&d(-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};Gt.displayName="VyreCommandItem";const Yt=({className:e})=>t.jsx("div",{className:v("vyre-command__separator",e),role:"separator","aria-hidden":"true"});Yt.displayName="VyreCommandSeparator";const Kt=({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 c=document.activeElement,d=(h=l.current)==null?void 0:h.querySelector(".vyre-command__input");return d==null||d.focus(),()=>{c==null||c.focus({preventScroll:!0})}},[e]),s.useEffect(()=>{if(!e)return;const c=d=>{d.key==="Escape"&&r(!1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,r]),e?P.createPortal(t.jsx("div",{className:"vyre-command-backdrop",ref:l,onClick:c=>{c.target===c.currentTarget&&r(!1)},role:"dialog","aria-modal":"true","aria-label":"Command palette",children:t.jsx(he,{value:a,onValueChange:n,className:v("vyre-command--dialog",o),children:i})}),document.body):null};Kt.displayName="VyreCommandDialog";const qt=s.forwardRef(({orientation:e="horizontal",attached:r=!1,size:a,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,role:"group",className:v("vyre-btn-group",e==="vertical"&&"vyre-btn-group--vertical",r&&"vyre-btn-group--attached",n),"data-orientation":e,"data-size":a,...i,children:o}));qt.displayName="VyreButtonGroup";const be=s.forwardRef(({variant:e="default",size:r="md",onRemove:a,onClick:n,disabled:o=!1,className:i,children:l,...c},d)=>{const h=!!n&&!o;return t.jsxs("span",{ref:d,className:v("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?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),n==null||n())}:void 0,...c,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:f=>{f.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 Ut=s.forwardRef(({value:e,onChange:r,placeholder:a="Add tag…",disabled:n=!1,max:o,size:i="md",className:l,style:c,"data-testid":d},h)=>{const[f,y]=s.useState(""),p=s.useRef(null),x=o!==void 0&&e.length>=o,u=n||x;function m(b){const L=b.trim();if(!L||e.includes(L)||x){y("");return}r([...e,L]),y("")}function _(b){n||r(e.filter((L,w)=>w!==b))}function g(b){if(b.key==="Enter"||b.key===","){b.preventDefault(),m(f);return}b.key==="Backspace"&&f===""&&e.length>0&&_(e.length-1)}function N(b){const L=b.target.value;if(L.includes(",")){const w=L.split(",");w.slice(0,-1).forEach(A=>m(A)),y(w[w.length-1])}else y(L)}return t.jsxs("div",{ref:h,className:v("vyre-tags-input",`vyre-tags-input--${i}`,n&&"vyre-tags-input--disabled",l),"data-testid":d,style:c,onClick:()=>{var b;return(b=p.current)==null?void 0:b.focus()},children:[e.map((b,L)=>t.jsx(be,{size:i,disabled:n,onRemove:n?void 0:()=>_(L),children:b},`${b}-${L}`)),t.jsx("input",{ref:p,type:"text",className:"vyre-tags-input__field",value:f,onChange:N,onKeyDown:g,placeholder:x?"":a,disabled:u,"aria-label":"Add tag"})]})});Ut.displayName="VyreTagsInput";const zt=s.forwardRef(({options:e,value:r,onChange:a,placeholder:n="Search…",disabled:o=!1,size:i="md",emptyText:l="No results",className:c,...d},h)=>{const[f,y]=s.useState(!1),[p,x]=s.useState(""),[u,m]=s.useState(-1),_=s.useRef(null),g=s.useRef(null),N=s.useRef(null),L=`${s.useId()}-listbox`,w=e.find(k=>k.value===r)??null,I=e.filter(k=>k.label.toLowerCase().includes(p.toLowerCase())),A=s.useCallback(()=>{y(!1),m(-1),x("")},[]),T=s.useCallback(k=>{var D;k.disabled||(a(k.value),A(),(D=_.current)==null||D.blur())},[a,A]);s.useEffect(()=>{if(!f)return;const k=D=>{const E=N.current;E&&!E.contains(D.target)&&A()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[f,A]),s.useEffect(()=>{var D;if(!f||u<0)return;const k=(D=g.current)==null?void 0:D.children[u];k==null||k.scrollIntoView({block:"nearest"})},[u,f]),s.useEffect(()=>{m(I.length>0?0:-1)},[p]);function M(){o||(y(!0),x(""))}function B(k){x(k.target.value),f||y(!0)}function R(k){var D;switch(k.key){case"ArrowDown":{if(k.preventDefault(),!f){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(k.preventDefault(),!f){y(!0);return}m(E=>{let V=E-1;for(;V>=0&&I[V].disabled;)V--;return V>=0?V:E});break}case"Enter":{k.preventDefault(),f&&u>=0&&I[u]&&T(I[u]);break}case"Escape":{A(),(D=_.current)==null||D.blur();break}}}const j=f?p:(w==null?void 0:w.label)??"";return t.jsxs("div",{ref:k=>{N.current=k,typeof h=="function"?h(k):h&&(h.current=k)},className:v("vyre-combobox",`vyre-combobox--${i}`,o&&"vyre-combobox--disabled",c),"data-open":f,...d,children:[t.jsx("input",{ref:_,type:"text",role:"combobox","aria-expanded":f,"aria-haspopup":"listbox","aria-controls":L,"aria-autocomplete":"list","aria-disabled":o,disabled:o,className:"vyre-combobox__input",placeholder:n,value:j,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"})})}),f&&t.jsx("ul",{ref:g,id:L,role:"listbox",className:"vyre-combobox__dropdown","aria-label":"Options",children:I.length>0?I.map((k,D)=>t.jsx("li",{role:"option","aria-selected":k.value===r,"aria-disabled":k.disabled,"data-highlighted":D===u,className:v("vyre-combobox__option",D===u&&"vyre-combobox__option--highlighted",k.value===r&&"vyre-combobox__option--selected"),onMouseEnter:()=>!k.disabled&&m(D),onMouseDown:E=>{E.preventDefault(),T(k)},children:k.label},k.value)):t.jsx("li",{className:"vyre-combobox__empty",role:"presentation",children:l})})]})});zt.displayName="VyreCombobox";function ca({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 da=5,Xt=s.forwardRef(({columns:e,rows:r,sortKey:a,sortDir:n,onSort:o,loading:i=!1,emptyText:l="No data",stickyHeader:c=!1,className:d,style:h,"data-testid":f},y)=>{function p(u){if(!u.sortable||!o)return;const m=a===u.key&&n==="asc"?"desc":"asc";o(u.key,m)}function x(u){return a!==u.key?"none":n==="asc"?"ascending":"descending"}return t.jsx("div",{ref:y,className:v("vyre-data-grid",c&&"vyre-data-grid--sticky-header",d),style:h,"data-testid":f,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:v("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?x(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(ca,{col:u,sortKey:a,sortDir:n})]}):u.label},u.key))})}),t.jsx("tbody",{className:"vyre-data-grid__tbody",children:i?Array.from({length:da}).map((u,m)=>t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--skeleton",children:e.map(_=>t.jsx("td",{className:"vyre-data-grid__td",children:t.jsx(ye,{height:16})},_.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(_=>t.jsx("td",{className:"vyre-data-grid__td",children:u[_.key]!=null?String(u[_.key]):""},_.key))},m))})]})})});Xt.displayName="VyreDataGrid";const Zt=s.forwardRef(({gap:e="md",wrap:r=!0,className:a,children:n,...o},i)=>t.jsx("div",{ref:i,className:v("vyre-tag-group",`vyre-tag-group--gap-${e}`,!r&&"vyre-tag-group--nowrap",a),role:"list",...o,children:n}));Zt.displayName="VyreTagGroup";function z(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function G(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function Q(e,r){return z(e)<z(r)}function _e(e,r){return z(e)>z(r)}function ua(e,r){return new Date(e,r+1,0).getDate()}function ma(e,r,a){return(new Date(e,r,1).getDay()-a+7)%7}function Y(e,r){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}function va(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}const ge=Array.from({length:12},(e,r)=>new Intl.DateTimeFormat("default",{month:"long"}).format(new Date(2e3,r,1))),J=12,ee=s.forwardRef((e,r)=>{const{showTime:a=!1,minDate:n,maxDate:o,disabled:i,className:l,weekStartsOn:c=1,defaultMonth:d}=e,h=z(new Date),f=()=>{var C,S;return e.mode==="range"?((C=e.value)==null?void 0:C[0])??d??h:e.mode==="multiple"?((S=e.value)==null?void 0:S[0])??d??h:e.value??d??h},[y,p]=s.useState(()=>(f()??h).getFullYear()),[x,u]=s.useState(()=>(f()??h).getMonth()),[m,_]=s.useState("days"),[g,N]=s.useState(null),[b,L]=s.useState(()=>{const C=e.mode==="single"?e.value:null;return C?C.getHours():0}),[w,I]=s.useState(()=>{const C=e.mode==="single"?e.value:null;return C?C.getMinutes():0}),A=s.useMemo(()=>{const C=ua(y,x),S=ma(y,x,c);return{count:C,offset:S}},[y,x,c]),T=s.useMemo(()=>c===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],[c]),M=s.useCallback(C=>{if(e.mode==="single")return!!e.value&&G(C,e.value);if(e.mode==="range"){const[S,$]=e.value??[null,null];return!!S&&G(C,S)||!!$&&G(C,$)}return e.mode==="multiple"?(e.value??[]).some(S=>G(C,S)):!1},[e]),B=s.useCallback(C=>{if(e.mode!=="range")return!1;const[S,$]=e.value??[null,null],F=$??g;if(!S||!F)return!1;const K=Q(S,F)?S:F,q=Q(S,F)?F:S;return _e(C,K)&&Q(C,q)},[e,g]),R=s.useCallback(C=>{if(e.mode!=="range")return!1;const[S]=e.value??[null,null];return!!S&&G(C,S)},[e]),j=s.useCallback(C=>{if(e.mode!=="range")return!1;const[,S]=e.value??[null,null];return!!S&&G(C,S)},[e]),k=s.useCallback(C=>!!(n&&Q(C,n)||o&&_e(C,o)||i!=null&&i(C)),[n,o,i]),D=s.useCallback(C=>{var $,F,K,q,Z,te;const S=new Date(y,x,C,b,w);if(!k(z(S))){if(e.mode==="single"||!e.mode)($=e.onChange)==null||$.call(e,S);else if(e.mode==="range"){const[H,U]=e.value??[null,null];!H||H&&U?(F=e.onChange)==null||F.call(e,[S,null]):Q(S,H)?(K=e.onChange)==null||K.call(e,[S,H]):(q=e.onChange)==null||q.call(e,[H,S])}else if(e.mode==="multiple"){const H=e.value??[],U=H.findIndex(pe=>G(pe,S));U>=0?(Z=e.onChange)==null||Z.call(e,H.filter((pe,Rr)=>Rr!==U)):(te=e.onChange)==null||te.call(e,[...H,S])}}},[y,x,b,w,e,k]),E=()=>{x===0?(u(11),p(C=>C-1)):u(C=>C-1)},V=()=>{x===11?(u(0),p(C=>C+1)):u(C=>C+1)},X=(C,S)=>{var $;if(L(C),I(S),e.mode==="single"&&e.value){const F=new Date(e.value);F.setHours(C,S),($=e.onChange)==null||$.call(e,F)}},Cr=Math.floor(y/J)*J;return t.jsxs("div",{ref:r,className:v("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-J),"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:()=>_(m==="months"?"days":"months"),children:ge[x]}),t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>_(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+J),"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:ge.map((C,S)=>t.jsx("button",{className:v("vyre-calendar__month-cell",S===x&&"vyre-calendar__month-cell--active"),onClick:()=>{u(S),_("days")},children:C.slice(0,3)},C))}),m==="years"&&t.jsx("div",{className:"vyre-calendar__year-grid",children:Array.from({length:J},(C,S)=>Cr+S).map(C=>t.jsx("button",{className:v("vyre-calendar__year-cell",C===y&&"vyre-calendar__year-cell--active"),onClick:()=>{p(C),_("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,x,C),$=M(S),F=B(S),K=R(S),q=j(S),Z=k(S),te=G(S,h);return t.jsx("button",{className:v("vyre-calendar__day",te&&"vyre-calendar__day--today",$&&"vyre-calendar__day--selected",F&&"vyre-calendar__day--in-range",K&&"vyre-calendar__day--range-start",q&&"vyre-calendar__day--range-end",Z&&"vyre-calendar__day--disabled"),onClick:()=>D(C),onMouseEnter:()=>{if(e.mode==="range"){const[H,U]=e.value??[null,null];H&&!U&&N(S)}},onMouseLeave:()=>N(null),disabled:Z,"aria-selected":$,"aria-label":Y(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:b,onChange:C=>X(Number(C.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:C=>X(b,Number(C.target.value)),"aria-label":"Minutes"})]})]})});ee.displayName="VyreCalendar";function fa(e){if(e.mode==="range"){const[n,o]=e.value??[null,null];return n?o?`${Y(n)} – ${Y(o)}`:Y(n):""}if(e.mode==="multiple"){const n=e.value??[];return n.length===0?"":n.length===1?Y(n[0]):`${n.length} dates selected`}const r=e.value,a=e.showTime;return r?a?`${Y(r)} ${va(r)}`:Y(r):""}const Qt=s.forwardRef(({placeholder:e="Pick a date",inputClassName:r,...a},n)=>{const[o,i]=s.useState(!1),l=s.useRef(null),c=s.useRef(null),[d,h]=s.useState({top:0,left:0,width:0}),f=fa(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=_=>{var g,N;!((g=c.current)!=null&&g.contains(_.target))&&!((N=l.current)!=null&&N.contains(_.target))&&i(!1)},m=_=>{_.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,x=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:v("vyre-datepicker__trigger",!f&&"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:f||e}),f&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:u=>{var m,_,g;u.stopPropagation(),a.mode==="range"?(m=a.onChange)==null||m.call(a,[null,null]):a.mode==="multiple"?(_=a.onChange)==null||_.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&&P.createPortal(t.jsx("div",{ref:c,className:"vyre-datepicker__popover",role:"dialog","aria-label":"Date picker",style:{top:d.top,left:d.left,minWidth:d.width},children:t.jsx(ee,{...x})}),document.body)]})});Qt.displayName="VyreDatePicker";function O(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function ie(e,r){const a=new Date(e);return a.setDate(a.getDate()+r),O(a)}function le(e){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}const ya=[{label:"Today",range:()=>{const e=O(new Date);return{from:e,to:e}}},{label:"Yesterday",range:()=>{const e=ie(new Date,-1);return{from:e,to:e}}},{label:"Last 7 days",range:()=>({from:ie(new Date,-6),to:O(new Date)})},{label:"Last 30 days",range:()=>({from:ie(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))}}}],Jt=s.forwardRef(({value:e,onChange:r,placeholder:a="Pick a date range",numberOfMonths:n=2,presets:o=!1,minDate:i,maxDate:l,disabled:c,weekStartsOn:d=1,className:h,inputClassName:f},y)=>{const[p,x]=s.useState(!1),u=s.useRef(null),m=s.useRef(null),[_,g]=s.useState({top:0,left:0,width:0}),N=(e==null?void 0:e.from)??null,b=(e==null?void 0:e.to)??null,L=s.useMemo(()=>o===!0?ya:Array.isArray(o)?o:[],[o]),w=s.useMemo(()=>N?b?`${le(N)} – ${le(b)}`:le(N):"",[N,b]),I=s.useCallback(()=>{if(!u.current)return;const j=u.current.getBoundingClientRect();g({top:j.bottom+window.scrollY+6,left:j.left+window.scrollX,width:j.width})},[]);s.useEffect(()=>{if(!p)return;I();const j=()=>I(),k=()=>I();return window.addEventListener("scroll",j,!0),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",j,!0),window.removeEventListener("resize",k)}},[p,I]),s.useEffect(()=>{if(!p)return;const j=D=>{var E,V;!((E=m.current)!=null&&E.contains(D.target))&&!((V=u.current)!=null&&V.contains(D.target))&&x(!1)},k=D=>{D.key==="Escape"&&x(!1)};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",k),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",k)}},[p]);const A=s.useCallback(j=>{const k={from:j[0],to:j[1]};r==null||r(k),k.from&&k.to&&x(!1)},[r]),T=s.useCallback(j=>{r==null||r(j.range()),x(!1)},[r]),M=s.useCallback(()=>{r==null||r({from:null,to:null})},[r]),B=s.useMemo(()=>{const j=N??O(new Date);return new Date(j.getFullYear(),j.getMonth()+1,1)},[N]),R=[N,b];return t.jsxs("div",{ref:y,className:v("vyre-date-range-picker",h),children:[t.jsxs("button",{ref:u,type:"button",className:v("vyre-datepicker__trigger",!w&&"vyre-datepicker__trigger--placeholder",f),onClick:()=>{I(),x(j=>!j)},"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:w||a}),w&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:j=>{j.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&&P.createPortal(t.jsxs("div",{ref:m,className:"vyre-date-range-picker__popover",role:"dialog","aria-label":"Date range picker",style:{top:_.top,left:_.left},children:[L.length>0&&t.jsx("div",{className:"vyre-date-range-picker__presets",children:L.map(j=>t.jsx("button",{type:"button",className:"vyre-date-range-picker__preset",onClick:()=>T(j),children:j.label},j.label))}),t.jsxs("div",{className:"vyre-date-range-picker__calendars",children:[t.jsx(ee,{mode:"range",value:R,onChange:A,minDate:i,maxDate:l,disabled:c,weekStartsOn:d}),n===2&&t.jsx(ee,{mode:"range",value:R,defaultMonth:B,onChange:A,minDate:i,maxDate:l,disabled:c,weekStartsOn:d},B.toISOString())]})]}),document.body)]})});Jt.displayName="VyreDateRangePicker";const er=s.forwardRef(({variant:e="default",size:r="md",clickable:a=!1,className:n,children:o,...i},l)=>t.jsx("div",{ref:l,className:v("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}));er.displayName="VyreItem";const tr=s.forwardRef(({separated:e=!1,className:r,children:a,...n},o)=>t.jsx("div",{ref:o,role:"list",className:v("vyre-item-group",e&&"vyre-item-group--separated",r),...n,children:a}));tr.displayName="VyreItemGroup";const rr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-item__media",e),"aria-hidden":"true",...a,children:r}));rr.displayName="VyreItemMedia";const ar=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-item__content",e),...a,children:r}));ar.displayName="VyreItemContent";const nr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-item__title",e),...a,children:r}));nr.displayName="VyreItemTitle";const sr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:v("vyre-item__description",e),...a,children:r}));sr.displayName="VyreItemDescription";const or=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("div",{ref:n,className:v("vyre-item__actions",e),...a,children:r}));or.displayName="VyreItemActions";function ha(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 c=l.cards.filter(f=>f.id!==r.cardId),d=Math.max(0,Math.min(n,c.length)),h=[...c];return h.splice(d,0,i),{...l,cards:h}}if(l.id===r.fromColumnId)return{...l,cards:l.cards.filter(c=>c.id!==r.cardId)};if(l.id===a){const c=Math.max(0,Math.min(n,l.cards.length)),d=[...l.cards];return d.splice(c,0,i),{...l,cards:d}}return l}):e}const ir=s.forwardRef(({value:e,onChange:r,renderCard:a,onCardClick:n,className:o,...i},l)=>{const c=s.useRef(null),d=s.useRef(!1),[h,f]=s.useState(null),[y,p]=s.useState(null),[x,u]=s.useState(null),m=(b,L)=>{p(w=>w===b?w:b),u(w=>w===L?w:L)},_=(b,L)=>w=>{c.current={cardId:L,fromColumnId:b},d.current=!1,f(L),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",L)},g=()=>{c.current=null,f(null),p(null),u(null)},N=(b,L)=>{const w=c.current;if(!w)return;const I=ha(e,w,b,L);I!==e&&(d.current=!0,r(I))};return t.jsx("div",{ref:l,className:v("vyre-kanban",o),role:"list","aria-label":"Kanban board",...i,children:e.map(b=>{const L=y===b.id,w=b.color&&b.color!=="default"?b.color:void 0,I=L&&c.current&&x!==null?x:null,A=t.jsx("div",{className:"vyre-kanban__placeholder","aria-hidden":"true"});return t.jsxs("div",{role:"listitem","data-color":w,className:v("vyre-kanban__column",L&&"vyre-kanban__column--over"),onDragOver:T=>{c.current&&(T.preventDefault(),T.dataTransfer.dropEffect="move",m(b.id,b.cards.length))},onDragLeave:T=>{T.currentTarget.contains(T.relatedTarget)||(p(M=>M===b.id?null:M),u(null))},onDrop:T=>{T.preventDefault(),N(b.id,x??b.cards.length),g()},children:[t.jsxs("div",{className:"vyre-kanban__column-header",children:[t.jsx("span",{className:"vyre-kanban__column-title",children:b.title}),t.jsx("span",{className:"vyre-kanban__column-count",children:b.cards.length})]}),t.jsxs("div",{className:"vyre-kanban__cards",children:[b.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(de,{variant:"outlined","data-color":B,className:v("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:_(b.id,T.id),onDragEnd:g,onDragOver:R=>{if(!c.current)return;R.preventDefault(),R.stopPropagation();const j=R.currentTarget.getBoundingClientRect(),k=R.clientY-j.top>j.height/2;m(b.id,k?M+1:M)},onDrop:R=>{R.preventDefault(),R.stopPropagation(),N(b.id,x??M),g()},onClick:()=>{d.current||n==null||n(T,b)},onKeyDown:R=>{n&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),n(T,b))},children:t.jsx(ue,{children:a?a(T,b):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===b.cards.length&&A,b.cards.length===0&&I===null&&t.jsx("div",{className:"vyre-kanban__empty",children:"Drop cards here"})]})]},b.id)})})});ir.displayName="VyreKanban";function je(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 ba(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 pa(e){return new Intl.DateTimeFormat("default",{hour:"numeric",minute:"2-digit"}).format(e)}const xa={sending:"Sending…",sent:"Sent",delivered:"Delivered",read:"Read"};function _a(){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 ga({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(_a,{})}),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 lr=s.forwardRef(({value:e,currentUserId:r,composer:a=!1,onSend:n,placeholder:o="Write a message…",typing:i=!1,allowAttachments:l=!1,accept:c,renderMessage:d,renderComposer:h,className:f,...y},p)=>{const[x,u]=s.useState(""),[m,_]=s.useState([]),g=s.useRef(null),N=()=>{const w=x.trim();!w&&m.length===0||(n==null||n(w,m),u(""),_([]))},b=s.useMemo(()=>e.map((w,I)=>{const A=e[I-1],T=e[I+1],M=je(w.timestamp),B=A?je(A.timestamp):null,R=!!M&&(!B||!ce(M,B)),j=!A||A.authorId!==w.authorId||R,k=!T||T.authorId!==w.authorId,D=w.authorId===r;return{msg:w,date:M,showDaySeparator:R,isGroupStart:j,isGroupEnd:k,outgoing:D}}),[e,r]),L={value:x,setValue:u,files:m,setFiles:_,send:N};return t.jsxs("div",{ref:p,className:v("vyre-conversation",f),...y,children:[t.jsxs("div",{className:"vyre-conversation__thread",role:"log","aria-label":"Conversation","aria-live":"polite",children:[b.map(({msg:w,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:ba(I)})}),t.jsxs("div",{className:v("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(ve,{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:[!B&&T&&w.authorName&&t.jsx("span",{className:"vyre-conversation__author",children:w.authorName}),t.jsx("div",{className:"vyre-conversation__bubble",children:d?d(w,{outgoing:B,isGroupStart:T,isGroupEnd:M}):t.jsxs(t.Fragment,{children:[w.attachments&&w.attachments.length>0&&t.jsx("div",{className:"vyre-conversation__attachments",children:w.attachments.map((R,j)=>t.jsx(ga,{attachment:R},j))}),w.text]})}),M&&t.jsxs("span",{className:"vyre-conversation__meta",children:[I&&pa(I),B&&w.status&&t.jsxs("span",{className:v("vyre-conversation__status",`vyre-conversation__status--${w.status}`),children:[I?" · ":"",xa[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})]})})]})]}),h?h(L):a&&t.jsxs("form",{className:"vyre-conversation__composer",onSubmit:w=>{w.preventDefault(),N()},children:[l&&m.length>0&&t.jsx("div",{className:"vyre-conversation__staged",children:m.map((w,I)=>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:()=>_(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:c,className:"vyre-conversation__file-input",onChange:w=>{const I=Array.from(w.target.files??[]);I.length&&_([...m,...I]),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:x,onChange:w=>u(w.target.value),placeholder:o,"aria-label":"Message"}),t.jsx("button",{type:"submit",className:"vyre-conversation__send",disabled:!x.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"})})})]})]})]})});lr.displayName="VyreConversation";const cr=s.forwardRef(({as:e="p",size:r="md",weight:a,color:n="default",truncate:o,mono:i,className:l,children:c,...d},h)=>t.jsx(e,{ref:h,className:v("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),...d,children:c}));cr.displayName="VyreText";const dr=s.forwardRef(({as:e="h2",size:r="md",weight:a="bold",color:n="default",truncate:o,className:i,children:l,...c},d)=>t.jsx(e,{ref:d,className:v("vyre-heading",`vyre-heading--${r}`,a!=="bold"&&`vyre-heading--${a}`,n!=="default"&&`vyre-text--${n}`,o&&"vyre-text--truncate",i),...c,children:l}));dr.displayName="VyreHeading";const ur=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("p",{ref:n,className:v("vyre-lead",e),...a,children:r}));ur.displayName="VyreLead";const mr=s.forwardRef(({block:e,className:r,children:a,...n},o)=>e?t.jsx("pre",{className:v("vyre-code-block",r),...n,children:t.jsx("code",{ref:o,children:a})}):t.jsx("code",{ref:o,className:v("vyre-code",r),...n,children:a}));mr.displayName="VyreCode";const vr=s.forwardRef(({className:e,children:r,...a},n)=>t.jsx("blockquote",{ref:n,className:v("vyre-blockquote",e),...a,children:r}));vr.displayName="VyreBlockquote";const fr=s.createContext({collapsed:!1,toggleCollapsed:()=>{}}),se=()=>s.useContext(fr),yr=s.forwardRef(({defaultCollapsed:e=!1,collapsed:r,onCollapsedChange:a,className:n,children:o},i)=>{const[l,c]=s.useState(e),d=r!==void 0?r:l,h=s.useCallback(()=>{const f=!d;c(f),a==null||a(f)},[d,a]);return t.jsx(fr.Provider,{value:{collapsed:d,toggleCollapsed:h},children:t.jsx("div",{ref:i,className:v("vyre-app-layout",n),children:o})})});yr.displayName="VyreAppLayout";const hr=s.forwardRef(({variant:e="default",className:r,children:a},n)=>{const{collapsed:o}=se();return t.jsx("aside",{ref:n,className:v("vyre-sidebar",o&&"vyre-sidebar--collapsed",e==="floating"&&"vyre-sidebar--floating",r),"data-collapsed":o||void 0,children:a})});hr.displayName="VyreSidebar";const br=s.forwardRef(({logo:e,title:r,className:a,children:n},o)=>t.jsxs("div",{ref:o,className:v("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]}));br.displayName="VyreSidebarHeader";const pr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:v("vyre-sidebar__content",e),children:r}));pr.displayName="VyreSidebarContent";const xr=s.forwardRef(({label:e,className:r,children:a},n)=>t.jsxs("div",{ref:n,className:v("vyre-sidebar__section",r),children:[e&&t.jsx("div",{className:"vyre-sidebar__section-label",children:e}),a]}));xr.displayName="VyreSidebarSection";const _r=({active:e,icon:r,badge:a,href:n,onClick:o,className:i,children:l})=>{const{collapsed:c}=se(),d=v("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:d,"aria-current":e?"page":void 0,title:c?String(l):void 0,children:h}):t.jsx("button",{type:"button",className:d,onClick:o,"aria-pressed":e,title:c?String(l):void 0,children:h})};_r.displayName="VyreSidebarItem";const gr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:v("vyre-sidebar__footer",e),children:r}));gr.displayName="VyreSidebarFooter";const jr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:v("vyre-app-shell",e),children:r}));jr.displayName="VyreAppShell";const wr=s.forwardRef(({className:e,children:r},a)=>t.jsx("header",{ref:a,className:v("vyre-app-bar",e),children:r}));wr.displayName="VyreAppBar";const kr=({className:e})=>{const{collapsed:r,toggleCollapsed:a}=se();return t.jsx("button",{type:"button",className:v("vyre-sidebar-trigger",e),onClick:a,"aria-label":r?"Expand sidebar":"Collapse sidebar","aria-expanded":!r,children: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"})]})})};kr.displayName="VyreSidebarTrigger";const Nr=s.forwardRef(({className:e,children:r},a)=>t.jsx("div",{ref:a,className:v("vyre-page-content",e),children:r}));Nr.displayName="VyrePageContent";exports.Accordion=Ze;exports.AccordionContent=et;exports.AccordionItem=Qe;exports.AccordionTrigger=Je;exports.Alert=gt;exports.AlertDialog=jt;exports.AppBar=wr;exports.AppLayout=yr;exports.AppShell=jr;exports.Avatar=ve;exports.Badge=ke;exports.Blockquote=vr;exports.Breadcrumb=Rt;exports.BreadcrumbItem=Lt;exports.BreadcrumbLink=Dt;exports.BreadcrumbSeparator=St;exports.Button=we;exports.ButtonGroup=qt;exports.Calendar=ee;exports.Card=de;exports.CardBody=ue;exports.CardFooter=Ce;exports.CardHeader=Ne;exports.Checkbox=tt;exports.Code=mr;exports.Combobox=zt;exports.Command=he;exports.CommandDialog=Kt;exports.CommandEmpty=Pt;exports.CommandGroup=Ot;exports.CommandInput=Wt;exports.CommandItem=Gt;exports.CommandList=Ht;exports.CommandSeparator=Yt;exports.Conversation=lr;exports.DataGrid=Xt;exports.DatePicker=Qt;exports.DateRangePicker=Jt;exports.DropdownCheckboxItem=yt;exports.DropdownItem=ft;exports.DropdownLabel=vt;exports.DropdownMenu=mt;exports.DropdownRadioGroup=ht;exports.DropdownRadioItem=bt;exports.DropdownSeparator=xt;exports.DropdownSub=pt;exports.Field=Re;exports.FieldDescription=De;exports.FieldError=Se;exports.FieldGroup=Me;exports.FieldLabel=Le;exports.FieldSet=Ie;exports.Heading=dr;exports.Input=Te;exports.Item=er;exports.ItemActions=or;exports.ItemContent=ar;exports.ItemDescription=sr;exports.ItemGroup=tr;exports.ItemMedia=rr;exports.ItemTitle=nr;exports.Kanban=ir;exports.Label=ct;exports.Lead=ur;exports.Modal=Ae;exports.ModalBody=Ve;exports.ModalFooter=$e;exports.ModalHeader=Be;exports.PageContent=Nr;exports.Pagination=Mt;exports.Popover=dt;exports.Progress=it;exports.Radio=fe;exports.RadioGroup=at;exports.RichTextEditor=nt;exports.Select=We;exports.Separator=lt;exports.Sheet=wt;exports.SheetBody=Nt;exports.SheetFooter=Ct;exports.SheetHeader=kt;exports.Sidebar=hr;exports.SidebarContent=pr;exports.SidebarFooter=gr;exports.SidebarHeader=br;exports.SidebarItem=_r;exports.SidebarSection=xr;exports.SidebarTrigger=kr;exports.Skeleton=ye;exports.Slider=ot;exports.Switch=st;exports.Tab=Ye;exports.TabList=Ge;exports.TabPanel=qe;exports.TabPanels=Ke;exports.Table=It;exports.TableBody=Et;exports.TableCaption=$t;exports.TableCell=Vt;exports.TableHead=Tt;exports.TableHeader=Bt;exports.TableRow=At;exports.Tabs=Oe;exports.Tag=be;exports.TagGroup=Zt;exports.TagsInput=Ut;exports.Text=cr;exports.Textarea=Ee;exports.ToastProvider=Ar;exports.Tooltip=Ue;exports.cn=v;exports.useAppLayout=se;exports.useToast=Br;
|
|
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;
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
* - DateRangePicker — Start/end date range picker with dual-month view and preset shortcuts; built on Calendar
|
|
50
50
|
* - Kanban — Controlled board with drag-and-drop cards between columns; native HTML5 DnD, zero deps
|
|
51
51
|
* - Conversation — Controlled chat/inbox thread: grouped bubbles, avatars, day separators, status, optional composer
|
|
52
|
+
* - Stack — Flex layout primitive (use instead of <div style="display:flex">); token-locked gap/align/justify
|
|
53
|
+
* - Grid — CSS grid primitive: columns (1-12 or auto-fit), rows, flow, token-locked gap (+ GridItem for colSpan/rowSpan placement)
|
|
54
|
+
* - Box — Spacing-only container (padding/margin tokens) + controlled style escape hatch
|
|
52
55
|
*
|
|
53
56
|
* CSS must be imported separately:
|
|
54
57
|
* import "@usevyre/tokens/css"; ← design tokens (required)
|
|
@@ -97,6 +100,8 @@ export { Conversation } from "./components/Conversation/Conversation";
|
|
|
97
100
|
export type { CalendarProps, CalendarSingleProps, CalendarRangeProps, CalendarMultipleProps, CalendarBaseProps, DatePickerProps, CalendarMode, } from "./components/Calendar/Calendar";
|
|
98
101
|
export { Text, Heading, Lead, Code, Blockquote } from "./components/Typography/Typography";
|
|
99
102
|
export type { TextProps, HeadingProps, LeadProps, CodeProps, BlockquoteProps, } from "./components/Typography/Typography";
|
|
103
|
+
export { Stack, Grid, GridItem, Box } from "./components/Layout/Layout";
|
|
104
|
+
export type { StackProps, GridProps, GridItemProps, BoxProps, SpaceToken, StackDirection, StackWrap, StackAlign, StackJustify, StackAlignContent, StackAlignSelf, StackBasis, GridAlign, GridFlow, GridColumns, } from "./components/Layout/Layout";
|
|
100
105
|
export { AppLayout, AppShell, AppBar, PageContent, SidebarTrigger, Sidebar, SidebarHeader, SidebarContent, SidebarSection, SidebarItem, SidebarFooter, useAppLayout, } from "./components/Sidebar/Sidebar";
|
|
101
106
|
export type { AppLayoutProps, AppShellProps, AppBarProps, PageContentProps, SidebarTriggerProps, SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarSectionProps, SidebarItemProps, SidebarFooterProps, } from "./components/Sidebar/Sidebar";
|
|
102
107
|
export type { ButtonProps } from "./components/Button/Button";
|