visits-style 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("clsx"),re=require("tailwind-merge"),t=require("react/jsx-runtime"),r=require("react"),f=require("@floating-ui/react"),oe=require("react-dom");function k(e,n){return n?re.twMerge(e,n):e}function H({className:e,...n}){const o=r.useMemo(()=>m("leading-none peer-disabled:opacity-70",e),[e]);return t.jsx("label",{className:o,...n})}function se({label:e,children:n,required:o,htmlFor:s,error:l,help:i,helpBefore:a,className:d,innerClass:u,...x}){const p=r.useMemo(()=>m("font-medium",o?'after:content-["*"] after:text-danger after:text-sm after:pl-0.5':""),[o]),g=r.useMemo(()=>k("flex flex-col space-y-2",d),[d]);return t.jsxs("div",{className:g,...x,children:[e?t.jsx(H,{className:p,htmlFor:s,children:e}):null,i&&a?t.jsx("p",{className:"text-xs text-muted pb-2",children:i}):null,t.jsx("div",{className:u,children:ie(n,!!l)}),i&&!a&&!l?t.jsx("p",{className:"text-xs text-muted",children:i}):null,l?t.jsx("p",{className:"text-xs text-danger",children:l}):null]})}function ie(e,n){const o=r.Children.count(e);if(!o)return null;if(o===1)return r.cloneElement(e,{error:n});const s=r.Children.toArray(e);return s[0]=r.cloneElement(s[0],{error:n}),s}function le({error:e,unstyled:n,className:o,...s}){const l=r.useMemo(()=>n?o:k(m("flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted","[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",e?"border-danger hover:border-danger-fore":"border-input"),o),[o,e,n]);return t.jsx("div",{className:l,...s})}const W=r.forwardRef(({className:e,type:n,error:o,unstyled:s,...l},i)=>{const a=r.useMemo(()=>s?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",o?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore",n==="file"?"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground":null),e),[e,n,o,s]);return t.jsx("input",{ref:i,type:n,className:a,...l})});W.displayName="Input";const X=r.forwardRef(({className:e,error:n,unstyled:o,...s},l)=>{const i=r.useMemo(()=>o?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",n?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,n,o]);return t.jsx("textarea",{ref:l,className:i,...s})});X.displayName="Textarea";function D(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M11.5 18.5l-3.9-4L6 16l5.6 5.6 11.6-11.5-1.7-1.6z",fill:"currentColor"})})}function ae(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",children:t.jsx("rect",{width:"20",height:"3",y:"13.5",x:"4.5",fill:"currentColor",stroke:"none",rx:"2"})})}function ce({checked:e,indeterminate:n,className:o,id:s,name:l,onChange:i,value:a,...d}){const u=r.useMemo(()=>k(m("inline-flex justify-center items-center border w-4.5 h-4.5 rounded","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",e||n?"bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input":"border-input not-disabled:hover:border-input-fore"),o),[e,n,o]),x=()=>{d.disabled||i?.(!e)};return t.jsxs("button",{type:"button",role:"checkbox",id:s||l,className:u,onClick:x,"aria-checked":e,...d,children:[e?t.jsx(D,{}):null,n&&!e?t.jsx(ae,{}):null,t.jsx("input",{type:"checkbox","aria-hidden":"true",name:l,checked:e,value:a,onChange:x,disabled:d.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const ue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=ue?r.useLayoutEffect:r.useEffect;function z({children:e,container:n,disabled:o}){const[s,l]=r.useState(null);return _(()=>{if(!n){let i=document.getElementById("visits-style-portals");return i||(i=document.createElement("div"),i.id="visits-style-portals",document.body.appendChild(i)),l(i)}l(n)},[n]),o||!s?null:oe.createPortal(e,s)}function P(e){e&&(e.stopPropagation(),e.preventDefault())}const de={open:150,close:75},O=r.forwardRef(({position:e,label:n,children:o,color:s="background",disabled:l,offset:i={x:0,y:6},onOpen:a,onClose:d,onManualClose:u,timeout:x=de,unstyled:p,zIndex:g=9996,role:w,...c},b)=>{const[v,y]=r.useState(!1),I=f.useId(),j=r.useRef(a),A=r.useRef(d),{refs:M,floatingStyles:S,context:F}=f.useFloating({nodeId:I,placement:e,middleware:[f.shift(),f.flip({fallbackAxisSideDirection:"end"}),f.offset({mainAxis:i.y,crossAxis:i.x})],open:v,onOpenChange:C=>{C?j.current?.(M.reference.current,M.floating.current):A.current?.(M.reference.current,M.floating.current),y(C)},whileElementsMounted:f.autoUpdate}),{isMounted:T,styles:B}=f.useTransitionStyles(F,{duration:x,initial({side:C}){let R="";return C==="top"?R="translateY(5%) scale(0.95)":C==="bottom"?R="translateY(-5%) scale(0.95)":C==="left"?R="translateX(5%) scale(0.95)":R="translateX(-5%) scale(0.95)",{opacity:0,transform:R}}}),E=r.useCallback(C=>{if(P(C),u)return u();y(!1),A.current?.(M.reference.current,M.floating.current)},[u]);r.useEffect(()=>{if(l&&v)return y(!1)},[l,v]),r.useImperativeHandle(b,()=>({open:()=>{y(!0),j.current?.(M.reference.current,M.floating.current)},close:()=>{y(!1),A.current?.(M.reference.current,M.floating.current)}}),[]);const{getFloatingProps:h,getReferenceProps:N}=f.useInteractions([f.useClick(F,{enabled:!l})]);return j.current=a,A.current=d,t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(n),N({ref:M.setReference,tabIndex:0,role:"button","aria-expanded":v,disabled:l,onClick:P})),t.jsx(z,{disabled:l||!T,children:t.jsx(f.FloatingOverlay,{"data-testid":"vs-popover-shadow",onClick:E,style:{zIndex:g},autoFocus:!0,children:t.jsx("div",{role:w||"region",ref:M.setFloating,style:S,children:t.jsx(Y,{unstyled:p,styles:B,...h({...c,onClick:P}),children:o})})})})]})});O.displayName="Popover";const Y=r.forwardRef(({className:e,unstyled:n,styles:o,style:s={},...l},i)=>{const a=r.useMemo(()=>m("z-20 w-auto h-auto outline-none transition-transform ease-in-out",n?null:"border border-accent rounded-md shadow-lg p-1 bg-background",e),[e,n]);return t.jsx("div",{ref:i,className:a,style:{...o,...s},...l})});Y.displayName="PopoverContent";function U(e){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M11.7 14.8 7 9.8a.5.5 0 0 1 0-.7c.2-.2.5-.2.7 0l4.5 5c.2.2.2.6 0 .8-.1.2-.4.2-.6 0Z",fill:"currentColor"}),t.jsx("path",{d:"m16.9 9.9-4.6 5c-.2.2-.4.2-.6 0a.5.5 0 0 1 0-.8l4.5-5c.2-.2.5-.2.7 0 .1.2.1.6 0 .8Z",fill:"currentColor"})]})}function V(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",...e,children:t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[t.jsx("path",{d:"M26 26l-12.5-12.5L26 1"}),t.jsx("path",{d:"M1 26l12.5-12.5L1 1"})]})})}function fe({className:e,placeholder:n="",options:o=[],error:s,unstyled:l,disabled:i,value:a,maxHeight:d=408,arrow:u,onChange:x,onClear:p,renderItem:g,...w}){const c=r.useRef(null),[b,v]=r.useState(0),y=r.useMemo(()=>l?e:k(m("flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",s?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,s,l]),I=r.useMemo(()=>Array.isArray(a),[]),j=r.useCallback(h=>{x?.(h),I||c.current?.close()},[x,I]),A=r.useCallback(h=>Array.isArray(a)?a.indexOf(h)>-1:a===h,[a]),M=r.useMemo(()=>{const h={},N=o.filter(C=>typeof C!="string");for(let C=0,R=N.length;C<R;C+=1){const $=N[C];h[`${$.value}`]=$.label}return h},[o]),S=r.useMemo(()=>{if(!a)return n;if(Array.isArray(a)){if(!a.length)return n;const h=[...a].sort(),N=[];for(let C=0,R=h.length;C<R;C+=1)N[C]=M[`${h[C]}`]||"";return N.filter(Boolean).join(",")||n}return M[`${a}`]||n},[n,a,M]),F=S===n,T=r.useMemo(()=>m("overflow-hidden overflow-ellipsis whitespace-nowrap",F?"text-muted":"text-text"),[F]),B=r.useMemo(()=>u||t.jsx(U,{className:"absolute right-0 text-muted size-5"}),[u]),E=r.useCallback((h,N)=>g?typeof h=="string"?g(h,{index:N,selected:!1,onChange:()=>{}}):g(h,{index:N,selected:A(h.value),onChange:()=>j(h.value)}):typeof h=="string"?t.jsx("h5",{className:"font-medium py-1 px-2 text-muted",children:h},`optionheader-${N}`):t.jsx(he,{selected:A(h.value),onChange:j,...h},h.label),[g,j,A]);return t.jsx(O,{label:t.jsxs("button",{type:"button",className:y,disabled:i,...w,children:[t.jsx("span",{className:T,children:S}),t.jsxs("div",{className:"relative flex items-center pl-8 pr-3 space-x-2",children:[p&&!F?t.jsx("div",{tabIndex:-1,role:"button",className:"size-6 p-1.5 rounded hover:bg-accent","aria-label":"clear selected values",onKeyDown:h=>{h.key!=="Enter"&&h.key!=="Space"||p()},onClick:h=>{h.stopPropagation(),p()},children:t.jsx(V,{})}):null,B]})]}),ref:c,onOpen:h=>v(h?.getBoundingClientRect().width||0),disabled:i,children:t.jsx("ul",{className:"overflow-y-auto flex flex-col",role:"listbox",style:{minWidth:b,maxWidth:"calc(100vw - 3rem)",maxHeight:d},children:o.map(E)})})}function he({className:e,value:n,label:o,selected:s,onChange:l}){const i=r.useMemo(()=>m("flex items-center w-full hover:bg-accent rounded p-1",e),[e]);return t.jsxs("button",{type:"button",role:"option",className:i,"aria-selected":s,onClick:()=>l?.(n),children:[s?t.jsx(D,{className:"w-5 h-5 mr-1"}):t.jsx("div",{className:"w-5 h-1 mr-1"}),o]})}function xe({checked:e,className:n,id:o,name:s,onChange:l,value:i,...a}){const d=r.useMemo(()=>m("relative inline-flex justify-center items-center border border-input w-4.5 h-4.5 rounded-full","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",e?"[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input":"",n),[n,e]),u=()=>{a.disabled||l?.(!e)};return t.jsxs("button",{type:"button",role:"radio",id:o||s,className:d,onClick:u,"aria-checked":e,...a,children:[t.jsx("i",{className:"block w-2.5 h-2.5 rounded-full transition-transform",style:{transform:e?"":"scale(0.8)",opacity:e?1:0}}),t.jsx("input",{type:"radio","aria-hidden":"true",name:s,checked:e,value:i,onChange:u,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const G=r.forwardRef(({className:e,checked:n,onChange:o,value:s,id:l,name:i,...a},d)=>{const u=r.useMemo(()=>k(m("inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50","w-11",n?"bg-primary":"bg-input"),e),[e,n]),x=r.useMemo(()=>k("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",e),[e]),p=()=>{a.disabled||o?.(!n)};return t.jsxs("button",{type:"button",role:"switch",id:l||i,className:u,onClick:p,"aria-checked":n,...a,children:[t.jsx("span",{className:x,style:{transform:n?"translateX(100%)":""}}),t.jsx("input",{ref:d,type:"checkbox","aria-hidden":"true",name:i,checked:n,value:s,onChange:p,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})});G.displayName="Switch";function pe({header:e,show:n,children:o,timeout:s=300,...l}){const i=r.useRef(null),a=r.useRef(0),d=r.useRef(0),u=r.useRef(!0);return r.useEffect(()=>{d.current=s},[s]),_(()=>{if(!i.current)return;if(i.current.style.overflow="hidden",i.current.style.opacity="1",u.current){u.current=!1,i.current.style.height=n?"auto":"0px",n?window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)}):(window.requestAnimationFrame(()=>{i.current&&(i.current.style.height="auto",a.current=i.current.offsetHeight,i.current.style.height="0px")}),i.current.style.opacity="0");return}n||(i.current.style.height=`${a.current}px`);const x=[];x[0]=window.requestAnimationFrame(()=>{x[1]=window.requestAnimationFrame(()=>{i.current&&(i.current.style.height=`${n?a.current:0}px`,i.current.style.opacity=n?"1":"0")})});let p;const g=()=>{i.current&&(n?(i.current.style.height="auto",i.current.style.overflow="",i.current.style.opacity="",window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)})):i.current.style.height="0px")};return d.current===0?g():p=window.setTimeout(g,d.current),()=>{x.forEach(window.cancelAnimationFrame),p&&window.clearTimeout(p)}},[n]),t.jsxs("div",{...l,children:[e,t.jsx("div",{className:"transition-all ease-in-out overflow-hidden",role:"region","aria-hidden":!n,ref:i,style:{transitionDuration:`${s}ms`},children:o})]})}const ge=r.forwardRef(({children:e,position:n="bottom",label:o,className:s,timeout:l=150,offset:i={x:0,y:6},clientPoint:a=!1,disabled:d},u)=>{const[x,p]=r.useState(!1),g=f.useId(),{refs:w,floatingStyles:c,context:b}=f.useFloating({nodeId:g,open:x,placement:n,middleware:[f.shift(),f.flip(),f.offset({mainAxis:i.y,crossAxis:i.x})],whileElementsMounted:d?void 0:f.autoUpdate,onOpenChange:p}),{getReferenceProps:v,getFloatingProps:y}=f.useInteractions([f.useHover(b,{enabled:!d}),f.useClientPoint(b,{enabled:a})]),{isMounted:I,styles:j}=f.useTransitionStyles(b,{duration:l,initial:{opacity:0,transform:"scale(0.8)"}});r.useImperativeHandle(u,()=>({floating:w.floating,reference:w.reference,open:()=>p(!0),close:()=>p(!1)}));const A=typeof e=="string"?t.jsx("span",{children:e}):e;return t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(A),{ref:w.setReference,...v()}),t.jsx(z,{disabled:d||!I,children:t.jsx("div",{role:"tooltip",className:"z-[9999]",ref:w.setFloating,...y({style:c}),children:t.jsx(me,{className:s,style:j,children:o})})})]})}),me=r.forwardRef(({className:e,custom:n,...o},s)=>{const l=r.useMemo(()=>m("relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",n?null:"border border-accent rounded shadow-md px-3 py-1 bg-background",e),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});function K({variant:e,size:n}){return m("inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",{"bg-primary text-inverted hover:bg-primary-fore":!e||e==="primary","bg-info text-inverted hover:bg-info-fore":e==="info","bg-warn text-inverted hover:bg-warn-fore":e==="warn","bg-danger text-inverted hover:bg-danger-fore":e==="danger","hover:bg-accent":e==="ghost","hover:underline":e==="link","border border-input hover:bg-accent":e==="outline"},{"px-2 py-1":!n,"p-1.5":n==="icon"})}function be({size:e,variant:n,className:o,...s}){const l=r.useMemo(()=>m(K({size:e,variant:n}),o),[e,n,o]);return t.jsx("button",{className:l,type:"button",...s})}function we({open:e,children:n,timeout:o=150,padding:s="0.85rem",verticalAlign:l="center",closeOnOverlay:i,closeOnEsc:a,onExited:d,className:u,onOpenChange:x,size:p,...g}){const w=r.useRef(d),c=r.useRef(!1),b=f.useId(),{refs:v,context:y}=f.useFloating({open:e,onOpenChange:x,nodeId:b}),{getFloatingProps:I}=f.useInteractions([f.useDismiss(y,{enabled:a,escapeKey:a,outsidePress:!1})]),{isMounted:j,styles:A}=f.useTransitionStyles(y,{duration:o,initial:{opacity:0,transform:"scale(0.8)"}});r.useEffect(()=>{c.current!==j&&(c.current=j,!j&&w.current?.())},[j]);const M=r.useCallback(()=>{i&&x?.(!1)},[x,i]);w.current=d;const S=r.useMemo(()=>m("grid bg-backdrop z-40 justify-items-center",{"place-items-start items-start":l==="start","place-items-end":l==="end","place-items-center":l==="center"||!l}),[l]),F=r.useMemo(()=>k("transition ease-in-out",u),[u]);return t.jsx(z,{disabled:!j,children:t.jsx(f.FloatingOverlay,{className:S,"data-testid":"vs-dialog-overlay",onClick:M,style:{padding:s,opacity:A.opacity},lockScroll:!0,children:t.jsx(J,{ref:v.setFloating,className:F,role:"dialog",size:p,...I({...g,style:A,onClick:P}),children:n})})})}const J=r.forwardRef(({size:e,className:n,...o},s)=>{const l=r.useMemo(()=>m(e?"flex flex-col bg-background shadow-lg p-5 rounded":null,{"w-full max-w-sm":e==="small","w-full max-w-lg":e==="medium","w-full max-w-2xl":e==="large"},n),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});J.displayName="DialogContent";const ve={open:300,close:150};function ye({open:e,timeout:n=ve,onOpenChange:o,position:s="right",overlay:l,...i}){const a=f.useId(),{refs:d,context:u}=f.useFloating({open:e,onOpenChange:o,nodeId:a}),{isMounted:x,styles:p}=f.useTransitionStyles(u,{duration:n,initial(){let w="translateX(75%)";return s==="left"?w="translateX(-75%)":s==="top"?w="translateY(-75%)":s==="bottom"&&(w="translateY(75%)"),{opacity:0,transform:w}}}),g=r.useMemo(()=>m("fixed transition-transform z-30",{"top-0 right-0 h-full max-h-screen":s==="right","top-0 left-0 h-full max-h-screen":s==="left","top-0 left-0 right-0 w-full max-w-screen":s==="top","bottom-0 left-0 right-0 w-full max-w-screen":s==="bottom"}),[s]);return t.jsxs(z,{disabled:!x,children:[l?t.jsx(f.FloatingOverlay,{className:"bg-backdrop",style:{opacity:p.opacity},onClick:()=>o?.(!1)}):null,t.jsx("div",{ref:d.setFloating,className:g,role:"dialog",style:p,children:t.jsx(je,{...i})})]})}function je({className:e,unstyled:n,...o}){const s=r.useMemo(()=>n?e:k(m("relative bg-background min-w-full min-h-full border border-input shadow-lg"),e),[n,e]);return t.jsx("div",{className:s,...o})}function Q(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsx("path",{d:"M15 29a14 14 0 0 1-9.9-4.1A14 14 0 0 1 1 15a14 14 0 0 1 4.1-9.9A14 14 0 0 1 15 1a14 14 0 0 1 9.9 4.1A14 14 0 0 1 29 15a14 14 0 0 1-4.1 9.9A14 14 0 0 1 15 29z",fill:"none"}),t.jsx("path",{d:"M15 2a13 13 0 0 0-9.2 3.8A13 13 0 0 0 2 15a13 13 0 0 0 3.8 9.2A13 13 0 0 0 15 28a13 13 0 0 0 9.2-3.8A13 13 0 0 0 28 15a13 13 0 0 0-3.8-9.2A13 13 0 0 0 15 2m0-2a15 15 0 1 1 0 30 15 15 0 0 1 0-30z",fill:"currentColor"}),t.jsx("path",{d:"m11.5 18.5-3.9-4L6 16l5.6 5.6L23.2 10l-1.7-1.6z",fill:"currentColor"})]})}function L(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 32 32",...e,children:[t.jsx("path",{d:"M16 0C7.16 0 0 7.16 0 16C0 24.84 7.16 32 16 32C24.84 32 32 24.84 32 16C32 7.16 24.84 0 16 0ZM16 31C7.73 31 1 24.27 1 16C1 7.73 7.73 1 16 1C24.27 1 31 7.73 31 16C31 24.27 24.27 31 16 31Z",fill:"currentColor"}),t.jsx("path",{d:"M15.5 19.55V8.54999C15.5 8.26999 15.72 8.04999 16 8.04999C16.28 8.04999 16.5 8.26999 16.5 8.54999V19.55C16.5 19.83 16.28 20.05 16 20.05C15.72 20.05 15.5 19.83 15.5 19.55Z",fill:"currentColor"}),t.jsx("path",{d:"M16 23.95C16.5523 23.95 17 23.5023 17 22.95C17 22.3977 16.5523 21.95 16 21.95C15.4477 21.95 15 22.3977 15 22.95C15 23.5023 15.4477 23.95 16 23.95Z",fill:"currentColor"})]})}function ee(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 52 45",...e,children:t.jsx("path",{d:"M50.6 37.8 29.3 2c-1.5-2.6-5.1-2.8-6.7-.3l-21.2 36c-1.7 2.6.2 6.6 3.4 6.6h42.4c3.1 0 5-4 3.4-6.6Zm-24.7.6a2.7 2.7 0 1 1 0-5.5 2.7 2.7 0 0 1 0 5.5Zm2.9-10.1c0 1.5-1.3 2.7-2.8 2.7a2.8 2.8 0 0 1-2.8-2.7V13.9c0-1.5 1.3-2.7 2.8-2.7 1.5 0 2.8 1.2 2.8 2.7v14.4Z",fill:"currentColor"})})}function te({size:e=20,label:n="Loading...",...o}){return t.jsxs("div",{role:"status",...o,children:[t.jsxs("svg",{"aria-hidden":"true",className:"text-accent animate-spin fill-primary",width:e,height:e,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z",fill:"currentColor"}),t.jsx("path",{d:"M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z",fill:"currentFill"})]}),t.jsx("span",{className:"sr-only",children:n})]})}function ne({type:e,label:n,message:o}){return t.jsxs("div",{className:"flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2",children:[e?t.jsxs("figure",{className:"mr-2",children:[e==="success"?t.jsx(Q,{className:"text-primary size-5"}):null,e==="info"?t.jsx(L,{className:"text-info size-5"}):null,e==="error"?t.jsx(L,{className:"text-danger size-5"}):null,e==="warn"?t.jsx(ee,{className:"text-warn size-5"}):null,e==="loading"?t.jsx(te,{size:20}):null]}):null,t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"font-medium leading-none",children:n}),o?t.jsx("p",{children:o}):null]})]})}function q(){}class Ce{notify=q;lastId=0;subscribe=n=>(this.notify=n,()=>{this.notify=q});add=(n,o={})=>{this.lastId+=1;const s=`${this.lastId}`;return this.notify({id:s,type:"add",config:{id:s,label:n,...o}}),s};update=(n,o)=>{this.notify({id:n,type:"update",config:o})};remove=n=>{this.notify({id:n,type:"remove"})};clear=()=>{this.lastId=0}}const Z=new Ce;function Me({id:e,type:n,index:o,duration:s,className:l,children:i,inverted:a,timeout:d=250,max:u=3}){const x=r.useRef(!1),[p,g]=r.useState(!1),{context:w,refs:c}=f.useFloating({open:p,onOpenChange:g,nodeId:e}),{isMounted:b,styles:v}=f.useTransitionStyles(w,{duration:d,initial:{opacity:0,transform:`translateY(${a?"":"-"}50%)`}});r.useLayoutEffect(()=>{g(o<=u)},[o,u]),r.useEffect(()=>{x.current!==b&&(b||Z.remove(e),x.current=b)},[b,e]),r.useEffect(()=>{if(!s)return;const j=window.setTimeout(()=>g(!1),s);return()=>window.clearTimeout(j)},[s,e]);const y=r.useCallback(()=>{n!=="loading"&&g(!1)},[n]),I=r.useMemo(()=>m("relative flex w-fit transition-transform ease-in-out cursor-pointer",l),[l]);return b?t.jsx("li",{role:"log",tabIndex:-1,ref:c.setFloating,className:I,style:v,onClick:y,children:i}):null}function ke({className:e,margin:n=16,position:o="top-left",max:s,ListItem:l=ne}){const i=r.useMemo(()=>{const c={position:"fixed"};return o.indexOf("top")>-1?c.top=n:o.indexOf("bottom")>-1&&(c.bottom=n),o.indexOf("left")>-1?(c.left=n,c.alignItems="flex-start"):o.indexOf("right")>-1?(c.right=n,c.alignItems="flex-end"):(c.left="50%",c.alignItems="center",c.transform="translateX(-50%)"),c},[n,o]),a=r.useMemo(()=>m("flex flex-col z-40 overflow-hidden",e),[e]),d=r.useMemo(()=>o?.startsWith("bottom")||!1,[o]),u=r.useRef(new Map),[x,p]=r.useState([]),g=r.useState(0)[1];_(()=>Z.subscribe(c=>{r.startTransition(()=>{if(c.type==="add")u.current.set(c.id,c.config),p(b=>[...b,c.id]);else if(c.type==="remove"){if(!u.current.delete(c.id))return;p(v=>{const y=new Set(v);return y.has(c.id)?(y.delete(c.id),Array.from(y)):v})}else if(c.type==="update"){const b=u.current.get(c.id);if(!b)return;u.current.set(c.id,{...b,...c.config}),g(v=>v+1)}})}),[]);const w=x.length;return t.jsx(z,{children:t.jsx("ol",{className:a,style:i,"aria-live":"polite",children:x.map((c,b)=>{const v=u.current.get(c);if(!v)return null;const{className:y,duration:I,...j}=v;return t.jsx(Me,{id:c,index:w-b,className:y,duration:I,inverted:d,max:s,children:r.createElement(l,j)},c)})})})}function Ae({className:e,...n}){const o=r.useMemo(()=>k("inline-block animate-pulse rounded-md bg-accent",e),[e]);return t.jsx("span",{className:o,...n})}function Ie({className:e,...n}){const o=r.useMemo(()=>m("flex items-center justify-center","[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr","[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",e),[e]);return t.jsx("div",{role:"group",className:o,...n})}function Ne({value:e,max:n,className:o,...s}){const l=r.useMemo(()=>e?Math.round(e/n*100):0,[e,n]),i=r.useMemo(()=>k("relative overflow-hidden rounded-full bg-primary",o),[o]);return t.jsx("div",{role:"progressbar",className:i,"aria-valuemax":n,"aria-valuemin":0,...s,children:t.jsx("div",{className:"h-full w-full flex-1 bg-input transition-all origin-right",style:{transform:`translateX(${l>100?100:l}%)`}})})}function Re({className:e,orientation:n="horizontal",...o}){const s=r.useMemo(()=>k(m("border-0 p-0 shrink-0 bg-input",n==="horizontal"?"h-[1px] w-full":"w-[1px] h-full"),e),[e,n]);return t.jsx("hr",{className:s,role:"none",...o})}function Fe(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsx("path",{d:"M18.066 8.5l-7.567 6.731 7.567 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2"})]})}function Se(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsxs("g",{transform:"translate(9 7)",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("rect",{width:"12",height:"16",rx:"1",stroke:"none"}),t.jsx("path",{d:"M1 1h10v14H1z"})]}),t.jsx("path",{fill:"currentColor",d:"M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"})]})}function ze(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17.796",height:"17.908",viewBox:"0 0 17.796 17.908",...e,children:t.jsx("path",{d:"M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801",fill:"none",stroke:"currentColor"})})}function Pe(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("circle",{cx:"15",cy:"15",r:"15",stroke:"none"}),t.jsx("circle",{cx:"15",cy:"15",r:"14"})]}),t.jsx("path",{d:"M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z",fill:"currentColor"})]})}function Te(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z",fill:"currentColor"})})}function Be(e){return t.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"16.5",y:"9",width:"14",height:"1",rx:".5",transform:"rotate(90 16.5 9)",fill:"currentColor"}),t.jsx("rect",{x:"9",y:"15.5",width:"14",height:"1",rx:".5",fill:"currentColor"})]})}exports.clsx=m;exports.Accordion=pe;exports.Button=be;exports.ButtonGroup=Ie;exports.Checkbox=ce;exports.Dialog=we;exports.Divider=Re;exports.FormField=se;exports.FormLabel=H;exports.IconAlert=L;exports.IconApproved=Q;exports.IconArrowDown=U;exports.IconCaution=ee;exports.IconCheck=D;exports.IconChevronRound=Fe;exports.IconClose=V;exports.IconFileRound=Se;exports.IconPencil=ze;exports.IconPlus=Be;exports.IconRefresh=Te;exports.IconUser=Pe;exports.Input=W;exports.InputField=le;exports.Placeholder=Ae;exports.Popover=O;exports.Portal=z;exports.Progress=Ne;exports.Radio=xe;exports.Select=fe;exports.Sheet=ye;exports.Spinner=te;exports.Switch=G;exports.Textarea=X;exports.Toast=ke;exports.ToastItem=ne;exports.Tooltip=ge;exports.merge=k;exports.toast=Z;exports.varientButton=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("clsx"),re=require("tailwind-merge"),t=require("react/jsx-runtime"),r=require("react"),f=require("@floating-ui/react"),oe=require("react-dom");function k(e,n){return n?re.twMerge(e,n):e}function H({className:e,...n}){const o=r.useMemo(()=>m("leading-none peer-disabled:opacity-70",e),[e]);return t.jsx("label",{className:o,...n})}function se({label:e,children:n,required:o,htmlFor:s,error:l,help:i,helpBefore:a,className:d,innerClass:u,...x}){const p=r.useMemo(()=>m("font-medium",o?'after:content-["*"] after:text-danger after:text-sm after:pl-0.5':""),[o]),g=r.useMemo(()=>k("flex flex-col space-y-2",d),[d]);return t.jsxs("div",{className:g,...x,children:[e?t.jsx(H,{className:p,htmlFor:s,children:e}):null,i&&a?t.jsx("p",{className:"text-xs text-muted pb-2",children:i}):null,t.jsx("div",{className:u,children:ie(n,!!l)}),i&&!a&&!l?t.jsx("p",{className:"text-xs text-muted",children:i}):null,l?t.jsx("p",{className:"text-xs text-danger",children:l}):null]})}function ie(e,n){const o=r.Children.count(e);if(!o)return null;if(o===1)return r.cloneElement(e,{error:n});const s=r.Children.toArray(e);return s[0]=r.cloneElement(s[0],{error:n}),s}function le({error:e,unstyled:n,className:o,...s}){const l=r.useMemo(()=>n?o:k(m("flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted","[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",e?"border-danger hover:border-danger-fore":"border-input"),o),[o,e,n]);return t.jsx("div",{className:l,...s})}const W=r.forwardRef(({className:e,type:n,error:o,unstyled:s,...l},i)=>{const a=r.useMemo(()=>s?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",o?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore",n==="file"?"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground":null),e),[e,n,o,s]);return t.jsx("input",{ref:i,type:n,className:a,...l})});W.displayName="Input";const X=r.forwardRef(({className:e,error:n,unstyled:o,...s},l)=>{const i=r.useMemo(()=>o?e:k(m("flex rounded-md border bg-background px-3 py-2 w-full","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",n?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,n,o]);return t.jsx("textarea",{ref:l,className:i,...s})});X.displayName="Textarea";function D(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M11.5 18.5l-3.9-4L6 16l5.6 5.6 11.6-11.5-1.7-1.6z",fill:"currentColor"})})}function ae(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",children:t.jsx("rect",{width:"20",height:"3",y:"13.5",x:"4.5",fill:"currentColor",stroke:"none",rx:"2"})})}function ce({checked:e,indeterminate:n,className:o,id:s,name:l,onChange:i,value:a,...d}){const u=r.useMemo(()=>k(m("inline-flex justify-center items-center border w-4.5 h-4.5 rounded","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",e||n?"bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input":"border-input not-disabled:hover:border-input-fore"),o),[e,n,o]),x=()=>{d.disabled||i?.(!e)};return t.jsxs("button",{type:"button",role:"checkbox",id:s||l,className:u,onClick:x,"aria-checked":e,...d,children:[e?t.jsx(D,{}):null,n&&!e?t.jsx(ae,{}):null,t.jsx("input",{type:"checkbox","aria-hidden":"true",name:l,checked:e,value:a,onChange:x,disabled:d.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const ue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=ue?r.useLayoutEffect:r.useEffect;function z({children:e,container:n,disabled:o}){const[s,l]=r.useState(null);return _(()=>{if(!n){let i=document.getElementById("visits-style-portals");return i||(i=document.createElement("div"),i.id="visits-style-portals",document.body.appendChild(i)),l(i)}l(n)},[n]),o||!s?null:oe.createPortal(e,s)}function P(e){e&&(e.stopPropagation(),e.preventDefault())}const de={open:150,close:75},O=r.forwardRef(({position:e,label:n,children:o,color:s="background",disabled:l,offset:i={x:0,y:6},onOpen:a,onClose:d,onManualClose:u,timeout:x=de,unstyled:p,zIndex:g=9996,role:w,...c},b)=>{const[v,y]=r.useState(!1),I=f.useId(),j=r.useRef(a),A=r.useRef(d),{refs:M,floatingStyles:S,context:F}=f.useFloating({nodeId:I,placement:e,middleware:[f.shift(),f.flip({fallbackAxisSideDirection:"end"}),f.offset({mainAxis:i.y,crossAxis:i.x})],open:v,onOpenChange:C=>{C?j.current?.(M.reference.current,M.floating.current):A.current?.(M.reference.current,M.floating.current),y(C)},whileElementsMounted:f.autoUpdate}),{isMounted:T,styles:E}=f.useTransitionStyles(F,{duration:x,initial({side:C}){let R="";return C==="top"?R="translateY(5%) scale(0.95)":C==="bottom"?R="translateY(-5%) scale(0.95)":C==="left"?R="translateX(5%) scale(0.95)":R="translateX(-5%) scale(0.95)",{opacity:0,transform:R}}}),B=r.useCallback(C=>{if(P(C),u)return u();y(!1),A.current?.(M.reference.current,M.floating.current)},[u]);r.useEffect(()=>{if(l&&v)return y(!1)},[l,v]),r.useImperativeHandle(b,()=>({open:()=>{y(!0),j.current?.(M.reference.current,M.floating.current)},close:()=>{y(!1),A.current?.(M.reference.current,M.floating.current)}}),[]);const{getFloatingProps:h,getReferenceProps:N}=f.useInteractions([f.useClick(F,{enabled:!l})]);return j.current=a,A.current=d,t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(n),N({ref:M.setReference,tabIndex:0,role:"button","aria-expanded":v,disabled:l,onClick:P})),t.jsx(z,{disabled:l||!T,children:t.jsx(f.FloatingOverlay,{"data-testid":"vs-popover-shadow",onClick:B,style:{zIndex:g},autoFocus:!0,children:t.jsx("div",{role:w||"region",ref:M.setFloating,style:S,children:t.jsx(Y,{unstyled:p,styles:E,...h({...c,onClick:P}),children:o})})})})]})});O.displayName="Popover";const Y=r.forwardRef(({className:e,unstyled:n,styles:o,style:s={},...l},i)=>{const a=r.useMemo(()=>m("z-20 w-auto h-auto outline-none transition-transform ease-in-out",n?null:"border border-accent rounded-md shadow-lg p-1 bg-background",e),[e,n]);return t.jsx("div",{ref:i,className:a,style:{...o,...s},...l})});Y.displayName="PopoverContent";function U(e){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M11.7 14.8 7 9.8a.5.5 0 0 1 0-.7c.2-.2.5-.2.7 0l4.5 5c.2.2.2.6 0 .8-.1.2-.4.2-.6 0Z",fill:"currentColor"}),t.jsx("path",{d:"m16.9 9.9-4.6 5c-.2.2-.4.2-.6 0a.5.5 0 0 1 0-.8l4.5-5c.2-.2.5-.2.7 0 .1.2.1.6 0 .8Z",fill:"currentColor"})]})}function V(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",...e,children:t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[t.jsx("path",{d:"M26 26l-12.5-12.5L26 1"}),t.jsx("path",{d:"M1 26l12.5-12.5L1 1"})]})})}function fe({className:e,placeholder:n="",options:o=[],error:s,unstyled:l,disabled:i,value:a,maxHeight:d=408,arrow:u,onChange:x,onClear:p,renderItem:g,...w}){const c=r.useRef(null),[b,v]=r.useState(0),y=r.useMemo(()=>l?e:k(m("flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer","disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",s?"border-danger hover:border-danger-fore":"border-input not-disabled:hover:border-input-fore"),e),[e,s,l]),I=r.useMemo(()=>Array.isArray(a),[]),j=r.useCallback(h=>{x?.(h),I||c.current?.close()},[x,I]),A=r.useCallback(h=>Array.isArray(a)?a.indexOf(h)>-1:a===h,[a]),M=r.useMemo(()=>{const h={},N=o.filter(C=>typeof C!="string");for(let C=0,R=N.length;C<R;C+=1){const $=N[C];h[`${$.value}`]=$.label}return h},[o]),S=r.useMemo(()=>{if(!a)return n;if(Array.isArray(a)){if(!a.length)return n;const h=[...a].sort(),N=[];for(let C=0,R=h.length;C<R;C+=1)N[C]=M[`${h[C]}`]||"";return N.filter(Boolean).join(",")||n}return M[`${a}`]||n},[n,a,M]),F=S===n,T=r.useMemo(()=>m("overflow-hidden overflow-ellipsis whitespace-nowrap",F?"text-muted":"text-text"),[F]),E=r.useMemo(()=>u||t.jsx(U,{className:"absolute right-0 text-muted size-5"}),[u]),B=r.useCallback((h,N)=>g?typeof h=="string"?g(h,{index:N,selected:!1,onChange:()=>{}}):g(h,{index:N,selected:A(h.value),onChange:()=>j(h.value)}):typeof h=="string"?t.jsx("h5",{className:"font-medium py-1 px-2 text-muted",children:h},`optionheader-${N}`):t.jsx(he,{selected:A(h.value),onChange:j,...h},h.label),[g,j,A]);return t.jsx(O,{label:t.jsxs("button",{type:"button",className:y,disabled:i,...w,children:[t.jsx("span",{className:T,children:S}),t.jsxs("div",{className:"relative flex items-center pl-8 pr-3 space-x-2",children:[p&&!F?t.jsx("div",{tabIndex:-1,role:"button",className:"size-6 p-1.5 rounded hover:bg-accent","aria-label":"clear selected values",onKeyDown:h=>{h.key!=="Enter"&&h.key!=="Space"||p()},onClick:h=>{h.stopPropagation(),p()},children:t.jsx(V,{})}):null,E]})]}),ref:c,onOpen:h=>v(h?.getBoundingClientRect().width||0),disabled:i,children:t.jsx("ul",{className:"overflow-y-auto flex flex-col",role:"listbox",style:{minWidth:b,maxWidth:"calc(100vw - 3rem)",maxHeight:d},children:o.map(B)})})}function he({className:e,value:n,label:o,selected:s,onChange:l}){const i=r.useMemo(()=>m("flex items-center w-full hover:bg-accent rounded p-1",e),[e]);return t.jsxs("button",{type:"button",role:"option",className:i,"aria-selected":s,onClick:()=>l?.(n),children:[s?t.jsx(D,{className:"w-5 h-5 mr-1"}):t.jsx("div",{className:"w-5 h-1 mr-1"}),o]})}function xe({checked:e,className:n,id:o,name:s,onChange:l,value:i,...a}){const d=r.useMemo(()=>m("relative inline-flex justify-center items-center border border-input w-4.5 h-4.5 rounded-full","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",e?"[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input":"",n),[n,e]),u=()=>{a.disabled||l?.(!e)};return t.jsxs("button",{type:"button",role:"radio",id:o||s,className:d,onClick:u,"aria-checked":e,...a,children:[t.jsx("i",{className:"block w-2.5 h-2.5 rounded-full transition-transform",style:{transform:e?"":"scale(0.8)",opacity:e?1:0}}),t.jsx("input",{type:"radio","aria-hidden":"true",name:s,checked:e,value:i,onChange:u,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})}const G=r.forwardRef(({className:e,checked:n,onChange:o,value:s,id:l,name:i,...a},d)=>{const u=r.useMemo(()=>k(m("inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50","w-11",n?"bg-primary":"bg-input"),e),[e,n]),x=r.useMemo(()=>k("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",e),[e]),p=()=>{a.disabled||o?.(!n)};return t.jsxs("button",{type:"button",role:"switch",id:l||i,className:u,onClick:p,"aria-checked":n,...a,children:[t.jsx("span",{className:x,style:{transform:n?"translateX(100%)":""}}),t.jsx("input",{ref:d,type:"checkbox","aria-hidden":"true",name:i,checked:n,value:s,onChange:p,disabled:a.disabled,style:{position:"absolute",pointerEvents:"none",top:0,left:0,width:1,height:1,opacity:0}})]})});G.displayName="Switch";function pe({header:e,show:n,children:o,timeout:s=300,...l}){const i=r.useRef(null),a=r.useRef(0),d=r.useRef(0),u=r.useRef(!0);return r.useEffect(()=>{d.current=s},[s]),_(()=>{if(!i.current)return;if(i.current.style.overflow="hidden",i.current.style.opacity="1",u.current){u.current=!1,i.current.style.height=n?"auto":"0px",n?window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)}):(window.requestAnimationFrame(()=>{i.current&&(i.current.style.height="auto",a.current=i.current.offsetHeight,i.current.style.height="0px")}),i.current.style.opacity="0");return}n||(i.current.style.height=`${a.current}px`);const x=[];x[0]=window.requestAnimationFrame(()=>{x[1]=window.requestAnimationFrame(()=>{i.current&&(i.current.style.height=`${n?a.current:0}px`,i.current.style.opacity=n?"1":"0")})});let p;const g=()=>{i.current&&(n?(i.current.style.height="auto",i.current.style.overflow="",i.current.style.opacity="",window.requestAnimationFrame(()=>{i.current&&(a.current=i.current.offsetHeight)})):i.current.style.height="0px")};return d.current===0?g():p=window.setTimeout(g,d.current),()=>{x.forEach(window.cancelAnimationFrame),p&&window.clearTimeout(p)}},[n]),t.jsxs("div",{...l,children:[e,t.jsx("div",{className:"transition-all ease-in-out overflow-hidden",role:"region","aria-hidden":!n,ref:i,style:{transitionDuration:`${s}ms`},children:o})]})}const ge=r.forwardRef(({children:e,position:n="bottom",label:o,className:s,timeout:l=150,offset:i={x:0,y:6},clientPoint:a=!1,disabled:d},u)=>{const[x,p]=r.useState(!1),g=f.useId(),{refs:w,floatingStyles:c,context:b}=f.useFloating({nodeId:g,open:x,placement:n,middleware:[f.shift(),f.flip(),f.offset({mainAxis:i.y,crossAxis:i.x})],whileElementsMounted:d?void 0:f.autoUpdate,onOpenChange:p}),{getReferenceProps:v,getFloatingProps:y}=f.useInteractions([f.useHover(b,{enabled:!d}),f.useClientPoint(b,{enabled:a})]),{isMounted:I,styles:j}=f.useTransitionStyles(b,{duration:l,initial:{opacity:0,transform:"scale(0.8)"}});r.useImperativeHandle(u,()=>({floating:w.floating,reference:w.reference,open:()=>p(!0),close:()=>p(!1)})),r.useEffect(()=>{d&&p(!1)},[d]);const A=typeof e=="string"?t.jsx("span",{children:e}):e;return t.jsxs(t.Fragment,{children:[r.cloneElement(r.Children.only(A),{ref:w.setReference,...v()}),t.jsx(z,{disabled:d||!I,children:t.jsx("div",{role:"tooltip",className:"z-[9999]",ref:w.setFloating,...y({style:c}),children:t.jsx(me,{className:s,style:j,children:o})})})]})}),me=r.forwardRef(({className:e,custom:n,...o},s)=>{const l=r.useMemo(()=>m("relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",n?null:"border border-accent rounded shadow-md px-3 py-1 bg-background",e),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});function K({variant:e,size:n}){return m("inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",{"bg-primary text-inverted hover:bg-primary-fore":!e||e==="primary","bg-info text-inverted hover:bg-info-fore":e==="info","bg-warn text-inverted hover:bg-warn-fore":e==="warn","bg-danger text-inverted hover:bg-danger-fore":e==="danger","hover:bg-accent":e==="ghost","hover:underline":e==="link","border border-input hover:bg-accent":e==="outline"},{"px-2 py-1":!n,"p-1.5":n==="icon"})}function be({size:e,variant:n,className:o,...s}){const l=r.useMemo(()=>m(K({size:e,variant:n}),o),[e,n,o]);return t.jsx("button",{className:l,type:"button",...s})}function we({open:e,children:n,timeout:o=150,padding:s="0.85rem",verticalAlign:l="center",closeOnOverlay:i,closeOnEsc:a,onExited:d,className:u,onOpenChange:x,size:p,...g}){const w=r.useRef(d),c=r.useRef(!1),b=f.useId(),{refs:v,context:y}=f.useFloating({open:e,onOpenChange:x,nodeId:b}),{getFloatingProps:I}=f.useInteractions([f.useDismiss(y,{enabled:a,escapeKey:a,outsidePress:!1})]),{isMounted:j,styles:A}=f.useTransitionStyles(y,{duration:o,initial:{opacity:0,transform:"scale(0.8)"}});r.useEffect(()=>{c.current!==j&&(c.current=j,!j&&w.current?.())},[j]);const M=r.useCallback(()=>{i&&x?.(!1)},[x,i]);w.current=d;const S=r.useMemo(()=>m("grid bg-backdrop z-40 justify-items-center",{"place-items-start items-start":l==="start","place-items-end":l==="end","place-items-center":l==="center"||!l}),[l]),F=r.useMemo(()=>k("transition ease-in-out",u),[u]);return t.jsx(z,{disabled:!j,children:t.jsx(f.FloatingOverlay,{className:S,"data-testid":"vs-dialog-overlay",onClick:M,style:{padding:s,opacity:A.opacity},lockScroll:!0,children:t.jsx(J,{ref:v.setFloating,className:F,role:"dialog",size:p,...I({...g,style:A,onClick:P}),children:n})})})}const J=r.forwardRef(({size:e,className:n,...o},s)=>{const l=r.useMemo(()=>m(e?"flex flex-col bg-background shadow-lg p-5 rounded":null,{"w-full max-w-sm":e==="small","w-full max-w-lg":e==="medium","w-full max-w-2xl":e==="large"},n),[e,n]);return t.jsx("div",{ref:s,className:l,...o})});J.displayName="DialogContent";const ve={open:300,close:150};function ye({open:e,timeout:n=ve,onOpenChange:o,position:s="right",overlay:l,...i}){const a=f.useId(),{refs:d,context:u}=f.useFloating({open:e,onOpenChange:o,nodeId:a}),{isMounted:x,styles:p}=f.useTransitionStyles(u,{duration:n,initial(){let w="translateX(75%)";return s==="left"?w="translateX(-75%)":s==="top"?w="translateY(-75%)":s==="bottom"&&(w="translateY(75%)"),{opacity:0,transform:w}}}),g=r.useMemo(()=>m("fixed transition-transform z-30",{"top-0 right-0 h-full max-h-screen":s==="right","top-0 left-0 h-full max-h-screen":s==="left","top-0 left-0 right-0 w-full max-w-screen":s==="top","bottom-0 left-0 right-0 w-full max-w-screen":s==="bottom"}),[s]);return t.jsxs(z,{disabled:!x,children:[l?t.jsx(f.FloatingOverlay,{className:"bg-backdrop",style:{opacity:p.opacity},onClick:()=>o?.(!1)}):null,t.jsx("div",{ref:d.setFloating,className:g,role:"dialog",style:p,children:t.jsx(je,{...i})})]})}function je({className:e,unstyled:n,...o}){const s=r.useMemo(()=>n?e:k(m("relative bg-background min-w-full min-h-full border border-input shadow-lg"),e),[n,e]);return t.jsx("div",{className:s,...o})}function Q(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsx("path",{d:"M15 29a14 14 0 0 1-9.9-4.1A14 14 0 0 1 1 15a14 14 0 0 1 4.1-9.9A14 14 0 0 1 15 1a14 14 0 0 1 9.9 4.1A14 14 0 0 1 29 15a14 14 0 0 1-4.1 9.9A14 14 0 0 1 15 29z",fill:"none"}),t.jsx("path",{d:"M15 2a13 13 0 0 0-9.2 3.8A13 13 0 0 0 2 15a13 13 0 0 0 3.8 9.2A13 13 0 0 0 15 28a13 13 0 0 0 9.2-3.8A13 13 0 0 0 28 15a13 13 0 0 0-3.8-9.2A13 13 0 0 0 15 2m0-2a15 15 0 1 1 0 30 15 15 0 0 1 0-30z",fill:"currentColor"}),t.jsx("path",{d:"m11.5 18.5-3.9-4L6 16l5.6 5.6L23.2 10l-1.7-1.6z",fill:"currentColor"})]})}function L(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 32 32",...e,children:[t.jsx("path",{d:"M16 0C7.16 0 0 7.16 0 16C0 24.84 7.16 32 16 32C24.84 32 32 24.84 32 16C32 7.16 24.84 0 16 0ZM16 31C7.73 31 1 24.27 1 16C1 7.73 7.73 1 16 1C24.27 1 31 7.73 31 16C31 24.27 24.27 31 16 31Z",fill:"currentColor"}),t.jsx("path",{d:"M15.5 19.55V8.54999C15.5 8.26999 15.72 8.04999 16 8.04999C16.28 8.04999 16.5 8.26999 16.5 8.54999V19.55C16.5 19.83 16.28 20.05 16 20.05C15.72 20.05 15.5 19.83 15.5 19.55Z",fill:"currentColor"}),t.jsx("path",{d:"M16 23.95C16.5523 23.95 17 23.5023 17 22.95C17 22.3977 16.5523 21.95 16 21.95C15.4477 21.95 15 22.3977 15 22.95C15 23.5023 15.4477 23.95 16 23.95Z",fill:"currentColor"})]})}function ee(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 52 45",...e,children:t.jsx("path",{d:"M50.6 37.8 29.3 2c-1.5-2.6-5.1-2.8-6.7-.3l-21.2 36c-1.7 2.6.2 6.6 3.4 6.6h42.4c3.1 0 5-4 3.4-6.6Zm-24.7.6a2.7 2.7 0 1 1 0-5.5 2.7 2.7 0 0 1 0 5.5Zm2.9-10.1c0 1.5-1.3 2.7-2.8 2.7a2.8 2.8 0 0 1-2.8-2.7V13.9c0-1.5 1.3-2.7 2.8-2.7 1.5 0 2.8 1.2 2.8 2.7v14.4Z",fill:"currentColor"})})}function te({size:e=20,label:n="Loading...",...o}){return t.jsxs("div",{role:"status",...o,children:[t.jsxs("svg",{"aria-hidden":"true",className:"text-accent animate-spin fill-primary",width:e,height:e,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z",fill:"currentColor"}),t.jsx("path",{d:"M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z",fill:"currentFill"})]}),t.jsx("span",{className:"sr-only",children:n})]})}function ne({type:e,label:n,message:o}){return t.jsxs("div",{className:"flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2",children:[e?t.jsxs("figure",{className:"mr-2",children:[e==="success"?t.jsx(Q,{className:"text-primary size-5"}):null,e==="info"?t.jsx(L,{className:"text-info size-5"}):null,e==="error"?t.jsx(L,{className:"text-danger size-5"}):null,e==="warn"?t.jsx(ee,{className:"text-warn size-5"}):null,e==="loading"?t.jsx(te,{size:20}):null]}):null,t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"font-medium leading-none",children:n}),o?t.jsx("p",{children:o}):null]})]})}function q(){}class Ce{notify=q;lastId=0;subscribe=n=>(this.notify=n,()=>{this.notify=q});add=(n,o={})=>{this.lastId+=1;const s=`${this.lastId}`;return this.notify({id:s,type:"add",config:{id:s,label:n,...o}}),s};update=(n,o)=>{this.notify({id:n,type:"update",config:o})};remove=n=>{this.notify({id:n,type:"remove"})};clear=()=>{this.lastId=0}}const Z=new Ce;function Me({id:e,type:n,index:o,duration:s,className:l,children:i,inverted:a,timeout:d=250,max:u=3}){const x=r.useRef(!1),[p,g]=r.useState(!1),{context:w,refs:c}=f.useFloating({open:p,onOpenChange:g,nodeId:e}),{isMounted:b,styles:v}=f.useTransitionStyles(w,{duration:d,initial:{opacity:0,transform:`translateY(${a?"":"-"}50%)`}});r.useLayoutEffect(()=>{g(o<=u)},[o,u]),r.useEffect(()=>{x.current!==b&&(b||Z.remove(e),x.current=b)},[b,e]),r.useEffect(()=>{if(!s)return;const j=window.setTimeout(()=>g(!1),s);return()=>window.clearTimeout(j)},[s,e]);const y=r.useCallback(()=>{n!=="loading"&&g(!1)},[n]),I=r.useMemo(()=>m("relative flex w-fit transition-transform ease-in-out cursor-pointer",l),[l]);return b?t.jsx("li",{role:"log",tabIndex:-1,ref:c.setFloating,className:I,style:v,onClick:y,children:i}):null}function ke({className:e,margin:n=16,position:o="top-left",max:s,ListItem:l=ne}){const i=r.useMemo(()=>{const c={position:"fixed"};return o.indexOf("top")>-1?c.top=n:o.indexOf("bottom")>-1&&(c.bottom=n),o.indexOf("left")>-1?(c.left=n,c.alignItems="flex-start"):o.indexOf("right")>-1?(c.right=n,c.alignItems="flex-end"):(c.left="50%",c.alignItems="center",c.transform="translateX(-50%)"),c},[n,o]),a=r.useMemo(()=>m("flex flex-col z-40 overflow-hidden",e),[e]),d=r.useMemo(()=>o?.startsWith("bottom")||!1,[o]),u=r.useRef(new Map),[x,p]=r.useState([]),g=r.useState(0)[1];_(()=>Z.subscribe(c=>{r.startTransition(()=>{if(c.type==="add")u.current.set(c.id,c.config),p(b=>[...b,c.id]);else if(c.type==="remove"){if(!u.current.delete(c.id))return;p(v=>{const y=new Set(v);return y.has(c.id)?(y.delete(c.id),Array.from(y)):v})}else if(c.type==="update"){const b=u.current.get(c.id);if(!b)return;u.current.set(c.id,{...b,...c.config}),g(v=>v+1)}})}),[]);const w=x.length;return t.jsx(z,{children:t.jsx("ol",{className:a,style:i,"aria-live":"polite",children:x.map((c,b)=>{const v=u.current.get(c);if(!v)return null;const{className:y,duration:I,...j}=v;return t.jsx(Me,{id:c,index:w-b,className:y,duration:I,inverted:d,max:s,children:r.createElement(l,j)},c)})})})}function Ae({className:e,...n}){const o=r.useMemo(()=>k("inline-block animate-pulse rounded-md bg-accent",e),[e]);return t.jsx("span",{className:o,...n})}function Ie({className:e,...n}){const o=r.useMemo(()=>m("flex items-center justify-center","[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr","[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",e),[e]);return t.jsx("div",{role:"group",className:o,...n})}function Ne({value:e,max:n,className:o,...s}){const l=r.useMemo(()=>e?Math.round(e/n*100):0,[e,n]),i=r.useMemo(()=>k("relative overflow-hidden rounded-full bg-primary",o),[o]);return t.jsx("div",{role:"progressbar",className:i,"aria-valuemax":n,"aria-valuemin":0,...s,children:t.jsx("div",{className:"h-full w-full flex-1 bg-input transition-all origin-right",style:{transform:`translateX(${l>100?100:l}%)`}})})}function Re({className:e,orientation:n="horizontal",...o}){const s=r.useMemo(()=>k(m("border-0 p-0 shrink-0 bg-input",n==="horizontal"?"h-[1px] w-full":"w-[1px] h-full"),e),[e,n]);return t.jsx("hr",{className:s,role:"none",...o})}function Fe(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsx("path",{d:"M18.066 8.5l-7.567 6.731 7.567 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2"})]})}function Se(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",children:[t.jsx("path",{d:"M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"}),t.jsx("path",{d:"M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",fill:"currentColor"})]}),t.jsxs("g",{transform:"translate(9 7)",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("rect",{width:"12",height:"16",rx:"1",stroke:"none"}),t.jsx("path",{d:"M1 1h10v14H1z"})]}),t.jsx("path",{fill:"currentColor",d:"M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"})]})}function ze(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17.796",height:"17.908",viewBox:"0 0 17.796 17.908",...e,children:t.jsx("path",{d:"M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801",fill:"none",stroke:"currentColor"})})}function Pe(e){return t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:[t.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t.jsx("circle",{cx:"15",cy:"15",r:"15",stroke:"none"}),t.jsx("circle",{cx:"15",cy:"15",r:"14"})]}),t.jsx("path",{d:"M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z",fill:"currentColor"})]})}function Te(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",...e,children:t.jsx("path",{d:"M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z",fill:"currentColor"})})}function Ee(e){return t.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"16.5",y:"9",width:"14",height:"1",rx:".5",transform:"rotate(90 16.5 9)",fill:"currentColor"}),t.jsx("rect",{x:"9",y:"15.5",width:"14",height:"1",rx:".5",fill:"currentColor"})]})}exports.clsx=m;exports.Accordion=pe;exports.Button=be;exports.ButtonGroup=Ie;exports.Checkbox=ce;exports.Dialog=we;exports.Divider=Re;exports.FormField=se;exports.FormLabel=H;exports.IconAlert=L;exports.IconApproved=Q;exports.IconArrowDown=U;exports.IconCaution=ee;exports.IconCheck=D;exports.IconChevronRound=Fe;exports.IconClose=V;exports.IconFileRound=Se;exports.IconPencil=ze;exports.IconPlus=Ee;exports.IconRefresh=Te;exports.IconUser=Pe;exports.Input=W;exports.InputField=le;exports.Placeholder=Ae;exports.Popover=O;exports.Portal=z;exports.Progress=Ne;exports.Radio=xe;exports.Select=fe;exports.Sheet=ye;exports.Spinner=te;exports.Switch=G;exports.Textarea=X;exports.Toast=ke;exports.ToastItem=ne;exports.Tooltip=ge;exports.merge=k;exports.toast=Z;exports.varientButton=K;
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import w from "clsx";
2
2
  import { default as gt } from "clsx";
3
- import { twMerge as ue } from "tailwind-merge";
3
+ import { twMerge as de } from "tailwind-merge";
4
4
  import { jsx as n, jsxs as g, Fragment as Q } from "react/jsx-runtime";
5
- import { useMemo as d, Children as j, cloneElement as $, forwardRef as R, useLayoutEffect as ee, useEffect as E, useState as S, useRef as F, useCallback as L, useImperativeHandle as te, startTransition as fe, createElement as he } from "react";
6
- import { useId as W, useFloating as _, shift as ne, flip as re, offset as oe, autoUpdate as ie, useTransitionStyles as D, useInteractions as q, useClick as pe, FloatingOverlay as U, useHover as ge, useClientPoint as me, useDismiss as be } from "@floating-ui/react";
5
+ import { useMemo as d, Children as j, cloneElement as $, forwardRef as R, useLayoutEffect as ee, useEffect as S, useState as T, useRef as F, useCallback as E, useImperativeHandle as te, startTransition as fe, createElement as he } from "react";
6
+ import { useId as W, useFloating as _, autoUpdate as ne, shift as re, flip as oe, offset as ie, useTransitionStyles as D, useInteractions as q, useClick as pe, FloatingOverlay as U, useHover as ge, useClientPoint as me, useDismiss as be } from "@floating-ui/react";
7
7
  import { createPortal as we } from "react-dom";
8
8
  function N(e, t) {
9
- return t ? ue(e, t) : e;
9
+ return t ? de(e, t) : e;
10
10
  }
11
- function xe({ className: e, ...t }) {
11
+ function ve({ className: e, ...t }) {
12
12
  const r = d(() => w("leading-none peer-disabled:opacity-70", e), [e]);
13
13
  return /* @__PURE__ */ n("label", { className: r, ...t });
14
14
  }
@@ -29,14 +29,14 @@ function Ye({
29
29
  r ? 'after:content-["*"] after:text-danger after:text-sm after:pl-0.5' : ""
30
30
  ), [r]), m = d(() => N("flex flex-col space-y-2", u), [u]);
31
31
  return /* @__PURE__ */ g("div", { className: m, ...h, children: [
32
- e ? /* @__PURE__ */ n(xe, { className: p, htmlFor: o, children: e }) : null,
32
+ e ? /* @__PURE__ */ n(ve, { className: p, htmlFor: o, children: e }) : null,
33
33
  i && s ? /* @__PURE__ */ n("p", { className: "text-xs text-muted pb-2", children: i }) : null,
34
- /* @__PURE__ */ n("div", { className: c, children: ve(t, !!l) }),
34
+ /* @__PURE__ */ n("div", { className: c, children: xe(t, !!l) }),
35
35
  i && !s && !l ? /* @__PURE__ */ n("p", { className: "text-xs text-muted", children: i }) : null,
36
36
  l ? /* @__PURE__ */ n("p", { className: "text-xs text-danger", children: l }) : null
37
37
  ] });
38
38
  }
39
- function ve(e, t) {
39
+ function xe(e, t) {
40
40
  const r = j.count(e);
41
41
  if (!r) return null;
42
42
  if (r === 1)
@@ -135,9 +135,9 @@ function Ue({
135
135
  }
136
136
  );
137
137
  }
138
- const ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", V = ke ? ee : E;
138
+ const ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", V = ke ? ee : S;
139
139
  function Z({ children: e, container: t, disabled: r }) {
140
- const [o, l] = S(null);
140
+ const [o, l] = T(null);
141
141
  return V(() => {
142
142
  if (!t) {
143
143
  let i = document.getElementById("visits-style-portals");
@@ -162,35 +162,35 @@ const Me = { open: 150, close: 75 }, se = R(({
162
162
  timeout: h = Me,
163
163
  unstyled: p,
164
164
  zIndex: m = 9996,
165
- role: x,
165
+ role: v,
166
166
  ...a
167
167
  }, b) => {
168
- const [v, y] = S(!1), I = W(), C = F(s), M = F(u), { refs: k, floatingStyles: T, context: B } = _({
168
+ const [x, y] = T(!1), I = W(), C = F(s), M = F(u), { refs: k, floatingStyles: L, context: B } = _({
169
169
  nodeId: I,
170
170
  placement: e,
171
171
  middleware: [
172
- ne(),
173
- re({ fallbackAxisSideDirection: "end" }),
174
- oe({ mainAxis: i.y, crossAxis: i.x })
172
+ re(),
173
+ oe({ fallbackAxisSideDirection: "end" }),
174
+ ie({ mainAxis: i.y, crossAxis: i.x })
175
175
  ],
176
- open: v,
176
+ open: x,
177
177
  onOpenChange: (A) => {
178
178
  A ? C.current?.(k.reference.current, k.floating.current) : M.current?.(k.reference.current, k.floating.current), y(A);
179
179
  },
180
- whileElementsMounted: ie
180
+ whileElementsMounted: ne
181
181
  }), { isMounted: H, styles: X } = D(B, {
182
182
  duration: h,
183
183
  initial({ side: A }) {
184
184
  let P = "";
185
185
  return A === "top" ? P = "translateY(5%) scale(0.95)" : A === "bottom" ? P = "translateY(-5%) scale(0.95)" : A === "left" ? P = "translateX(5%) scale(0.95)" : P = "translateX(-5%) scale(0.95)", { opacity: 0, transform: P };
186
186
  }
187
- }), Y = L((A) => {
187
+ }), Y = E((A) => {
188
188
  if (O(A), c) return c();
189
189
  y(!1), M.current?.(k.reference.current, k.floating.current);
190
190
  }, [c]);
191
- E(() => {
192
- if (l && v) return y(!1);
193
- }, [l, v]), te(b, () => ({
191
+ S(() => {
192
+ if (l && x) return y(!1);
193
+ }, [l, x]), te(b, () => ({
194
194
  open: () => {
195
195
  y(!0), C.current?.(k.reference.current, k.floating.current);
196
196
  },
@@ -207,11 +207,11 @@ const Me = { open: 150, close: 75 }, se = R(({
207
207
  ref: k.setReference,
208
208
  tabIndex: 0,
209
209
  role: "button",
210
- "aria-expanded": v,
210
+ "aria-expanded": x,
211
211
  disabled: l,
212
212
  onClick: O
213
213
  })),
214
- /* @__PURE__ */ n(Z, { disabled: l || !H, children: /* @__PURE__ */ n(U, { "data-testid": "vs-popover-shadow", onClick: Y, style: { zIndex: m }, autoFocus: !0, children: /* @__PURE__ */ n("div", { role: x || "region", ref: k.setFloating, style: T, children: /* @__PURE__ */ n(
214
+ /* @__PURE__ */ n(Z, { disabled: l || !H, children: /* @__PURE__ */ n(U, { "data-testid": "vs-popover-shadow", onClick: Y, style: { zIndex: m }, autoFocus: !0, children: /* @__PURE__ */ n("div", { role: v || "region", ref: k.setFloating, style: L, children: /* @__PURE__ */ n(
215
215
  ae,
216
216
  {
217
217
  unstyled: p,
@@ -263,22 +263,22 @@ function Ve({
263
263
  onChange: h,
264
264
  onClear: p,
265
265
  renderItem: m,
266
- ...x
266
+ ...v
267
267
  }) {
268
- const a = F(null), [b, v] = S(0), y = d(() => l ? e : N(w(
268
+ const a = F(null), [b, x] = T(0), y = d(() => l ? e : N(w(
269
269
  "flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer",
270
270
  "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
271
271
  o ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
272
- ), e), [e, o, l]), I = d(() => Array.isArray(s), []), C = L((f) => {
272
+ ), e), [e, o, l]), I = d(() => Array.isArray(s), []), C = E((f) => {
273
273
  h?.(f), I || a.current?.close();
274
- }, [h, I]), M = L((f) => Array.isArray(s) ? s.indexOf(f) > -1 : s === f, [s]), k = d(() => {
274
+ }, [h, I]), M = E((f) => Array.isArray(s) ? s.indexOf(f) > -1 : s === f, [s]), k = d(() => {
275
275
  const f = {}, z = r.filter((A) => typeof A != "string");
276
276
  for (let A = 0, P = z.length; A < P; A += 1) {
277
277
  const K = z[A];
278
278
  f[`${K.value}`] = K.label;
279
279
  }
280
280
  return f;
281
- }, [r]), T = d(() => {
281
+ }, [r]), L = d(() => {
282
282
  if (!s) return t;
283
283
  if (Array.isArray(s)) {
284
284
  if (!s.length) return t;
@@ -288,10 +288,10 @@ function Ve({
288
288
  return z.filter(Boolean).join(",") || t;
289
289
  }
290
290
  return k[`${s}`] || t;
291
- }, [t, s, k]), B = T === t, H = d(() => w(
291
+ }, [t, s, k]), B = L === t, H = d(() => w(
292
292
  "overflow-hidden overflow-ellipsis whitespace-nowrap",
293
293
  B ? "text-muted" : "text-text"
294
- ), [B]), X = d(() => c || /* @__PURE__ */ n(Ne, { className: "absolute right-0 text-muted size-5" }), [c]), Y = L((f, z) => m ? typeof f == "string" ? m(f, { index: z, selected: !1, onChange: () => {
294
+ ), [B]), X = d(() => c || /* @__PURE__ */ n(Ne, { className: "absolute right-0 text-muted size-5" }), [c]), Y = E((f, z) => m ? typeof f == "string" ? m(f, { index: z, selected: !1, onChange: () => {
295
295
  } }) : m(f, {
296
296
  index: z,
297
297
  selected: M(f.value),
@@ -308,8 +308,8 @@ function Ve({
308
308
  return /* @__PURE__ */ n(
309
309
  se,
310
310
  {
311
- label: /* @__PURE__ */ g("button", { type: "button", className: y, disabled: i, ...x, children: [
312
- /* @__PURE__ */ n("span", { className: H, children: T }),
311
+ label: /* @__PURE__ */ g("button", { type: "button", className: y, disabled: i, ...v, children: [
312
+ /* @__PURE__ */ n("span", { className: H, children: L }),
313
313
  /* @__PURE__ */ g("div", { className: "relative flex items-center pl-8 pr-3 space-x-2", children: [
314
314
  p && !B ? /* @__PURE__ */ n(
315
315
  "div",
@@ -331,7 +331,7 @@ function Ve({
331
331
  ] })
332
332
  ] }),
333
333
  ref: a,
334
- onOpen: (f) => v(f?.getBoundingClientRect().width || 0),
334
+ onOpen: (f) => x(f?.getBoundingClientRect().width || 0),
335
335
  disabled: i,
336
336
  children: /* @__PURE__ */ n(
337
337
  "ul",
@@ -462,7 +462,7 @@ const Fe = R(({
462
462
  Fe.displayName = "Switch";
463
463
  function Ge({ header: e, show: t, children: r, timeout: o = 300, ...l }) {
464
464
  const i = F(null), s = F(0), u = F(0), c = F(!0);
465
- return E(() => {
465
+ return S(() => {
466
466
  u.current = o;
467
467
  }, [o]), V(() => {
468
468
  if (!i.current) return;
@@ -515,18 +515,18 @@ const Je = R(({
515
515
  clientPoint: s = !1,
516
516
  disabled: u
517
517
  }, c) => {
518
- const [h, p] = S(!1), m = W(), { refs: x, floatingStyles: a, context: b } = _({
518
+ const [h, p] = T(!1), m = W(), { refs: v, floatingStyles: a, context: b } = _({
519
519
  nodeId: m,
520
520
  open: h,
521
521
  placement: t,
522
522
  middleware: [
523
- ne(),
524
523
  re(),
525
- oe({ mainAxis: i.y, crossAxis: i.x })
524
+ oe(),
525
+ ie({ mainAxis: i.y, crossAxis: i.x })
526
526
  ],
527
- whileElementsMounted: u ? void 0 : ie,
527
+ whileElementsMounted: u ? void 0 : ne,
528
528
  onOpenChange: p
529
- }), { getReferenceProps: v, getFloatingProps: y } = q([
529
+ }), { getReferenceProps: x, getFloatingProps: y } = q([
530
530
  ge(b, { enabled: !u }),
531
531
  me(b, { enabled: s })
532
532
  ]), { isMounted: I, styles: C } = D(b, {
@@ -534,18 +534,20 @@ const Je = R(({
534
534
  initial: { opacity: 0, transform: "scale(0.8)" }
535
535
  });
536
536
  te(c, () => ({
537
- floating: x.floating,
538
- reference: x.reference,
537
+ floating: v.floating,
538
+ reference: v.reference,
539
539
  open: () => p(!0),
540
540
  close: () => p(!1)
541
- }));
541
+ })), S(() => {
542
+ u && p(!1);
543
+ }, [u]);
542
544
  const M = typeof e == "string" ? /* @__PURE__ */ n("span", { children: e }) : e;
543
545
  return /* @__PURE__ */ g(Q, { children: [
544
546
  $(j.only(M), {
545
- ref: x.setReference,
546
- ...v()
547
+ ref: v.setReference,
548
+ ...x()
547
549
  }),
548
- /* @__PURE__ */ n(Z, { disabled: u || !I, children: /* @__PURE__ */ n("div", { role: "tooltip", className: "z-[9999]", ref: x.setFloating, ...y({ style: a }), children: /* @__PURE__ */ n(Pe, { className: o, style: C, children: r }) }) })
550
+ /* @__PURE__ */ n(Z, { disabled: u || !I, children: /* @__PURE__ */ n("div", { role: "tooltip", className: "z-[9999]", ref: v.setFloating, ...y({ style: a }), children: /* @__PURE__ */ n(Pe, { className: o, style: C, children: r }) }) })
549
551
  ] });
550
552
  }), Pe = R(({
551
553
  className: e,
@@ -597,7 +599,7 @@ function et({
597
599
  size: p,
598
600
  ...m
599
601
  }) {
600
- const x = F(u), a = F(!1), b = W(), { refs: v, context: y } = _({ open: e, onOpenChange: h, nodeId: b }), { getFloatingProps: I } = q([
602
+ const v = F(u), a = F(!1), b = W(), { refs: x, context: y } = _({ open: e, onOpenChange: h, nodeId: b }), { getFloatingProps: I } = q([
601
603
  be(y, {
602
604
  enabled: s,
603
605
  escapeKey: s,
@@ -607,14 +609,14 @@ function et({
607
609
  duration: r,
608
610
  initial: { opacity: 0, transform: "scale(0.8)" }
609
611
  });
610
- E(() => {
611
- a.current !== C && (a.current = C, !C && x.current?.());
612
+ S(() => {
613
+ a.current !== C && (a.current = C, !C && v.current?.());
612
614
  }, [C]);
613
- const k = L(() => {
615
+ const k = E(() => {
614
616
  i && h?.(!1);
615
617
  }, [h, i]);
616
- x.current = u;
617
- const T = d(() => w("grid bg-backdrop z-40 justify-items-center", {
618
+ v.current = u;
619
+ const L = d(() => w("grid bg-backdrop z-40 justify-items-center", {
618
620
  "place-items-start items-start": l === "start",
619
621
  "place-items-end": l === "end",
620
622
  "place-items-center": l === "center" || !l
@@ -622,7 +624,7 @@ function et({
622
624
  return /* @__PURE__ */ n(Z, { disabled: !C, children: /* @__PURE__ */ n(
623
625
  U,
624
626
  {
625
- className: T,
627
+ className: L,
626
628
  "data-testid": "vs-dialog-overlay",
627
629
  onClick: k,
628
630
  style: { padding: o, opacity: M.opacity },
@@ -630,7 +632,7 @@ function et({
630
632
  children: /* @__PURE__ */ n(
631
633
  ce,
632
634
  {
633
- ref: v.setFloating,
635
+ ref: x.setFloating,
634
636
  className: B,
635
637
  role: "dialog",
636
638
  size: p,
@@ -663,8 +665,8 @@ function tt({ open: e, timeout: t = Re, onOpenChange: r, position: o = "right",
663
665
  const s = W(), { refs: u, context: c } = _({ open: e, onOpenChange: r, nodeId: s }), { isMounted: h, styles: p } = D(c, {
664
666
  duration: t,
665
667
  initial() {
666
- let x = "translateX(75%)";
667
- return o === "left" ? x = "translateX(-75%)" : o === "top" ? x = "translateY(-75%)" : o === "bottom" && (x = "translateY(75%)"), { opacity: 0, transform: x };
668
+ let v = "translateX(75%)";
669
+ return o === "left" ? v = "translateX(-75%)" : o === "top" ? v = "translateY(-75%)" : o === "bottom" && (v = "translateY(75%)"), { opacity: 0, transform: v };
668
670
  }
669
671
  }), m = d(() => w(
670
672
  "fixed transition-transform z-30",
@@ -769,7 +771,7 @@ class De {
769
771
  this.lastId = 0;
770
772
  };
771
773
  }
772
- const de = new De();
774
+ const ue = new De();
773
775
  function Ze({
774
776
  id: e,
775
777
  type: t,
@@ -781,20 +783,20 @@ function Ze({
781
783
  timeout: u = 250,
782
784
  max: c = 3
783
785
  }) {
784
- const h = F(!1), [p, m] = S(!1), { context: x, refs: a } = _({ open: p, onOpenChange: m, nodeId: e }), { isMounted: b, styles: v } = D(x, {
786
+ const h = F(!1), [p, m] = T(!1), { context: v, refs: a } = _({ open: p, onOpenChange: m, nodeId: e }), { isMounted: b, styles: x } = D(v, {
785
787
  duration: u,
786
788
  initial: { opacity: 0, transform: `translateY(${s ? "" : "-"}50%)` }
787
789
  });
788
790
  ee(() => {
789
791
  m(r <= c);
790
- }, [r, c]), E(() => {
791
- h.current !== b && (b || de.remove(e), h.current = b);
792
- }, [b, e]), E(() => {
792
+ }, [r, c]), S(() => {
793
+ h.current !== b && (b || ue.remove(e), h.current = b);
794
+ }, [b, e]), S(() => {
793
795
  if (!o) return;
794
796
  const C = window.setTimeout(() => m(!1), o);
795
797
  return () => window.clearTimeout(C);
796
798
  }, [o, e]);
797
- const y = L(() => {
799
+ const y = E(() => {
798
800
  t !== "loading" && m(!1);
799
801
  }, [t]), I = d(() => w(
800
802
  "relative flex w-fit transition-transform ease-in-out cursor-pointer",
@@ -807,7 +809,7 @@ function Ze({
807
809
  tabIndex: -1,
808
810
  ref: a.setFloating,
809
811
  className: I,
810
- style: v,
812
+ style: x,
811
813
  onClick: y,
812
814
  children: i
813
815
  }
@@ -826,34 +828,34 @@ function nt({
826
828
  }, [t, r]), s = d(() => w(
827
829
  "flex flex-col z-40 overflow-hidden",
828
830
  e
829
- ), [e]), u = d(() => r?.startsWith("bottom") || !1, [r]), c = F(/* @__PURE__ */ new Map()), [h, p] = S([]), m = S(0)[1];
830
- V(() => de.subscribe((a) => {
831
+ ), [e]), u = d(() => r?.startsWith("bottom") || !1, [r]), c = F(/* @__PURE__ */ new Map()), [h, p] = T([]), m = T(0)[1];
832
+ V(() => ue.subscribe((a) => {
831
833
  fe(() => {
832
834
  if (a.type === "add")
833
835
  c.current.set(a.id, a.config), p((b) => [...b, a.id]);
834
836
  else if (a.type === "remove") {
835
837
  if (!c.current.delete(a.id)) return;
836
- p((v) => {
837
- const y = new Set(v);
838
- return y.has(a.id) ? (y.delete(a.id), Array.from(y)) : v;
838
+ p((x) => {
839
+ const y = new Set(x);
840
+ return y.has(a.id) ? (y.delete(a.id), Array.from(y)) : x;
839
841
  });
840
842
  } else if (a.type === "update") {
841
843
  const b = c.current.get(a.id);
842
844
  if (!b) return;
843
- c.current.set(a.id, { ...b, ...a.config }), m((v) => v + 1);
845
+ c.current.set(a.id, { ...b, ...a.config }), m((x) => x + 1);
844
846
  }
845
847
  });
846
848
  }), []);
847
- const x = h.length;
849
+ const v = h.length;
848
850
  return /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n("ol", { className: s, style: i, "aria-live": "polite", children: h.map((a, b) => {
849
- const v = c.current.get(a);
850
- if (!v) return null;
851
- const { className: y, duration: I, ...C } = v;
851
+ const x = c.current.get(a);
852
+ if (!x) return null;
853
+ const { className: y, duration: I, ...C } = x;
852
854
  return /* @__PURE__ */ n(
853
855
  Ze,
854
856
  {
855
857
  id: a,
856
- index: x - b,
858
+ index: v - b,
857
859
  className: y,
858
860
  duration: I,
859
861
  inverted: u,
@@ -955,7 +957,7 @@ function ct(e) {
955
957
  }
956
958
  ) });
957
959
  }
958
- function dt(e) {
960
+ function ut(e) {
959
961
  return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
960
962
  /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
961
963
  /* @__PURE__ */ n("circle", { cx: "15", cy: "15", r: "15", stroke: "none" }),
@@ -970,7 +972,7 @@ function dt(e) {
970
972
  )
971
973
  ] });
972
974
  }
973
- function ut(e) {
975
+ function dt(e) {
974
976
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: /* @__PURE__ */ n(
975
977
  "path",
976
978
  {
@@ -993,7 +995,7 @@ export {
993
995
  et as Dialog,
994
996
  lt as Divider,
995
997
  Ye as FormField,
996
- xe as FormLabel,
998
+ ve as FormLabel,
997
999
  G as IconAlert,
998
1000
  Te as IconApproved,
999
1001
  Ne as IconArrowDown,
@@ -1004,8 +1006,8 @@ export {
1004
1006
  at as IconFileRound,
1005
1007
  ct as IconPencil,
1006
1008
  ft as IconPlus,
1007
- ut as IconRefresh,
1008
- dt as IconUser,
1009
+ dt as IconRefresh,
1010
+ ut as IconUser,
1009
1011
  ye as Input,
1010
1012
  qe as InputField,
1011
1013
  rt as Placeholder,
@@ -1023,6 +1025,6 @@ export {
1023
1025
  Je as Tooltip,
1024
1026
  gt as clsx,
1025
1027
  N as merge,
1026
- de as toast,
1028
+ ue as toast,
1027
1029
  Be as varientButton
1028
1030
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "visits-style",
3
3
  "repository": "https://github.com/visits-works/visits-style",
4
4
  "homepage": "https://github.com/visits-works/visits-style",
5
- "version": "2.0.6",
5
+ "version": "2.0.7",
6
6
  "description": "VISITS Technologiesのreactデザインコンポーネント",
7
7
  "type": "module",
8
8
  "main": "./dist/index.cjs.js",
@@ -27,8 +27,8 @@
27
27
  "tailwindcss": ">=4"
28
28
  },
29
29
  "dependencies": {
30
- "@floating-ui/react": "^0.27.4",
30
+ "@floating-ui/react": "^0.27.8",
31
31
  "clsx": "^2.1.1",
32
- "tailwind-merge": "^3.0.2"
32
+ "tailwind-merge": "^3.3.0"
33
33
  }
34
34
  }