sodtrack-web-ui 0.49.1 → 0.50.1
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/{chunk-XKAWYIAQ.mjs → chunk-5UJVYIVN.mjs} +1 -1
- package/dist/{chunk-GSFJI6ZQ.mjs → chunk-FGMEWKU3.mjs} +1 -1
- package/dist/{chunk-4HUMCLHB.mjs → chunk-HWLLVJWJ.mjs} +1 -1
- package/dist/{chunk-RUBXXCVF.mjs → chunk-JDBAUMA2.mjs} +1 -1
- package/dist/{chunk-3CFE6AGW.mjs → chunk-ORFPBGHG.mjs} +1 -1
- package/dist/{chunk-OZ3MMHWQ.mjs → chunk-PL44ZCIA.mjs} +1 -1
- package/dist/chunk-QHBCNAWO.mjs +1 -0
- package/dist/{chunk-6Y5TR5PD.mjs → chunk-WGOFOREW.mjs} +1 -1
- package/dist/chunk-YF6MY4ZO.mjs +1 -0
- package/dist/{chunk-2NVW6WMW.mjs → chunk-ZJOF2Z6O.mjs} +1 -1
- package/dist/common.css +1 -0
- package/dist/country-text-field.mjs +1 -1
- package/dist/data-table.mjs +1 -1
- package/dist/dialog.mjs +1 -1
- package/dist/drawer-sticky.d.mts +49 -0
- package/dist/drawer-sticky.d.ts +49 -0
- package/dist/drawer-sticky.js +58 -0
- package/dist/drawer-sticky.mjs +1 -0
- package/dist/drawer.mjs +1 -1
- package/dist/flag-select.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/list-item-arrow.css +1 -1
- package/dist/list-item-arrow.mjs +1 -1
- package/dist/list-item-checkbox.css +1 -1
- package/dist/list-item-checkbox.mjs +1 -1
- package/dist/list-item.css +1 -1
- package/dist/list-item.mjs +1 -1
- package/dist/scrollarea.d.mts +2 -1
- package/dist/scrollarea.d.ts +2 -1
- package/dist/scrollarea.mjs +1 -1
- package/dist/select.mjs +1 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/time-picker.mjs +1 -1
- package/package.json +2 -1
- package/dist/chunk-JGL2V7EX.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {a as a$2}from'./chunk-WGMDH4XX.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {d}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as r from'react';import*as t from'@radix-ui/react-dialog';export{t as a };import {jsx,jsxs}from'react/jsx-runtime';var E=t.Root,H=t.Trigger,v=t.Portal,P=t.Close,f=r.forwardRef(({className:e,...i},l)=>jsx(t.Overlay,{ref:l,className:a("fixed inset-0 z-50 bg-neutral-900/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...i}));f.displayName=t.Overlay.displayName;var u=r.forwardRef(({className:e,children:i,onPointerDownOutside:l,...g},D)=>jsx(v,{children:jsx(f,{children:jsx(t.Content,{onPointerDownOutside:s=>{s.target instanceof Element&&s.target.closest(".pac-container")&&s.preventDefault(),l?.(s);},ref:D,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 pr-0 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...g,children:jsx(a$1,{className:"max-h-[80vh]",viewPortClassName:"py-3 ",children:i})})})}));u.displayName=t.Content.displayName;var y=({className:e,...i})=>jsx("div",{className:a("mb-4 ml-6 mr-4 flex flex-col gap-4 text-left",e),...i});y.displayName="DialogHeader";var R=({className:e,...i})=>jsxs("div",{children:[jsx(a$2,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...i})]});R.displayName="DialogFooter";var O=({className:e,...i})=>jsx("div",{className:a("mb-4.5 mx-6",e),...i}),N=r.forwardRef(({className:e,...i},l)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(t.Title,{ref:l,className:a("pr-2 font-jakarta text-lg font-semibold leading-[160%]",e),...i}),jsxs(t.Close,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));N.displayName=t.Title.displayName;var C=r.forwardRef(({className:e,...i},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm font-normal leading-[130%]",e),...i}));C.displayName=t.Description.displayName;var A=e=>jsx(c,{variant:"contained",...e}),F=e=>jsx(P,{asChild:!0,children:jsx(c,{variant:"secondary",...e})}),L=e=>jsx(c,{variant:"ghost",...e});export{E as b,H as c,v as d,f as e,u as f,y as g,R as h,O as i,N as j,C as k,A as l,F as m,L as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$3}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$3}from'./chunk-QHBCNAWO.mjs';import {o}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as S from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var U=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],i=56,d=6,V=({value:f,onChange:P,locale:g,minTime:T,maxTime:v,...N})=>{let[O,u]=useState(!1),[p,h]=useState(f),[n,y]=useState(),[z,A]=useState("bottom"),E=useRef(null),o$1=useRef(null),x=useRef(null),[l,c]=useState(-1),k=e=>{h(e),P?.(e),u(!1),c(-1);},B=useMemo(()=>p?format(new Date("2024-01-01T"+p),"p"):"",[p,g]),K=()=>{h(void 0),c(-1),P?.(void 0);},r=useMemo(()=>U.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:T&&e<T||v&&e>v})),[g,T,v]),_=e=>{if(e.preventDefault(),e.key==="ArrowDown"){if(l===r.length-1)return;c(t=>t+1),u(!0),L();}else if(e.key==="ArrowUp"){if(l===0)return;c(t=>t-1),L();}else e.key==="Enter"&&(k(r[l].value),c(-1));},L=()=>{let e=i*d;x.current.scroll({top:(l+2)*i<=e?0:i*(l+2)-e,behavior:"smooth"});};return useEffect(()=>{h(f);},[f]),a(E,()=>{u(!1);}),useEffect(()=>{if(!o$1.current)return;let e=()=>{if(!o$1.current)return;let t=i*(r.length<d?r.length:d)+16,m=o$1.current.getBoundingClientRect();y(m);let $=window.innerHeight-m.bottom>t,G=m.top+m.height>t;A($?"bottom":G?"top":"bottom");};return e(),o$1.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o$1.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o$1.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:o$1,autoComplete:"off",startIcon:jsx(o,{}),onClean:K,readOnly:!0,value:B,onKeyDown:_,onClick:e=>{y(e.currentTarget.getBoundingClientRect()),u(t=>!t);},...N}),jsx(S.Root,{children:jsx("div",{ref:E,className:a$2("pointer-events-auto fixed z-50 hidden",O&&"block"),style:n?{width:`${n.width}px`,top:z==="bottom"?`${n.height+n.top}px`:n.top-(r.length<d?r.length:d)*i-16,left:n?.left}:void 0,children:jsx(a$3,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:r.map((e,t)=>jsx("div",{onClick:()=>!e.disabled&&k(e.value),className:a$2("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",p===e.value&&"bg-primary-200",l===t&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:i},children:e.label},e.value))})})})]})};V.displayName="TimePicker";export{V as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-5UJVYIVN.mjs';import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as t from'@radix-ui/react-dialog';import*as v from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],h=({...r})=>jsx(t.Root,{...r});h.displayName="Drawer";var j=t.Trigger,B=t.Portal,k=t.Close,x=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...a$1}));x.displayName=t.Overlay.displayName;var A=s.forwardRef(({className:r,size:a$3="sm",title:o,description:i,children:f,isLoading:c=!1,loadingText:n="",buttons:d,hideHeader:D=!1,onPointerDownOutside:b,...H},T)=>jsx(B,{children:jsx(x,{children:jsx(t.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),b?.(m);},ref:T,...!i||D?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col bg-neutral-50",a$3==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$3==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$3==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$3==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...H,children:jsxs(a$1,{className:"h-full",viewPortClassName:"pr-8 pt-10 pl-6",children:[D?jsx(v.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:d}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:c?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$2,{}),n&&jsx("p",{children:n})]}):f})]})})})}));A.displayName="DrawerContent";var N=({className:r,title:a$1,description:o,buttons:i=[],...f})=>jsxs("div",{className:a("mb-7",r),...f,children:[jsxs("div",{className:"flex justify-between gap-2",children:[a$1&&jsx(C,{children:a$1}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:c=!0,...n},d)=>c?jsx(c$1,{variant:"ghost",size:"sm",...n},d):null)})]}),o&&jsx(P,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});O.displayName="DrawerFooter";var C=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));C.displayName=t.Title.displayName;var P=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));P.displayName=t.Description.displayName;export{V as a,h as b,j as c,B as d,k as e,x as f,A as g,N as h,O as i,C as j,P as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3,b,c,d,e,f,g as g$1,h,i}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$3,b,c,d,e,f,g as g$1,h,i}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-QHBCNAWO.mjs';import {g}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import Q,{useId,useRef,useState,useEffect}from'react';import*as A from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var H=56,p=6,Z=[{id:0,code:"+56",name:"Chile",flag:a$3,country:"CL"},{id:1,code:"+54",name:"Argentina",flag:b,country:"AR"},{id:2,code:"+57",name:"Colombia",flag:c,country:"CO"},{id:3,code:"+502",name:"Guatemala",flag:d,country:"GT"},{id:4,code:"+52",name:"Mexico",flag:e,country:"MX"},{id:5,code:"+51",name:"Per\xFA",flag:f,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:g$1,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:h,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:i,country:"US"}],we=({options:o=Z,noResults:y,selectedOption:B,onSelect:U,onChange:h,onClick:ee,className:G,defaultCountry:v="CL",initialValue:s,size:$="md",...i})=>{let z=useId(),c=useRef(null),l=useRef(null),D=useRef(null),[Y,_]=useState("bottom"),[d,V]=useState(),[X,j]=useState(-1),[a$3,x]=useState(B??null),[E,F]=useState(""),q=e=>{let t={target:{value:e.code+E}};h?.(t),c.current.style.display="none",l.current.value=e.code,x(e),U?.(e);};return useEffect(()=>{if(!l.current)return;let e=()=>{if(!l.current)return;let t=H*(o.length<p?o.length:p)+16,m=l.current.getBoundingClientRect();V(m);let J=window.innerHeight-m.bottom>t,K=m.top>t;_(J?"bottom":K?"top":"bottom");};return e(),l.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{l.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[l.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",j(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[c.current]),useEffect(()=>{if(v&&!s){let e=o.find(t=>t.country===v)??null;x(e);}},[v,s]),useEffect(()=>{if(s){let e=o.find(t=>s.includes(t.code))??null;x(e),F(s.replace(e?.code??"",""));}},[s]),jsx("div",{className:a("flex flex-col",G),children:jsxs("div",{className:a("relative flex flex-col"),children:[jsx(a$1,{ref:l,value:E,placeholder:i.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");F(t);let m={target:{value:a$3?.code&&!t.includes(a$3.code)?a$3?.code+t:t}};h?.(m);},startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{i.disabled||(c.current.style.display="flex");},children:[jsx("img",{src:a$3?.flag,alt:a$3?.country,className:a("h-6 w-6 cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a("ml-1",i.disabled&&"cursor-not-allowed text-neutral-400"),children:a$3?.code}),jsx(g,{className:a($==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")})]}),...i}),jsx(A.Root,{asChild:!0,children:jsx("ul",{ref:c,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:d?{width:`${d.width}px`,left:d.left,top:Y==="bottom"?`${d.height+d.top+window.scrollY}px`:window.scrollY+d.top-(o.length<p?o.length:p)*H-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:D,children:[o.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[Q.cloneElement(y.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:y.message})]}),o.map((e,t)=>jsx("li",{onClick:()=>{q(e);},className:a("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",a$3?.code===e.code&&"bg-primary-200",X===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a("flex items-center space-x-3"),children:[jsx("img",{src:e.flag,alt:e.country,className:"h-6 w-6"}),jsx("p",{children:e.name}),jsx("p",{className:"text-primary-500",children:`(${e.code})`})]})},`select-option-${z}-${e.id??e.code}`))]})})})]})})};export{we as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-2GJHRBSH.mjs';import {a}from'./chunk-JGL2V7EX.mjs';import {b}from'./chunk-UGGS6W5K.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="md",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),C=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{C.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),C?.current){let O=C.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(C,()=>{C.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{C.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:C,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{t.disabled||(a?.current?.value&&n.preventDefault(),r?.(t,n));},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="md",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:C,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(L=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===L.value);return $===-1?(S=P.concat(L),r?.(L,S),S):(S=P.toSpliced($,1),r?.(L,S),S)});},[r]),U=useCallback(()=>{N([]),C(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let L=d.current.getBoundingClientRect();nt(L);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-L.bottom>P,$=L.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-L.bottom>E?E:window.innerHeight-L.bottom);},[H?.height]),Q=useCallback(()=>{let L=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(C(L),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{C(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
|
|
1
|
+
import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-2GJHRBSH.mjs';import {a}from'./chunk-QHBCNAWO.mjs';import {b}from'./chunk-UGGS6W5K.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="md",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),C=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{C.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),C?.current){let O=C.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(C,()=>{C.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{C.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:C,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{t.disabled||(a?.current?.value&&n.preventDefault(),r?.(t,n));},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="md",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:C,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(L=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===L.value);return $===-1?(S=P.concat(L),r?.(L,S),S):(S=P.toSpliced($,1),r?.(L,S),S)});},[r]),U=useCallback(()=>{N([]),C(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let L=d.current.getBoundingClientRect();nt(L);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-L.bottom>P,$=L.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-L.bottom>E?E:window.innerHeight-L.bottom);},[H?.height]),Q=useCallback(()=>{let L=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(C(L),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{C(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-QHBCNAWO.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import $,{useId,useRef,useState,useEffect}from'react';import*as R from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=56,u=6,q=({options:n,noResults:w,selectedOption:L,onSelect:P,onChange:C,onClick:T,className:k,...I})=>{let N=useId(),l=useRef(null),o=useRef(null),g=useRef(null),[H,M]=useState("bottom"),[r,F]=useState(),[s,c]=useState(-1),[h,y]=useState(L??null),b=e=>{l.current.style.display="none",o.current.value=e.label,y(e),P?.(e);},A=e=>{if(e.key==="ArrowDown"){if(s===n.length-1)return;c(t=>t+1),l.current.style.display="flex",x();}else if(e.key==="ArrowUp"){if(s===0)return;c(t=>t-1),x();}else e.key==="Enter"&&(b(n[s]),c(-1));},x=()=>{let e=i*u;g.current.scroll({top:(s+2)*i<=e?0:i*(s+2)-e,behavior:"smooth"});};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=i*(n.length<u?n.length:u)+16,m=o.current.getBoundingClientRect();F(m);let B=window.innerHeight-m.bottom>t,D=m.top>t;M(B?"bottom":D?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){l.current&&!l.current.contains(t.target)&&(l.current.style.display="none",c(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[l.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",k),readOnly:!0,ref:o,autoComplete:"off",list:"",selectMode:!0,value:h?.label,showClearButton:!1,onClick:e=>{l.current.style.display="flex",T?.(e);},onChange:e=>{c(-1),y(null),C?.(e);},onKeyDown:A,...I}),jsx(R.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:r?{width:`${r.width}px`,left:r.left,top:H==="bottom"?`${r.height+r.top+window.scrollY}px`:window.scrollY+r.top-(n.length<u?n.length:u)*i-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:g,children:[n.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[$.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),n.map((e,t)=>jsx("li",{onClick:()=>{b(e);},className:a$1("w-full flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",h?.value===e.value&&"bg-primary-200",s===t&&"bg-primary-200"),children:e.label},`select-option-${N}-${e.key??e.value}`))]})})})]})};export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-2WINTZSS.mjs';import*as e from'@radix-ui/react-scroll-area';import {forwardRef,useRef,useEffect,useImperativeHandle}from'react';import {jsxs,jsx}from'react/jsx-runtime';var b=forwardRef(({className:c,children:r,onScrollEnd:a$1,isInfiniteScroll:o=!1,viewPortClassName:v,viewPortStyle:S,...A},p)=>{let l=useRef(null);return useEffect(()=>{if(!o)return;let s=()=>{if(l.current){let{scrollTop:u,scrollHeight:P,clientHeight:R}=l.current;u+R>=P-10&&a$1?.();}},m=l.current;return m?.addEventListener("scroll",s),()=>{m?.removeEventListener("scroll",s);}},[a$1,o]),useImperativeHandle(p,()=>l.current,[l]),jsxs(e.Root,{className:a("relative overflow-hidden",c),...A,children:[jsx(e.Viewport,{ref:l,className:a("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",v),style:S,children:r}),jsx(f,{forceMount:o},o?l.current?.scrollHeight:1),jsx(e.Corner,{})]})});b.displayName=e.Root.displayName;var f=forwardRef(({className:c,orientation:r="vertical",...a$1},o)=>jsx(e.ScrollAreaScrollbar,{ref:o,orientation:r,className:a("flex touch-none select-none bg-neutral-100 transition-colors",r==="vertical"&&"h-full w-4 py-2",r==="horizontal"&&"h-4 flex-col px-2",c),...a$1,children:jsx(e.ScrollAreaThumb,{className:a("relative flex-1 rounded bg-primary-500",r==="vertical"&&"mx-1 w-2",r==="horizontal"&&"my-1 h-2")})}));f.displayName=e.ScrollAreaScrollbar.displayName;export{b as a,f as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a
|
|
1
|
+
import {a as a$1,b as b$1,c,g,h,d,e as e$1,i,j,f}from'./chunk-A5A22HEL.mjs';import {a,b as b$2}from'./chunk-XNOZYNRE.mjs';import {a as a$2,b}from'./chunk-QHBCNAWO.mjs';import {e}from'./chunk-TYHJTIAW.mjs';import {useMemo}from'react';import {useReactTable,getCoreRowModel,getPaginationRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function se({columns:z,data:m,rowsCount:l,pagination:i$1,onPaginationChange:d$1,noResults:H,rowsPerPageText:I="Rows per page",ofText:k="of",onNextPageClick:M,onPreviousPageClick:B,disableNextPage:T,disablePreviousPage:p,className:O,onRowsPerPageChange:A,columnOrder:V,columnVisibility:L,rowsPerPageOptions:F,...G}){let o=useReactTable({data:m,columns:z,rowCount:l,state:{pagination:i$1,columnOrder:V,columnVisibility:L},onPaginationChange:d$1,manualPagination:!0,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),$=useMemo(()=>p||!!l&&!o.getCanPreviousPage(),[p,l,i$1?.pageIndex]),E=useMemo(()=>T||!!l&&!o.getCanNextPage(),[T,l,i$1?.pageIndex]);return o.getRowModel().rows?.length?jsx(a,{children:jsxs(a$1,{className:O,...G,children:[jsxs(a$2,{children:[jsx(b,{orientation:"horizontal",className:"z-10"}),jsxs(b$1,{className:"mb-3",children:[jsx("colgroup",{children:o.getHeaderGroups()[0].headers.map(a=>{let t=a.column.getSize()/o.getHeaderGroups()[0].headers.reduce((n,W)=>n+W.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${t}%`,minWidth:`${a.column.getSize()}px`}},a.id)})}),jsx(c,{children:o.getHeaderGroups().map(a=>jsx(g,{children:a.headers.map(t=>{let n=t.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[t.isPlaceholder?null:jsx(b$2,{content:flexRender(n.header,t.getContext()),className:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1",children:flexRender(n.header,t.getContext())})}),n.headerInfoTooltip&&jsx(b$2,{size:n.headerInfoTooltipSize,content:n.headerInfoTooltip,className:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] flex-shrink-0"})})]})},t.id)})},a.id))}),jsx(d,{children:o.getRowModel().rows.map(a=>jsx(e$1,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(t=>jsx(i,{children:flexRender(t.column.columnDef.cell,t.getContext())},t.id))},a.id))})]})]}),i$1&&d$1&&m.length>0&&jsx(j,{rowsPerPageOptions:F,rowsCount:l,pagination:i$1,onRowsPerPageChange:a=>{o.setPageSize(a),o.setPageIndex(0),A?.(a);},onPreviousPageClick:()=>{o.previousPage(),B?.();},onNextPageClick:()=>{o.nextPage(),M?.();},disableNextPage:E,disablePreviousPage:$,ofText:k,rowsPerPageText:I})]})}):jsx(f,{...H})}export{se as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {d}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';var z=forwardRef(({onOpenChange:i,...a},r)=>jsx(Dialog.Root,{onOpenChange:t=>i?.(t.open),trapFocus:!1,...a,ref:r})),I=Dialog.Trigger,j=["sm","md","lg","xl"],F=forwardRef(({children:i,className:a$1,size:r="sm",...t},n)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"fixed inset-0 z-40 bg-neutral-900/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsx(Dialog.Positioner,{className:"fixed left-0 top-0 z-40 flex h-screen w-screen items-center justify-end",children:jsx(Dialog.Content,{ref:n,className:a("elevation-10 h-full bg-neutral-50 data-[state=closed]:animate-swipeOut data-[state=open]:animate-slideIn",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",a$1),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:i})})})]})),W=forwardRef(({children:i,className:a$1,title:r,buttons:t=[],description:n,...g},D)=>jsxs("div",{className:a("border-b-1 border-neutral-200 pb-3.75 pl-4.5 pt-2",a$1),ref:D,...g,children:[jsx(Dialog.CloseTrigger,{asChild:!0,children:jsx(d,{className:"ml-auto mr-2 size-6 cursor-pointer"})}),jsxs("div",{className:"mr-4.5 mt-2 flex items-center justify-between gap-4.5",children:[jsx(Dialog.Title,{className:"line-clamp-1 break-all font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...t}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:u=!0,...y},v)=>u?jsx(c$1,{variant:"ghost",size:"sm",...y},v):null)})]}),n&&jsx(Dialog.Description,{className:"mr-4.5 mt-1 line-clamp-2 break-all font-inter text-sm leading-[130%] text-neutral-900",children:n})]})),X=forwardRef(({children:i,className:a$1,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pb-4.5 pt-4.25",a$1),ref:t,...r,children:i})),q=forwardRef(({children:i,className:a$2,...r},t)=>jsxs(a$1,{viewPortClassName:"py-4 px-6",className:a("h-full",a$2),ref:t,...r,children:[i,jsx("div",{className:"min-h-4"})]})),G=Dialog.CloseTrigger;export{z as a,I as b,j as c,F as d,W as e,X as f,q as g,G as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-E5G7444M.mjs';import {a as a$3}from'./chunk-2GJHRBSH.mjs';import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-E5G7444M.mjs';import {a as a$3}from'./chunk-2GJHRBSH.mjs';import {a as a$4}from'./chunk-QHBCNAWO.mjs';import {g as g$1}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import V,{useId,useRef,useState,useEffect,useMemo}from'react';import*as S from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var M=56,p=6,K=(o=>(o.CL="CL",o.AR="AR",o.CO="CO",o.GT="GT",o.MX="MX",o.PE="PE",o.BR="BR",o.UY="UY",o.US="US",o))(K||{}),I=new Map([["CL",{name:"Chile",flag:a}],["AR",{name:"Argentina",flag:b}],["CO",{name:"Colombia",flag:c}],["GT",{name:"Guatemala",flag:d}],["MX",{name:"Mexico",flag:e}],["PE",{name:"Per\xFA",flag:f}],["BR",{name:"Brasil",flag:g}],["UY",{name:"Uruguay",flag:h}],["US",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(I.entries()),ge=({noResults:x,selectedCountry:d,onSelect:A,className:U,size:B="md",...m})=>{let H=useId(),l=useRef(null),r=useRef(null),o=useRef(null),[G,Y]=useState("bottom"),[s,$]=useState(),[k,z]=useState(-1),X=e=>{l.current.style.display="none",A?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=M*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();$(c);let _=window.innerHeight-c.bottom>a,D=c.top>a;Y(_?"bottom":D?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",z(-1));});let w=useMemo(()=>I.get(d),[d]);return jsx("div",{className:a$2("flex flex-col",U),children:jsxs("div",{className:a$2("relative flex flex-col"),children:[jsx(a$3,{ref:r,startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{m.disabled||(l.current.style.display="flex");},children:[jsx("img",{src:w?.flag,alt:w?.name,className:a$2("h-6 w-6 cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$2("ml-1",m.disabled&&"cursor-not-allowed text-neutral-400"),children:d}),jsx(g$1,{className:a$2(B==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")})]}),...m}),jsx(S.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:s?{width:`${s.width}px`,left:s.left,top:G==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*M-16}:void 0,children:jsxs(a$4,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:o,children:[i.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[V.cloneElement(x.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:x.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{X(e);},className:a$2("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",d===e&&"bg-primary-200",k===c&&"bg-primary-200"),children:jsxs("div",{className:a$2("flex items-center space-x-3"),children:[jsx("img",{src:a.flag,alt:a.name,className:"h-6 w-6"}),jsx("p",{children:a.name}),jsx("p",{className:"text-primary-500",children:`(${e})`})]})},`select-option-${H}-${e}`))]})})})]})})};export{K as a,ge as b};
|
package/dist/common.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CountryEnum,b as CountryTextField}from'./chunk-
|
|
1
|
+
export{a as CountryEnum,b as CountryTextField}from'./chunk-ZJOF2Z6O.mjs';import'./chunk-KTRSJBA4.mjs';import'./chunk-E5G7444M.mjs';import'./chunk-2GJHRBSH.mjs';import'./chunk-SVUSHVWV.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|
package/dist/data-table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataTable}from'./chunk-
|
|
1
|
+
export{a as DataTable}from'./chunk-WGOFOREW.mjs';import'./chunk-A5A22HEL.mjs';import'./chunk-XNOZYNRE.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|
package/dist/dialog.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as Dialog,l as DialogActionButton,i as DialogBody,m as DialogCloseButton,f as DialogContent,k as DialogDescription,n as DialogExtraButton,h as DialogFooter,g as DialogHeader,e as DialogOverlay,d as DialogPortal,a as DialogPrimitive,j as DialogTitle,c as DialogTrigger}from'./chunk-
|
|
1
|
+
export{b as Dialog,l as DialogActionButton,i as DialogBody,m as DialogCloseButton,f as DialogContent,k as DialogDescription,n as DialogExtraButton,h as DialogFooter,g as DialogHeader,e as DialogOverlay,d as DialogPortal,a as DialogPrimitive,j as DialogTitle,c as DialogTrigger}from'./chunk-5UJVYIVN.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-WGMDH4XX.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { PropsWithChildren, HTMLAttributes } from 'react';
|
|
4
|
+
import { DialogRootProps, DialogContentProps } from '@ark-ui/react/dialog';
|
|
5
|
+
import { IconButtonProps } from './icon-button.mjs';
|
|
6
|
+
import { ButtonProps } from './button.mjs';
|
|
7
|
+
import 'tailwind-variants';
|
|
8
|
+
import 'lucide-react';
|
|
9
|
+
|
|
10
|
+
declare const DrawerSticky: React.ForwardRefExoticComponent<DialogRootProps & {
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DrawerStickyTrigger: any;
|
|
14
|
+
declare const DrawerStickySizes: readonly ["sm", "md", "lg", "xl"];
|
|
15
|
+
type DrawerStickyContentProps = DialogContentProps & PropsWithChildren & {
|
|
16
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
17
|
+
size?: (typeof DrawerStickySizes)[number];
|
|
18
|
+
};
|
|
19
|
+
declare const DrawerStickyContent: React.ForwardRefExoticComponent<DialogContentProps & {
|
|
20
|
+
children?: React.ReactNode | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
23
|
+
size?: (typeof DrawerStickySizes)[number];
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
type DrawerStickyHeaderButtons = (IconButtonProps & {
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
})[] | (ButtonProps & {
|
|
28
|
+
visible?: boolean;
|
|
29
|
+
});
|
|
30
|
+
type DrawerStickyHeaderProps = {
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
buttons?: DrawerStickyHeaderButtons;
|
|
34
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description">;
|
|
35
|
+
declare const DrawerStickyHeader: React.ForwardRefExoticComponent<{
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
buttons?: DrawerStickyHeaderButtons;
|
|
39
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const DrawerStickyFooter: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const DrawerStickyBody: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
42
|
+
onScrollEnd?: () => void;
|
|
43
|
+
isInfiniteScroll?: boolean;
|
|
44
|
+
viewPortClassName?: HTMLAttributes<HTMLDivElement>["className"];
|
|
45
|
+
viewPortStyle?: HTMLAttributes<HTMLDivElement>["style"];
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const DrawerStickyCloseTrigger: any;
|
|
48
|
+
|
|
49
|
+
export { DrawerSticky, DrawerStickyBody, DrawerStickyCloseTrigger, DrawerStickyContent, type DrawerStickyContentProps, DrawerStickyFooter, DrawerStickyHeader, type DrawerStickyHeaderProps, DrawerStickySizes, DrawerStickyTrigger };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { PropsWithChildren, HTMLAttributes } from 'react';
|
|
4
|
+
import { DialogRootProps, DialogContentProps } from '@ark-ui/react/dialog';
|
|
5
|
+
import { IconButtonProps } from './icon-button.js';
|
|
6
|
+
import { ButtonProps } from './button.js';
|
|
7
|
+
import 'tailwind-variants';
|
|
8
|
+
import 'lucide-react';
|
|
9
|
+
|
|
10
|
+
declare const DrawerSticky: React.ForwardRefExoticComponent<DialogRootProps & {
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DrawerStickyTrigger: any;
|
|
14
|
+
declare const DrawerStickySizes: readonly ["sm", "md", "lg", "xl"];
|
|
15
|
+
type DrawerStickyContentProps = DialogContentProps & PropsWithChildren & {
|
|
16
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
17
|
+
size?: (typeof DrawerStickySizes)[number];
|
|
18
|
+
};
|
|
19
|
+
declare const DrawerStickyContent: React.ForwardRefExoticComponent<DialogContentProps & {
|
|
20
|
+
children?: React.ReactNode | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
23
|
+
size?: (typeof DrawerStickySizes)[number];
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
type DrawerStickyHeaderButtons = (IconButtonProps & {
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
})[] | (ButtonProps & {
|
|
28
|
+
visible?: boolean;
|
|
29
|
+
});
|
|
30
|
+
type DrawerStickyHeaderProps = {
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
buttons?: DrawerStickyHeaderButtons;
|
|
34
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description">;
|
|
35
|
+
declare const DrawerStickyHeader: React.ForwardRefExoticComponent<{
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
buttons?: DrawerStickyHeaderButtons;
|
|
39
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const DrawerStickyFooter: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const DrawerStickyBody: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
42
|
+
onScrollEnd?: () => void;
|
|
43
|
+
isInfiniteScroll?: boolean;
|
|
44
|
+
viewPortClassName?: HTMLAttributes<HTMLDivElement>["className"];
|
|
45
|
+
viewPortStyle?: HTMLAttributes<HTMLDivElement>["style"];
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const DrawerStickyCloseTrigger: any;
|
|
48
|
+
|
|
49
|
+
export { DrawerSticky, DrawerStickyBody, DrawerStickyCloseTrigger, DrawerStickyContent, type DrawerStickyContentProps, DrawerStickyFooter, DrawerStickyHeader, type DrawerStickyHeaderProps, DrawerStickySizes, DrawerStickyTrigger };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';var dialog=require('@ark-ui/react/dialog'),portal=require('@ark-ui/react/portal'),Me=require('react'),tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime'),P=require('@radix-ui/react-scroll-area');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Me__default=/*#__PURE__*/_interopDefault(Me);var P__namespace=/*#__PURE__*/_interopNamespace(P);function fe(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(a=0;a<r;a++)e[a]&&(t=fe(e[a]))&&(o&&(o+=" "),o+=t);}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function ie(){for(var e,a,t=0,o="",r=arguments.length;t<r;t++)(e=arguments[t])&&(a=fe(e))&&(o&&(o+=" "),o+=a);return o}var $="-",Fe=e=>{let a=Re(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:d=>{let u=d.split($);return u[0]===""&&u.length!==1&&u.shift(),pe(u,a)||ve(d)},getConflictingClassGroupIds:(d,u)=>{let f=t[d]||[];return u&&o[d]?[...f,...o[d]]:f}}},pe=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),r=o?pe(e.slice(1),o):void 0;if(r)return r;if(a.validators.length===0)return;let l=e.join($);return a.validators.find(({validator:d})=>d(l))?.classGroupId},ne=/^\[(.+)\]$/,ve=e=>{if(ne.test(e)){let a=ne.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return "arbitrary.."+t}},Re=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return qe(Object.entries(e.classGroups),t).forEach(([l,d])=>{_(d,o,l,a);}),o},_=(e,a,t,o)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?a:ce(a,r);l.classGroupId=t;return}if(typeof r=="function"){if(Te(r)){_(r(o),a,t,o);return}a.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([l,d])=>{_(d,ce(a,l),t,o);});});},ce=(e,a)=>{let t=e;return a.split($).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o);}),t},Te=e=>e.isThemeGetter,qe=(e,a)=>a?e.map(([t,o])=>{let r=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([d,u])=>[a+d,u])):l);return [t,r]}):e,Ue=e=>{if(e<1)return {get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,r=(l,d)=>{t.set(l,d),a++,a>e&&(a=0,o=t,t=new Map);};return {get(l){let d=t.get(l);if(d!==void 0)return d;if((d=o.get(l))!==void 0)return r(l,d),d},set(l,d){t.has(l)?t.set(l,d):r(l,d);}}},me="!",Oe=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,r=a[0],l=a.length,d=u=>{let f=[],i=0,p=0,I;for(let m=0;m<u.length;m++){let x=u[m];if(i===0){if(x===r&&(o||u.slice(m,m+l)===a)){f.push(u.slice(p,m)),p=m+l;continue}if(x==="/"){I=m;continue}}x==="["?i++:x==="]"&&i--;}let g=f.length===0?u:u.substring(p),w=g.startsWith(me),C=w?g.substring(1):g,L=I&&I>p?I-p:void 0;return {modifiers:f,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:L}};return t?u=>t({className:u,parseClassName:d}):d},He=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o);}),a.push(...t.sort()),a},Ge=e=>({cache:Ue(e.cacheSize),parseClassName:Oe(e),...Fe(e)}),ze=/\s+/,Ee=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:r}=a,l=[],d=e.trim().split(ze),u="";for(let f=d.length-1;f>=0;f-=1){let i=d[f],{modifiers:p,hasImportantModifier:I,baseClassName:g,maybePostfixModifierPosition:w}=t(i),C=!!w,L=o(C?g.substring(0,w):g);if(!L){if(!C){u=i+(u.length>0?" "+u:u);continue}if(L=o(g),!L){u=i+(u.length>0?" "+u:u);continue}C=!1;}let m=He(p).join(":"),x=I?m+me:m,b=x+L;if(l.includes(b))continue;l.push(b);let T=r(L,C);for(let F=0;F<T.length;++F){let E=T[F];l.push(x+E);}u=i+(u.length>0?" "+u:u);}return u};function Ve(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=Le(a))&&(o&&(o+=" "),o+=t);return o}var Le=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=Le(e[o]))&&(t&&(t+=" "),t+=a);return t};function We(e,...a){let t,o,r,l=d;function d(f){let i=a.reduce((p,I)=>I(p),e());return t=Ge(i),o=t.cache.get,r=t.cache.set,l=u,u(f)}function u(f){let i=o(f);if(i)return i;let p=Ee(f,t);return r(f,p),p}return function(){return l(Ve.apply(null,arguments))}}var n=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},xe=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ne=/^\d+\/\d+$/,Xe=new Set(["px","full","screen"]),Ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Je=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,je=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>v(e)||Xe.has(e)||Ne.test(e),B=e=>R(e,"length",la),v=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>R(e,"number",v),U=e=>!!e&&Number.isInteger(Number(e)),Ye=e=>e.endsWith("%")&&v(e.slice(0,-1)),s=e=>xe.test(e),M=e=>Ke.test(e),_e=new Set(["length","size","percentage"]),$e=e=>R(e,_e,Ie),ea=e=>R(e,"position",Ie),aa=new Set(["image","url"]),ta=e=>R(e,aa,ua),oa=e=>R(e,"",ra),O=()=>!0,R=(e,a,t)=>{let o=xe.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},la=e=>Ze.test(e)&&!Je.test(e),Ie=()=>!1,ra=e=>Qe.test(e),ua=e=>je.test(e);var da=()=>{let e=n("colors"),a=n("spacing"),t=n("blur"),o=n("brightness"),r=n("borderColor"),l=n("borderRadius"),d=n("borderSpacing"),u=n("borderWidth"),f=n("contrast"),i=n("grayscale"),p=n("hueRotate"),I=n("invert"),g=n("gap"),w=n("gradientColorStops"),C=n("gradientColorStopPositions"),L=n("inset"),m=n("margin"),x=n("opacity"),b=n("padding"),T=n("saturate"),F=n("scale"),E=n("sepia"),te=n("skew"),oe=n("space"),le=n("translate"),Z=()=>["auto","contain","none"],J=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",s,a],c=()=>[s,a],re=()=>["",A,B],V=()=>["auto",v,s],ue=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",s],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[v,s];return {cacheSize:500,separator:":",theme:{colors:[O],spacing:[A,B],blur:["none","",M,s],brightness:k(),borderColor:[e],borderRadius:["none","","full",M,s],borderSpacing:c(),borderWidth:re(),contrast:k(),grayscale:q(),hueRotate:k(),invert:q(),gap:c(),gradientColorStops:[e],gradientColorStopPositions:[Ye,B],inset:Q(),margin:Q(),opacity:k(),padding:c(),saturate:k(),scale:k(),sepia:q(),skew:k(),space:c(),translate:c()},classGroups:{aspect:[{aspect:["auto","square","video",s]}],container:["container"],columns:[{columns:[M]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ue(),s]}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",U,s]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",s]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",U,s]}],"grid-cols":[{"grid-cols":[O]}],"col-start-end":[{col:["auto",{span:["full",U,s]},s]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[O]}],"row-start-end":[{row:["auto",{span:[U,s]},s]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",s]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",s]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[oe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[oe]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",s,a]}],"min-w":[{"min-w":[s,a,"min","max","fit"]}],"max-w":[{"max-w":[s,a,"none","full","min","max","fit","prose",{screen:[M]},M]}],h:[{h:[s,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[s,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[s,a,"auto","min","max","fit"]}],"font-size":[{text:["base",M,B]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y]}],"font-family":[{font:[O]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",s]}],"line-clamp":[{"line-clamp":["none",v,Y]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",A,s]}],"list-image":[{"list-image":["none",s]}],"list-style-type":[{list:["none","disc","decimal",s]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",A,B]}],"underline-offset":[{"underline-offset":["auto",A,s]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ue(),ea]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$e]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ta]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:W()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[A,s]}],"outline-w":[{outline:[A,B]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[A,B]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",M,oa]}],"shadow-color":[{shadow:[O]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",M,s]}],grayscale:[{grayscale:[i]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[I]}],saturate:[{saturate:[T]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[I]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",s]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",s]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",s]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[U,s]}],"translate-x":[{"translate-x":[le]}],"translate-y":[{"translate-y":[le]}],"skew-x":[{"skew-x":[te]}],"skew-y":[{"skew-y":[te]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",s]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",s]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",s]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[A,B,Y]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ge=We(da);function h(...e){return ge(ie(e))}var ia=tailwindVariants.tv({slots:{container:"flex items-center justify-center font-inter text-base font-semibold ring-inset transition-all",icon:""},variants:{variant:{contained:{},secondary:{},outlined:{},ghost:{},standard:{}},size:{lg:{container:"h-12 w-12 rounded-lg",icon:"h-6 w-6"},md:{container:"h-10 w-10 rounded-lg",icon:"h-6 w-6"},sm:{container:"h-8 w-8 rounded-lg",icon:"h-4.5 w-4.5"},xs:{container:"h-5.5 w-5.5 rounded",icon:"h-4.5 w-4.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:!0,className:{container:"cursor-not-allowed text-neutral-400"}},{disabled:!1,className:{container:"cursor-pointer"}},{disabled:!1,variant:"contained",className:{container:"bg-primary-500 text-neutral-50 hover:bg-primary-600 focus:bg-primary-500 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-primary-700 active:ring-0"}},{disabled:!0,variant:"contained",className:{container:"bg-neutral-100 ring-0"}},{disabled:!1,variant:"secondary",className:{container:"text-primary-500 ring-[1.5px] ring-inset ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:bg-neutral-50/0 focus:text-primary-500 focus:ring-[3px] focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-[1.5px] active:ring-primary-700"}},{disabled:!0,variant:"secondary",className:{container:"ring-neutral-400 disabled:ring-[1.5px]"}},{disabled:!1,variant:"outlined",className:{container:"text-neutral-900 ring-[1.5px] ring-neutral-900 hover:bg-transparent-primary-20 focus:ring-[3px] active:bg-transparent-primary-40"}},{disabled:!0,variant:"outlined",className:{container:"text-neutral-400 ring-[1.5px] ring-neutral-400"}},{disabled:!1,variant:"ghost",className:{container:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-0"}},{disabled:!0,variant:"ghost",className:{container:""}},{disabled:!1,variant:"standard",className:{container:"text-neutral-900 hover:bg-transparent-primary-20 focus:bg-neutral-50 focus:bg-opacity-0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:ring-0"}},{disabled:!0,variant:"standard",className:{container:""}}],defaultVariants:{variant:"contained",size:"sm",disabled:!1}}),he=Me.forwardRef(({className:e,variant:a,disabled:t,Icon:o,size:r,type:l="button",...d},u)=>{let{container:f,icon:i}=ia({variant:a,size:r,disabled:t});return jsxRuntime.jsx("button",{ref:u,disabled:t,className:h(f(),e),type:l,...d,children:jsxRuntime.jsx(o,{className:i()})})});var Se=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();var we={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Pe=Me.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:r="",children:l,iconNode:d,...u},f)=>Me.createElement("svg",{ref:f,...we,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:N("lucide",r),...u},[...d.map(([i,p])=>Me.createElement(i,p)),...Array.isArray(l)?l:[l]]));var X=(e,a)=>{let t=Me.forwardRef(({className:o,...r},l)=>Me.createElement(Pe,{ref:l,iconNode:a,className:N(`lucide-${Se(e)}`,o),...r}));return t.displayName=`${e}`,t};var D=X("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var H=X("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ke=D;var Ae=H;var ee=Me.forwardRef(({className:e,children:a,onScrollEnd:t,isInfiniteScroll:o=!1,viewPortClassName:r,viewPortStyle:l,...d},u)=>{let f=Me.useRef(null);return Me.useEffect(()=>{if(!o)return;let i=()=>{if(f.current){let{scrollTop:I,scrollHeight:g,clientHeight:w}=f.current;I+w>=g-10&&t?.();}},p=f.current;return p?.addEventListener("scroll",i),()=>{p?.removeEventListener("scroll",i);}},[t,o]),Me.useImperativeHandle(u,()=>f.current,[f]),jsxRuntime.jsxs(P__namespace.Root,{className:h("relative overflow-hidden",e),...d,children:[jsxRuntime.jsx(P__namespace.Viewport,{ref:f,className:h("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",r),style:l,children:a}),jsxRuntime.jsx(Be,{forceMount:o},o?f.current?.scrollHeight:1),jsxRuntime.jsx(P__namespace.Corner,{})]})});ee.displayName=P__namespace.Root.displayName;var Be=Me.forwardRef(({className:e,orientation:a="vertical",...t},o)=>jsxRuntime.jsx(P__namespace.ScrollAreaScrollbar,{ref:o,orientation:a,className:h("flex touch-none select-none bg-neutral-100 transition-colors",a==="vertical"&&"h-full w-4 py-2",a==="horizontal"&&"h-4 flex-col px-2",e),...t,children:jsxRuntime.jsx(P__namespace.ScrollAreaThumb,{className:h("relative flex-1 rounded bg-primary-500",a==="vertical"&&"mx-1 w-2",a==="horizontal"&&"my-1 h-2")})}));Be.displayName=P__namespace.ScrollAreaScrollbar.displayName;var ha=tailwindVariants.tv({slots:{button:"flex flex-shrink-0 items-center justify-center gap-2 rounded-lg font-inter text-base font-semibold leading-[130%] transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-400"},variants:{size:{lg:{button:"h-12 px-4",icon:"h-4.5 w-4.5",loadingIcon:"h-4.5 w-4.5"},md:{button:"h-10 px-4 text-sm leading-[130%]",icon:"h-4.5 w-4.5",loadingIcon:"h-4.5 w-4.5"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[130%]",icon:"h-3.5 w-3.5",loadingIcon:"h-3.5 w-3.5"},xs:{button:"h-6 gap-1 rounded-[6px] px-3 text-xs leading-[130%]",icon:"h-3.5 w-3.5",loadingIcon:"h-3.5 w-3.5"}},variant:{contained:{button:"bg-primary-500 text-neutral-50 hover:bg-primary-600 focus:bg-primary-500 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-primary-700 active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-[1.5px] ring-inset ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-[3px] focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"leading-[130%] text-neutral-900 ring-[1.5px] ring-inset ring-neutral-900 focus:bg-neutral-50 focus:bg-opacity-0 focus:ring-[3px] focus:ring-primary-900 active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-neutral-50 focus:bg-opacity-0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},standard:{button:"text-neutral-900 hover:bg-transparent-primary-20 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},link:{button:"text-primary-500 underline underline-offset-2 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-neutral-50/0 focus:text-primary-500 focus:ring-[3px] focus:ring-inset focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-0 disabled:bg-neutral-50 disabled:bg-opacity-0 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-neutral-50 disabled:text-opacity-0"}}},defaultVariants:{variant:"contained",size:"md",loading:!1,disabled:!1}}),De=Me.forwardRef(({children:e,className:a,variant:t,size:o,startIcon:r,endIcon:l,loading:d,disabled:u,type:f="button",StartIcon:i,EndIcon:p,...I},g)=>{let{button:w,icon:C,loadingIcon:L}=ha({variant:t,size:o,loading:d});return jsxRuntime.jsxs("button",{...I,ref:g,disabled:d||u,className:h(w(),a),type:f,children:[d&&jsxRuntime.jsx(ke,{className:L()}),r&&Me__default.default.cloneElement(r,{className:C()}),i&&jsxRuntime.jsx(i,{className:C()}),e,l&&Me__default.default.cloneElement(l,{className:C()}),p&&jsxRuntime.jsx(p,{className:C()})]})});var Kt=Me.forwardRef(({onOpenChange:e,...a},t)=>jsxRuntime.jsx(dialog.Dialog.Root,{onOpenChange:o=>e?.(o.open),trapFocus:!1,...a,ref:t})),Zt=dialog.Dialog.Trigger,Jt=["sm","md","lg","xl"],Qt=Me.forwardRef(({children:e,className:a,size:t="sm",...o},r)=>jsxRuntime.jsxs(portal.Portal,{children:[jsxRuntime.jsx(dialog.Dialog.Backdrop,{className:"fixed inset-0 z-40 bg-neutral-900/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsxRuntime.jsx(dialog.Dialog.Positioner,{className:"fixed left-0 top-0 z-40 flex h-screen w-screen items-center justify-end",children:jsxRuntime.jsx(dialog.Dialog.Content,{ref:r,className:h("elevation-10 h-full bg-neutral-50 data-[state=closed]:animate-swipeOut data-[state=open]:animate-slideIn",t==="sm"&&"w-117.5",t==="md"&&"w-187",t==="lg"&&"w-235",t==="xl"&&"w-312",a),...o,children:jsxRuntime.jsx("div",{className:"flex h-full flex-1 flex-col",children:e})})})]})),jt=Me.forwardRef(({children:e,className:a,title:t,buttons:o=[],description:r,...l},d)=>jsxRuntime.jsxs("div",{className:h("border-b-1 border-neutral-200 pb-3.75 pl-4.5 pt-2",a),ref:d,...l,children:[jsxRuntime.jsx(dialog.Dialog.CloseTrigger,{asChild:!0,children:jsxRuntime.jsx(Ae,{className:"ml-auto mr-2 size-6 cursor-pointer"})}),jsxRuntime.jsxs("div",{className:"mr-4.5 mt-2 flex items-center justify-between gap-4.5",children:[jsxRuntime.jsx(dialog.Dialog.Title,{className:"line-clamp-1 break-all font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",children:t}),!Array.isArray(o)&&o.visible!==!1&&jsxRuntime.jsx(De,{size:"sm",variant:"ghost",...o}),Array.isArray(o)&&jsxRuntime.jsx("div",{className:"flex gap-1",children:o.map(({visible:u=!0,...f},i)=>u?jsxRuntime.jsx(he,{variant:"ghost",size:"sm",...f},i):null)})]}),r&&jsxRuntime.jsx(dialog.Dialog.Description,{className:"mr-4.5 mt-1 line-clamp-2 break-all font-inter text-sm leading-[130%] text-neutral-900",children:r})]})),Yt=Me.forwardRef(({children:e,className:a,...t},o)=>jsxRuntime.jsx("div",{className:h("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pb-4.5 pt-4.25",a),ref:o,...t,children:e})),_t=Me.forwardRef(({children:e,className:a,...t},o)=>jsxRuntime.jsxs(ee,{viewPortClassName:"py-4 px-6",className:h("h-full",a),ref:o,...t,children:[e,jsxRuntime.jsx("div",{className:"min-h-4"})]})),$t=dialog.Dialog.CloseTrigger;/*! Bundled license information:
|
|
2
|
+
|
|
3
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
|
+
(**
|
|
5
|
+
* @license lucide-react v0.469.0 - ISC
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the ISC license.
|
|
8
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
+
*)
|
|
10
|
+
|
|
11
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
12
|
+
(**
|
|
13
|
+
* @license lucide-react v0.469.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*)
|
|
18
|
+
|
|
19
|
+
lucide-react/dist/esm/Icon.js:
|
|
20
|
+
(**
|
|
21
|
+
* @license lucide-react v0.469.0 - ISC
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the ISC license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*)
|
|
26
|
+
|
|
27
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
28
|
+
(**
|
|
29
|
+
* @license lucide-react v0.469.0 - ISC
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the ISC license.
|
|
32
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
+
*)
|
|
34
|
+
|
|
35
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
36
|
+
(**
|
|
37
|
+
* @license lucide-react v0.469.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*)
|
|
42
|
+
|
|
43
|
+
lucide-react/dist/esm/icons/x.js:
|
|
44
|
+
(**
|
|
45
|
+
* @license lucide-react v0.469.0 - ISC
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the ISC license.
|
|
48
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
+
*)
|
|
50
|
+
|
|
51
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
52
|
+
(**
|
|
53
|
+
* @license lucide-react v0.469.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*)
|
|
58
|
+
*/exports.DrawerSticky=Kt;exports.DrawerStickyBody=_t;exports.DrawerStickyCloseTrigger=$t;exports.DrawerStickyContent=Qt;exports.DrawerStickyFooter=Yt;exports.DrawerStickyHeader=jt;exports.DrawerStickySizes=Jt;exports.DrawerStickyTrigger=Zt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as DrawerSticky,g as DrawerStickyBody,h as DrawerStickyCloseTrigger,d as DrawerStickyContent,f as DrawerStickyFooter,e as DrawerStickyHeader,c as DrawerStickySizes,b as DrawerStickyTrigger}from'./chunk-YF6MY4ZO.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-WS2F7JWJ.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|
package/dist/drawer.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as Drawer,e as DrawerClose,g as DrawerContent,k as DrawerDescription,i as DrawerFooter,h as DrawerHeader,f as DrawerOverlay,d as DrawerPortal,a as DrawerSizes,j as DrawerTitle,c as DrawerTrigger}from'./chunk-
|
|
1
|
+
export{b as Drawer,e as DrawerClose,g as DrawerContent,k as DrawerDescription,i as DrawerFooter,h as DrawerHeader,f as DrawerOverlay,d as DrawerPortal,a as DrawerSizes,j as DrawerTitle,c as DrawerTrigger}from'./chunk-HWLLVJWJ.mjs';import'./chunk-562EYVK4.mjs';import'./chunk-5UJVYIVN.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-WS2F7JWJ.mjs';import'./chunk-WGMDH4XX.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|
package/dist/flag-select.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as FlagSelect}from'./chunk-
|
|
1
|
+
export{a as FlagSelect}from'./chunk-JDBAUMA2.mjs';import'./chunk-E5G7444M.mjs';import'./chunk-2GJHRBSH.mjs';import'./chunk-SVUSHVWV.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|