@usevyre/react 1.0.2 → 1.1.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/LICENSE +21 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +50 -0
- package/dist/components/Combobox/Combobox.d.ts +66 -0
- package/dist/components/DataGrid/DataGrid.d.ts +66 -0
- package/dist/components/Tag/Tag.d.ts +41 -0
- package/dist/components/Tag/TagGroup.d.ts +34 -0
- package/dist/components/TagsInput/TagsInput.d.ts +51 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1515 -1052
- package/dist/styles/components.css +508 -4
- package/package.json +15 -27
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),H=require("react-dom");function m(...e){const a=[];for(const r of e)if(r){if(typeof r=="string")a.push(r);else if(Array.isArray(r)){const s=m(...r);s&&a.push(s)}else if(typeof r=="object")for(const[s,o]of Object.entries(r))o&&a.push(s)}return a.join(" ")}const zt={primary:"vyre-btn--primary",secondary:"vyre-btn--secondary",ghost:"vyre-btn--ghost",accent:"vyre-btn--accent",teal:"vyre-btn--teal",danger:"vyre-btn--danger"},Zt={sm:"vyre-btn--sm",md:"vyre-btn--md",lg:"vyre-btn--lg",icon:"vyre-btn--icon"},ue=n.forwardRef(({variant:e="secondary",size:a="md",loading:r=!1,disabled:s,leftIcon:o,rightIcon:i,className:d,children:l,as:c="button",...x},b)=>{const y=s||r;return t.jsxs(c,{ref:b,className:m("vyre-btn",zt[e],Zt[a],r&&"vyre-btn--loading",d),disabled:c==="button"?y:void 0,"aria-disabled":y,"data-variant":e,"data-size":a,...x,children:[r&&t.jsx("span",{className:"vyre-btn__spinner","aria-hidden":"true",children:t.jsx(Jt,{})}),!r&&o&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--left","aria-hidden":"true",children:o}),l&&t.jsx("span",{className:"vyre-btn__label",children:l}),i&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--right","aria-hidden":"true",children:i})]})});ue.displayName="VyreButton";function Jt(){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 me=n.forwardRef(({variant:e="default",dot:a=!1,className:r,children:s,...o},i)=>t.jsxs("span",{ref:i,className:m("vyre-badge",`vyre-badge--${e}`,r),"data-variant":e,...o,children:[a&&t.jsx("span",{className:"vyre-badge__dot","aria-hidden":"true"}),s]}));me.displayName="VyreBadge";const ve=n.forwardRef(({variant:e="default",hoverable:a=!1,clickable:r=!1,className:s,children:o,...i},d)=>t.jsx("div",{ref:d,className:m("vyre-card",`vyre-card--${e}`,a&&"vyre-card--hoverable",r&&"vyre-card--clickable",s),"data-variant":e,role:r?"button":void 0,tabIndex:r?0:void 0,...i,children:o}));ve.displayName="VyreCard";const ye=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-card__header",e),...r,children:a}));ye.displayName="VyreCardHeader";const fe=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-card__body",e),...r,children:a}));fe.displayName="VyreCardBody";const he=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-card__footer",e),...r,children:a}));he.displayName="VyreCardFooter";const be=n.forwardRef(({label:e,hint:a,state:r="idle",required:s=!1,htmlFor:o,className:i,children:d,...l},c)=>t.jsxs("div",{ref:c,className:m("vyre-field",r!=="idle"&&`vyre-field--${r}`,i),"data-state":r,...l,children:[e&&t.jsxs("label",{className:"vyre-field__label",htmlFor:o,children:[e,s&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}),d,a&&t.jsx("span",{className:"vyre-field__hint",role:r==="error"?"alert":void 0,children:a})]}));be.displayName="VyreField";const xe=n.forwardRef(({size:e="md",leftElement:a,rightElement:r,className:s,...o},i)=>a||r?t.jsxs("div",{className:m("vyre-input-wrapper",`vyre-input-wrapper--${e}`),children:[a&&t.jsx("span",{className:"vyre-input__element vyre-input__element--left","aria-hidden":"true",children:a}),t.jsx("input",{ref:i,className:m("vyre-input",`vyre-input--${e}`,!!a&&"vyre-input--has-left",!!r&&"vyre-input--has-right",s),...o}),r&&t.jsx("span",{className:"vyre-input__element vyre-input__element--right","aria-hidden":"true",children:r})]}):t.jsx("input",{ref:i,className:m("vyre-input",`vyre-input--${e}`,s),...o}));xe.displayName="VyreInput";const pe=n.forwardRef(({size:e="md",resize:a="vertical",className:r,style:s,...o},i)=>t.jsx("textarea",{ref:i,className:m("vyre-textarea",`vyre-textarea--${e}`,r),style:{resize:a,...s},...o}));pe.displayName="VyreTextarea";const Qt=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),_e=n.forwardRef(({open:e,onClose:a,size:r="md",closeOnBackdrop:s=!0,closeOnEsc:o=!0,initialFocus:i,className:d,children:l,"aria-label":c,"aria-labelledby":x,...b},y)=>{const f=n.useRef(null),p=n.useRef(null),u=n.useCallback(h=>{f.current=h,typeof y=="function"?y(h):y&&(y.current=h)},[y]),v=n.useCallback(h=>{if(h.key!=="Tab")return;const g=f.current;if(!g)return;const N=Array.from(g.querySelectorAll(Qt));if(!N.length)return;const T=N[0],E=N[N.length-1];h.shiftKey&&document.activeElement===T?(h.preventDefault(),E.focus()):!h.shiftKey&&document.activeElement===E&&(h.preventDefault(),T.focus())},[]),_=n.useCallback(h=>{h.key==="Escape"&&o&&a()},[o,a]);return n.useEffect(()=>{if(!e)return;document.addEventListener("keydown",_),document.addEventListener("keydown",v);const h=document.body.style.overflow;document.body.style.overflow="hidden";const g=setTimeout(()=>{var N;i!=null&&i.current?i.current.focus():(N=f.current)==null||N.focus()},0);return()=>{document.removeEventListener("keydown",_),document.removeEventListener("keydown",v),document.body.style.overflow=h,clearTimeout(g)}},[e,_,v,i]),e?H.createPortal(t.jsx("div",{ref:p,className:"vyre-modal-backdrop",onClick:h=>{s&&h.target===p.current&&a()},role:"presentation",children:t.jsx("div",{ref:u,className:m("vyre-modal",`vyre-modal--${r}`,d),role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":x,tabIndex:-1,...b,children:l})}),document.body):null});_e.displayName="VyreModal";const we=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-modal__header",e),...r,children:a}));we.displayName="VyreModalHeader";const je=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-modal__body",e),...r,children:a}));je.displayName="VyreModalBody";const ge=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-modal__footer",e),...r,children:a}));ge.displayName="VyreModalFooter";const ke=n.createContext(null);function er(e,a){switch(a.type){case"ADD":return[...e,a.payload];case"REMOVE":return e.filter(r=>r.id!==a.id);default:return e}}let tr=0;const rr=()=>`vyre-t-${++tr}`;function ar({children:e}){const[a,r]=n.useReducer(er,[]),s=n.useCallback(i=>{const d=rr();return r({type:"ADD",payload:{...i,id:d}}),d},[]),o=n.useCallback(i=>{r({type:"REMOVE",id:i})},[]);return t.jsxs(ke.Provider,{value:{toast:s,dismiss:o},children:[e,typeof document<"u"&&H.createPortal(t.jsx("div",{className:"vyre-toast-viewport","aria-live":"polite","aria-atomic":"false","aria-label":"Notifications",children:a.map(i=>t.jsx(sr,{...i,onDismiss:()=>o(i.id)},i.id))}),document.body)]})}function nr(){const e=n.useContext(ke);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function sr({title:e,description:a,variant:r="default",duration:s=4e3,onDismiss:o}){return n.useEffect(()=>{if(s===1/0)return;const i=setTimeout(o,s);return()=>clearTimeout(i)},[s,o]),t.jsxs("div",{className:m("vyre-toast",`vyre-toast--${r}`),role:"alert","data-variant":r,children:[t.jsxs("div",{className:"vyre-toast__content",children:[e&&t.jsx("p",{className:"vyre-toast__title",children:e}),a&&t.jsx("p",{className:"vyre-toast__description",children:a})]}),t.jsx("button",{className:"vyre-toast__close",onClick:o,"aria-label":"Dismiss notification",type:"button",children:t.jsx(or,{})})]})}function or(){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 Ne=n.forwardRef(({options:e,value:a,defaultValue:r,onChange:s,placeholder:o="Select an option",disabled:i=!1,size:d="md",className:l,...c},x)=>{const b=a!==void 0,[y,f]=n.useState(r??""),p=b?a:y,[u,v]=n.useState(!1),[_,h]=n.useState(-1),g=n.useRef(null),N=n.useRef(null),E=`${n.useId()}-listbox`,W=e.find(j=>j.value===p),V=e.filter(j=>!j.disabled),B=n.useCallback(()=>{v(!1),h(-1)},[]),L=n.useCallback(j=>{var S;j.disabled||(b||f(j.value),s==null||s(j.value),B(),(S=g.current)==null||S.focus())},[b,s,B]);n.useEffect(()=>{if(!u)return;const j=S=>{const R=x==null?void 0:x.current;R&&!R.contains(S.target)&&B()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[u,x,B]),n.useEffect(()=>{var S;if(!u||_<0)return;const j=(S=N.current)==null?void 0:S.children[_];j==null||j.scrollIntoView({block:"nearest"})},[_,u]);const I=j=>{switch(j.key){case"Enter":case" ":case"ArrowDown":{if(j.preventDefault(),!u){v(!0);const S=e.findIndex(R=>R.value===p);h(S>=0?S:0)}break}case"ArrowUp":{j.preventDefault(),u||(v(!0),h(e.length-1));break}case"Escape":{B();break}}},C=j=>{var S;switch(j.key){case"ArrowDown":{j.preventDefault(),h(R=>{let M=R+1;for(;M<e.length&&e[M].disabled;)M++;return M<e.length?M:R});break}case"ArrowUp":{j.preventDefault(),h(R=>{let M=R-1;for(;M>=0&&e[M].disabled;)M--;return M>=0?M:R});break}case"Enter":case" ":{j.preventDefault(),_>=0&&L(e[_]);break}case"Escape":case"Tab":{B(),(S=g.current)==null||S.focus();break}case"Home":{j.preventDefault();const R=e.findIndex(M=>!M.disabled);R>=0&&h(R);break}case"End":{j.preventDefault();const R=[...e].reverse().findIndex(M=>!M.disabled);R>=0&&h(e.length-1-R);break}}};return t.jsxs("div",{ref:x,className:m("vyre-select",`vyre-select--${d}`,l),"data-open":u,...c,children:[t.jsxs("button",{ref:g,type:"button",className:"vyre-select__trigger","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":E,"aria-disabled":i,disabled:i,onClick:()=>{i||v(j=>{if(!j){const S=e.findIndex(R=>R.value===p);h(S>=0?S:0)}return!j})},onKeyDown:I,children:[W?t.jsx("span",{className:"vyre-select__value",children:W.label}):t.jsx("span",{className:"vyre-select__placeholder",children:o}),t.jsx(ir,{})]}),u&&t.jsxs("ul",{ref:N,id:E,role:"listbox",className:"vyre-select__dropdown","aria-label":"Options",tabIndex:-1,onKeyDown:C,children:[e.map((j,S)=>t.jsxs("li",{role:"option","aria-selected":j.value===p,"aria-disabled":j.disabled,"data-highlighted":S===_,className:"vyre-select__option",onMouseEnter:()=>!j.disabled&&h(S),onMouseDown:R=>{R.preventDefault(),L(j)},children:[j.label,j.value===p&&t.jsx(lr,{})]},j.value)),V.length===0&&t.jsx("li",{className:"vyre-select__empty",role:"presentation",children:"No options available"})]})]})});Ne.displayName="VyreSelect";function ir(){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 lr(){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 Ce=n.createContext(null);function Se(){const e=n.useContext(Ce);if(!e)throw new Error("Tab components must be used inside <Tabs>");return e}const Re=n.forwardRef(({defaultValue:e="",value:a,onChange:r,className:s,children:o,...i},d)=>{const l=a!==void 0,[c,x]=n.useState(e),b=l?a:c,y=n.useId(),f=n.useCallback(p=>{l||x(p),r==null||r(p)},[l,r]);return t.jsx(Ce.Provider,{value:{value:b,onChange:f,baseId:y},children:t.jsx("div",{ref:d,className:m("vyre-tabs",s),...i,children:o})})});Re.displayName="VyreTabs";const Le=n.forwardRef(({className:e,children:a,"aria-label":r,...s},o)=>{const i=n.useRef(null),d=l=>{var y;const c=Array.from(((y=i.current)==null?void 0:y.querySelectorAll('[role="tab"]:not([disabled])'))??[]),x=c.findIndex(f=>f===document.activeElement);if(x<0)return;let b=x;if(l.key==="ArrowRight")b=(x+1)%c.length;else if(l.key==="ArrowLeft")b=(x-1+c.length)%c.length;else if(l.key==="Home")b=0;else if(l.key==="End")b=c.length-1;else return;l.preventDefault(),c[b].focus(),c[b].click()};return t.jsx("div",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},role:"tablist",className:m("vyre-tabs__list",e),"aria-label":r,onKeyDown:d,...s,children:a})});Le.displayName="VyreTabList";const Me=n.forwardRef(({value:e,disabled:a=!1,className:r,children:s,...o},i)=>{const{value:d,onChange:l,baseId:c}=Se(),x=e===d;return t.jsx("button",{ref:i,role:"tab",type:"button",id:`${c}-tab-${e}`,"aria-controls":`${c}-panel-${e}`,"aria-selected":x,disabled:a,tabIndex:x?0:-1,className:m("vyre-tabs__tab",x&&"vyre-tabs__tab--active",r),"data-selected":x,onClick:()=>!a&&l(e),...o,children:s})});Me.displayName="VyreTab";const Te=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-tabs__panels",e),...r,children:a}));Te.displayName="VyreTabPanels";const Ee=n.forwardRef(({value:e,className:a,children:r,...s},o)=>{const{value:i,baseId:d}=Se();return e===i?t.jsx("div",{ref:o,role:"tabpanel",id:`${d}-panel-${e}`,"aria-labelledby":`${d}-tab-${e}`,tabIndex:0,className:m("vyre-tabs__panel",a),...s,children:r}):null});Ee.displayName="VyreTabPanel";const cr=120,Ie=({content:e,placement:a="top",delay:r=300,children:s,className:o})=>{const[i,d]=n.useState("hidden"),l=n.useRef(null),c=n.useRef(null),x=n.useId(),b=n.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),l.current=setTimeout(()=>d("visible"),r)},[r]),y=n.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null),d("leaving"),c.current=setTimeout(()=>d("hidden"),cr)},[]),f=n.Children.only(s),p=n.cloneElement(f,{onMouseEnter:u=>{var v,_;b(),(_=(v=f.props).onMouseEnter)==null||_.call(v,u)},onMouseLeave:u=>{var v,_;y(),(_=(v=f.props).onMouseLeave)==null||_.call(v,u)},onFocus:u=>{var v,_;d("visible"),(_=(v=f.props).onFocus)==null||_.call(v,u)},onBlur:u=>{var v,_;y(),(_=(v=f.props).onBlur)==null||_.call(v,u)},"aria-describedby":i!=="hidden"?x:void 0});return t.jsxs("span",{className:m("vyre-tooltip-wrapper",o),children:[p,i!=="hidden"&&t.jsxs("span",{id:x,role:"tooltip",className:m("vyre-tooltip",`vyre-tooltip--${a}`,i==="leaving"&&"vyre-tooltip--leaving"),"data-placement":a,children:[e,t.jsx("span",{className:"vyre-tooltip__arrow","aria-hidden":"true"})]})]})};Ie.displayName="VyreTooltip";const De=n.createContext(null);function Ae(){const e=n.useContext(De);if(!e)throw new Error("AccordionItem must be used within Accordion");return e}const Be=n.forwardRef(({type:e="single",defaultValue:a,value:r,onValueChange:s,className:o,children:i,...d},l)=>{const c=p=>p===void 0?[]:Array.isArray(p)?p:[p],[x,b]=n.useState(c(a)),y=r!==void 0?c(r):x,f=n.useCallback(p=>{let u;e==="single"?u=y.includes(p)?[]:[p]:u=y.includes(p)?y.filter(v=>v!==p):[...y,p],r===void 0&&b(u),s==null||s(e==="single"?u[0]??"":u)},[e,y,r,s]);return t.jsx(De.Provider,{value:{type:e,value:y,toggle:f},children:t.jsx("div",{ref:l,className:["vyre-accordion",o].filter(Boolean).join(" "),...d,children:i})})});Be.displayName="Accordion";const ne=n.createContext(null),Ve=n.forwardRef(({value:e,className:a,children:r,...s},o)=>{const{value:i}=Ae(),d=i.includes(e);return t.jsx(ne.Provider,{value:{itemValue:e,isOpen:d},children:t.jsx("div",{ref:o,"data-state":d?"open":"closed",className:["vyre-accordion__item",a].filter(Boolean).join(" "),...s,children:r})})});Ve.displayName="AccordionItem";const $e=n.forwardRef(({className:e,children:a,...r},s)=>{const{toggle:o}=Ae(),i=n.useContext(ne);if(!i)throw new Error("AccordionTrigger must be used within AccordionItem");const{itemValue:d,isOpen:l}=i;return t.jsxs("button",{ref:s,type:"button","aria-expanded":l,"data-state":l?"open":"closed",className:["vyre-accordion__trigger",e].filter(Boolean).join(" "),onClick:()=>o(d),...r,children:[t.jsx("span",{className:"vyre-accordion__trigger-text",children:a}),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"})})]})});$e.displayName="AccordionTrigger";const We=n.forwardRef(({className:e,children:a,...r},s)=>{const o=n.useContext(ne);if(!o)throw new Error("AccordionContent must be used within AccordionItem");const{isOpen:i}=o;return t.jsx("div",{ref:s,hidden:!i,"data-state":i?"open":"closed",className:["vyre-accordion__content",e].filter(Boolean).join(" "),...r,children:t.jsx("div",{className:"vyre-accordion__content-inner",children:a})})});We.displayName="AccordionContent";const He=n.forwardRef(({src:e,alt:a="",fallback:r,size:s="md",status:o,className:i,...d},l)=>{var y;const[c,x]=n.useState(!1),b=e&&!c;return t.jsxs("span",{ref:l,"data-size":s,className:["vyre-avatar",i].filter(Boolean).join(" "),...d,children:[b?t.jsx("img",{src:e,alt:a,className:"vyre-avatar__img",onError:()=>x(!0)}):t.jsx("span",{className:"vyre-avatar__fallback","aria-label":a||r,children:r??((y=a==null?void 0:a.charAt(0))==null?void 0:y.toUpperCase())??"?"}),o&&t.jsx("span",{className:`vyre-avatar__status vyre-avatar__status--${o}`,"aria-label":o})]})});He.displayName="Avatar";const Fe=n.forwardRef(({checked:e,defaultChecked:a,indeterminate:r=!1,onCheckedChange:s,disabled:o,size:i="md",className:d,id:l,...c},x)=>{const b=n.useRef(null),y=x??b;return n.useEffect(()=>{y.current&&(y.current.indeterminate=r)},[r,y]),t.jsxs("span",{className:["vyre-checkbox",`vyre-checkbox--${i}`,d].filter(Boolean).join(" "),"data-disabled":o||void 0,"data-checked":e||void 0,"data-indeterminate":r||void 0,children:[t.jsx("input",{ref:y,type:"checkbox",id:l,checked:e,defaultChecked:a,disabled:o,className:"vyre-checkbox__input",onChange:f=>s==null?void 0:s(f.target.checked),...c}),t.jsx("span",{className:"vyre-checkbox__box","aria-hidden":"true",children:r?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"})})})]})});Fe.displayName="Checkbox";const Pe=n.forwardRef(({checked:e,defaultChecked:a=!1,onCheckedChange:r,disabled:s,size:o="md",className:i,...d},l)=>{const[c,x]=n.useState(a),b=e!==void 0?e:c,y=()=>{if(s)return;const f=!b;e===void 0&&x(f),r==null||r(f)};return t.jsx("button",{ref:l,type:"button",role:"switch","aria-checked":b,disabled:s,"data-checked":b||void 0,"data-size":o,className:["vyre-switch",i].filter(Boolean).join(" "),onClick:y,...d,children:t.jsx("span",{className:"vyre-switch__thumb"})})});Pe.displayName="Switch";const qe=n.forwardRef(({value:e,defaultValue:a=0,min:r=0,max:s=100,step:o=1,onValueChange:i,disabled:d,size:l="md",className:c,style:x,...b},y)=>{const[f,p]=n.useState(a),u=e!==void 0?e:f,v=(u-r)/(s-r)*100;return t.jsxs("div",{className:["vyre-slider",`vyre-slider--${l}`,c].filter(Boolean).join(" "),"data-disabled":d||void 0,style:{"--vyre-slider-pct":`${v}%`,...x},children:[t.jsx("input",{ref:y,type:"range",min:r,max:s,step:o,value:u,disabled:d,className:"vyre-slider__input",onChange:_=>{const h=Number(_.target.value);e===void 0&&p(h),i==null||i(h)},...b}),t.jsxs("div",{className:"vyre-slider__track",children:[t.jsx("div",{className:"vyre-slider__fill",style:{width:`${v}%`}}),t.jsx("div",{className:"vyre-slider__thumb",style:{left:`${v}%`}})]})]})});qe.displayName="Slider";const Oe=n.forwardRef(({value:e,max:a=100,indeterminate:r=!1,size:s="md",variant:o="default",className:i,...d},l)=>{const c=r?void 0:Math.min(100,Math.max(0,(e??0)/a*100));return t.jsx("div",{ref:l,role:"progressbar","aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":r?void 0:e??0,"data-size":s,"data-variant":o,"data-indeterminate":r||void 0,className:["vyre-progress",i].filter(Boolean).join(" "),...d,children:t.jsx("div",{className:"vyre-progress__bar",style:c!==void 0?{width:`${c}%`}:void 0})})});Oe.displayName="Progress";const Ke=n.forwardRef(({orientation:e="horizontal",decorative:a=!0,className:r,...s},o)=>t.jsx("div",{ref:o,role:a?"none":"separator","aria-orientation":a?void 0:e,"data-orientation":e,className:["vyre-separator",r].filter(Boolean).join(" "),...s}));Ke.displayName="Separator";const Ye=n.forwardRef(({required:e,disabled:a,className:r,children:s,...o},i)=>t.jsxs("label",{ref:i,"data-required":e||void 0,"data-disabled":a||void 0,className:["vyre-label",r].filter(Boolean).join(" "),...o,children:[s,e&&t.jsx("span",{className:"vyre-label__required","aria-hidden":"true",children:"*"})]}));Ye.displayName="Label";const Ue=n.forwardRef(({variant:e="rect",width:a,height:r,className:s,style:o,...i},d)=>t.jsx("div",{ref:d,"aria-hidden":"true","data-variant":e,className:["vyre-skeleton",s].filter(Boolean).join(" "),style:{width:typeof a=="number"?`${a}px`:a,height:typeof r=="number"?`${r}px`:r,...o},...i}));Ue.displayName="Skeleton";const Q=8,dr=120;function ur(e){const[a,r]=e.split("-");return{side:a,align:r??"center"}}function mr(e,a,r,s,o,i){const d=e.width,l=e.height,c=a.width,x=a.height,b=e.left+o,y=e.top+i;let f=0,p=0;switch(r){case"top":f=y-x-Q;break;case"bottom":f=y+l+Q;break;case"left":p=b-c-Q;break;case"right":p=b+d+Q;break}if(r==="top"||r==="bottom")switch(s){case"start":p=b;break;case"center":p=b+d/2-c/2;break;case"end":p=b+d-c;break}else switch(s){case"start":f=y;break;case"center":f=y+l/2-x/2;break;case"end":f=y+l-x;break}return{top:f,left:p}}const Ge=({trigger:e,children:a,open:r,onOpenChange:s,placement:o="bottom",closeOnOutside:i=!0,className:d})=>{const l=r!==void 0,[c,x]=n.useState(!1),[b,y]=n.useState(!1),[f,p]=n.useState(!1),[u,v]=n.useState({top:0,left:0}),_=l?r:c,h=n.useRef(null),g=n.useRef(null),N=n.useRef(null),T=n.useId(),{side:E,align:W}=ur(o),V=n.useCallback(C=>{l||x(C),s==null||s(C)},[l,s]),B=n.useCallback(()=>V(!_),[_,V]),L=n.useCallback(()=>{y(!0),N.current=setTimeout(()=>{y(!1),p(!1),V(!1)},dr)},[V]);n.useEffect(()=>{_?(N.current&&(clearTimeout(N.current),N.current=null),y(!1),p(!0)):f&&!b&&L()},[_]),n.useEffect(()=>{if(!f||!h.current||!g.current)return;const C=h.current.getBoundingClientRect(),j=g.current.getBoundingClientRect(),S=mr(C,j,E,W,window.scrollX,window.scrollY);v(S)},[f,E,W]),n.useEffect(()=>{if(!f||!i)return;const C=j=>{g.current&&!g.current.contains(j.target)&&h.current&&!h.current.contains(j.target)&&L()};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[f,i,L]),n.useEffect(()=>{if(!f)return;const C=j=>{j.key==="Escape"&&L()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[f,L]);const I=n.cloneElement(e,{ref:h,onClick:C=>{var j,S;B(),(S=(j=e.props).onClick)==null||S.call(j,C)},"aria-expanded":_,"aria-controls":T,"aria-haspopup":"dialog"});return t.jsxs(t.Fragment,{children:[I,f&&H.createPortal(t.jsx("div",{ref:g,id:T,role:"dialog","aria-modal":"false",className:m("vyre-popover",`vyre-popover--${E}`,b&&"vyre-popover--leaving",d),style:{top:u.top,left:u.left},children:a}),document.body)]})};Ge.displayName="VyrePopover";const ee=n.createContext(null),Xe=n.createContext(null),vr=120,ze=({trigger:e,children:a,placement:r="bottom-start",className:s})=>{const[o,i]=n.useState(!1),[d,l]=n.useState(!1),[c,x]=n.useState(!1),[b,y]=n.useState({top:0,left:0}),[f,p]=n.useState(-1),u=n.useRef(null),v=n.useRef(null),_=n.useRef(null),h=n.useId(),g=n.useCallback(()=>{var L;return Array.from(((L=v.current)==null?void 0:L.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])"))??[])},[]),N=n.useCallback(()=>{l(!0),_.current=setTimeout(()=>{var L;l(!1),x(!1),i(!1),p(-1),(L=u.current)==null||L.focus({preventScroll:!0})},vr)},[]),T=n.useCallback(()=>{_.current&&(clearTimeout(_.current),_.current=null),l(!1),i(!0),x(!0)},[]),E=n.useCallback(()=>{o?N():T()},[o,T,N]);n.useEffect(()=>{if(!c||!u.current)return;const L=u.current.getBoundingClientRect(),I=4,C=window.scrollX,j=window.scrollY;let S=0,R=0;r.startsWith("bottom")?(S=L.bottom+j+I,R=r==="bottom-start"?L.left+C:L.right+C):(S=L.top+j-I,R=r==="top-start"?L.left+C:L.right+C),y({top:S,left:R}),requestAnimationFrame(()=>{var P;(P=g()[0])==null||P.focus({preventScroll:!0}),p(0)})},[c,r,g]),n.useEffect(()=>{if(!c)return;const L=C=>{v.current&&!v.current.contains(C.target)&&u.current&&!u.current.contains(C.target)&&N()},I=C=>{var j,S,R;if(C.key==="Escape"){N();return}if(C.key==="ArrowDown"||C.key==="ArrowUp"){C.preventDefault();const M=g();if(!M.length)return;const P=C.key==="ArrowDown"?1:-1,Z=(f+P+M.length)%M.length;(j=M[Z])==null||j.focus({preventScroll:!0}),p(Z)}if(C.key==="Home"&&((S=g()[0])==null||S.focus({preventScroll:!0}),p(0)),C.key==="End"){const M=g();(R=M[M.length-1])==null||R.focus({preventScroll:!0}),p(M.length-1)}};return document.addEventListener("mousedown",L),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("keydown",I)}},[c,f,N,g]);const W=n.cloneElement(e,{ref:u,onClick:L=>{var I,C;E(),(C=(I=e.props).onClick)==null||C.call(I,L)},"aria-expanded":o,"aria-haspopup":"menu","aria-controls":h}),V=r.endsWith("-end"),B=r.startsWith("top");return t.jsxs(ee.Provider,{value:{close:N},children:[W,c&&H.createPortal(t.jsx("div",{ref:v,id:h,role:"menu","aria-orientation":"vertical",className:m("vyre-dropdown",V&&"vyre-dropdown--end",B&&"vyre-dropdown--top",d&&"vyre-dropdown--leaving",s),style:{top:b.top,left:b.left,transform:V?"translateX(-100%)":void 0},children:a}),document.body)]})};ze.displayName="VyreDropdownMenu";const Ze=({children:e,className:a})=>t.jsx("div",{className:m("vyre-dropdown__label",a),children:e});Ze.displayName="VyreDropdownLabel";const Je=({children:e,onSelect:a,disabled:r=!1,variant:s="default",icon:o,shortcut:i,className:d})=>{const l=n.useContext(ee);return t.jsxs("button",{role:"menuitem",className:m("vyre-dropdown__item",s==="danger"&&"vyre-dropdown__item--danger",d),"aria-disabled":r||void 0,disabled:r,tabIndex:-1,onClick:()=>{r||(a==null||a(),l==null||l.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})]})};Je.displayName="VyreDropdownItem";const Qe=({children:e,checked:a,onCheckedChange:r,disabled:s=!1,shortcut:o,className:i})=>{const d=n.useContext(ee);return t.jsxs("button",{role:"menuitemcheckbox","aria-checked":a,"aria-disabled":s||void 0,disabled:s,tabIndex:-1,className:m("vyre-dropdown__item vyre-dropdown__item--checkbox",i),onClick:()=>{s||(r(!a),d==null||d.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:a&&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})]})};Qe.displayName="VyreDropdownCheckboxItem";const et=({value:e,onValueChange:a,children:r})=>t.jsx(Xe.Provider,{value:{value:e,onValueChange:a},children:t.jsx("div",{role:"group",children:r})});et.displayName="VyreDropdownRadioGroup";const tt=({children:e,value:a,disabled:r=!1,className:s})=>{const o=n.useContext(ee),i=n.useContext(Xe),d=(i==null?void 0:i.value)===a;return t.jsxs("button",{role:"menuitemradio","aria-checked":d,"aria-disabled":r||void 0,disabled:r,tabIndex:-1,className:m("vyre-dropdown__item vyre-dropdown__item--radio",s),onClick:()=>{r||(i==null||i.onValueChange(a),o==null||o.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:d&&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})]})};tt.displayName="VyreDropdownRadioItem";const rt=({trigger:e,children:a,icon:r,placement:s="right",disabled:o=!1,className:i})=>{const[d,l]=n.useState(!1),[c,x]=n.useState({top:0,left:0}),b=n.useRef(null),y=n.useRef(null),f=n.useCallback(()=>{if(!b.current)return;const v=b.current.getBoundingClientRect(),_=window.scrollX,h=window.scrollY,g=2;x({top:v.top+h,left:s==="right"?v.right+_+g:v.left+_-g}),l(!0)},[s]),p=n.useCallback(()=>l(!1),[]),u=v=>{var h;const _=v.relatedTarget;(h=y.current)!=null&&h.contains(_)||p()};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{ref:b,role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"aria-disabled":o||void 0,disabled:o,tabIndex:-1,className:m("vyre-dropdown__item vyre-dropdown__item--sub",i),onMouseEnter:f,onMouseLeave:u,onFocus:f,children:[r&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:r}),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:s==="right"?"M4 2l4 4-4 4":"M8 2L4 6l4 4",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d&&H.createPortal(t.jsx("div",{ref:y,role:"menu",className:m("vyre-dropdown vyre-dropdown--sub",s==="left"&&"vyre-dropdown--sub-left"),style:{position:"absolute",top:c.top,left:s==="right"?c.left:void 0,right:s==="left"?`calc(100vw - ${c.left}px)`:void 0,transform:s==="left"?"translateX(-100%)":void 0},onMouseLeave:v=>{var h;const _=v.relatedTarget;(h=b.current)!=null&&h.contains(_)||p()},children:a}),document.body)]})};rt.displayName="VyreDropdownSub";const at=({className:e})=>t.jsx("div",{role:"separator",className:m("vyre-dropdown__separator",e)});at.displayName="VyreDropdownSeparator";const yr=()=>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"})]}),fr=()=>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"})]}),hr=()=>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"})]}),br=()=>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"})]}),nt={info:yr,success:fr,warning:hr,danger:br},st=({variant:e="info",title:a,icon:r,onClose:s,children:o,className:i})=>{const d=nt[e];return t.jsxs("div",{role:"alert",className:m("vyre-alert",`vyre-alert--${e}`,i),children:[t.jsx("span",{className:"vyre-alert__icon","aria-hidden":"true",children:r??t.jsx(d,{})}),t.jsxs("div",{className:"vyre-alert__body",children:[a&&t.jsx("p",{className:"vyre-alert__title",children:a}),o&&t.jsx("div",{className:"vyre-alert__description",children:o})]}),s&&t.jsx("button",{type:"button",className:"vyre-alert__close","aria-label":"Dismiss",onClick:s,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"})})})]})};st.displayName="VyreAlert";const xr=["button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),ot=({open:e,onOpenChange:a,title:r,description:s,variant:o="danger",confirmLabel:i="Confirm",cancelLabel:d="Cancel",onConfirm:l,onCancel:c,className:x})=>{const b=n.useRef(null),y=n.useRef(null),f=n.useRef(null),p=n.useCallback(()=>{c==null||c(),a(!1)},[c,a]),u=n.useCallback(()=>{l==null||l(),a(!1)},[l,a]),v=n.useCallback(h=>{if(h.key!=="Tab")return;const g=b.current;if(!g)return;const N=Array.from(g.querySelectorAll(xr));if(!N.length)return;const T=N[0],E=N[N.length-1];h.shiftKey&&document.activeElement===T?(h.preventDefault(),E.focus()):!h.shiftKey&&document.activeElement===E&&(h.preventDefault(),T.focus())},[]);if(n.useEffect(()=>{if(!e)return;document.addEventListener("keydown",v);const h=document.body.style.overflow;document.body.style.overflow="hidden";const g=N=>{N.key==="Escape"&&p()};return document.addEventListener("keydown",g),setTimeout(()=>{var N;return(N=f.current)==null?void 0:N.focus()},0),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keydown",g),document.body.style.overflow=h}},[e,v,p]),!e)return null;const _=nt[o];return H.createPortal(t.jsx("div",{ref:y,className:"vyre-alert-dialog-backdrop",onClick:h=>{h.target===y.current&&p()},role:"presentation",children:t.jsxs("div",{ref:b,role:"alertdialog","aria-modal":"true","aria-labelledby":"vyre-ad-title","aria-describedby":s?"vyre-ad-desc":void 0,className:m("vyre-alert-dialog",`vyre-alert-dialog--${o}`,x),tabIndex:-1,children:[t.jsx("div",{className:"vyre-alert-dialog__icon-wrap",children:t.jsx("span",{className:m("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:r}),s&&t.jsx("p",{id:"vyre-ad-desc",className:"vyre-alert-dialog__description",children:s})]}),t.jsxs("div",{className:"vyre-alert-dialog__footer",children:[t.jsx("button",{ref:f,type:"button",className:"vyre-btn vyre-btn--ghost vyre-btn--sm",onClick:p,children:d}),t.jsx("button",{type:"button",className:m("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)};ot.displayName="VyreAlertDialog";const pr=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),it=n.forwardRef(({open:e,onClose:a,side:r="right",size:s="md",closeOnBackdrop:o=!0,closeOnEsc:i=!0,className:d,children:l,"aria-label":c,"aria-labelledby":x,...b},y)=>{const f=n.useRef(null),p=n.useRef(null),u=n.useCallback(v=>{if(v.key!=="Tab")return;const _=f.current;if(!_)return;const h=Array.from(_.querySelectorAll(pr));if(!h.length)return;const g=h[0],N=h[h.length-1];v.shiftKey&&document.activeElement===g?(v.preventDefault(),N.focus()):!v.shiftKey&&document.activeElement===N&&(v.preventDefault(),g.focus())},[]);return n.useEffect(()=>{if(!e)return;if(document.addEventListener("keydown",u),i){const _=g=>{g.key==="Escape"&&a()};document.addEventListener("keydown",_);const h=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var g;return(g=f.current)==null?void 0:g.focus()},0),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keydown",_),document.body.style.overflow=h}}const v=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var _;return(_=f.current)==null?void 0:_.focus()},0),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=v}},[e,u,i,a]),e?H.createPortal(t.jsx("div",{ref:p,className:"vyre-sheet-backdrop",onClick:v=>{o&&v.target===p.current&&a()},role:"presentation",children:t.jsx("div",{ref:v=>{f.current=v,typeof y=="function"?y(v):y&&(y.current=v)},role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":x,tabIndex:-1,className:m("vyre-sheet",`vyre-sheet--${r}`,`vyre-sheet--${s}`,d),...b,children:l})}),document.body):null});it.displayName="VyreSheet";const lt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-sheet__header",e),...r,children:a}));lt.displayName="VyreSheetHeader";const ct=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-sheet__body",e),...r,children:a}));ct.displayName="VyreSheetBody";const dt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:m("vyre-sheet__footer",e),...r,children:a}));dt.displayName="VyreSheetFooter";const ut=({children:e,separator:a="/",className:r})=>{const s=n.Children.toArray(e).filter(Boolean);return t.jsx("nav",{"aria-label":"Breadcrumb",className:m("vyre-breadcrumb",r),children:t.jsx("ol",{className:"vyre-breadcrumb__list",children:s.map((o,i)=>t.jsxs("li",{className:"vyre-breadcrumb__item",children:[o,i<s.length-1&&t.jsx("span",{className:"vyre-breadcrumb__separator","aria-hidden":"true",children:a})]},i))})})};ut.displayName="VyreBreadcrumb";const mt=({children:e,href:a,current:r=!1,className:s})=>r||!a?t.jsx("span",{className:m("vyre-breadcrumb__link vyre-breadcrumb__link--current",s),"aria-current":r?"page":void 0,children:e}):t.jsx("a",{href:a,className:m("vyre-breadcrumb__link",s),children:e});mt.displayName="VyreBreadcrumbItem";const vt=({children:e,href:a,className:r})=>t.jsx("a",{href:a,className:m("vyre-breadcrumb__link",r),children:e});vt.displayName="VyreBreadcrumbLink";const yt=({children:e="/",className:a})=>t.jsx("span",{className:m("vyre-breadcrumb__separator",a),"aria-hidden":"true",children:e});yt.displayName="VyreBreadcrumbSeparator";function le(e,a){return Array.from({length:a-e+1},(r,s)=>e+s)}function _r(e,a,r){const s=r*2+5;if(a<=s)return le(1,a);const o=Math.max(e-r,2),i=Math.min(e+r,a-1),d=o>2,l=i<a-1,c=[1];return d&&c.push("..."),c.push(...le(o,i)),l&&c.push("..."),c.push(a),c}const wr=()=>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"})}),jr=()=>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"})}),gr=()=>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"})}),kr=()=>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"})}),ft=({page:e,totalPages:a,onPageChange:r,siblings:s=1,showEdges:o=!0,showInfo:i=!1,totalItems:d,pageSize:l,className:c})=>{const x=_r(e,a,s),b=e>1,y=e<a,f=n.useMemo(()=>{if(!i)return null;if(d!=null&&l!=null){const u=(e-1)*l+1,v=Math.min(e*l,d);return`Showing ${u}–${v} of ${d}`}return`Page ${e} of ${a}`},[i,e,a,d,l]),p=t.jsxs(t.Fragment,{children:[o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(1),disabled:!b,"aria-label":"First page",children:t.jsx(gr,{})}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(e-1),disabled:!b,"aria-label":"Previous page",children:t.jsx(wr,{})}),t.jsx("ol",{className:"vyre-pagination__list",children:x.map((u,v)=>u==="..."?t.jsx("li",{children:t.jsx("span",{className:"vyre-pagination__dots","aria-hidden":"true",children:"···"})},`dots-${v}`):t.jsx("li",{children:t.jsx("button",{className:m("vyre-pagination__btn",u===e&&"vyre-pagination__btn--active"),onClick:()=>r(u),"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,children:u})},u))}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(e+1),disabled:!y,"aria-label":"Next page",children:t.jsx(jr,{})}),o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(a),disabled:!y,"aria-label":"Last page",children:t.jsx(kr,{})})]});return i?t.jsxs("div",{className:m("vyre-pagination-row",c),children:[t.jsx("span",{className:"vyre-pagination__info",children:f}),t.jsx("nav",{"aria-label":"Pagination",className:"vyre-pagination",children:p})]}):t.jsx("nav",{"aria-label":"Pagination",className:m("vyre-pagination",c),children:p})};ft.displayName="VyrePagination";const ht=({children:e,striped:a=!1,bordered:r=!1,compact:s=!1,hoverable:o=!0,className:i})=>t.jsx("div",{className:"vyre-table-wrapper",children:t.jsx("table",{className:m("vyre-table",a&&"vyre-table--striped",r&&"vyre-table--bordered",s&&"vyre-table--compact",o&&"vyre-table--hoverable",i),children:e})});ht.displayName="VyreTable";const bt=n.forwardRef(({className:e,...a},r)=>t.jsx("thead",{ref:r,className:m("vyre-table__head",e),...a}));bt.displayName="VyreTableHead";const xt=n.forwardRef(({className:e,...a},r)=>t.jsx("tbody",{ref:r,className:m("vyre-table__body",e),...a}));xt.displayName="VyreTableBody";const pt=n.forwardRef(({className:e,selected:a,...r},s)=>t.jsx("tr",{ref:s,className:m("vyre-table__row",a&&"vyre-table__row--selected",e),"aria-selected":a,...r}));pt.displayName="VyreTableRow";const Nr=({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})]})}),_t=n.forwardRef(({className:e,sortable:a,sortDir:r=null,onSort:s,align:o="left",children:i,...d},l)=>a?t.jsx("th",{ref:l,className:m("vyre-table__th vyre-table__th--sortable",`vyre-table__th--${o}`,r&&`vyre-table__th--sort-${r}`,e),"aria-sort":r==="asc"?"ascending":r==="desc"?"descending":"none",...d,children:t.jsxs("button",{className:"vyre-table__sort-btn",onClick:s,type:"button",children:[i,t.jsx(Nr,{dir:r})]})}):t.jsx("th",{ref:l,className:m("vyre-table__th",`vyre-table__th--${o}`,e),...d,children:i}));_t.displayName="VyreTableHeader";const wt=n.forwardRef(({className:e,align:a="left",...r},s)=>t.jsx("td",{ref:s,className:m("vyre-table__td",`vyre-table__td--${a}`,e),...r}));wt.displayName="VyreTableCell";const jt=n.forwardRef(({className:e,...a},r)=>t.jsx("caption",{ref:r,className:m("vyre-table__caption",e),...a}));jt.displayName="VyreTableCaption";const gt=n.createContext(null),te=()=>{const e=n.useContext(gt);if(!e)throw new Error("Command components must be used inside <Command>");return e};function ae(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function Cr(e,a,r=[]){if(!e)return!0;const s=ae(e);return ae(a).includes(s)||r.some(o=>ae(o).includes(s))}let Sr=0;function Rr(){return`cmd-${++Sr}`}const se=n.forwardRef(({value:e,onValueChange:a,className:r,children:s},o)=>{const[i,d]=n.useState(""),[l,c]=n.useState(0),[x,b]=n.useState(0),y=e!==void 0?e:i,f=n.useCallback(N=>{d(N),a==null||a(N),c(0)},[a]),p=n.useRef(new Map),u=n.useRef(new Map),v=n.useCallback((N,T,E)=>{p.current.set(N,{el:T,disabled:E})},[]),_=n.useCallback(N=>{p.current.delete(N),u.current.delete(N)},[]),h=n.useCallback(N=>{var T;(T=u.current.get(N))==null||T()},[]),g=n.useMemo(()=>({search:y,setSearch:f,activeIndex:l,setActiveIndex:c,items:p,registerItem:v,unregisterItem:_,selectItem:h,onSelectRef:u,visibleCount:x,setVisibleCount:b}),[y,f,l,v,_,h,x]);return t.jsx(gt.Provider,{value:g,children:t.jsx("div",{ref:o,className:m("vyre-command",r),role:"combobox","aria-expanded":"true","aria-haspopup":"listbox",children:s})})});se.displayName="VyreCommand";const kt=n.forwardRef(({placeholder:e="Search...",className:a},r)=>{const{search:s,setSearch:o}=te();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:r,className:m("vyre-command__input",a),type:"text",placeholder:e,value:s,onChange:i=>o(i.target.value),autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list","aria-controls":"vyre-command-list"}),s&&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"})})})]})});kt.displayName="VyreCommandInput";const Nt=n.forwardRef(({className:e,children:a},r)=>{const{activeIndex:s,setActiveIndex:o,items:i,selectItem:d}=te(),l=n.useCallback(c=>{var b,y;const x=Array.from((i.current??new Map).entries()).filter(([,f])=>!f.disabled&&f.el.closest("[data-cmd-item]")!==null&&!f.el.hasAttribute("data-cmd-hidden"));if(c.key==="ArrowDown")c.preventDefault(),o(Math.min(s+1,x.length-1)),(b=x[Math.min(s+1,x.length-1)])==null||b[1].el.scrollIntoView({block:"nearest"});else if(c.key==="ArrowUp")c.preventDefault(),o(Math.max(s-1,0)),(y=x[Math.max(s-1,0)])==null||y[1].el.scrollIntoView({block:"nearest"});else if(c.key==="Enter"){c.preventDefault();const[f]=x[s]??[];f&&d(f)}},[s,o,i,d]);return t.jsx("div",{ref:r,id:"vyre-command-list",role:"listbox",className:m("vyre-command__list",e),onKeyDown:l,children:a})});Nt.displayName="VyreCommandList";const Ct=({className:e,children:a})=>{const{search:r,visibleCount:s}=te();return!r||s>0?null:t.jsx("div",{className:m("vyre-command__empty",e),role:"presentation",children:a??"No results found."})};Ct.displayName="VyreCommandEmpty";const St=({heading:e,className:a,children:r})=>t.jsxs("div",{className:m("vyre-command__group",a),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:r})]});St.displayName="VyreCommandGroup";const Rt=({onSelect:e,disabled:a=!1,keywords:r,className:s,children:o,icon:i,shortcut:d})=>{const{search:l,setActiveIndex:c,registerItem:x,unregisterItem:b,onSelectRef:y,setVisibleCount:f}=te(),p=n.useMemo(()=>Rr(),[]),u=n.useRef(null),_=Cr(l,typeof o=="string"?o:"",r);return n.useEffect(()=>(f(h=>h+(_?1:0)),()=>{f(h=>h-(_?1:0))}),[_,f]),n.useEffect(()=>{const h=u.current;if(!(!h||!_))return x(p,h,a),()=>b(p)},[p,a,_,x,b]),n.useEffect(()=>{var h;return e&&((h=y.current)==null||h.set(p,e)),()=>{var g;(g=y.current)==null||g.delete(p)}},[p,e,y]),_?t.jsxs("div",{ref:u,"data-cmd-item":!0,role:"option","aria-disabled":a||void 0,className:m("vyre-command__item",a&&"vyre-command__item--disabled",s),onClick:()=>{a||e==null||e()},onMouseEnter:()=>{!a&&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}),d&&t.jsx("kbd",{className:"vyre-command__item-shortcut",children:d})]}):null};Rt.displayName="VyreCommandItem";const Lt=({className:e})=>t.jsx("div",{className:m("vyre-command__separator",e),role:"separator","aria-hidden":"true"});Lt.displayName="VyreCommandSeparator";const Mt=({open:e,onOpenChange:a,value:r,onValueChange:s,className:o,children:i})=>{const d=n.useRef(null);return n.useEffect(()=>{var x;if(!e)return;const l=document.activeElement,c=(x=d.current)==null?void 0:x.querySelector(".vyre-command__input");return c==null||c.focus(),()=>{l==null||l.focus({preventScroll:!0})}},[e]),n.useEffect(()=>{if(!e)return;const l=c=>{c.key==="Escape"&&a(!1)};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,a]),e?H.createPortal(t.jsx("div",{className:"vyre-command-backdrop",ref:d,onClick:l=>{l.target===l.currentTarget&&a(!1)},role:"dialog","aria-modal":"true","aria-label":"Command palette",children:t.jsx(se,{value:r,onValueChange:s,className:m("vyre-command--dialog",o),children:i})}),document.body):null};Mt.displayName="VyreCommandDialog";function U(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function F(e,a){return e.getFullYear()===a.getFullYear()&&e.getMonth()===a.getMonth()&&e.getDate()===a.getDate()}function X(e,a){return U(e)<U(a)}function ce(e,a){return U(e)>U(a)}function Lr(e,a){return new Date(e,a+1,0).getDate()}function Mr(e,a,r){return(new Date(e,a,1).getDay()-r+7)%7}function q(e,a){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}function Tr(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}const de=Array.from({length:12},(e,a)=>new Intl.DateTimeFormat("default",{month:"long"}).format(new Date(2e3,a,1))),z=12,oe=n.forwardRef((e,a)=>{const{showTime:r=!1,minDate:s,maxDate:o,disabled:i,className:d,weekStartsOn:l=1}=e,c=U(new Date),x=()=>{var w,k;return e.mode==="range"?((w=e.value)==null?void 0:w[0])??c:e.mode==="multiple"?((k=e.value)==null?void 0:k[0])??c:e.value??c},[b,y]=n.useState(()=>(x()??c).getFullYear()),[f,p]=n.useState(()=>(x()??c).getMonth()),[u,v]=n.useState("days"),[_,h]=n.useState(null),[g,N]=n.useState(()=>{const w=e.mode==="single"?e.value:null;return w?w.getHours():0}),[T,E]=n.useState(()=>{const w=e.mode==="single"?e.value:null;return w?w.getMinutes():0}),W=n.useMemo(()=>{const w=Lr(b,f),k=Mr(b,f,l);return{count:w,offset:k}},[b,f,l]),V=n.useMemo(()=>l===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],[l]),B=n.useCallback(w=>{if(e.mode==="single")return!!e.value&&F(w,e.value);if(e.mode==="range"){const[k,D]=e.value??[null,null];return!!k&&F(w,k)||!!D&&F(w,D)}return e.mode==="multiple"?(e.value??[]).some(k=>F(w,k)):!1},[e]),L=n.useCallback(w=>{if(e.mode!=="range")return!1;const[k,D]=e.value??[null,null],A=D??_;if(!k||!A)return!1;const O=X(k,A)?k:A,K=X(k,A)?A:k;return ce(w,O)&&X(w,K)},[e,_]),I=n.useCallback(w=>{if(e.mode!=="range")return!1;const[k]=e.value??[null,null];return!!k&&F(w,k)},[e]),C=n.useCallback(w=>{if(e.mode!=="range")return!1;const[,k]=e.value??[null,null];return!!k&&F(w,k)},[e]),j=n.useCallback(w=>!!(s&&X(w,s)||o&&ce(w,o)||i!=null&&i(w)),[s,o,i]),S=n.useCallback(w=>{var D,A,O,K,G,J;const k=new Date(b,f,w,g,T);if(!j(U(k))){if(e.mode==="single"||!e.mode)(D=e.onChange)==null||D.call(e,k);else if(e.mode==="range"){const[$,Y]=e.value??[null,null];!$||$&&Y?(A=e.onChange)==null||A.call(e,[k,null]):X(k,$)?(O=e.onChange)==null||O.call(e,[k,$]):(K=e.onChange)==null||K.call(e,[$,k])}else if(e.mode==="multiple"){const $=e.value??[],Y=$.findIndex(ie=>F(ie,k));Y>=0?(G=e.onChange)==null||G.call(e,$.filter((ie,Xt)=>Xt!==Y)):(J=e.onChange)==null||J.call(e,[...$,k])}}},[b,f,g,T,e,j]),R=()=>{f===0?(p(11),y(w=>w-1)):p(w=>w-1)},M=()=>{f===11?(p(0),y(w=>w+1)):p(w=>w+1)},P=(w,k)=>{var D;if(N(w),E(k),e.mode==="single"&&e.value){const A=new Date(e.value);A.setHours(w,k),(D=e.onChange)==null||D.call(e,A)}},Z=Math.floor(b/z)*z;return t.jsxs("div",{ref:a,className:m("vyre-calendar",d),children:[t.jsxs("div",{className:"vyre-calendar__header",children:[u==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:R,"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"})})}),u==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>y(w=>w-z),"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:()=>v(u==="months"?"days":"months"),children:de[f]}),t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>v(u==="years"?"days":"years"),children:b})]}),u==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:M,"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"})})}),u==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>y(w=>w+z),"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"})})})]}),u==="months"&&t.jsx("div",{className:"vyre-calendar__month-grid",children:de.map((w,k)=>t.jsx("button",{className:m("vyre-calendar__month-cell",k===f&&"vyre-calendar__month-cell--active"),onClick:()=>{p(k),v("days")},children:w.slice(0,3)},w))}),u==="years"&&t.jsx("div",{className:"vyre-calendar__year-grid",children:Array.from({length:z},(w,k)=>Z+k).map(w=>t.jsx("button",{className:m("vyre-calendar__year-cell",w===b&&"vyre-calendar__year-cell--active"),onClick:()=>{y(w),v("days")},children:w},w))}),u==="days"&&t.jsxs("div",{className:"vyre-calendar__grid",children:[V.map(w=>t.jsx("div",{className:"vyre-calendar__weekday",children:w},w)),Array.from({length:W.offset}).map((w,k)=>t.jsx("div",{},`empty-${k}`)),Array.from({length:W.count},(w,k)=>k+1).map(w=>{const k=new Date(b,f,w),D=B(k),A=L(k),O=I(k),K=C(k),G=j(k),J=F(k,c);return t.jsx("button",{className:m("vyre-calendar__day",J&&"vyre-calendar__day--today",D&&"vyre-calendar__day--selected",A&&"vyre-calendar__day--in-range",O&&"vyre-calendar__day--range-start",K&&"vyre-calendar__day--range-end",G&&"vyre-calendar__day--disabled"),onClick:()=>S(w),onMouseEnter:()=>{if(e.mode==="range"){const[$,Y]=e.value??[null,null];$&&!Y&&h(k)}},onMouseLeave:()=>h(null),disabled:G,"aria-selected":D,"aria-label":q(k),children:w},w)})]}),r&&u==="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:g,onChange:w=>P(Number(w.target.value),T),"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:T,onChange:w=>P(g,Number(w.target.value)),"aria-label":"Minutes"})]})]})});oe.displayName="VyreCalendar";function Er(e){if(e.mode==="range"){const[s,o]=e.value??[null,null];return s?o?`${q(s)} – ${q(o)}`:q(s):""}if(e.mode==="multiple"){const s=e.value??[];return s.length===0?"":s.length===1?q(s[0]):`${s.length} dates selected`}const a=e.value,r=e.showTime;return a?r?`${q(a)} ${Tr(a)}`:q(a):""}const Tt=n.forwardRef(({placeholder:e="Pick a date",inputClassName:a,...r},s)=>{const[o,i]=n.useState(!1),d=n.useRef(null),l=n.useRef(null),[c,x]=n.useState({top:0,left:0,width:0}),b=Er(r),y=n.useCallback(()=>{if(!d.current)return;const u=d.current.getBoundingClientRect();x({top:u.bottom+window.scrollY+6,left:u.left+window.scrollX,width:u.width})},[]);n.useEffect(()=>{if(!o)return;y();const u=()=>y(),v=()=>y();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",v)}},[o,y]),n.useEffect(()=>{if(!o)return;const u=_=>{var h,g;!((h=l.current)!=null&&h.contains(_.target))&&!((g=d.current)!=null&&g.contains(_.target))&&i(!1)},v=_=>{_.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",v)}},[o]);const f=r.mode!=="range"&&r.mode!=="multiple"&&!r.showTime,p=n.useMemo(()=>r.mode==="range"?{...r,onChange:u=>{var v;(v=r.onChange)==null||v.call(r,u),u[0]&&u[1]&&i(!1)}}:r.mode==="multiple"?r:{...r,onChange:u=>{var v;(v=r.onChange)==null||v.call(r,u),f&&i(!1)}},[r,f]);return t.jsxs("div",{ref:s,className:"vyre-datepicker",children:[t.jsxs("button",{ref:d,type:"button",className:m("vyre-datepicker__trigger",!b&&"vyre-datepicker__trigger--placeholder",a),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:b||e}),b&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:u=>{var v,_,h;u.stopPropagation(),r.mode==="range"?(v=r.onChange)==null||v.call(r,[null,null]):r.mode==="multiple"?(_=r.onChange)==null||_.call(r,[]):(h=r.onChange)==null||h.call(r,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&&H.createPortal(t.jsx("div",{ref:l,className:"vyre-datepicker__popover",role:"dialog","aria-label":"Date picker",style:{top:c.top,left:c.left,minWidth:c.width},children:t.jsx(oe,{...p})}),document.body)]})});Tt.displayName="VyreDatePicker";const Et=n.forwardRef(({as:e="p",size:a="md",weight:r,color:s="default",truncate:o,mono:i,className:d,children:l,...c},x)=>t.jsx(e,{ref:x,className:m("vyre-text",a!=="md"&&`vyre-text--${a}`,r&&`vyre-text--${r}`,s!=="default"&&`vyre-text--${s}`,o&&"vyre-text--truncate",i&&"vyre-text--mono",d),...c,children:l}));Et.displayName="VyreText";const It=n.forwardRef(({as:e="h2",size:a="md",weight:r="bold",color:s="default",truncate:o,className:i,children:d,...l},c)=>t.jsx(e,{ref:c,className:m("vyre-heading",`vyre-heading--${a}`,r!=="bold"&&`vyre-heading--${r}`,s!=="default"&&`vyre-text--${s}`,o&&"vyre-text--truncate",i),...l,children:d}));It.displayName="VyreHeading";const Dt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("p",{ref:s,className:m("vyre-lead",e),...r,children:a}));Dt.displayName="VyreLead";const At=n.forwardRef(({block:e,className:a,children:r,...s},o)=>e?t.jsx("pre",{className:m("vyre-code-block",a),...s,children:t.jsx("code",{ref:o,children:r})}):t.jsx("code",{ref:o,className:m("vyre-code",a),...s,children:r}));At.displayName="VyreCode";const Bt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("blockquote",{ref:s,className:m("vyre-blockquote",e),...r,children:a}));Bt.displayName="VyreBlockquote";const Vt=n.createContext({collapsed:!1,toggleCollapsed:()=>{}}),re=()=>n.useContext(Vt),$t=n.forwardRef(({defaultCollapsed:e=!1,collapsed:a,onCollapsedChange:r,className:s,children:o},i)=>{const[d,l]=n.useState(e),c=a!==void 0?a:d,x=n.useCallback(()=>{const b=!c;l(b),r==null||r(b)},[c,r]);return t.jsx(Vt.Provider,{value:{collapsed:c,toggleCollapsed:x},children:t.jsx("div",{ref:i,className:m("vyre-app-layout",s),children:o})})});$t.displayName="VyreAppLayout";const Wt=n.forwardRef(({variant:e="default",className:a,children:r},s)=>{const{collapsed:o}=re();return t.jsx("aside",{ref:s,className:m("vyre-sidebar",o&&"vyre-sidebar--collapsed",e==="floating"&&"vyre-sidebar--floating",a),"data-collapsed":o||void 0,children:r})});Wt.displayName="VyreSidebar";const Ht=n.forwardRef(({logo:e,title:a,className:r,children:s},o)=>t.jsxs("div",{ref:o,className:m("vyre-sidebar__header",r),children:[e&&t.jsx("span",{className:"vyre-sidebar__logo",children:e}),a&&t.jsx("span",{className:"vyre-sidebar__title",children:a}),s]}));Ht.displayName="VyreSidebarHeader";const Ft=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:m("vyre-sidebar__content",e),children:a}));Ft.displayName="VyreSidebarContent";const Pt=n.forwardRef(({label:e,className:a,children:r},s)=>t.jsxs("div",{ref:s,className:m("vyre-sidebar__section",a),children:[e&&t.jsx("div",{className:"vyre-sidebar__section-label",children:e}),r]}));Pt.displayName="VyreSidebarSection";const qt=({active:e,icon:a,badge:r,href:s,onClick:o,className:i,children:d})=>{const{collapsed:l}=re(),c=m("vyre-sidebar__item",e&&"vyre-sidebar__item--active",i),x=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:"vyre-sidebar__item-icon",children:a}),t.jsx("span",{className:"vyre-sidebar__item-label",children:d}),r!==void 0&&t.jsx("span",{className:"vyre-sidebar__item-badge",children:r})]});return s?t.jsx("a",{href:s,className:c,"aria-current":e?"page":void 0,title:l?String(d):void 0,children:x}):t.jsx("button",{type:"button",className:c,onClick:o,"aria-pressed":e,title:l?String(d):void 0,children:x})};qt.displayName="VyreSidebarItem";const Ot=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:m("vyre-sidebar__footer",e),children:a}));Ot.displayName="VyreSidebarFooter";const Kt=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:m("vyre-app-shell",e),children:a}));Kt.displayName="VyreAppShell";const Yt=n.forwardRef(({className:e,children:a},r)=>t.jsx("header",{ref:r,className:m("vyre-app-bar",e),children:a}));Yt.displayName="VyreAppBar";const Ut=({className:e})=>{const{collapsed:a,toggleCollapsed:r}=re();return t.jsx("button",{type:"button",className:m("vyre-sidebar-trigger",e),onClick:r,"aria-label":a?"Expand sidebar":"Collapse sidebar","aria-expanded":!a,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"})]})})};Ut.displayName="VyreSidebarTrigger";const Gt=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:m("vyre-page-content",e),children:a}));Gt.displayName="VyrePageContent";exports.Accordion=Be;exports.AccordionContent=We;exports.AccordionItem=Ve;exports.AccordionTrigger=$e;exports.Alert=st;exports.AlertDialog=ot;exports.AppBar=Yt;exports.AppLayout=$t;exports.AppShell=Kt;exports.Avatar=He;exports.Badge=me;exports.Blockquote=Bt;exports.Breadcrumb=ut;exports.BreadcrumbItem=mt;exports.BreadcrumbLink=vt;exports.BreadcrumbSeparator=yt;exports.Button=ue;exports.Calendar=oe;exports.Card=ve;exports.CardBody=fe;exports.CardFooter=he;exports.CardHeader=ye;exports.Checkbox=Fe;exports.Code=At;exports.Command=se;exports.CommandDialog=Mt;exports.CommandEmpty=Ct;exports.CommandGroup=St;exports.CommandInput=kt;exports.CommandItem=Rt;exports.CommandList=Nt;exports.CommandSeparator=Lt;exports.DatePicker=Tt;exports.DropdownCheckboxItem=Qe;exports.DropdownItem=Je;exports.DropdownLabel=Ze;exports.DropdownMenu=ze;exports.DropdownRadioGroup=et;exports.DropdownRadioItem=tt;exports.DropdownSeparator=at;exports.DropdownSub=rt;exports.Field=be;exports.Heading=It;exports.Input=xe;exports.Label=Ye;exports.Lead=Dt;exports.Modal=_e;exports.ModalBody=je;exports.ModalFooter=ge;exports.ModalHeader=we;exports.PageContent=Gt;exports.Pagination=ft;exports.Popover=Ge;exports.Progress=Oe;exports.Select=Ne;exports.Separator=Ke;exports.Sheet=it;exports.SheetBody=ct;exports.SheetFooter=dt;exports.SheetHeader=lt;exports.Sidebar=Wt;exports.SidebarContent=Ft;exports.SidebarFooter=Ot;exports.SidebarHeader=Ht;exports.SidebarItem=qt;exports.SidebarSection=Pt;exports.SidebarTrigger=Ut;exports.Skeleton=Ue;exports.Slider=qe;exports.Switch=Pe;exports.Tab=Me;exports.TabList=Le;exports.TabPanel=Ee;exports.TabPanels=Te;exports.Table=ht;exports.TableBody=xt;exports.TableCaption=jt;exports.TableCell=wt;exports.TableHead=bt;exports.TableHeader=_t;exports.TableRow=pt;exports.Tabs=Re;exports.Text=Et;exports.Textarea=pe;exports.ToastProvider=ar;exports.Tooltip=Ie;exports.cn=m;exports.useAppLayout=re;exports.useToast=nr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),F=require("react-dom");function f(...e){const a=[];for(const r of e)if(r){if(typeof r=="string")a.push(r);else if(Array.isArray(r)){const s=f(...r);s&&a.push(s)}else if(typeof r=="object")for(const[s,o]of Object.entries(r))o&&a.push(s)}return a.join(" ")}const rr={primary:"vyre-btn--primary",secondary:"vyre-btn--secondary",ghost:"vyre-btn--ghost",accent:"vyre-btn--accent",teal:"vyre-btn--teal",danger:"vyre-btn--danger"},ar={sm:"vyre-btn--sm",md:"vyre-btn--md",lg:"vyre-btn--lg",icon:"vyre-btn--icon"},ve=n.forwardRef(({variant:e="secondary",size:a="md",loading:r=!1,disabled:s,leftIcon:o,rightIcon:i,className:c,children:d,as:u="button",...h},m)=>{const y=s||r;return t.jsxs(u,{ref:m,className:f("vyre-btn",rr[e],ar[a],r&&"vyre-btn--loading",c),disabled:u==="button"?y:void 0,"aria-disabled":y,"data-variant":e,"data-size":a,...h,children:[r&&t.jsx("span",{className:"vyre-btn__spinner","aria-hidden":"true",children:t.jsx(nr,{})}),!r&&o&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--left","aria-hidden":"true",children:o}),d&&t.jsx("span",{className:"vyre-btn__label",children:d}),i&&t.jsx("span",{className:"vyre-btn__icon vyre-btn__icon--right","aria-hidden":"true",children:i})]})});ve.displayName="VyreButton";function nr(){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 ye=n.forwardRef(({variant:e="default",dot:a=!1,className:r,children:s,...o},i)=>t.jsxs("span",{ref:i,className:f("vyre-badge",`vyre-badge--${e}`,r),"data-variant":e,...o,children:[a&&t.jsx("span",{className:"vyre-badge__dot","aria-hidden":"true"}),s]}));ye.displayName="VyreBadge";const fe=n.forwardRef(({variant:e="default",hoverable:a=!1,clickable:r=!1,className:s,children:o,...i},c)=>t.jsx("div",{ref:c,className:f("vyre-card",`vyre-card--${e}`,a&&"vyre-card--hoverable",r&&"vyre-card--clickable",s),"data-variant":e,role:r?"button":void 0,tabIndex:r?0:void 0,...i,children:o}));fe.displayName="VyreCard";const he=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-card__header",e),...r,children:a}));he.displayName="VyreCardHeader";const be=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-card__body",e),...r,children:a}));be.displayName="VyreCardBody";const xe=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-card__footer",e),...r,children:a}));xe.displayName="VyreCardFooter";const pe=n.forwardRef(({label:e,hint:a,state:r="idle",required:s=!1,htmlFor:o,className:i,children:c,...d},u)=>t.jsxs("div",{ref:u,className:f("vyre-field",r!=="idle"&&`vyre-field--${r}`,i),"data-state":r,...d,children:[e&&t.jsxs("label",{className:"vyre-field__label",htmlFor:o,children:[e,s&&t.jsx("span",{className:"vyre-field__required","aria-label":"required",children:"*"})]}),c,a&&t.jsx("span",{className:"vyre-field__hint",role:r==="error"?"alert":void 0,children:a})]}));pe.displayName="VyreField";const _e=n.forwardRef(({size:e="md",leftElement:a,rightElement:r,className:s,...o},i)=>a||r?t.jsxs("div",{className:f("vyre-input-wrapper",`vyre-input-wrapper--${e}`),children:[a&&t.jsx("span",{className:"vyre-input__element vyre-input__element--left","aria-hidden":"true",children:a}),t.jsx("input",{ref:i,className:f("vyre-input",`vyre-input--${e}`,!!a&&"vyre-input--has-left",!!r&&"vyre-input--has-right",s),...o}),r&&t.jsx("span",{className:"vyre-input__element vyre-input__element--right","aria-hidden":"true",children:r})]}):t.jsx("input",{ref:i,className:f("vyre-input",`vyre-input--${e}`,s),...o}));_e.displayName="VyreInput";const ge=n.forwardRef(({size:e="md",resize:a="vertical",className:r,style:s,...o},i)=>t.jsx("textarea",{ref:i,className:f("vyre-textarea",`vyre-textarea--${e}`,r),style:{resize:a,...s},...o}));ge.displayName="VyreTextarea";const sr=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),we=n.forwardRef(({open:e,onClose:a,size:r="md",closeOnBackdrop:s=!0,closeOnEsc:o=!0,initialFocus:i,className:c,children:d,"aria-label":u,"aria-labelledby":h,...m},y)=>{const b=n.useRef(null),_=n.useRef(null),l=n.useCallback(x=>{b.current=x,typeof y=="function"?y(x):y&&(y.current=x)},[y]),v=n.useCallback(x=>{if(x.key!=="Tab")return;const N=b.current;if(!N)return;const j=Array.from(N.querySelectorAll(sr));if(!j.length)return;const S=j[0],E=j[j.length-1];x.shiftKey&&document.activeElement===S?(x.preventDefault(),E.focus()):!x.shiftKey&&document.activeElement===E&&(x.preventDefault(),S.focus())},[]),p=n.useCallback(x=>{x.key==="Escape"&&o&&a()},[o,a]);return n.useEffect(()=>{if(!e)return;document.addEventListener("keydown",p),document.addEventListener("keydown",v);const x=document.body.style.overflow;document.body.style.overflow="hidden";const N=setTimeout(()=>{var j;i!=null&&i.current?i.current.focus():(j=b.current)==null||j.focus()},0);return()=>{document.removeEventListener("keydown",p),document.removeEventListener("keydown",v),document.body.style.overflow=x,clearTimeout(N)}},[e,p,v,i]),e?F.createPortal(t.jsx("div",{ref:_,className:"vyre-modal-backdrop",onClick:x=>{s&&x.target===_.current&&a()},role:"presentation",children:t.jsx("div",{ref:l,className:f("vyre-modal",`vyre-modal--${r}`,c),role:"dialog","aria-modal":"true","aria-label":u,"aria-labelledby":h,tabIndex:-1,...m,children:d})}),document.body):null});we.displayName="VyreModal";const je=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-modal__header",e),...r,children:a}));je.displayName="VyreModalHeader";const ke=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-modal__body",e),...r,children:a}));ke.displayName="VyreModalBody";const Ne=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-modal__footer",e),...r,children:a}));Ne.displayName="VyreModalFooter";const Ce=n.createContext(null);function or(e,a){switch(a.type){case"ADD":return[...e,a.payload];case"REMOVE":return e.filter(r=>r.id!==a.id);default:return e}}let ir=0;const lr=()=>`vyre-t-${++ir}`;function dr({children:e}){const[a,r]=n.useReducer(or,[]),s=n.useCallback(i=>{const c=lr();return r({type:"ADD",payload:{...i,id:c}}),c},[]),o=n.useCallback(i=>{r({type:"REMOVE",id:i})},[]);return t.jsxs(Ce.Provider,{value:{toast:s,dismiss:o},children:[e,typeof document<"u"&&F.createPortal(t.jsx("div",{className:"vyre-toast-viewport","aria-live":"polite","aria-atomic":"false","aria-label":"Notifications",children:a.map(i=>t.jsx(ur,{...i,onDismiss:()=>o(i.id)},i.id))}),document.body)]})}function cr(){const e=n.useContext(Ce);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function ur({title:e,description:a,variant:r="default",duration:s=4e3,onDismiss:o}){return n.useEffect(()=>{if(s===1/0)return;const i=setTimeout(o,s);return()=>clearTimeout(i)},[s,o]),t.jsxs("div",{className:f("vyre-toast",`vyre-toast--${r}`),role:"alert","data-variant":r,children:[t.jsxs("div",{className:"vyre-toast__content",children:[e&&t.jsx("p",{className:"vyre-toast__title",children:e}),a&&t.jsx("p",{className:"vyre-toast__description",children:a})]}),t.jsx("button",{className:"vyre-toast__close",onClick:o,"aria-label":"Dismiss notification",type:"button",children:t.jsx(mr,{})})]})}function mr(){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 Le=n.forwardRef(({options:e,value:a,defaultValue:r,onChange:s,placeholder:o="Select an option",disabled:i=!1,size:c="md",className:d,...u},h)=>{const m=a!==void 0,[y,b]=n.useState(r??""),_=m?a:y,[l,v]=n.useState(!1),[p,x]=n.useState(-1),N=n.useRef(null),j=n.useRef(null),E=`${n.useId()}-listbox`,I=e.find(k=>k.value===_),D=e.filter(k=>!k.disabled),V=n.useCallback(()=>{v(!1),x(-1)},[]),T=n.useCallback(k=>{var w;k.disabled||(m||b(k.value),s==null||s(k.value),V(),(w=N.current)==null||w.focus())},[m,s,V]);n.useEffect(()=>{if(!l)return;const k=w=>{const L=h==null?void 0:h.current;L&&!L.contains(w.target)&&V()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[l,h,V]),n.useEffect(()=>{var w;if(!l||p<0)return;const k=(w=j.current)==null?void 0:w.children[p];k==null||k.scrollIntoView({block:"nearest"})},[p,l]);const B=k=>{switch(k.key){case"Enter":case" ":case"ArrowDown":{if(k.preventDefault(),!l){v(!0);const w=e.findIndex(L=>L.value===_);x(w>=0?w:0)}break}case"ArrowUp":{k.preventDefault(),l||(v(!0),x(e.length-1));break}case"Escape":{V();break}}},M=k=>{var w;switch(k.key){case"ArrowDown":{k.preventDefault(),x(L=>{let R=L+1;for(;R<e.length&&e[R].disabled;)R++;return R<e.length?R:L});break}case"ArrowUp":{k.preventDefault(),x(L=>{let R=L-1;for(;R>=0&&e[R].disabled;)R--;return R>=0?R:L});break}case"Enter":case" ":{k.preventDefault(),p>=0&&T(e[p]);break}case"Escape":case"Tab":{V(),(w=N.current)==null||w.focus();break}case"Home":{k.preventDefault();const L=e.findIndex(R=>!R.disabled);L>=0&&x(L);break}case"End":{k.preventDefault();const L=[...e].reverse().findIndex(R=>!R.disabled);L>=0&&x(e.length-1-L);break}}};return t.jsxs("div",{ref:h,className:f("vyre-select",`vyre-select--${c}`,d),"data-open":l,...u,children:[t.jsxs("button",{ref:N,type:"button",className:"vyre-select__trigger","aria-haspopup":"listbox","aria-expanded":l,"aria-controls":E,"aria-disabled":i,disabled:i,onClick:()=>{i||v(k=>{if(!k){const w=e.findIndex(L=>L.value===_);x(w>=0?w:0)}return!k})},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(vr,{})]}),l&&t.jsxs("ul",{ref:j,id:E,role:"listbox",className:"vyre-select__dropdown","aria-label":"Options",tabIndex:-1,onKeyDown:M,children:[e.map((k,w)=>t.jsxs("li",{role:"option","aria-selected":k.value===_,"aria-disabled":k.disabled,"data-highlighted":w===p,className:"vyre-select__option",onMouseEnter:()=>!k.disabled&&x(w),onMouseDown:L=>{L.preventDefault(),T(k)},children:[k.label,k.value===_&&t.jsx(yr,{})]},k.value)),D.length===0&&t.jsx("li",{className:"vyre-select__empty",role:"presentation",children:"No options available"})]})]})});Le.displayName="VyreSelect";function vr(){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 Re=n.createContext(null);function Se(){const e=n.useContext(Re);if(!e)throw new Error("Tab components must be used inside <Tabs>");return e}const Me=n.forwardRef(({defaultValue:e="",value:a,onChange:r,className:s,children:o,...i},c)=>{const d=a!==void 0,[u,h]=n.useState(e),m=d?a:u,y=n.useId(),b=n.useCallback(_=>{d||h(_),r==null||r(_)},[d,r]);return t.jsx(Re.Provider,{value:{value:m,onChange:b,baseId:y},children:t.jsx("div",{ref:c,className:f("vyre-tabs",s),...i,children:o})})});Me.displayName="VyreTabs";const Te=n.forwardRef(({className:e,children:a,"aria-label":r,...s},o)=>{const i=n.useRef(null),c=d=>{var y;const u=Array.from(((y=i.current)==null?void 0:y.querySelectorAll('[role="tab"]:not([disabled])'))??[]),h=u.findIndex(b=>b===document.activeElement);if(h<0)return;let m=h;if(d.key==="ArrowRight")m=(h+1)%u.length;else if(d.key==="ArrowLeft")m=(h-1+u.length)%u.length;else if(d.key==="Home")m=0;else if(d.key==="End")m=u.length-1;else return;d.preventDefault(),u[m].focus(),u[m].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":r,onKeyDown:c,...s,children:a})});Te.displayName="VyreTabList";const Ee=n.forwardRef(({value:e,disabled:a=!1,className:r,children:s,...o},i)=>{const{value:c,onChange:d,baseId:u}=Se(),h=e===c;return t.jsx("button",{ref:i,role:"tab",type:"button",id:`${u}-tab-${e}`,"aria-controls":`${u}-panel-${e}`,"aria-selected":h,disabled:a,tabIndex:h?0:-1,className:f("vyre-tabs__tab",h&&"vyre-tabs__tab--active",r),"data-selected":h,onClick:()=>!a&&d(e),...o,children:s})});Ee.displayName="VyreTab";const Ie=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-tabs__panels",e),...r,children:a}));Ie.displayName="VyreTabPanels";const De=n.forwardRef(({value:e,className:a,children:r,...s},o)=>{const{value:i,baseId:c}=Se();return e===i?t.jsx("div",{ref:o,role:"tabpanel",id:`${c}-panel-${e}`,"aria-labelledby":`${c}-tab-${e}`,tabIndex:0,className:f("vyre-tabs__panel",a),...s,children:r}):null});De.displayName="VyreTabPanel";const fr=120,Ae=({content:e,placement:a="top",delay:r=300,children:s,className:o})=>{const[i,c]=n.useState("hidden"),d=n.useRef(null),u=n.useRef(null),h=n.useId(),m=n.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),d.current=setTimeout(()=>c("visible"),r)},[r]),y=n.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),c("leaving"),u.current=setTimeout(()=>c("hidden"),fr)},[]),b=n.Children.only(s),_=n.cloneElement(b,{onMouseEnter:l=>{var v,p;m(),(p=(v=b.props).onMouseEnter)==null||p.call(v,l)},onMouseLeave:l=>{var v,p;y(),(p=(v=b.props).onMouseLeave)==null||p.call(v,l)},onFocus:l=>{var v,p;c("visible"),(p=(v=b.props).onFocus)==null||p.call(v,l)},onBlur:l=>{var v,p;y(),(p=(v=b.props).onBlur)==null||p.call(v,l)},"aria-describedby":i!=="hidden"?h:void 0});return t.jsxs("span",{className:f("vyre-tooltip-wrapper",o),children:[_,i!=="hidden"&&t.jsxs("span",{id:h,role:"tooltip",className:f("vyre-tooltip",`vyre-tooltip--${a}`,i==="leaving"&&"vyre-tooltip--leaving"),"data-placement":a,children:[e,t.jsx("span",{className:"vyre-tooltip__arrow","aria-hidden":"true"})]})]})};Ae.displayName="VyreTooltip";const Be=n.createContext(null);function Ve(){const e=n.useContext(Be);if(!e)throw new Error("AccordionItem must be used within Accordion");return e}const $e=n.forwardRef(({type:e="single",defaultValue:a,value:r,onValueChange:s,className:o,children:i,...c},d)=>{const u=_=>_===void 0?[]:Array.isArray(_)?_:[_],[h,m]=n.useState(u(a)),y=r!==void 0?u(r):h,b=n.useCallback(_=>{let l;e==="single"?l=y.includes(_)?[]:[_]:l=y.includes(_)?y.filter(v=>v!==_):[...y,_],r===void 0&&m(l),s==null||s(e==="single"?l[0]??"":l)},[e,y,r,s]);return t.jsx(Be.Provider,{value:{type:e,value:y,toggle:b},children:t.jsx("div",{ref:d,className:["vyre-accordion",o].filter(Boolean).join(" "),...c,children:i})})});$e.displayName="Accordion";const ne=n.createContext(null),We=n.forwardRef(({value:e,className:a,children:r,...s},o)=>{const{value:i}=Ve(),c=i.includes(e);return t.jsx(ne.Provider,{value:{itemValue:e,isOpen:c},children:t.jsx("div",{ref:o,"data-state":c?"open":"closed",className:["vyre-accordion__item",a].filter(Boolean).join(" "),...s,children:r})})});We.displayName="AccordionItem";const He=n.forwardRef(({className:e,children:a,...r},s)=>{const{toggle:o}=Ve(),i=n.useContext(ne);if(!i)throw new Error("AccordionTrigger must be used within AccordionItem");const{itemValue:c,isOpen:d}=i;return t.jsxs("button",{ref:s,type:"button","aria-expanded":d,"data-state":d?"open":"closed",className:["vyre-accordion__trigger",e].filter(Boolean).join(" "),onClick:()=>o(c),...r,children:[t.jsx("span",{className:"vyre-accordion__trigger-text",children:a}),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"})})]})});He.displayName="AccordionTrigger";const Fe=n.forwardRef(({className:e,children:a,...r},s)=>{const o=n.useContext(ne);if(!o)throw new Error("AccordionContent must be used within AccordionItem");const{isOpen:i}=o;return t.jsx("div",{ref:s,hidden:!i,"data-state":i?"open":"closed",className:["vyre-accordion__content",e].filter(Boolean).join(" "),...r,children:t.jsx("div",{className:"vyre-accordion__content-inner",children:a})})});Fe.displayName="AccordionContent";const Pe=n.forwardRef(({src:e,alt:a="",fallback:r,size:s="md",status:o,className:i,...c},d)=>{var y;const[u,h]=n.useState(!1),m=e&&!u;return t.jsxs("span",{ref:d,"data-size":s,className:["vyre-avatar",i].filter(Boolean).join(" "),...c,children:[m?t.jsx("img",{src:e,alt:a,className:"vyre-avatar__img",onError:()=>h(!0)}):t.jsx("span",{className:"vyre-avatar__fallback","aria-label":a||r,children:r??((y=a==null?void 0:a.charAt(0))==null?void 0:y.toUpperCase())??"?"}),o&&t.jsx("span",{className:`vyre-avatar__status vyre-avatar__status--${o}`,"aria-label":o})]})});Pe.displayName="Avatar";const Oe=n.forwardRef(({checked:e,defaultChecked:a,indeterminate:r=!1,onCheckedChange:s,disabled:o,size:i="md",className:c,id:d,...u},h)=>{const m=n.useRef(null),y=h??m;return n.useEffect(()=>{y.current&&(y.current.indeterminate=r)},[r,y]),t.jsxs("span",{className:["vyre-checkbox",`vyre-checkbox--${i}`,c].filter(Boolean).join(" "),"data-disabled":o||void 0,"data-checked":e||void 0,"data-indeterminate":r||void 0,children:[t.jsx("input",{ref:y,type:"checkbox",id:d,checked:e,defaultChecked:a,disabled:o,className:"vyre-checkbox__input",onChange:b=>s==null?void 0:s(b.target.checked),...u}),t.jsx("span",{className:"vyre-checkbox__box","aria-hidden":"true",children:r?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"})})})]})});Oe.displayName="Checkbox";const Ke=n.forwardRef(({checked:e,defaultChecked:a=!1,onCheckedChange:r,disabled:s,size:o="md",className:i,...c},d)=>{const[u,h]=n.useState(a),m=e!==void 0?e:u,y=()=>{if(s)return;const b=!m;e===void 0&&h(b),r==null||r(b)};return t.jsx("button",{ref:d,type:"button",role:"switch","aria-checked":m,disabled:s,"data-checked":m||void 0,"data-size":o,className:["vyre-switch",i].filter(Boolean).join(" "),onClick:y,...c,children:t.jsx("span",{className:"vyre-switch__thumb"})})});Ke.displayName="Switch";const qe=n.forwardRef(({value:e,defaultValue:a=0,min:r=0,max:s=100,step:o=1,onValueChange:i,disabled:c,size:d="md",className:u,style:h,...m},y)=>{const[b,_]=n.useState(a),l=e!==void 0?e:b,v=(l-r)/(s-r)*100;return t.jsxs("div",{className:["vyre-slider",`vyre-slider--${d}`,u].filter(Boolean).join(" "),"data-disabled":c||void 0,style:{"--vyre-slider-pct":`${v}%`,...h},children:[t.jsx("input",{ref:y,type:"range",min:r,max:s,step:o,value:l,disabled:c,className:"vyre-slider__input",onChange:p=>{const x=Number(p.target.value);e===void 0&&_(x),i==null||i(x)},...m}),t.jsxs("div",{className:"vyre-slider__track",children:[t.jsx("div",{className:"vyre-slider__fill",style:{width:`${v}%`}}),t.jsx("div",{className:"vyre-slider__thumb",style:{left:`${v}%`}})]})]})});qe.displayName="Slider";const Ge=n.forwardRef(({value:e,max:a=100,indeterminate:r=!1,size:s="md",variant:o="default",className:i,...c},d)=>{const u=r?void 0:Math.min(100,Math.max(0,(e??0)/a*100));return t.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":r?void 0:e??0,"data-size":s,"data-variant":o,"data-indeterminate":r||void 0,className:["vyre-progress",i].filter(Boolean).join(" "),...c,children:t.jsx("div",{className:"vyre-progress__bar",style:u!==void 0?{width:`${u}%`}:void 0})})});Ge.displayName="Progress";const Ye=n.forwardRef(({orientation:e="horizontal",decorative:a=!0,className:r,...s},o)=>t.jsx("div",{ref:o,role:a?"none":"separator","aria-orientation":a?void 0:e,"data-orientation":e,className:["vyre-separator",r].filter(Boolean).join(" "),...s}));Ye.displayName="Separator";const Ue=n.forwardRef(({required:e,disabled:a,className:r,children:s,...o},i)=>t.jsxs("label",{ref:i,"data-required":e||void 0,"data-disabled":a||void 0,className:["vyre-label",r].filter(Boolean).join(" "),...o,children:[s,e&&t.jsx("span",{className:"vyre-label__required","aria-hidden":"true",children:"*"})]}));Ue.displayName="Label";const se=n.forwardRef(({variant:e="rect",width:a,height:r,className:s,style:o,...i},c)=>t.jsx("div",{ref:c,"aria-hidden":"true","data-variant":e,className:["vyre-skeleton",s].filter(Boolean).join(" "),style:{width:typeof a=="number"?`${a}px`:a,height:typeof r=="number"?`${r}px`:r,...o},...i}));se.displayName="Skeleton";const Q=8,hr=120;function br(e){const[a,r]=e.split("-");return{side:a,align:r??"center"}}function xr(e,a,r,s,o,i){const c=e.width,d=e.height,u=a.width,h=a.height,m=e.left+o,y=e.top+i;let b=0,_=0;switch(r){case"top":b=y-h-Q;break;case"bottom":b=y+d+Q;break;case"left":_=m-u-Q;break;case"right":_=m+c+Q;break}if(r==="top"||r==="bottom")switch(s){case"start":_=m;break;case"center":_=m+c/2-u/2;break;case"end":_=m+c-u;break}else switch(s){case"start":b=y;break;case"center":b=y+d/2-h/2;break;case"end":b=y+d-h;break}return{top:b,left:_}}const Xe=({trigger:e,children:a,open:r,onOpenChange:s,placement:o="bottom",closeOnOutside:i=!0,className:c})=>{const d=r!==void 0,[u,h]=n.useState(!1),[m,y]=n.useState(!1),[b,_]=n.useState(!1),[l,v]=n.useState({top:0,left:0}),p=d?r:u,x=n.useRef(null),N=n.useRef(null),j=n.useRef(null),S=n.useId(),{side:E,align:I}=br(o),D=n.useCallback(M=>{d||h(M),s==null||s(M)},[d,s]),V=n.useCallback(()=>D(!p),[p,D]),T=n.useCallback(()=>{y(!0),j.current=setTimeout(()=>{y(!1),_(!1),D(!1)},hr)},[D]);n.useEffect(()=>{p?(j.current&&(clearTimeout(j.current),j.current=null),y(!1),_(!0)):b&&!m&&T()},[p]),n.useEffect(()=>{if(!b||!x.current||!N.current)return;const M=x.current.getBoundingClientRect(),k=N.current.getBoundingClientRect(),w=xr(M,k,E,I,window.scrollX,window.scrollY);v(w)},[b,E,I]),n.useEffect(()=>{if(!b||!i)return;const M=k=>{N.current&&!N.current.contains(k.target)&&x.current&&!x.current.contains(k.target)&&T()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[b,i,T]),n.useEffect(()=>{if(!b)return;const M=k=>{k.key==="Escape"&&T()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[b,T]);const B=n.cloneElement(e,{ref:x,onClick:M=>{var k,w;V(),(w=(k=e.props).onClick)==null||w.call(k,M)},"aria-expanded":p,"aria-controls":S,"aria-haspopup":"dialog"});return t.jsxs(t.Fragment,{children:[B,b&&F.createPortal(t.jsx("div",{ref:N,id:S,role:"dialog","aria-modal":"false",className:f("vyre-popover",`vyre-popover--${E}`,m&&"vyre-popover--leaving",c),style:{top:l.top,left:l.left},children:a}),document.body)]})};Xe.displayName="VyrePopover";const ee=n.createContext(null),ze=n.createContext(null),pr=120,Ze=({trigger:e,children:a,placement:r="bottom-start",className:s})=>{const[o,i]=n.useState(!1),[c,d]=n.useState(!1),[u,h]=n.useState(!1),[m,y]=n.useState({top:0,left:0}),[b,_]=n.useState(-1),l=n.useRef(null),v=n.useRef(null),p=n.useRef(null),x=n.useId(),N=n.useCallback(()=>{var T;return Array.from(((T=v.current)==null?void 0:T.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])"))??[])},[]),j=n.useCallback(()=>{d(!0),p.current=setTimeout(()=>{var T;d(!1),h(!1),i(!1),_(-1),(T=l.current)==null||T.focus({preventScroll:!0})},pr)},[]),S=n.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null),d(!1),i(!0),h(!0)},[]),E=n.useCallback(()=>{o?j():S()},[o,S,j]);n.useEffect(()=>{if(!u||!l.current)return;const T=l.current.getBoundingClientRect(),B=4,M=window.scrollX,k=window.scrollY;let w=0,L=0;r.startsWith("bottom")?(w=T.bottom+k+B,L=r==="bottom-start"?T.left+M:T.right+M):(w=T.top+k-B,L=r==="top-start"?T.left+M:T.right+M),y({top:w,left:L}),requestAnimationFrame(()=>{var A;(A=N()[0])==null||A.focus({preventScroll:!0}),_(0)})},[u,r,N]),n.useEffect(()=>{if(!u)return;const T=M=>{v.current&&!v.current.contains(M.target)&&l.current&&!l.current.contains(M.target)&&j()},B=M=>{var k,w,L;if(M.key==="Escape"){j();return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault();const R=N();if(!R.length)return;const A=M.key==="ArrowDown"?1:-1,Z=(b+A+R.length)%R.length;(k=R[Z])==null||k.focus({preventScroll:!0}),_(Z)}if(M.key==="Home"&&((w=N()[0])==null||w.focus({preventScroll:!0}),_(0)),M.key==="End"){const R=N();(L=R[R.length-1])==null||L.focus({preventScroll:!0}),_(R.length-1)}};return document.addEventListener("mousedown",T),document.addEventListener("keydown",B),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",B)}},[u,b,j,N]);const I=n.cloneElement(e,{ref:l,onClick:T=>{var B,M;E(),(M=(B=e.props).onClick)==null||M.call(B,T)},"aria-expanded":o,"aria-haspopup":"menu","aria-controls":x}),D=r.endsWith("-end"),V=r.startsWith("top");return t.jsxs(ee.Provider,{value:{close:j},children:[I,u&&F.createPortal(t.jsx("div",{ref:v,id:x,role:"menu","aria-orientation":"vertical",className:f("vyre-dropdown",D&&"vyre-dropdown--end",V&&"vyre-dropdown--top",c&&"vyre-dropdown--leaving",s),style:{top:m.top,left:m.left,transform:D?"translateX(-100%)":void 0},children:a}),document.body)]})};Ze.displayName="VyreDropdownMenu";const Je=({children:e,className:a})=>t.jsx("div",{className:f("vyre-dropdown__label",a),children:e});Je.displayName="VyreDropdownLabel";const Qe=({children:e,onSelect:a,disabled:r=!1,variant:s="default",icon:o,shortcut:i,className:c})=>{const d=n.useContext(ee);return t.jsxs("button",{role:"menuitem",className:f("vyre-dropdown__item",s==="danger"&&"vyre-dropdown__item--danger",c),"aria-disabled":r||void 0,disabled:r,tabIndex:-1,onClick:()=>{r||(a==null||a(),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})]})};Qe.displayName="VyreDropdownItem";const et=({children:e,checked:a,onCheckedChange:r,disabled:s=!1,shortcut:o,className:i})=>{const c=n.useContext(ee);return t.jsxs("button",{role:"menuitemcheckbox","aria-checked":a,"aria-disabled":s||void 0,disabled:s,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--checkbox",i),onClick:()=>{s||(r(!a),c==null||c.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:a&&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})]})};et.displayName="VyreDropdownCheckboxItem";const tt=({value:e,onValueChange:a,children:r})=>t.jsx(ze.Provider,{value:{value:e,onValueChange:a},children:t.jsx("div",{role:"group",children:r})});tt.displayName="VyreDropdownRadioGroup";const rt=({children:e,value:a,disabled:r=!1,className:s})=>{const o=n.useContext(ee),i=n.useContext(ze),c=(i==null?void 0:i.value)===a;return t.jsxs("button",{role:"menuitemradio","aria-checked":c,"aria-disabled":r||void 0,disabled:r,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--radio",s),onClick:()=>{r||(i==null||i.onValueChange(a),o==null||o.close())},children:[t.jsx("span",{className:"vyre-dropdown__item-indicator","aria-hidden":"true",children:c&&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})]})};rt.displayName="VyreDropdownRadioItem";const at=({trigger:e,children:a,icon:r,placement:s="right",disabled:o=!1,className:i})=>{const[c,d]=n.useState(!1),[u,h]=n.useState({top:0,left:0}),m=n.useRef(null),y=n.useRef(null),b=n.useCallback(()=>{if(!m.current)return;const v=m.current.getBoundingClientRect(),p=window.scrollX,x=window.scrollY,N=2;h({top:v.top+x,left:s==="right"?v.right+p+N:v.left+p-N}),d(!0)},[s]),_=n.useCallback(()=>d(!1),[]),l=v=>{var x;const p=v.relatedTarget;(x=y.current)!=null&&x.contains(p)||_()};return t.jsxs(t.Fragment,{children:[t.jsxs("button",{ref:m,role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"aria-disabled":o||void 0,disabled:o,tabIndex:-1,className:f("vyre-dropdown__item vyre-dropdown__item--sub",i),onMouseEnter:b,onMouseLeave:l,onFocus:b,children:[r&&t.jsx("span",{className:"vyre-dropdown__item-icon","aria-hidden":"true",children:r}),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:s==="right"?"M4 2l4 4-4 4":"M8 2L4 6l4 4",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),c&&F.createPortal(t.jsx("div",{ref:y,role:"menu",className:f("vyre-dropdown vyre-dropdown--sub",s==="left"&&"vyre-dropdown--sub-left"),style:{position:"absolute",top:u.top,left:s==="right"?u.left:void 0,right:s==="left"?`calc(100vw - ${u.left}px)`:void 0,transform:s==="left"?"translateX(-100%)":void 0},onMouseLeave:v=>{var x;const p=v.relatedTarget;(x=m.current)!=null&&x.contains(p)||_()},children:a}),document.body)]})};at.displayName="VyreDropdownSub";const nt=({className:e})=>t.jsx("div",{role:"separator",className:f("vyre-dropdown__separator",e)});nt.displayName="VyreDropdownSeparator";const _r=()=>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"})]}),gr=()=>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"})]}),wr=()=>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"})]}),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:"M6 6l4 4M10 6l-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),st={info:_r,success:gr,warning:wr,danger:jr},ot=({variant:e="info",title:a,icon:r,onClose:s,children:o,className:i})=>{const c=st[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:r??t.jsx(c,{})}),t.jsxs("div",{className:"vyre-alert__body",children:[a&&t.jsx("p",{className:"vyre-alert__title",children:a}),o&&t.jsx("div",{className:"vyre-alert__description",children:o})]}),s&&t.jsx("button",{type:"button",className:"vyre-alert__close","aria-label":"Dismiss",onClick:s,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"})})})]})};ot.displayName="VyreAlert";const kr=["button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),it=({open:e,onOpenChange:a,title:r,description:s,variant:o="danger",confirmLabel:i="Confirm",cancelLabel:c="Cancel",onConfirm:d,onCancel:u,className:h})=>{const m=n.useRef(null),y=n.useRef(null),b=n.useRef(null),_=n.useCallback(()=>{u==null||u(),a(!1)},[u,a]),l=n.useCallback(()=>{d==null||d(),a(!1)},[d,a]),v=n.useCallback(x=>{if(x.key!=="Tab")return;const N=m.current;if(!N)return;const j=Array.from(N.querySelectorAll(kr));if(!j.length)return;const S=j[0],E=j[j.length-1];x.shiftKey&&document.activeElement===S?(x.preventDefault(),E.focus()):!x.shiftKey&&document.activeElement===E&&(x.preventDefault(),S.focus())},[]);if(n.useEffect(()=>{if(!e)return;document.addEventListener("keydown",v);const x=document.body.style.overflow;document.body.style.overflow="hidden";const N=j=>{j.key==="Escape"&&_()};return document.addEventListener("keydown",N),setTimeout(()=>{var j;return(j=b.current)==null?void 0:j.focus()},0),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keydown",N),document.body.style.overflow=x}},[e,v,_]),!e)return null;const p=st[o];return F.createPortal(t.jsx("div",{ref:y,className:"vyre-alert-dialog-backdrop",onClick:x=>{x.target===y.current&&_()},role:"presentation",children:t.jsxs("div",{ref:m,role:"alertdialog","aria-modal":"true","aria-labelledby":"vyre-ad-title","aria-describedby":s?"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(p,{})})}),t.jsxs("div",{className:"vyre-alert-dialog__body",children:[t.jsx("h2",{id:"vyre-ad-title",className:"vyre-alert-dialog__title",children:r}),s&&t.jsx("p",{id:"vyre-ad-desc",className:"vyre-alert-dialog__description",children:s})]}),t.jsxs("div",{className:"vyre-alert-dialog__footer",children:[t.jsx("button",{ref:b,type:"button",className:"vyre-btn vyre-btn--ghost vyre-btn--sm",onClick:_,children:c}),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:l,children:i})]})]})}),document.body)};it.displayName="VyreAlertDialog";const Nr=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),lt=n.forwardRef(({open:e,onClose:a,side:r="right",size:s="md",closeOnBackdrop:o=!0,closeOnEsc:i=!0,className:c,children:d,"aria-label":u,"aria-labelledby":h,...m},y)=>{const b=n.useRef(null),_=n.useRef(null),l=n.useCallback(v=>{if(v.key!=="Tab")return;const p=b.current;if(!p)return;const x=Array.from(p.querySelectorAll(Nr));if(!x.length)return;const N=x[0],j=x[x.length-1];v.shiftKey&&document.activeElement===N?(v.preventDefault(),j.focus()):!v.shiftKey&&document.activeElement===j&&(v.preventDefault(),N.focus())},[]);return n.useEffect(()=>{if(!e)return;if(document.addEventListener("keydown",l),i){const p=N=>{N.key==="Escape"&&a()};document.addEventListener("keydown",p);const x=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var N;return(N=b.current)==null?void 0:N.focus()},0),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keydown",p),document.body.style.overflow=x}}const v=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{var p;return(p=b.current)==null?void 0:p.focus()},0),()=>{document.removeEventListener("keydown",l),document.body.style.overflow=v}},[e,l,i,a]),e?F.createPortal(t.jsx("div",{ref:_,className:"vyre-sheet-backdrop",onClick:v=>{o&&v.target===_.current&&a()},role:"presentation",children:t.jsx("div",{ref:v=>{b.current=v,typeof y=="function"?y(v):y&&(y.current=v)},role:"dialog","aria-modal":"true","aria-label":u,"aria-labelledby":h,tabIndex:-1,className:f("vyre-sheet",`vyre-sheet--${r}`,`vyre-sheet--${s}`,c),...m,children:d})}),document.body):null});lt.displayName="VyreSheet";const dt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-sheet__header",e),...r,children:a}));dt.displayName="VyreSheetHeader";const ct=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-sheet__body",e),...r,children:a}));ct.displayName="VyreSheetBody";const ut=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("div",{ref:s,className:f("vyre-sheet__footer",e),...r,children:a}));ut.displayName="VyreSheetFooter";const mt=({children:e,separator:a="/",className:r})=>{const s=n.Children.toArray(e).filter(Boolean);return t.jsx("nav",{"aria-label":"Breadcrumb",className:f("vyre-breadcrumb",r),children:t.jsx("ol",{className:"vyre-breadcrumb__list",children:s.map((o,i)=>t.jsxs("li",{className:"vyre-breadcrumb__item",children:[o,i<s.length-1&&t.jsx("span",{className:"vyre-breadcrumb__separator","aria-hidden":"true",children:a})]},i))})})};mt.displayName="VyreBreadcrumb";const vt=({children:e,href:a,current:r=!1,className:s})=>r||!a?t.jsx("span",{className:f("vyre-breadcrumb__link vyre-breadcrumb__link--current",s),"aria-current":r?"page":void 0,children:e}):t.jsx("a",{href:a,className:f("vyre-breadcrumb__link",s),children:e});vt.displayName="VyreBreadcrumbItem";const yt=({children:e,href:a,className:r})=>t.jsx("a",{href:a,className:f("vyre-breadcrumb__link",r),children:e});yt.displayName="VyreBreadcrumbLink";const ft=({children:e="/",className:a})=>t.jsx("span",{className:f("vyre-breadcrumb__separator",a),"aria-hidden":"true",children:e});ft.displayName="VyreBreadcrumbSeparator";function ce(e,a){return Array.from({length:a-e+1},(r,s)=>e+s)}function Cr(e,a,r){const s=r*2+5;if(a<=s)return ce(1,a);const o=Math.max(e-r,2),i=Math.min(e+r,a-1),c=o>2,d=i<a-1,u=[1];return c&&u.push("..."),u.push(...ce(o,i)),d&&u.push("..."),u.push(a),u}const Lr=()=>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"})}),Rr=()=>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"})}),Sr=()=>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"})}),Mr=()=>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"})}),ht=({page:e,totalPages:a,onPageChange:r,siblings:s=1,showEdges:o=!0,showInfo:i=!1,totalItems:c,pageSize:d,className:u})=>{const h=Cr(e,a,s),m=e>1,y=e<a,b=n.useMemo(()=>{if(!i)return null;if(c!=null&&d!=null){const l=(e-1)*d+1,v=Math.min(e*d,c);return`Showing ${l}–${v} of ${c}`}return`Page ${e} of ${a}`},[i,e,a,c,d]),_=t.jsxs(t.Fragment,{children:[o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(1),disabled:!m,"aria-label":"First page",children:t.jsx(Sr,{})}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(e-1),disabled:!m,"aria-label":"Previous page",children:t.jsx(Lr,{})}),t.jsx("ol",{className:"vyre-pagination__list",children:h.map((l,v)=>l==="..."?t.jsx("li",{children:t.jsx("span",{className:"vyre-pagination__dots","aria-hidden":"true",children:"···"})},`dots-${v}`):t.jsx("li",{children:t.jsx("button",{className:f("vyre-pagination__btn",l===e&&"vyre-pagination__btn--active"),onClick:()=>r(l),"aria-label":`Page ${l}`,"aria-current":l===e?"page":void 0,children:l})},l))}),t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(e+1),disabled:!y,"aria-label":"Next page",children:t.jsx(Rr,{})}),o&&t.jsx("button",{className:"vyre-pagination__nav",onClick:()=>r(a),disabled:!y,"aria-label":"Last page",children:t.jsx(Mr,{})})]});return i?t.jsxs("div",{className:f("vyre-pagination-row",u),children:[t.jsx("span",{className:"vyre-pagination__info",children:b}),t.jsx("nav",{"aria-label":"Pagination",className:"vyre-pagination",children:_})]}):t.jsx("nav",{"aria-label":"Pagination",className:f("vyre-pagination",u),children:_})};ht.displayName="VyrePagination";const bt=({children:e,striped:a=!1,bordered:r=!1,compact:s=!1,hoverable:o=!0,className:i})=>t.jsx("div",{className:"vyre-table-wrapper",children:t.jsx("table",{className:f("vyre-table",a&&"vyre-table--striped",r&&"vyre-table--bordered",s&&"vyre-table--compact",o&&"vyre-table--hoverable",i),children:e})});bt.displayName="VyreTable";const xt=n.forwardRef(({className:e,...a},r)=>t.jsx("thead",{ref:r,className:f("vyre-table__head",e),...a}));xt.displayName="VyreTableHead";const pt=n.forwardRef(({className:e,...a},r)=>t.jsx("tbody",{ref:r,className:f("vyre-table__body",e),...a}));pt.displayName="VyreTableBody";const _t=n.forwardRef(({className:e,selected:a,...r},s)=>t.jsx("tr",{ref:s,className:f("vyre-table__row",a&&"vyre-table__row--selected",e),"aria-selected":a,...r}));_t.displayName="VyreTableRow";const Tr=({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})]})}),gt=n.forwardRef(({className:e,sortable:a,sortDir:r=null,onSort:s,align:o="left",children:i,...c},d)=>a?t.jsx("th",{ref:d,className:f("vyre-table__th vyre-table__th--sortable",`vyre-table__th--${o}`,r&&`vyre-table__th--sort-${r}`,e),"aria-sort":r==="asc"?"ascending":r==="desc"?"descending":"none",...c,children:t.jsxs("button",{className:"vyre-table__sort-btn",onClick:s,type:"button",children:[i,t.jsx(Tr,{dir:r})]})}):t.jsx("th",{ref:d,className:f("vyre-table__th",`vyre-table__th--${o}`,e),...c,children:i}));gt.displayName="VyreTableHeader";const wt=n.forwardRef(({className:e,align:a="left",...r},s)=>t.jsx("td",{ref:s,className:f("vyre-table__td",`vyre-table__td--${a}`,e),...r}));wt.displayName="VyreTableCell";const jt=n.forwardRef(({className:e,...a},r)=>t.jsx("caption",{ref:r,className:f("vyre-table__caption",e),...a}));jt.displayName="VyreTableCaption";const kt=n.createContext(null),te=()=>{const e=n.useContext(kt);if(!e)throw new Error("Command components must be used inside <Command>");return e};function ae(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function Er(e,a,r=[]){if(!e)return!0;const s=ae(e);return ae(a).includes(s)||r.some(o=>ae(o).includes(s))}let Ir=0;function Dr(){return`cmd-${++Ir}`}const oe=n.forwardRef(({value:e,onValueChange:a,className:r,children:s},o)=>{const[i,c]=n.useState(""),[d,u]=n.useState(0),[h,m]=n.useState(0),y=e!==void 0?e:i,b=n.useCallback(j=>{c(j),a==null||a(j),u(0)},[a]),_=n.useRef(new Map),l=n.useRef(new Map),v=n.useCallback((j,S,E)=>{_.current.set(j,{el:S,disabled:E})},[]),p=n.useCallback(j=>{_.current.delete(j),l.current.delete(j)},[]),x=n.useCallback(j=>{var S;(S=l.current.get(j))==null||S()},[]),N=n.useMemo(()=>({search:y,setSearch:b,activeIndex:d,setActiveIndex:u,items:_,registerItem:v,unregisterItem:p,selectItem:x,onSelectRef:l,visibleCount:h,setVisibleCount:m}),[y,b,d,v,p,x,h]);return t.jsx(kt.Provider,{value:N,children:t.jsx("div",{ref:o,className:f("vyre-command",r),role:"combobox","aria-expanded":"true","aria-haspopup":"listbox",children:s})})});oe.displayName="VyreCommand";const Nt=n.forwardRef(({placeholder:e="Search...",className:a},r)=>{const{search:s,setSearch:o}=te();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:r,className:f("vyre-command__input",a),type:"text",placeholder:e,value:s,onChange:i=>o(i.target.value),autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list","aria-controls":"vyre-command-list"}),s&&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"})})})]})});Nt.displayName="VyreCommandInput";const Ct=n.forwardRef(({className:e,children:a},r)=>{const{activeIndex:s,setActiveIndex:o,items:i,selectItem:c}=te(),d=n.useCallback(u=>{var m,y;const h=Array.from((i.current??new Map).entries()).filter(([,b])=>!b.disabled&&b.el.closest("[data-cmd-item]")!==null&&!b.el.hasAttribute("data-cmd-hidden"));if(u.key==="ArrowDown")u.preventDefault(),o(Math.min(s+1,h.length-1)),(m=h[Math.min(s+1,h.length-1)])==null||m[1].el.scrollIntoView({block:"nearest"});else if(u.key==="ArrowUp")u.preventDefault(),o(Math.max(s-1,0)),(y=h[Math.max(s-1,0)])==null||y[1].el.scrollIntoView({block:"nearest"});else if(u.key==="Enter"){u.preventDefault();const[b]=h[s]??[];b&&c(b)}},[s,o,i,c]);return t.jsx("div",{ref:r,id:"vyre-command-list",role:"listbox",className:f("vyre-command__list",e),onKeyDown:d,children:a})});Ct.displayName="VyreCommandList";const Lt=({className:e,children:a})=>{const{search:r,visibleCount:s}=te();return!r||s>0?null:t.jsx("div",{className:f("vyre-command__empty",e),role:"presentation",children:a??"No results found."})};Lt.displayName="VyreCommandEmpty";const Rt=({heading:e,className:a,children:r})=>t.jsxs("div",{className:f("vyre-command__group",a),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:r})]});Rt.displayName="VyreCommandGroup";const St=({onSelect:e,disabled:a=!1,keywords:r,className:s,children:o,icon:i,shortcut:c})=>{const{search:d,setActiveIndex:u,registerItem:h,unregisterItem:m,onSelectRef:y,setVisibleCount:b}=te(),_=n.useMemo(()=>Dr(),[]),l=n.useRef(null),p=Er(d,typeof o=="string"?o:"",r);return n.useEffect(()=>(b(x=>x+(p?1:0)),()=>{b(x=>x-(p?1:0))}),[p,b]),n.useEffect(()=>{const x=l.current;if(!(!x||!p))return h(_,x,a),()=>m(_)},[_,a,p,h,m]),n.useEffect(()=>{var x;return e&&((x=y.current)==null||x.set(_,e)),()=>{var N;(N=y.current)==null||N.delete(_)}},[_,e,y]),p?t.jsxs("div",{ref:l,"data-cmd-item":!0,role:"option","aria-disabled":a||void 0,className:f("vyre-command__item",a&&"vyre-command__item--disabled",s),onClick:()=>{a||e==null||e()},onMouseEnter:()=>{!a&&l.current&&u(-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}),c&&t.jsx("kbd",{className:"vyre-command__item-shortcut",children:c})]}):null};St.displayName="VyreCommandItem";const Mt=({className:e})=>t.jsx("div",{className:f("vyre-command__separator",e),role:"separator","aria-hidden":"true"});Mt.displayName="VyreCommandSeparator";const Tt=({open:e,onOpenChange:a,value:r,onValueChange:s,className:o,children:i})=>{const c=n.useRef(null);return n.useEffect(()=>{var h;if(!e)return;const d=document.activeElement,u=(h=c.current)==null?void 0:h.querySelector(".vyre-command__input");return u==null||u.focus(),()=>{d==null||d.focus({preventScroll:!0})}},[e]),n.useEffect(()=>{if(!e)return;const d=u=>{u.key==="Escape"&&a(!1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,a]),e?F.createPortal(t.jsx("div",{className:"vyre-command-backdrop",ref:c,onClick:d=>{d.target===d.currentTarget&&a(!1)},role:"dialog","aria-modal":"true","aria-label":"Command palette",children:t.jsx(oe,{value:r,onValueChange:s,className:f("vyre-command--dialog",o),children:i})}),document.body):null};Tt.displayName="VyreCommandDialog";const Et=n.forwardRef(({orientation:e="horizontal",attached:a=!1,size:r,className:s,children:o,...i},c)=>t.jsx("div",{ref:c,role:"group",className:f("vyre-btn-group",e==="vertical"&&"vyre-btn-group--vertical",a&&"vyre-btn-group--attached",s),"data-orientation":e,"data-size":r,...i,children:o}));Et.displayName="VyreButtonGroup";const ie=n.forwardRef(({variant:e="default",size:a="md",onRemove:r,onClick:s,disabled:o=!1,className:i,children:c,...d},u)=>{const h=!!s&&!o;return t.jsxs("span",{ref:u,className:f("vyre-tag",`vyre-tag--${e}`,`vyre-tag--${a}`,h&&"vyre-tag--clickable",o&&"vyre-tag--disabled",i),"data-variant":e,"data-size":a,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-disabled":o||void 0,onClick:h?s:void 0,onKeyDown:h?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s==null||s())}:void 0,...d,children:[t.jsx("span",{className:"vyre-tag__label",children:c}),r&&t.jsx("button",{type:"button",className:"vyre-tag__remove","aria-label":"Remove",disabled:o,onClick:m=>{m.stopPropagation(),r()},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"})})})]})});ie.displayName="VyreTag";const It=n.forwardRef(({value:e,onChange:a,placeholder:r="Add tag…",disabled:s=!1,max:o,size:i="md",className:c,style:d,"data-testid":u},h)=>{const[m,y]=n.useState(""),b=n.useRef(null),_=o!==void 0&&e.length>=o,l=s||_;function v(j){const S=j.trim();if(!S||e.includes(S)||_){y("");return}a([...e,S]),y("")}function p(j){s||a(e.filter((S,E)=>E!==j))}function x(j){if(j.key==="Enter"||j.key===","){j.preventDefault(),v(m);return}j.key==="Backspace"&&m===""&&e.length>0&&p(e.length-1)}function N(j){const S=j.target.value;if(S.includes(",")){const E=S.split(",");E.slice(0,-1).forEach(D=>v(D)),y(E[E.length-1])}else y(S)}return t.jsxs("div",{ref:h,className:f("vyre-tags-input",`vyre-tags-input--${i}`,s&&"vyre-tags-input--disabled",c),"data-testid":u,style:d,onClick:()=>{var j;return(j=b.current)==null?void 0:j.focus()},children:[e.map((j,S)=>t.jsx(ie,{size:i,disabled:s,onRemove:s?void 0:()=>p(S),children:j},`${j}-${S}`)),t.jsx("input",{ref:b,type:"text",className:"vyre-tags-input__field",value:m,onChange:N,onKeyDown:x,placeholder:_?"":r,disabled:l,"aria-label":"Add tag"})]})});It.displayName="VyreTagsInput";const Dt=n.forwardRef(({options:e,value:a,onChange:r,placeholder:s="Search…",disabled:o=!1,size:i="md",emptyText:c="No results",className:d,...u},h)=>{const[m,y]=n.useState(!1),[b,_]=n.useState(""),[l,v]=n.useState(-1),p=n.useRef(null),x=n.useRef(null),N=n.useRef(null),S=`${n.useId()}-listbox`,E=e.find(w=>w.value===a)??null,I=e.filter(w=>w.label.toLowerCase().includes(b.toLowerCase())),D=n.useCallback(()=>{y(!1),v(-1),_("")},[]),V=n.useCallback(w=>{var L;w.disabled||(r(w.value),D(),(L=p.current)==null||L.blur())},[r,D]);n.useEffect(()=>{if(!m)return;const w=L=>{const R=N.current;R&&!R.contains(L.target)&&D()};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[m,D]),n.useEffect(()=>{var L;if(!m||l<0)return;const w=(L=x.current)==null?void 0:L.children[l];w==null||w.scrollIntoView({block:"nearest"})},[l,m]),n.useEffect(()=>{v(I.length>0?0:-1)},[b]);function T(){o||(y(!0),_(""))}function B(w){_(w.target.value),m||y(!0)}function M(w){var L;switch(w.key){case"ArrowDown":{if(w.preventDefault(),!m){y(!0);return}v(R=>{let A=R+1;for(;A<I.length&&I[A].disabled;)A++;return A<I.length?A:R});break}case"ArrowUp":{if(w.preventDefault(),!m){y(!0);return}v(R=>{let A=R-1;for(;A>=0&&I[A].disabled;)A--;return A>=0?A:R});break}case"Enter":{w.preventDefault(),m&&l>=0&&I[l]&&V(I[l]);break}case"Escape":{D(),(L=p.current)==null||L.blur();break}}}const k=m?b:(E==null?void 0:E.label)??"";return t.jsxs("div",{ref:w=>{N.current=w,typeof h=="function"?h(w):h&&(h.current=w)},className:f("vyre-combobox",`vyre-combobox--${i}`,o&&"vyre-combobox--disabled",d),"data-open":m,...u,children:[t.jsx("input",{ref:p,type:"text",role:"combobox","aria-expanded":m,"aria-haspopup":"listbox","aria-controls":S,"aria-autocomplete":"list","aria-disabled":o,disabled:o,className:"vyre-combobox__input",placeholder:s,value:k,onFocus:T,onChange:B,onKeyDown:M}),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"})})}),m&&t.jsx("ul",{ref:x,id:S,role:"listbox",className:"vyre-combobox__dropdown","aria-label":"Options",children:I.length>0?I.map((w,L)=>t.jsx("li",{role:"option","aria-selected":w.value===a,"aria-disabled":w.disabled,"data-highlighted":L===l,className:f("vyre-combobox__option",L===l&&"vyre-combobox__option--highlighted",w.value===a&&"vyre-combobox__option--selected"),onMouseEnter:()=>!w.disabled&&v(L),onMouseDown:R=>{R.preventDefault(),V(w)},children:w.label},w.value)):t.jsx("li",{className:"vyre-combobox__empty",role:"presentation",children:c})})]})});Dt.displayName="VyreCombobox";function Ar({col:e,sortKey:a,sortDir:r}){const o=a===e.key?r: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 Br=5,At=n.forwardRef(({columns:e,rows:a,sortKey:r,sortDir:s,onSort:o,loading:i=!1,emptyText:c="No data",stickyHeader:d=!1,className:u,style:h,"data-testid":m},y)=>{function b(l){if(!l.sortable||!o)return;const v=r===l.key&&s==="asc"?"desc":"asc";o(l.key,v)}function _(l){return r!==l.key?"none":s==="asc"?"ascending":"descending"}return t.jsx("div",{ref:y,className:f("vyre-data-grid",d&&"vyre-data-grid--sticky-header",u),style:h,"data-testid":m,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(l=>t.jsx("th",{className:f("vyre-data-grid__th",l.sortable&&"vyre-data-grid__th--sortable",r===l.key&&`vyre-data-grid__th--sort-${s}`),style:l.width?{width:l.width}:void 0,"aria-sort":l.sortable?_(l):void 0,children:l.sortable?t.jsxs("button",{type:"button",className:"vyre-data-grid__sort-btn",onClick:()=>b(l),children:[l.label,t.jsx(Ar,{col:l,sortKey:r,sortDir:s})]}):l.label},l.key))})}),t.jsx("tbody",{className:"vyre-data-grid__tbody",children:i?Array.from({length:Br}).map((l,v)=>t.jsx("tr",{className:"vyre-data-grid__row vyre-data-grid__row--skeleton",children:e.map(p=>t.jsx("td",{className:"vyre-data-grid__td",children:t.jsx(se,{height:16})},p.key))},`skel-${v}`)):a.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:c})}):a.map((l,v)=>t.jsx("tr",{className:"vyre-data-grid__row",children:e.map(p=>t.jsx("td",{className:"vyre-data-grid__td",children:l[p.key]!=null?String(l[p.key]):""},p.key))},v))})]})})});At.displayName="VyreDataGrid";const Bt=n.forwardRef(({gap:e="md",wrap:a=!0,className:r,children:s,...o},i)=>t.jsx("div",{ref:i,className:f("vyre-tag-group",`vyre-tag-group--gap-${e}`,!a&&"vyre-tag-group--nowrap",r),role:"list",...o,children:s}));Bt.displayName="VyreTagGroup";function Y(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function P(e,a){return e.getFullYear()===a.getFullYear()&&e.getMonth()===a.getMonth()&&e.getDate()===a.getDate()}function X(e,a){return Y(e)<Y(a)}function ue(e,a){return Y(e)>Y(a)}function Vr(e,a){return new Date(e,a+1,0).getDate()}function $r(e,a,r){return(new Date(e,a,1).getDay()-r+7)%7}function O(e,a){return e?new Intl.DateTimeFormat("default",{year:"numeric",month:"short",day:"numeric"}).format(e):""}function Wr(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}const me=Array.from({length:12},(e,a)=>new Intl.DateTimeFormat("default",{month:"long"}).format(new Date(2e3,a,1))),z=12,le=n.forwardRef((e,a)=>{const{showTime:r=!1,minDate:s,maxDate:o,disabled:i,className:c,weekStartsOn:d=1}=e,u=Y(new Date),h=()=>{var g,C;return e.mode==="range"?((g=e.value)==null?void 0:g[0])??u:e.mode==="multiple"?((C=e.value)==null?void 0:C[0])??u:e.value??u},[m,y]=n.useState(()=>(h()??u).getFullYear()),[b,_]=n.useState(()=>(h()??u).getMonth()),[l,v]=n.useState("days"),[p,x]=n.useState(null),[N,j]=n.useState(()=>{const g=e.mode==="single"?e.value:null;return g?g.getHours():0}),[S,E]=n.useState(()=>{const g=e.mode==="single"?e.value:null;return g?g.getMinutes():0}),I=n.useMemo(()=>{const g=Vr(m,b),C=$r(m,b,d);return{count:g,offset:C}},[m,b,d]),D=n.useMemo(()=>d===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],[d]),V=n.useCallback(g=>{if(e.mode==="single")return!!e.value&&P(g,e.value);if(e.mode==="range"){const[C,$]=e.value??[null,null];return!!C&&P(g,C)||!!$&&P(g,$)}return e.mode==="multiple"?(e.value??[]).some(C=>P(g,C)):!1},[e]),T=n.useCallback(g=>{if(e.mode!=="range")return!1;const[C,$]=e.value??[null,null],W=$??p;if(!C||!W)return!1;const K=X(C,W)?C:W,q=X(C,W)?W:C;return ue(g,K)&&X(g,q)},[e,p]),B=n.useCallback(g=>{if(e.mode!=="range")return!1;const[C]=e.value??[null,null];return!!C&&P(g,C)},[e]),M=n.useCallback(g=>{if(e.mode!=="range")return!1;const[,C]=e.value??[null,null];return!!C&&P(g,C)},[e]),k=n.useCallback(g=>!!(s&&X(g,s)||o&&ue(g,o)||i!=null&&i(g)),[s,o,i]),w=n.useCallback(g=>{var $,W,K,q,U,J;const C=new Date(m,b,g,N,S);if(!k(Y(C))){if(e.mode==="single"||!e.mode)($=e.onChange)==null||$.call(e,C);else if(e.mode==="range"){const[H,G]=e.value??[null,null];!H||H&&G?(W=e.onChange)==null||W.call(e,[C,null]):X(C,H)?(K=e.onChange)==null||K.call(e,[C,H]):(q=e.onChange)==null||q.call(e,[H,C])}else if(e.mode==="multiple"){const H=e.value??[],G=H.findIndex(de=>P(de,C));G>=0?(U=e.onChange)==null||U.call(e,H.filter((de,tr)=>tr!==G)):(J=e.onChange)==null||J.call(e,[...H,C])}}},[m,b,N,S,e,k]),L=()=>{b===0?(_(11),y(g=>g-1)):_(g=>g-1)},R=()=>{b===11?(_(0),y(g=>g+1)):_(g=>g+1)},A=(g,C)=>{var $;if(j(g),E(C),e.mode==="single"&&e.value){const W=new Date(e.value);W.setHours(g,C),($=e.onChange)==null||$.call(e,W)}},Z=Math.floor(m/z)*z;return t.jsxs("div",{ref:a,className:f("vyre-calendar",c),children:[t.jsxs("div",{className:"vyre-calendar__header",children:[l==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:L,"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"})})}),l==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>y(g=>g-z),"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:()=>v(l==="months"?"days":"months"),children:me[b]}),t.jsx("button",{className:"vyre-calendar__header-btn",onClick:()=>v(l==="years"?"days":"years"),children:m})]}),l==="days"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:R,"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"})})}),l==="years"&&t.jsx("button",{className:"vyre-calendar__nav",onClick:()=>y(g=>g+z),"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"})})})]}),l==="months"&&t.jsx("div",{className:"vyre-calendar__month-grid",children:me.map((g,C)=>t.jsx("button",{className:f("vyre-calendar__month-cell",C===b&&"vyre-calendar__month-cell--active"),onClick:()=>{_(C),v("days")},children:g.slice(0,3)},g))}),l==="years"&&t.jsx("div",{className:"vyre-calendar__year-grid",children:Array.from({length:z},(g,C)=>Z+C).map(g=>t.jsx("button",{className:f("vyre-calendar__year-cell",g===m&&"vyre-calendar__year-cell--active"),onClick:()=>{y(g),v("days")},children:g},g))}),l==="days"&&t.jsxs("div",{className:"vyre-calendar__grid",children:[D.map(g=>t.jsx("div",{className:"vyre-calendar__weekday",children:g},g)),Array.from({length:I.offset}).map((g,C)=>t.jsx("div",{},`empty-${C}`)),Array.from({length:I.count},(g,C)=>C+1).map(g=>{const C=new Date(m,b,g),$=V(C),W=T(C),K=B(C),q=M(C),U=k(C),J=P(C,u);return t.jsx("button",{className:f("vyre-calendar__day",J&&"vyre-calendar__day--today",$&&"vyre-calendar__day--selected",W&&"vyre-calendar__day--in-range",K&&"vyre-calendar__day--range-start",q&&"vyre-calendar__day--range-end",U&&"vyre-calendar__day--disabled"),onClick:()=>w(g),onMouseEnter:()=>{if(e.mode==="range"){const[H,G]=e.value??[null,null];H&&!G&&x(C)}},onMouseLeave:()=>x(null),disabled:U,"aria-selected":$,"aria-label":O(C),children:g},g)})]}),r&&l==="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:N,onChange:g=>A(Number(g.target.value),S),"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:S,onChange:g=>A(N,Number(g.target.value)),"aria-label":"Minutes"})]})]})});le.displayName="VyreCalendar";function Hr(e){if(e.mode==="range"){const[s,o]=e.value??[null,null];return s?o?`${O(s)} – ${O(o)}`:O(s):""}if(e.mode==="multiple"){const s=e.value??[];return s.length===0?"":s.length===1?O(s[0]):`${s.length} dates selected`}const a=e.value,r=e.showTime;return a?r?`${O(a)} ${Wr(a)}`:O(a):""}const Vt=n.forwardRef(({placeholder:e="Pick a date",inputClassName:a,...r},s)=>{const[o,i]=n.useState(!1),c=n.useRef(null),d=n.useRef(null),[u,h]=n.useState({top:0,left:0,width:0}),m=Hr(r),y=n.useCallback(()=>{if(!c.current)return;const l=c.current.getBoundingClientRect();h({top:l.bottom+window.scrollY+6,left:l.left+window.scrollX,width:l.width})},[]);n.useEffect(()=>{if(!o)return;y();const l=()=>y(),v=()=>y();return window.addEventListener("scroll",l,!0),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",v)}},[o,y]),n.useEffect(()=>{if(!o)return;const l=p=>{var x,N;!((x=d.current)!=null&&x.contains(p.target))&&!((N=c.current)!=null&&N.contains(p.target))&&i(!1)},v=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",l),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",l),document.removeEventListener("keydown",v)}},[o]);const b=r.mode!=="range"&&r.mode!=="multiple"&&!r.showTime,_=n.useMemo(()=>r.mode==="range"?{...r,onChange:l=>{var v;(v=r.onChange)==null||v.call(r,l),l[0]&&l[1]&&i(!1)}}:r.mode==="multiple"?r:{...r,onChange:l=>{var v;(v=r.onChange)==null||v.call(r,l),b&&i(!1)}},[r,b]);return t.jsxs("div",{ref:s,className:"vyre-datepicker",children:[t.jsxs("button",{ref:c,type:"button",className:f("vyre-datepicker__trigger",!m&&"vyre-datepicker__trigger--placeholder",a),onClick:()=>{y(),i(l=>!l)},"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:m||e}),m&&t.jsx("button",{className:"vyre-datepicker__clear",type:"button","aria-label":"Clear",onClick:l=>{var v,p,x;l.stopPropagation(),r.mode==="range"?(v=r.onChange)==null||v.call(r,[null,null]):r.mode==="multiple"?(p=r.onChange)==null||p.call(r,[]):(x=r.onChange)==null||x.call(r,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&&F.createPortal(t.jsx("div",{ref:d,className:"vyre-datepicker__popover",role:"dialog","aria-label":"Date picker",style:{top:u.top,left:u.left,minWidth:u.width},children:t.jsx(le,{..._})}),document.body)]})});Vt.displayName="VyreDatePicker";const $t=n.forwardRef(({as:e="p",size:a="md",weight:r,color:s="default",truncate:o,mono:i,className:c,children:d,...u},h)=>t.jsx(e,{ref:h,className:f("vyre-text",a!=="md"&&`vyre-text--${a}`,r&&`vyre-text--${r}`,s!=="default"&&`vyre-text--${s}`,o&&"vyre-text--truncate",i&&"vyre-text--mono",c),...u,children:d}));$t.displayName="VyreText";const Wt=n.forwardRef(({as:e="h2",size:a="md",weight:r="bold",color:s="default",truncate:o,className:i,children:c,...d},u)=>t.jsx(e,{ref:u,className:f("vyre-heading",`vyre-heading--${a}`,r!=="bold"&&`vyre-heading--${r}`,s!=="default"&&`vyre-text--${s}`,o&&"vyre-text--truncate",i),...d,children:c}));Wt.displayName="VyreHeading";const Ht=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("p",{ref:s,className:f("vyre-lead",e),...r,children:a}));Ht.displayName="VyreLead";const Ft=n.forwardRef(({block:e,className:a,children:r,...s},o)=>e?t.jsx("pre",{className:f("vyre-code-block",a),...s,children:t.jsx("code",{ref:o,children:r})}):t.jsx("code",{ref:o,className:f("vyre-code",a),...s,children:r}));Ft.displayName="VyreCode";const Pt=n.forwardRef(({className:e,children:a,...r},s)=>t.jsx("blockquote",{ref:s,className:f("vyre-blockquote",e),...r,children:a}));Pt.displayName="VyreBlockquote";const Ot=n.createContext({collapsed:!1,toggleCollapsed:()=>{}}),re=()=>n.useContext(Ot),Kt=n.forwardRef(({defaultCollapsed:e=!1,collapsed:a,onCollapsedChange:r,className:s,children:o},i)=>{const[c,d]=n.useState(e),u=a!==void 0?a:c,h=n.useCallback(()=>{const m=!u;d(m),r==null||r(m)},[u,r]);return t.jsx(Ot.Provider,{value:{collapsed:u,toggleCollapsed:h},children:t.jsx("div",{ref:i,className:f("vyre-app-layout",s),children:o})})});Kt.displayName="VyreAppLayout";const qt=n.forwardRef(({variant:e="default",className:a,children:r},s)=>{const{collapsed:o}=re();return t.jsx("aside",{ref:s,className:f("vyre-sidebar",o&&"vyre-sidebar--collapsed",e==="floating"&&"vyre-sidebar--floating",a),"data-collapsed":o||void 0,children:r})});qt.displayName="VyreSidebar";const Gt=n.forwardRef(({logo:e,title:a,className:r,children:s},o)=>t.jsxs("div",{ref:o,className:f("vyre-sidebar__header",r),children:[e&&t.jsx("span",{className:"vyre-sidebar__logo",children:e}),a&&t.jsx("span",{className:"vyre-sidebar__title",children:a}),s]}));Gt.displayName="VyreSidebarHeader";const Yt=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:f("vyre-sidebar__content",e),children:a}));Yt.displayName="VyreSidebarContent";const Ut=n.forwardRef(({label:e,className:a,children:r},s)=>t.jsxs("div",{ref:s,className:f("vyre-sidebar__section",a),children:[e&&t.jsx("div",{className:"vyre-sidebar__section-label",children:e}),r]}));Ut.displayName="VyreSidebarSection";const Xt=({active:e,icon:a,badge:r,href:s,onClick:o,className:i,children:c})=>{const{collapsed:d}=re(),u=f("vyre-sidebar__item",e&&"vyre-sidebar__item--active",i),h=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:"vyre-sidebar__item-icon",children:a}),t.jsx("span",{className:"vyre-sidebar__item-label",children:c}),r!==void 0&&t.jsx("span",{className:"vyre-sidebar__item-badge",children:r})]});return s?t.jsx("a",{href:s,className:u,"aria-current":e?"page":void 0,title:d?String(c):void 0,children:h}):t.jsx("button",{type:"button",className:u,onClick:o,"aria-pressed":e,title:d?String(c):void 0,children:h})};Xt.displayName="VyreSidebarItem";const zt=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:f("vyre-sidebar__footer",e),children:a}));zt.displayName="VyreSidebarFooter";const Zt=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:f("vyre-app-shell",e),children:a}));Zt.displayName="VyreAppShell";const Jt=n.forwardRef(({className:e,children:a},r)=>t.jsx("header",{ref:r,className:f("vyre-app-bar",e),children:a}));Jt.displayName="VyreAppBar";const Qt=({className:e})=>{const{collapsed:a,toggleCollapsed:r}=re();return t.jsx("button",{type:"button",className:f("vyre-sidebar-trigger",e),onClick:r,"aria-label":a?"Expand sidebar":"Collapse sidebar","aria-expanded":!a,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"})]})})};Qt.displayName="VyreSidebarTrigger";const er=n.forwardRef(({className:e,children:a},r)=>t.jsx("div",{ref:r,className:f("vyre-page-content",e),children:a}));er.displayName="VyrePageContent";exports.Accordion=$e;exports.AccordionContent=Fe;exports.AccordionItem=We;exports.AccordionTrigger=He;exports.Alert=ot;exports.AlertDialog=it;exports.AppBar=Jt;exports.AppLayout=Kt;exports.AppShell=Zt;exports.Avatar=Pe;exports.Badge=ye;exports.Blockquote=Pt;exports.Breadcrumb=mt;exports.BreadcrumbItem=vt;exports.BreadcrumbLink=yt;exports.BreadcrumbSeparator=ft;exports.Button=ve;exports.ButtonGroup=Et;exports.Calendar=le;exports.Card=fe;exports.CardBody=be;exports.CardFooter=xe;exports.CardHeader=he;exports.Checkbox=Oe;exports.Code=Ft;exports.Combobox=Dt;exports.Command=oe;exports.CommandDialog=Tt;exports.CommandEmpty=Lt;exports.CommandGroup=Rt;exports.CommandInput=Nt;exports.CommandItem=St;exports.CommandList=Ct;exports.CommandSeparator=Mt;exports.DataGrid=At;exports.DatePicker=Vt;exports.DropdownCheckboxItem=et;exports.DropdownItem=Qe;exports.DropdownLabel=Je;exports.DropdownMenu=Ze;exports.DropdownRadioGroup=tt;exports.DropdownRadioItem=rt;exports.DropdownSeparator=nt;exports.DropdownSub=at;exports.Field=pe;exports.Heading=Wt;exports.Input=_e;exports.Label=Ue;exports.Lead=Ht;exports.Modal=we;exports.ModalBody=ke;exports.ModalFooter=Ne;exports.ModalHeader=je;exports.PageContent=er;exports.Pagination=ht;exports.Popover=Xe;exports.Progress=Ge;exports.Select=Le;exports.Separator=Ye;exports.Sheet=lt;exports.SheetBody=ct;exports.SheetFooter=ut;exports.SheetHeader=dt;exports.Sidebar=qt;exports.SidebarContent=Yt;exports.SidebarFooter=zt;exports.SidebarHeader=Gt;exports.SidebarItem=Xt;exports.SidebarSection=Ut;exports.SidebarTrigger=Qt;exports.Skeleton=se;exports.Slider=qe;exports.Switch=Ke;exports.Tab=Ee;exports.TabList=Te;exports.TabPanel=De;exports.TabPanels=Ie;exports.Table=bt;exports.TableBody=pt;exports.TableCaption=jt;exports.TableCell=wt;exports.TableHead=xt;exports.TableHeader=gt;exports.TableRow=_t;exports.Tabs=Me;exports.Tag=ie;exports.TagGroup=Bt;exports.TagsInput=It;exports.Text=$t;exports.Textarea=ge;exports.ToastProvider=dr;exports.Tooltip=Ae;exports.cn=f;exports.useAppLayout=re;exports.useToast=cr;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
* - Breadcrumb — Navigation trail (+ BreadcrumbItem)
|
|
36
36
|
* - Pagination — Page navigation control
|
|
37
37
|
* - Table — Data table (+ TableHead, TableBody, TableRow, TableHeader, TableCell, TableCaption)
|
|
38
|
+
* - ButtonGroup — Groups buttons horizontally/vertically with optional border collapse (attached mode)
|
|
39
|
+
* - TagsInput — Multi-tag input: Enter/comma to add, × to remove, Backspace to delete last
|
|
40
|
+
* - Combobox — Searchable select: type to filter options, keyboard navigation, controlled value
|
|
41
|
+
* - DataGrid — Table with built-in column sorting (asc/desc), loading skeletons, empty state
|
|
42
|
+
* - Tag — Standalone display tag/chip: variant, size, onRemove (× button), onClick (interactive)
|
|
43
|
+
* - TagGroup — Read-only container that lays out multiple Tag elements with wrapping + gap
|
|
38
44
|
*
|
|
39
45
|
* CSS must be imported separately:
|
|
40
46
|
* import "@usevyre/tokens/css"; ← design tokens (required)
|
|
@@ -66,6 +72,12 @@ export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbSeparator } from
|
|
|
66
72
|
export { Pagination } from "./components/Pagination/Pagination";
|
|
67
73
|
export { Table, TableHead, TableBody, TableRow, TableHeader, TableCell, TableCaption, } from "./components/Table/Table";
|
|
68
74
|
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandDialog, } from "./components/Command/Command";
|
|
75
|
+
export { ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
|
|
76
|
+
export { TagsInput } from "./components/TagsInput/TagsInput";
|
|
77
|
+
export { Combobox } from "./components/Combobox/Combobox";
|
|
78
|
+
export { DataGrid } from "./components/DataGrid/DataGrid";
|
|
79
|
+
export { Tag } from "./components/Tag/Tag";
|
|
80
|
+
export { TagGroup } from "./components/Tag/TagGroup";
|
|
69
81
|
export { Calendar, DatePicker } from "./components/Calendar/Calendar";
|
|
70
82
|
export type { CalendarProps, CalendarSingleProps, CalendarRangeProps, CalendarMultipleProps, CalendarBaseProps, DatePickerProps, CalendarMode, } from "./components/Calendar/Calendar";
|
|
71
83
|
export { Text, Heading, Lead, Code, Blockquote } from "./components/Typography/Typography";
|
|
@@ -97,5 +109,11 @@ export type { SheetProps, SheetSectionProps, SheetSide, SheetSize } from "./comp
|
|
|
97
109
|
export type { BreadcrumbProps, BreadcrumbItemProps, BreadcrumbLinkProps } from "./components/Breadcrumb/Breadcrumb";
|
|
98
110
|
export type { PaginationProps } from "./components/Pagination/Pagination";
|
|
99
111
|
export type { TableProps, TableRowProps, TableHeaderProps, TableCellProps, } from "./components/Table/Table";
|
|
112
|
+
export type { ButtonGroupProps } from "./components/ButtonGroup/ButtonGroup";
|
|
113
|
+
export type { TagsInputProps } from "./components/TagsInput/TagsInput";
|
|
114
|
+
export type { ComboboxProps, ComboboxOption } from "./components/Combobox/Combobox";
|
|
115
|
+
export type { DataGridProps, DataGridColumn } from "./components/DataGrid/DataGrid";
|
|
116
|
+
export type { TagProps, TagVariant, TagSize } from "./components/Tag/Tag";
|
|
117
|
+
export type { TagGroupProps, TagGroupGap } from "./components/Tag/TagGroup";
|
|
100
118
|
export type { Variant, Size, FieldState, BadgeVariant, BaseProps } from "./types";
|
|
101
119
|
export { cn } from "./utils/cn";
|