sodtrack-web-ui 0.87.1 → 0.87.2

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.
Files changed (57) hide show
  1. package/dist/{chunk-OWTD6XNO.mjs → chunk-7SIITVAP.mjs} +1 -1
  2. package/dist/chunk-DNNDD64D.mjs +1 -0
  3. package/dist/{chunk-7Y2SYD4C.mjs → chunk-EQGL4PHV.mjs} +1 -1
  4. package/dist/{chunk-EAAYAECY.mjs → chunk-IQERTPPC.mjs} +1 -1
  5. package/dist/chunk-K4WOO5Z2.mjs +1 -0
  6. package/dist/{chunk-RFYZVJY2.mjs → chunk-K4ZXFC6O.mjs} +1 -1
  7. package/dist/{chunk-HV3JCN4E.mjs → chunk-KDRW7OBB.mjs} +1 -1
  8. package/dist/{chunk-ZORLWBTQ.mjs → chunk-MWWXQ6JB.mjs} +1 -1
  9. package/dist/{chunk-HP7QTZBD.mjs → chunk-Q27SEAP5.mjs} +1 -1
  10. package/dist/chunk-RQ34YRN4.mjs +1 -0
  11. package/dist/{chunk-FTTXIKMA.mjs → chunk-WG6HOTUJ.mjs} +1 -1
  12. package/dist/{chunk-ZC2OYUZM.mjs → chunk-YM7ME2VE.mjs} +1 -1
  13. package/dist/{chunk-G24D4VG2.mjs → chunk-YXWDYXUX.mjs} +1 -1
  14. package/dist/{chunk-3WQ3SMKT.mjs → chunk-ZKMTX55M.mjs} +1 -1
  15. package/dist/components/alert-dialog.js +1 -1
  16. package/dist/components/alert-dialog.mjs +1 -1
  17. package/dist/components/alert-message.js +1 -1
  18. package/dist/components/alert-message.mjs +1 -1
  19. package/dist/components/button.d.mts +7 -16
  20. package/dist/components/button.d.ts +7 -16
  21. package/dist/components/button.js +1 -1
  22. package/dist/components/button.mjs +1 -1
  23. package/dist/components/card-expandable.js +1 -1
  24. package/dist/components/card-expandable.mjs +1 -1
  25. package/dist/components/card-form.js +1 -1
  26. package/dist/components/card-form.mjs +1 -1
  27. package/dist/components/data-table.js +1 -1
  28. package/dist/components/data-table.mjs +1 -1
  29. package/dist/components/dialog.js +1 -1
  30. package/dist/components/dialog.mjs +1 -1
  31. package/dist/components/drawer.js +1 -1
  32. package/dist/components/drawer.mjs +1 -1
  33. package/dist/components/icon-button.d.mts +4 -1
  34. package/dist/components/icon-button.d.ts +4 -1
  35. package/dist/components/icon-button.js +1 -1
  36. package/dist/components/icon-button.mjs +1 -1
  37. package/dist/components/index.js +2 -2
  38. package/dist/components/index.mjs +1 -1
  39. package/dist/components/list-item-arrow.mjs +1 -1
  40. package/dist/components/list-item-button.js +1 -1
  41. package/dist/components/list-item-button.mjs +1 -1
  42. package/dist/components/list-item-checkbox-left.mjs +1 -1
  43. package/dist/components/list-item-checkbox.mjs +1 -1
  44. package/dist/components/list-item.mjs +1 -1
  45. package/dist/components/snackbar.js +1 -1
  46. package/dist/components/snackbar.mjs +1 -1
  47. package/dist/components/switch.js +1 -1
  48. package/dist/components/switch.mjs +1 -1
  49. package/dist/components/table.js +1 -1
  50. package/dist/components/table.mjs +1 -1
  51. package/dist/components/toast.js +2 -2
  52. package/dist/components/toast.mjs +1 -1
  53. package/dist/styles/index.css +1 -1
  54. package/package.json +8 -8
  55. package/dist/chunk-AI4D6AOK.mjs +0 -1
  56. package/dist/chunk-JWB3TN2C.mjs +0 -1
  57. package/dist/chunk-WB4JKV64.mjs +0 -1
@@ -1 +1 @@
1
- import {c}from'./chunk-JWB3TN2C.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useTransition}from'react';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var s=createToaster({placement:"top-end",overlap:false,gap:8,duration:8e3}),C=l=>{let[c$1,m]=useTransition();return jsx(Toaster,{toaster:s,...l,children:({closable:p=true,...t})=>jsxs(Toast.Root,{className:a("group z-(--z-index) flex w-86 translate-x-(--x) translate-y-(--y) rounded-lg bg-neutral-900 p-4 opacity-(--opacity) transition-all will-change-transform","flex items-center gap-2 data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down"),children:[jsx(Toast.Title,{className:"line-clamp-3 flex-1 font-inter text-sm leading-[130%] text-neutral-50",children:t.title}),jsxs("div",{className:"flex items-center empty:hidden",children:[t.action&&jsx(c,{variant:"ghost",loading:c$1,size:"sm",onClick:()=>{m(async()=>{try{await t.action?.onClick();}catch{}finally{s.dismiss();}});},children:t.action.label}),p&&jsx(Toast.CloseTrigger,{children:jsx(d,{className:"h-6 w-6 text-neutral-50"})})]})]},t.id)})};export{s as a,C as b};
1
+ import {c}from'./chunk-DNNDD64D.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useTransition}from'react';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var s=createToaster({placement:"top-end",overlap:false,gap:8,duration:8e3}),C=l=>{let[c$1,m]=useTransition();return jsx(Toaster,{toaster:s,...l,children:({closable:p=true,...t})=>jsxs(Toast.Root,{className:a("group z-(--z-index) flex w-86 translate-x-(--x) translate-y-(--y) rounded-lg bg-neutral-900 p-4 opacity-(--opacity) transition-all will-change-transform","flex items-center gap-2 data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down"),children:[jsx(Toast.Title,{className:"line-clamp-3 flex-1 font-inter text-sm leading-[130%] text-neutral-50",children:t.title}),jsxs("div",{className:"flex items-center empty:hidden",children:[t.action&&jsx(c,{variant:"ghost",loading:c$1,size:"sm",onClick:()=>{m(async()=>{try{await t.action?.onClick();}catch{}finally{s.dismiss();}});},children:t.action.label}),p&&jsx(Toast.CloseTrigger,{children:jsx(d,{className:"h-6 w-6 text-neutral-50"})})]})]},t.id)})};export{s as a,C as b};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import d,{forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=["xs","sm","md","lg"],H=["contained","outlined","ghost","standard","secondary","white"],I=tv({slots:{button:"font-inter ring-inset flex shrink-0 items-center justify-center gap-2 rounded-md text-base leading-[130%] font-semibold transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-500"},variants:{size:{lg:{button:"h-12 px-4",icon:"size-4.5",loadingIcon:"size-6"},md:{button:"h-10 px-4 text-sm leading-[142%]",icon:"size-4.5",loadingIcon:"size-6"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[142%]",icon:"size-3.5",loadingIcon:"size-4"},xs:{button:"h-6 gap-1 rounded-sm px-3 text-xs leading-[142%]",icon:"size-3",loadingIcon:"size-4"}},variant:{contained:{button:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0 disabled:bg-neutral-200 disabled:text-neutral-500"},secondary:{button:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},ghost:{button:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 disabled:bg-opacity-0 focus:ring-3 focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},outlined:{button:"focus:ring-primary-800 [&:not([disabled])]:hover:bg-primary-100 [&:not([disabled])]:active:bg-primary-200 leading-[130%] text-neutral-900 ring-1 ring-neutral-900 active:ring-neutral-900 focus:ring-3 active:ring-1 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},standard:{button:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 disabled:bg-opacity-0 text-neutral-900 focus:ring-3 active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},white:{button:"bg-neutral-50 text-neutral-900 disabled:bg-neutral-50 disabled:text-neutral-500 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},compoundVariants:[{variant:"contained",loading:true,className:{button:"text-neutral-200!"}}],defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),M=forwardRef(({children:c,className:u,variant:g,size:b,startIcon:i,endIcon:r,loading:e,disabled:m,type:p="button",StartIcon:n,EndIcon:o,...y},x)=>{let{button:f,icon:t,loadingIcon:v}=I({variant:g,size:b,loading:e});return jsxs("button",{...y,ref:x,disabled:e||m,className:a(f(),u),type:p,children:[e&&jsx(a$1,{className:v()}),i&&d.cloneElement(i,{className:t()}),n&&jsx(n,{className:t()}),c,r&&d.cloneElement(r,{className:t()}),o&&jsx(o,{className:t()})]})});export{w as a,H as b,M as c};
@@ -1 +1 @@
1
- import {c as c$2}from'./chunk-AI4D6AOK.mjs';import {c as c$1}from'./chunk-JWB3TN2C.mjs';import {e,c,b,f,d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useState,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var P=tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),S={warning:f,success:b,error:c,info:e},O=({variant:o="info",className:d$1,description:t,title:u,hasCloseButton:a$1=true,actionButton:n})=>{let[x,N]=useState(true),{container:v,icon:h,closeIcon:C,title:I,description:b}=P({variant:o,hasCloseButton:a$1}),y=useCallback(()=>{N(false);},[]),M=S[o||"info"];return jsxs("div",{role:"alert",className:a(v(),d$1,!x&&"hidden"),children:[jsxs("div",{className:"flex flex-1",children:[jsx(M,{className:h({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxs("div",{className:"flex flex-col",children:[jsx("h6",{className:I({className:t&&"font-semibold"}),children:u}),t&&jsx("p",{className:b(),children:t})]})]}),n&&jsx(c$1,{...n,variant:"white",className:a("my-auto ml-4.5",n.className),size:"md"}),a$1&&jsx(c$2,{Icon:d,className:C(),size:"sm",variant:"standard",onClick:y,"aria-label":"Close alert"})]})};export{O as a};
1
+ import {c as c$2}from'./chunk-RQ34YRN4.mjs';import {c as c$1}from'./chunk-DNNDD64D.mjs';import {e,c,b,f,d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useState,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var P=tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),S={warning:f,success:b,error:c,info:e},O=({variant:o="info",className:d$1,description:t,title:u,hasCloseButton:a$1=true,actionButton:n})=>{let[x,N]=useState(true),{container:v,icon:h,closeIcon:C,title:I,description:b}=P({variant:o,hasCloseButton:a$1}),y=useCallback(()=>{N(false);},[]),M=S[o||"info"];return jsxs("div",{role:"alert",className:a(v(),d$1,!x&&"hidden"),children:[jsxs("div",{className:"flex flex-1",children:[jsx(M,{className:h({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxs("div",{className:"flex flex-col",children:[jsx("h6",{className:I({className:t&&"font-semibold"}),children:u}),t&&jsx("p",{className:b(),children:t})]})]}),n&&jsx(c$1,{...n,variant:"white",className:a("my-auto ml-4.5",n.className),size:"md"}),a$1&&jsx(c$2,{Icon:d,className:C(),size:"sm",variant:"standard",onClick:y,"aria-label":"Close alert"})]})};export{O as a};
@@ -1 +1 @@
1
- import {a as a$1,b,c as c$1,g,h,d,e as e$1,i,j,f}from'./chunk-RFYZVJY2.mjs';import {c}from'./chunk-PTRXL7BY.mjs';import {a}from'./chunk-DHWOGUID.mjs';import {e}from'./chunk-5VHBHGBZ.mjs';import {useState,useRef,useEffect,useMemo,useCallback}from'react';import {useReactTable,getPaginationRowModel,getCoreRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function Ge({columns:w,data:m,rowsCount:T,pagination:b$1,onPaginationChange:O,noResults:oe,rowsPerPageText:ie="Rows per page",ofText:re="of",onNextPageClick:se,onPreviousPageClick:le,disableNextPage:_,disablePreviousPage:E,className:ce,onRowsPerPageChange:de,columnOrder:ge,columnVisibility:ue,rowsPerPageOptions:pe,enableRowSelection:h$1=false,getRowId:V,selectedRowIds:r,onSelectedRowIdsChange:y,onSelectedRowDataByIdChange:u,isRowSelectable:p,rowSelectionTooltip:M,setDisabledRowState:C,...fe}){let[g$1,N]=useState(new Map),F=useRef(r),L=useRef(g$1);useEffect(()=>{F.current=r;},[r]),useEffect(()=>{L.current=g$1;},[g$1]),useEffect(()=>{let t=Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r??[]).map(String));if(!g$1.size)return;let e=new Map;g$1.forEach((n,i)=>{t.has(i)&&e.set(i,n);}),e.size!==g$1.size&&(N(e),u?.(e));},[r,g$1,u]);let P=(t,e)=>{if(V)return V(t);let n=t?.id;if(n!=null)return String(n);if(h$1)throw new Error("DataTable requires getRowId or rows with an 'id' field when row selection is enabled");return String(e??"")},R=useMemo(()=>r?Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r).map(String)):new Set,[r]),G=useMemo(()=>{let t={};return m.forEach((e,n)=>{let i=P(e,n);R.has(i)&&(t[i]=true);}),t},[m,R]),W=useCallback(t=>{let e=p?!p(t):false,n=e?typeof C=="function"?C(t):C:void 0;return {disabledBySelectable:e,disabledState:n}},[p,C]),me=useMemo(()=>h$1?[{id:"__select__",size:48,header:({table:e})=>{let n=e.getRowModel().rows,i=p?n.filter(s=>p(s.original)):n,c$1=i.length,o=0;for(let s of i)s.getIsSelected()&&o++;return jsx(c,{size:"sm",checked:c$1===0||o===0?false:o===c$1?true:"indeterminate",disabled:c$1===0,onCheckedChange:s=>{let v=F.current,z=new Set(Array.isArray(v)?v.map(String):Array.from(v??[]).map(String)),Se=s===true||s==="indeterminate";for(let A of i){let f=String(A.id);Se?z.add(f):z.delete(f);}if(y?.(z),u){let A=L.current,f=new Map(A),he=s===true||s==="indeterminate";for(let $ of i){let q=String($.id);he?f.set(q,$.original):f.delete(q);}N(f),u(f);}}})},cell:({row:e})=>{let{disabledBySelectable:n,disabledState:i}=W(e.original),c$1=n?i??false:e.getIsSelected(),o=jsx(c,{size:"sm",checked:c$1,onCheckedChange:x=>e.toggleSelected(x===true),disabled:n}),d=M?.content(e.original);return d?jsx(a,{className:"w-fit",content:d,positioning:M?.positioning??{placement:"right"},children:o}):o},enableSorting:false},...w]:w,[h$1,w,y,u,M,W]),l=useReactTable({data:m,columns:me,rowCount:T,state:{pagination:b$1,columnOrder:ge,columnVisibility:ue,rowSelection:G},onPaginationChange:O,manualPagination:true,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel(),enableRowSelection:p?t=>p(t.original):h$1,getRowId:(t,e)=>P(t,e),onRowSelectionChange:t=>{let n=typeof t=="function"?t(G):t,i=new Set(m.map((o,d)=>P(o,d))),c=new Set(R);for(let o of i)!!n[o]?c.add(String(o)):c.delete(String(o));if(y?.(c),u){let o=new Map(g$1);m.forEach((d,x)=>{let s=P(d,x);n[s]?o.set(String(s),d):o.delete(String(s));}),N(o),u(o);}}}),Te=useMemo(()=>E||!!T&&!l.getCanPreviousPage(),[E,T,b$1?.pageIndex]),be=useMemo(()=>_||!!T&&!l.getCanNextPage(),[_,T,b$1?.pageIndex]);return l.getRowModel().rows?.length?jsxs(a$1,{className:ce,...fe,children:[jsxs(b,{children:[jsx("colgroup",{children:l.getHeaderGroups()[0].headers.map(t=>{let e=t.column.getSize()/l.getHeaderGroups()[0].headers.reduce((n,i)=>n+i.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${e}%`,minWidth:`${t.column.getSize()}px`}},t.id)})}),jsx(c$1,{children:l.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(e$1=>{let n=e$1.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[e$1.isPlaceholder?null:e$1.column.id==="__select__"||n.headerTooltip===false?jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())}):jsx(a,{content:typeof n.headerTooltip=="boolean"||n.headerTooltip===void 0?flexRender(n.header,e$1.getContext()):n.headerTooltip,contentClassName:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())})}),n.headerInfoTooltip&&jsx(a,{content:n.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] shrink-0"})})]})},e$1.id)})},t.id))}),jsx(d,{children:l.getRowModel().rows.map(t=>jsx(e$1,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(e=>jsx(i,{children:flexRender(e.column.columnDef.cell,e.getContext())},e.id))},t.id))})]}),b$1&&O&&m.length>0&&jsx(j,{rowsPerPageOptions:pe,rowsCount:T,pagination:b$1,onRowsPerPageChange:t=>{l.setPageSize(t),l.setPageIndex(0),de?.(t);},onPreviousPageClick:()=>{l.previousPage(),le?.();},onNextPageClick:()=>{l.nextPage(),se?.();},disableNextPage:be,disablePreviousPage:Te,ofText:re,rowsPerPageText:ie})]}):jsx(f,{...oe})}export{Ge as a};
1
+ import {a as a$1,b,c as c$1,g,h,d,e as e$1,i,j,f}from'./chunk-K4ZXFC6O.mjs';import {c}from'./chunk-PTRXL7BY.mjs';import {a}from'./chunk-DHWOGUID.mjs';import {e}from'./chunk-5VHBHGBZ.mjs';import {useState,useRef,useEffect,useMemo,useCallback}from'react';import {useReactTable,getPaginationRowModel,getCoreRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function Ge({columns:w,data:m,rowsCount:T,pagination:b$1,onPaginationChange:O,noResults:oe,rowsPerPageText:ie="Rows per page",ofText:re="of",onNextPageClick:se,onPreviousPageClick:le,disableNextPage:_,disablePreviousPage:E,className:ce,onRowsPerPageChange:de,columnOrder:ge,columnVisibility:ue,rowsPerPageOptions:pe,enableRowSelection:h$1=false,getRowId:V,selectedRowIds:r,onSelectedRowIdsChange:y,onSelectedRowDataByIdChange:u,isRowSelectable:p,rowSelectionTooltip:M,setDisabledRowState:C,...fe}){let[g$1,N]=useState(new Map),F=useRef(r),L=useRef(g$1);useEffect(()=>{F.current=r;},[r]),useEffect(()=>{L.current=g$1;},[g$1]),useEffect(()=>{let t=Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r??[]).map(String));if(!g$1.size)return;let e=new Map;g$1.forEach((n,i)=>{t.has(i)&&e.set(i,n);}),e.size!==g$1.size&&(N(e),u?.(e));},[r,g$1,u]);let P=(t,e)=>{if(V)return V(t);let n=t?.id;if(n!=null)return String(n);if(h$1)throw new Error("DataTable requires getRowId or rows with an 'id' field when row selection is enabled");return String(e??"")},R=useMemo(()=>r?Array.isArray(r)?new Set(r.map(String)):new Set(Array.from(r).map(String)):new Set,[r]),G=useMemo(()=>{let t={};return m.forEach((e,n)=>{let i=P(e,n);R.has(i)&&(t[i]=true);}),t},[m,R]),W=useCallback(t=>{let e=p?!p(t):false,n=e?typeof C=="function"?C(t):C:void 0;return {disabledBySelectable:e,disabledState:n}},[p,C]),me=useMemo(()=>h$1?[{id:"__select__",size:48,header:({table:e})=>{let n=e.getRowModel().rows,i=p?n.filter(s=>p(s.original)):n,c$1=i.length,o=0;for(let s of i)s.getIsSelected()&&o++;return jsx(c,{size:"sm",checked:c$1===0||o===0?false:o===c$1?true:"indeterminate",disabled:c$1===0,onCheckedChange:s=>{let v=F.current,z=new Set(Array.isArray(v)?v.map(String):Array.from(v??[]).map(String)),Se=s===true||s==="indeterminate";for(let A of i){let f=String(A.id);Se?z.add(f):z.delete(f);}if(y?.(z),u){let A=L.current,f=new Map(A),he=s===true||s==="indeterminate";for(let $ of i){let q=String($.id);he?f.set(q,$.original):f.delete(q);}N(f),u(f);}}})},cell:({row:e})=>{let{disabledBySelectable:n,disabledState:i}=W(e.original),c$1=n?i??false:e.getIsSelected(),o=jsx(c,{size:"sm",checked:c$1,onCheckedChange:x=>e.toggleSelected(x===true),disabled:n}),d=M?.content(e.original);return d?jsx(a,{className:"w-fit",content:d,positioning:M?.positioning??{placement:"right"},children:o}):o},enableSorting:false},...w]:w,[h$1,w,y,u,M,W]),l=useReactTable({data:m,columns:me,rowCount:T,state:{pagination:b$1,columnOrder:ge,columnVisibility:ue,rowSelection:G},onPaginationChange:O,manualPagination:true,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel(),enableRowSelection:p?t=>p(t.original):h$1,getRowId:(t,e)=>P(t,e),onRowSelectionChange:t=>{let n=typeof t=="function"?t(G):t,i=new Set(m.map((o,d)=>P(o,d))),c=new Set(R);for(let o of i)!!n[o]?c.add(String(o)):c.delete(String(o));if(y?.(c),u){let o=new Map(g$1);m.forEach((d,x)=>{let s=P(d,x);n[s]?o.set(String(s),d):o.delete(String(s));}),N(o),u(o);}}}),Te=useMemo(()=>E||!!T&&!l.getCanPreviousPage(),[E,T,b$1?.pageIndex]),be=useMemo(()=>_||!!T&&!l.getCanNextPage(),[_,T,b$1?.pageIndex]);return l.getRowModel().rows?.length?jsxs(a$1,{className:ce,...fe,children:[jsxs(b,{children:[jsx("colgroup",{children:l.getHeaderGroups()[0].headers.map(t=>{let e=t.column.getSize()/l.getHeaderGroups()[0].headers.reduce((n,i)=>n+i.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${e}%`,minWidth:`${t.column.getSize()}px`}},t.id)})}),jsx(c$1,{children:l.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(e$1=>{let n=e$1.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[e$1.isPlaceholder?null:e$1.column.id==="__select__"||n.headerTooltip===false?jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())}):jsx(a,{content:typeof n.headerTooltip=="boolean"||n.headerTooltip===void 0?flexRender(n.header,e$1.getContext()):n.headerTooltip,contentClassName:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1 text-xs leading-[130%] uppercase",children:flexRender(n.header,e$1.getContext())})}),n.headerInfoTooltip&&jsx(a,{content:n.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] shrink-0"})})]})},e$1.id)})},t.id))}),jsx(d,{children:l.getRowModel().rows.map(t=>jsx(e$1,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(e=>jsx(i,{children:flexRender(e.column.columnDef.cell,e.getContext())},e.id))},t.id))})]}),b$1&&O&&m.length>0&&jsx(j,{rowsPerPageOptions:pe,rowsCount:T,pagination:b$1,onRowsPerPageChange:t=>{l.setPageSize(t),l.setPageIndex(0),de?.(t);},onPreviousPageClick:()=>{l.previousPage(),le?.();},onNextPageClick:()=>{l.nextPage(),se?.();},disableNextPage:be,disablePreviousPage:Te,ofText:re,rowsPerPageText:ie})]}):jsx(f,{...oe})}export{Ge as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-XJD5SYZJ.mjs';import {Switch}from'@ark-ui/react/switch';import {Loader2}from'lucide-react';import {jsxs,jsx}from'react/jsx-runtime';var P=["sm","md"],N=["base","status"],T=["primary","secondary"],I=({size:a$1="md",type:t="base",variant:d="primary",className:u,disabled:h,onCheckedChange:p,label:e,icon:g,loading:n=false,...l})=>{let i=n?Loader2:g,b=h||n,k=m=>{p?.(m.checked);};return jsxs(Switch.Root,{className:a("relative flex",u),disabled:b,onCheckedChange:k,...l,readOnly:false,"aria-readonly":false,children:[jsxs(Switch.Control,{className:a("group relative inline-flex shrink-0 cursor-pointer items-center rounded-full","transition-all ring-inset",d==="secondary"&&["ring"],t==="base"&&d==="primary"&&["data-[state=checked]:bg-primary-600","data-[state=unchecked]:bg-primary-200","data-[state=unchecked]:ring-primary-400","data-[state=checked]:hover:not-data-disabled:bg-primary-800","data-[state=unchecked]:hover:not-data-disabled:bg-primary-300","data-[state=checked]:active:not-data-disabled:bg-primary-600","data-[state=checked]:active:not-data-disabled:ring-primary-800","data-[state=unchecked]:active:not-data-disabled:bg-primary-300","data-[state=unchecked]:active:not-data-disabled:ring-primary-700","data-disabled:ring-0!"],t==="base"&&d==="secondary"&&["data-[state=checked]:bg-primary-400","data-[state=checked]:ring-primary-600","data-[state=unchecked]:bg-primary-200","data-[state=unchecked]:ring-primary-500","data-[state=checked]:hover:not-data-disabled:bg-primary-500","data-[state=checked]:hover:not-data-disabled:ring-primary-600","data-[state=unchecked]:hover:not-data-disabled:bg-primary-300","active:not-data-disabled:ring-primary-800","data-[state=unchecked]:active:not-data-disabled:bg-primary-300","data-disabled:ring-neutral-400!"],t==="status"&&d==="primary"&&["data-[state=checked]:bg-success-300","data-[state=unchecked]:bg-neutral-400","data-[state=unchecked]:ring-neutral-600","data-[state=checked]:hover:not-data-disabled:bg-success-500","data-[state=unchecked]:hover:not-data-disabled:bg-neutral-500","data-[state=checked]:active:not-data-disabled:ring-success-800","data-[state=unchecked]:active:not-data-disabled:ring-neutral-800","data-disabled:ring-0!"],t==="status"&&d==="secondary"&&["data-[state=checked]:bg-success-100","data-[state=checked]:ring-success-600","data-[state=unchecked]:bg-neutral-300","data-[state=unchecked]:ring-neutral-600","data-[state=checked]:hover:not-data-disabled:bg-success-300","data-[state=unchecked]:hover:not-data-disabled:bg-neutral-400","data-[state=checked]:active:not-data-disabled:ring-success-800","data-[state=unchecked]:active:not-data-disabled:ring-neutral-800","data-disabled:ring-neutral-400!"],"data-[state=unchecked]:not-active:ring-1","active:not-data-disabled:ring-4","data-disabled:cursor-not-allowed","data-disabled:bg-neutral-300!",!e&&a$1==="sm"&&"h-6 w-10",!e&&a$1==="md"&&"h-8 w-14",e&&a$1==="sm"&&["h-6 gap-2","data-[state=checked]:pl-2 data-[state=checked]:pr-1","data-[state=unchecked]:pl-1.5 data-[state=unchecked]:pr-2.5"],e&&a$1==="md"&&["h-8 gap-2","data-[state=checked]:pl-2 data-[state=checked]:pr-1","data-[state=unchecked]:pl-2 data-[state=unchecked]:pr-3"]),children:[e&&jsx("span",{className:a("leading-[133%] font-medium transition-all select-none",t==="base"&&d==="primary"&&["group-data-[state=checked]:not-group-data-disabled:text-neutral-50","group-data-[state=unchecked]:not-group-data-disabled:text-primary-700"],t==="base"&&d==="secondary"&&["group-data-[state=unchecked]:not-group-data-disabled:text-primary-600","group-data-[state=checked]:not-group-data-disabled:text-primary-800"],t==="status"&&["group-data-[state=checked]:not-group-data-disabled:text-success-800","group-data-[state=unchecked]:not-group-data-disabled:text-neutral-800"],"group-data-disabled:text-neutral-600","group-data-[state=checked]:order-1","group-data-[state=unchecked]:order-2",a$1==="sm"&&"text-xs",a$1==="md"&&"text-sm"),children:e}),jsx(Switch.Thumb,{className:a("flex items-center justify-center rounded-full bg-neutral-50 transition-all shrink-0","group-hover:not-group-data-disabled:ring-8","group-active:not-group-data-disabled:ring-7",t==="base"&&["group-hover:not-group-data-disabled:ring-transparent-primary-400-50","group-active:not-group-data-disabled:ring-transparent-primary-400-50"],t==="status"&&["group-data-[state=checked]:group-hover:not-group-data-disabled:ring-transparent-primary-400-50","group-data-[state=unchecked]:group-hover:not-group-data-disabled:ring-transparent-neutral-800-20","group-data-[state=checked]:group-active:not-group-data-disabled:ring-transparent-primary-400-50","group-data-[state=unchecked]:group-active:not-group-data-disabled:ring-transparent-neutral-800-20"],"group-data-disabled:ring-0!",a$1==="sm"&&"size-4 data-[state=unchecked]:size-3",a$1==="md"&&"size-6 data-[state=unchecked]:size-4",a$1==="sm"&&["group-active:data-[state=checked]:not-group-data-disabled:scale-[1.125]","group-active:data-[state=unchecked]:not-group-data-disabled:scale-[1.5]"],a$1==="md"&&["group-active:data-[state=checked]:not-group-data-disabled:scale-[1.08]","group-active:data-[state=unchecked]:not-group-data-disabled:scale-[1.625]"],!e&&"absolute",!e&&a$1==="sm"&&"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-1.5",!e&&a$1==="md"&&"data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-2",e&&"group-data-[state=checked]:order-2",e&&"group-data-[state=unchecked]:order-1"),children:i&&jsx(i,{className:a("transition-colors",n&&"animate-spin",a$1==="sm"&&"size-3 group-data-[state=unchecked]:size-2.5",a$1==="md"&&"size-3.5",t==="base"&&["group-data-[state=checked]:not-group-data-disabled:text-primary-600","group-data-[state=unchecked]:not-group-data-disabled:text-primary-500"],t==="status"&&["group-data-[state=checked]:not-group-data-disabled:text-success-700","group-data-[state=unchecked]:not-group-data-disabled:text-neutral-700"],"group-data-disabled:text-neutral-400")})})]}),jsx(Switch.HiddenInput,{})]})};export{P as a,N as b,T as c,I as d};
@@ -1 +1 @@
1
- import {c}from'./chunk-JWB3TN2C.mjs';import {i,h}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{ref:l,className:a("ring-primary-200 flex flex-col overflow-hidden rounded-2xl bg-neutral-50 ring-1",e),...a$1}));x.displayName="TableContainer";var N=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{className:a("relative w-full overflow-x-auto",e),children:jsx("table",{ref:l,className:"w-full table-auto overflow-hidden text-neutral-900",...a$1})}));N.displayName="Table";var g=r.forwardRef(({className:e,...a},l)=>jsx("thead",{ref:l,className:e,...a}));g.displayName="TableHeader";var H=r.forwardRef(({className:e,...a},l)=>jsx("tbody",{ref:l,className:e,...a}));H.displayName="TableBody";var w=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("text-sm leading-[130%] font-normal",e),...a$1}));w.displayName="TableBodyRow";var L=r.forwardRef(({Icon:e,icon:a$1,title:l,description:m,className:s,button:n,...d},b)=>jsxs("div",{ref:b,...d,className:a("flex flex-col items-center justify-center py-10 text-neutral-500",s),children:[a$1&&r.cloneElement(a$1,{className:"text-neutral-300 w-6 h-6"}),e&&jsx(e,{className:"h-6 w-6 text-neutral-300"}),jsx("span",{className:"mt-2 text-sm leading-[130%] font-semibold",children:l}),m&&jsx("span",{className:"mt-0.5 text-sm leading-[130%]",children:m}),n&&jsx(c,{size:"sm",...n,className:a("mt-3",n.className)})]}));L.displayName="TableNoResults";var y=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("bg-primary-100",e),...a$1}));y.displayName="TableHeaderRow";var M=r.forwardRef(({className:e,...a$1},l)=>jsx("th",{ref:l,className:a("h-10 px-3 py-1 text-left text-sm leading-[130%] font-semibold uppercase",e),...a$1}));M.displayName="TableHead";var v=r.forwardRef(({className:e,...a$1},l)=>jsx("td",{ref:l,className:a("h-18 px-3 py-1",e),...a$1}));v.displayName="TableCell";var S=({disableNextPage:e,disablePreviousPage:a$1,onNextPageClick:l,onPreviousPageClick:m,pagination:s,rowsCount:n,rowsPerPageText:d="Rows per page",ofText:b="of",onRowsPerPageChange:u,rowsPerPageOptions:R=[10,20,50]})=>jsxs("div",{className:"border-t-primary-200 flex h-8 flex-1 items-center justify-end gap-6 border-t-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("span",{className:"mr-2 text-sm leading-[130%] font-semibold text-neutral-700",children:`${d}:`}),jsx("select",{className:"text-sm leading-[130%]",value:s.pageSize,id:"rows_per_page",onChange:i=>{u?.(Number(i.target.value));},children:R.map(i=>jsx("option",{children:i},i))})]}),!!n&&jsx("span",{className:"text-sm leading-[130%] font-normal text-neutral-700",children:`${s?.pageIndex*s.pageSize+1}-${n>s?.pageIndex*s.pageSize+s.pageSize?s?.pageIndex*s.pageSize+s.pageSize:n} ${b} ${n}`}),!n&&jsx("span",{className:"text-sm leading-[120%] font-normal tracking-[0.28px] text-neutral-700",children:`${s.pageIndex>0?"... ":""}${s.pageIndex+1}${e?"":" ..."}`}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:a$1,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:m,children:jsx(i,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",a$1&&"text-neutral-500")})}),jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:l,children:jsx(h,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});export{x as a,N as b,g as c,H as d,w as e,L as f,y as g,M as h,v as i,S as j};
1
+ import {c}from'./chunk-DNNDD64D.mjs';import {i,h}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{ref:l,className:a("ring-primary-200 flex flex-col overflow-hidden rounded-2xl bg-neutral-50 ring-1",e),...a$1}));x.displayName="TableContainer";var N=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{className:a("relative w-full overflow-x-auto",e),children:jsx("table",{ref:l,className:"w-full table-auto overflow-hidden text-neutral-900",...a$1})}));N.displayName="Table";var g=r.forwardRef(({className:e,...a},l)=>jsx("thead",{ref:l,className:e,...a}));g.displayName="TableHeader";var H=r.forwardRef(({className:e,...a},l)=>jsx("tbody",{ref:l,className:e,...a}));H.displayName="TableBody";var w=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("text-sm leading-[130%] font-normal",e),...a$1}));w.displayName="TableBodyRow";var L=r.forwardRef(({Icon:e,icon:a$1,title:l,description:m,className:s,button:n,...d},b)=>jsxs("div",{ref:b,...d,className:a("flex flex-col items-center justify-center py-10 text-neutral-500",s),children:[a$1&&r.cloneElement(a$1,{className:"text-neutral-300 w-6 h-6"}),e&&jsx(e,{className:"h-6 w-6 text-neutral-300"}),jsx("span",{className:"mt-2 text-sm leading-[130%] font-semibold",children:l}),m&&jsx("span",{className:"mt-0.5 text-sm leading-[130%]",children:m}),n&&jsx(c,{size:"sm",...n,className:a("mt-3",n.className)})]}));L.displayName="TableNoResults";var y=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("bg-primary-100",e),...a$1}));y.displayName="TableHeaderRow";var M=r.forwardRef(({className:e,...a$1},l)=>jsx("th",{ref:l,className:a("h-10 px-3 py-1 text-left text-sm leading-[130%] font-semibold uppercase",e),...a$1}));M.displayName="TableHead";var v=r.forwardRef(({className:e,...a$1},l)=>jsx("td",{ref:l,className:a("h-18 px-3 py-1",e),...a$1}));v.displayName="TableCell";var S=({disableNextPage:e,disablePreviousPage:a$1,onNextPageClick:l,onPreviousPageClick:m,pagination:s,rowsCount:n,rowsPerPageText:d="Rows per page",ofText:b="of",onRowsPerPageChange:u,rowsPerPageOptions:R=[10,20,50]})=>jsxs("div",{className:"border-t-primary-200 flex h-8 flex-1 items-center justify-end gap-6 border-t-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("span",{className:"mr-2 text-sm leading-[130%] font-semibold text-neutral-700",children:`${d}:`}),jsx("select",{className:"text-sm leading-[130%]",value:s.pageSize,id:"rows_per_page",onChange:i=>{u?.(Number(i.target.value));},children:R.map(i=>jsx("option",{children:i},i))})]}),!!n&&jsx("span",{className:"text-sm leading-[130%] font-normal text-neutral-700",children:`${s?.pageIndex*s.pageSize+1}-${n>s?.pageIndex*s.pageSize+s.pageSize?s?.pageIndex*s.pageSize+s.pageSize:n} ${b} ${n}`}),!n&&jsx("span",{className:"text-sm leading-[120%] font-normal tracking-[0.28px] text-neutral-700",children:`${s.pageIndex>0?"... ":""}${s.pageIndex+1}${e?"":" ..."}`}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:a$1,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:m,children:jsx(i,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",a$1&&"text-neutral-500")})}),jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:l,children:jsx(h,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});export{x as a,N as b,g as c,H as d,w as e,L as f,y as g,M as h,v as i,S as j};
@@ -1 +1 @@
1
- import {c as c$1}from'./chunk-PTRXL7BY.mjs';import {c as c$2}from'./chunk-GBBE3RHT.mjs';import {d}from'./chunk-FAMLJ6AJ.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$4}from'./chunk-JWB3TN2C.mjs';import {a as a$1}from'./chunk-DHWOGUID.mjs';import {a as a$2}from'./chunk-GHVRYH3R.mjs';import {e,s,t}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {getDefaultOptions}from'date-fns';import {jsxs,jsx}from'react/jsx-runtime';var c=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),j=(a,e)=>e?.startsWith("es")?a?"Contraer":"Expandir":e?.startsWith("pt")?a?"Recolher":"Expandir":a?"Collapse":"Expand",bt=({headerLabel:a$3,complementaryText:e$1,subtitle:o,headerTooltip:n,className:m,action:i,chipStatus:l,badgeExpandable:p,chipExpandable:h,Icon:f,iconButtons:H,checkbox:b,...k})=>{let{header:w,headerLabel:D,complementaryText:M,subtitle:O}=c(),v=useCollapsibleContext(),{locale:F}=getDefaultOptions(),A=j(v.open,F?.code);return jsxs("div",{...k,className:a(w(),m),children:[b&&jsx(c$1,{...b,className:a("m-1",b.className),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("b",{className:D(),children:a$3}),e$1&&jsx("span",{className:M(),children:e$1}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[l&&jsx(d,{...l,size:"xs",type:"light"}),h&&jsx(c$2,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),H?.map((d,x)=>{let{tooltipContent:E,...R}=d;return jsx(a$1,{content:E,disabled:!E,children:jsx(c$3,{...R,variant:"standard",size:"xs"})},x)}),i&&(()=>{let{tooltipContent:d,...x}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(c$4,{...x,size:"xs",variant:"standard"})})})(),jsx(a$1,{content:A,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$3,{Icon:v.open?s:t,variant:"standard",size:"xs"})})})]})]}),o&&jsx("p",{className:O(),children:o})]})]})},xt=({className:a,...e})=>{let{contentInner:o,content:n}=c();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...e,className:o({className:a})})})},Ct=({className:a,...e})=>{let{fixedContent:o}=c();return jsx("div",{...e,className:o({className:a})})},ut=({className:a,onOpenChange:e,children:o,background:n="white",...m})=>{let{root:i}=c({background:n}),l=useCallback(p=>{e?.(p);},[e]);return jsx(Collapsible.Root,{onOpenChange:l,className:i({className:a}),...m,children:o})};export{bt as a,xt as b,Ct as c,ut as d};
1
+ import {c as c$1}from'./chunk-PTRXL7BY.mjs';import {c as c$2}from'./chunk-GBBE3RHT.mjs';import {d}from'./chunk-FAMLJ6AJ.mjs';import {c as c$3}from'./chunk-RQ34YRN4.mjs';import {c as c$4}from'./chunk-DNNDD64D.mjs';import {a as a$1}from'./chunk-DHWOGUID.mjs';import {a as a$2}from'./chunk-GHVRYH3R.mjs';import {e,s,t}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {getDefaultOptions}from'date-fns';import {jsxs,jsx}from'react/jsx-runtime';var c=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),j=(a,e)=>e?.startsWith("es")?a?"Contraer":"Expandir":e?.startsWith("pt")?a?"Recolher":"Expandir":a?"Collapse":"Expand",bt=({headerLabel:a$3,complementaryText:e$1,subtitle:o,headerTooltip:n,className:m,action:i,chipStatus:l,badgeExpandable:p,chipExpandable:h,Icon:f,iconButtons:H,checkbox:b,...k})=>{let{header:w,headerLabel:D,complementaryText:M,subtitle:O}=c(),v=useCollapsibleContext(),{locale:F}=getDefaultOptions(),A=j(v.open,F?.code);return jsxs("div",{...k,className:a(w(),m),children:[b&&jsx(c$1,{...b,className:a("m-1",b.className),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("b",{className:D(),children:a$3}),e$1&&jsx("span",{className:M(),children:e$1}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[l&&jsx(d,{...l,size:"xs",type:"light"}),h&&jsx(c$2,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),H?.map((d,x)=>{let{tooltipContent:E,...R}=d;return jsx(a$1,{content:E,disabled:!E,children:jsx(c$3,{...R,variant:"standard",size:"xs"})},x)}),i&&(()=>{let{tooltipContent:d,...x}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(c$4,{...x,size:"xs",variant:"standard"})})})(),jsx(a$1,{content:A,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$3,{Icon:v.open?s:t,variant:"standard",size:"xs"})})})]})]}),o&&jsx("p",{className:O(),children:o})]})]})},xt=({className:a,...e})=>{let{contentInner:o,content:n}=c();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...e,className:o({className:a})})})},Ct=({className:a,...e})=>{let{fixedContent:o}=c();return jsx("div",{...e,className:o({className:a})})},ut=({className:a,onOpenChange:e,children:o,background:n="white",...m})=>{let{root:i}=c({background:n}),l=useCallback(p=>{e?.(p);},[e]);return jsx(Collapsible.Root,{onOpenChange:l,className:i({className:a}),...m,children:o})};export{bt as a,xt as b,Ct as c,ut as d};
@@ -1 +1 @@
1
- import {c as c$1}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var j=({onOpenChange:a,...o})=>{let r=useCallback(t=>{a?.(t.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:r,...o})},S=Dialog.Trigger,X=["sm","md","lg","xl"],C=forwardRef(({children:a$1,className:o,size:r="sm",...t},s)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"fixed top-0 left-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:s,className:a("elevation-10 data-[state=closed]:animate-swipe-out data-[state=open]:animate-slide-in h-full bg-neutral-50",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",o),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));C.displayName="DrawerContent";var x=forwardRef(({children:a$1,className:o,title:r,buttons:t=[],Icon:s,description:d$1,...f},w)=>jsxs("div",{className:a("border-b border-neutral-200 pt-2 pb-3.75 pl-4.5",o),ref:w,...f,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"mr-2 ml-auto size-6 cursor-pointer"})}),jsxs("div",{className:"mt-2 mr-4.5 flex items-center justify-between gap-2",children:[s&&jsx(s,{className:"size-6 text-neutral-900"}),jsx(Dialog.Title,{className:"font-jakarta line-clamp-1 flex-1 text-2xl leading-[130%] font-semibold break-all text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==false&&jsx(c,{size:"sm",variant:"ghost",...(({visible:c,...m})=>m)(t)}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:c=true,...m},v)=>c?jsx(c$1,{variant:"ghost",size:"sm",...m},v):null)})]}),d$1&&jsx(Dialog.Description,{className:"font-inter mt-1 mr-4.5 line-clamp-2 text-sm leading-[130%] text-neutral-900",children:d$1})]}));x.displayName="DrawerHeader";var P=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pt-4.25 pb-4.5",o),ref:t,...r,children:a$1}));P.displayName="DrawerFooter";var T=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("h-full overflow-y-auto px-6 py-4",o),ref:t,...r,children:a$1}));T.displayName="DrawerBody";var q=Dialog.CloseTrigger;export{j as a,S as b,X as c,C as d,x as e,P as f,T as g,q as h};
1
+ import {c as c$1}from'./chunk-RQ34YRN4.mjs';import {c}from'./chunk-DNNDD64D.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var j=({onOpenChange:a,...o})=>{let r=useCallback(t=>{a?.(t.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:r,...o})},S=Dialog.Trigger,X=["sm","md","lg","xl"],C=forwardRef(({children:a$1,className:o,size:r="sm",...t},s)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"fixed top-0 left-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:s,className:a("elevation-10 data-[state=closed]:animate-swipe-out data-[state=open]:animate-slide-in h-full bg-neutral-50",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",o),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));C.displayName="DrawerContent";var x=forwardRef(({children:a$1,className:o,title:r,buttons:t=[],Icon:s,description:d$1,...f},w)=>jsxs("div",{className:a("border-b border-neutral-200 pt-2 pb-3.75 pl-4.5",o),ref:w,...f,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"mr-2 ml-auto size-6 cursor-pointer"})}),jsxs("div",{className:"mt-2 mr-4.5 flex items-center justify-between gap-2",children:[s&&jsx(s,{className:"size-6 text-neutral-900"}),jsx(Dialog.Title,{className:"font-jakarta line-clamp-1 flex-1 text-2xl leading-[130%] font-semibold break-all text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==false&&jsx(c,{size:"sm",variant:"ghost",...(({visible:c,...m})=>m)(t)}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:c=true,...m},v)=>c?jsx(c$1,{variant:"ghost",size:"sm",...m},v):null)})]}),d$1&&jsx(Dialog.Description,{className:"font-inter mt-1 mr-4.5 line-clamp-2 text-sm leading-[130%] text-neutral-900",children:d$1})]}));x.displayName="DrawerHeader";var P=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pt-4.25 pb-4.5",o),ref:t,...r,children:a$1}));P.displayName="DrawerFooter";var T=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("h-full overflow-y-auto px-6 py-4",o),ref:t,...r,children:a$1}));T.displayName="DrawerBody";var q=Dialog.CloseTrigger;export{j as a,S as b,X as c,C as d,x as e,P as f,T as g,q as h};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {jsx,jsxs}from'react/jsx-runtime';var v=({children:e,className:r,...o})=>jsx("div",{...o,className:a("bg-neutral-80 @container rounded-lg border border-neutral-200",r),children:e}),u=({title:e,buttons:r,...o})=>jsxs("div",{...o,children:[jsxs("div",{className:"flex items-center justify-between gap-2.5 px-3 py-2 empty:hidden",children:[!!e&&jsx("h2",{className:"text-lg font-medium",children:e}),!!r&&r?.length>0&&jsx("div",{className:"ml-auto flex gap-2",children:r?.map((i,p)=>jsx(c,{...i,size:"sm"},p))})]}),jsx(a$1,{})]}),P=({children:e,className:r,...o})=>jsx("div",{...o,className:a("px-3 py-4",r),children:e}),y=({children:e,ignorePadding:r=false,innerClassName:o,...i})=>jsxs("div",{...i,children:[jsx(a$1,{}),jsx("div",{className:a(o,!r&&"px-3 py-4"),children:e})]});export{v as a,u as b,P as c,y as d};
1
+ import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-DNNDD64D.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {jsx,jsxs}from'react/jsx-runtime';var v=({children:e,className:r,...o})=>jsx("div",{...o,className:a("bg-neutral-80 @container rounded-lg border border-neutral-200",r),children:e}),u=({title:e,buttons:r,...o})=>jsxs("div",{...o,children:[jsxs("div",{className:"flex items-center justify-between gap-2.5 px-3 py-2 empty:hidden",children:[!!e&&jsx("h2",{className:"text-lg font-medium",children:e}),!!r&&r?.length>0&&jsx("div",{className:"ml-auto flex gap-2",children:r?.map((i,p)=>jsx(c,{...i,size:"sm"},p))})]}),jsx(a$1,{})]}),P=({children:e,className:r,...o})=>jsx("div",{...o,className:a("px-3 py-4",r),children:e}),y=({children:e,ignorePadding:r=false,innerClassName:o,...i})=>jsxs("div",{...i,children:[jsx(a$1,{}),jsx("div",{className:a(o,!r&&"px-3 py-4"),children:e})]});export{v as a,u as b,P as c,y as d};
@@ -0,0 +1 @@
1
+ import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsx}from'react/jsx-runtime';var x=["lg","md","sm","xs"],B=["contained","secondary","outlined","ghost","standard","white"],p=tv({slots:{container:"font-inter flex items-center justify-center text-base font-semibold transition-all ring-inset",icon:""},variants:{variant:{contained:{},secondary:{},outlined:{},ghost:{},standard:{},white:{}},size:{lg:{container:"size-12 rounded-md",icon:"h-6 w-6"},md:{container:"size-10 rounded-md",icon:"h-6 w-6"},sm:{container:"size-8 rounded-md",icon:"h-4.5 w-4.5"},xs:{container:"size-6 rounded-sm",icon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:true,className:{container:"cursor-not-allowed text-neutral-500"}},{disabled:false,className:{container:"cursor-pointer"}},{disabled:false,variant:"contained",className:{container:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0"}},{disabled:true,variant:"contained",className:{container:"bg-neutral-200 ring-0"}},{disabled:false,variant:"secondary",className:{container:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 active:ring-1"}},{disabled:true,variant:"secondary",className:{container:"bg-neutral-50/0 ring-1 ring-neutral-500"}},{disabled:false,variant:"outlined",className:{container:"text-neutral-900 ring-1 ring-neutral-900 hover:bg-primary-100 active:bg-primary-200 focus:ring-primary-800 active:ring-neutral-900 focus:ring-3 active:ring-1"}},{disabled:true,variant:"outlined",className:{container:"bg-neutral-50/0 ring-1 ring-neutral-500"}},{disabled:false,variant:"ghost",className:{container:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 focus:ring-3 focus:ring-inset active:ring-0"}},{disabled:true,variant:"ghost",className:{container:"bg-neutral-50"}},{disabled:false,variant:"standard",className:{container:"text-neutral-900 hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 focus:ring-3 active:ring-0"}},{disabled:true,variant:"standard",className:{container:"bg-neutral-50"}},{disabled:false,variant:"white",className:{container:"bg-neutral-50 text-neutral-900 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},{disabled:true,variant:"white",className:{container:"bg-neutral-50"}}],defaultVariants:{variant:"contained",size:"sm",disabled:false}}),w=forwardRef(({className:t,variant:e,disabled:a,Icon:n,size:i,type:s="button",iconClassName:o,...c},l)=>{let{container:d,icon:u}=p({variant:e,size:i,disabled:a});return jsx("button",{ref:l,disabled:a,className:d({className:t}),type:s,...c,children:jsx(n,{className:u({className:o})})})});export{x as a,B as b,w as c};
@@ -1 +1 @@
1
- import {d}from'./chunk-4MO4OFLX.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-GTPSQXE3.mjs';import {c as c$2}from'./chunk-PTRXL7BY.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$3}from'./chunk-JTO6FE4R.mjs';import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-JEYTNPAV.mjs';import {c as c$1,h}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:x,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:x,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{x.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:x,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(v=>{O.current.style.display="none",d.current.value=v.label,M(v),t?.(v);},[t]),w=useCallback(()=>{if(!d?.current)return;let v=d.current.getBoundingClientRect();ue(v);let k=U?U.height:q,I=window.innerHeight-v.bottom>k,te=v.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let v=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(v),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:v=>{v.target.value||(M(null),t?.(null)),s?.(v);},onClean:()=>{M(null),z(e),t?.(null);},onClick:v=>{O.current.style.display="flex",o?.(v);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:x,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,x]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:x,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),x=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:x,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var vt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=vt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:x,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:x?{width:`${x.width}px`,left:x.left,top:c$1==="bottom"?`${x.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-x.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:x}=D();return jsx(a$4,{ref:x,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:x,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),v=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",v),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,v,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:x,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
1
+ import {d}from'./chunk-4MO4OFLX.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-GTPSQXE3.mjs';import {c as c$2}from'./chunk-PTRXL7BY.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$3}from'./chunk-JTO6FE4R.mjs';import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c as c$3}from'./chunk-RQ34YRN4.mjs';import {c}from'./chunk-DNNDD64D.mjs';import {a}from'./chunk-JEYTNPAV.mjs';import {c as c$1,h}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:x,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:x,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{x.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:x,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(v=>{O.current.style.display="none",d.current.value=v.label,M(v),t?.(v);},[t]),w=useCallback(()=>{if(!d?.current)return;let v=d.current.getBoundingClientRect();ue(v);let k=U?U.height:q,I=window.innerHeight-v.bottom>k,te=v.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let v=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(v),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:v=>{v.target.value||(M(null),t?.(null)),s?.(v);},onClean:()=>{M(null),z(e),t?.(null);},onClick:v=>{O.current.style.display="flex",o?.(v);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:x,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,x]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:x,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),x=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:x,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var vt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=vt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:x,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:x?{width:`${x.width}px`,left:x.left,top:c$1==="bottom"?`${x.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-x.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:x}=D();return jsx(a$4,{ref:x,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:x,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),v=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",v),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,v,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:x,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
@@ -1 +1 @@
1
- import {c}from'./chunk-7NJTMO4L.mjs';import {c as c$2}from'./chunk-AI4D6AOK.mjs';import {b,e,f,c as c$1,d}from'./chunk-5VHBHGBZ.mjs';import {a as a$1}from'./chunk-XJD5SYZJ.mjs';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var N=["success","warning","error","info","loading"],T=createToaster({placement:"top",overlap:false,gap:8,duration:5e3}),a="hidden size-6 animate-in fade-in-0 zoom-in duration-300",R=d$1=>jsx(Toaster,{toaster:T,...d$1,children:r=>jsxs(Toast.Root,{className:a$1("group z-(--z-index) flex h-(--height) max-w-175 min-w-70 translate-x-(--x) translate-y-(--y) items-center rounded-lg opacity-(--opacity) transition-all will-change-transform","data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down p-3 pr-2","data-[type=success]:bg-success-300","data-[type=info]:bg-info-300","data-[type=warning]:bg-warning-300","data-[type=error]:bg-danger-300","data-[type=loading]:bg-primary-500"),children:[jsx(c,{size:"md",variant:"inverse",className:"hidden group-data-[type=loading]:block"}),jsx(b,{className:a$1(a,"text-success-800 group-data-[type=success]:block")}),jsx(e,{className:a$1(a,"text-info-800 group-data-[type=info]:block")}),jsx(f,{className:a$1(a,"text-warning-800 group-data-[type=warning]:block")}),jsx(c$1,{className:a$1(a,"text-danger-800 group-data-[type=error]:block")}),jsx(Toast.Title,{className:"font-inter mr-4.5 ml-3 flex-1 truncate text-sm leading-[140%] font-medium text-neutral-900 group-data-[type=loading]:text-neutral-50",children:r.title}),jsx(Toast.CloseTrigger,{className:"ml-4.5",children:jsx(c$2,{Icon:d,size:"sm",variant:"standard",className:"group-data-[type=loading]:text-neutral-50"})})]},r.id)});export{N as a,T as b,R as c};
1
+ import {c}from'./chunk-7NJTMO4L.mjs';import {c as c$2}from'./chunk-RQ34YRN4.mjs';import {b,e,f,c as c$1,d}from'./chunk-5VHBHGBZ.mjs';import {a as a$1}from'./chunk-XJD5SYZJ.mjs';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var N=["success","warning","error","info","loading"],T=createToaster({placement:"top",overlap:false,gap:8,duration:5e3}),a="hidden size-6 animate-in fade-in-0 zoom-in duration-300",R=d$1=>jsx(Toaster,{toaster:T,...d$1,children:r=>jsxs(Toast.Root,{className:a$1("group z-(--z-index) flex h-(--height) max-w-175 min-w-70 translate-x-(--x) translate-y-(--y) items-center rounded-lg opacity-(--opacity) transition-all will-change-transform","data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down p-3 pr-2","data-[type=success]:bg-success-300","data-[type=info]:bg-info-300","data-[type=warning]:bg-warning-300","data-[type=error]:bg-danger-300","data-[type=loading]:bg-primary-500"),children:[jsx(c,{size:"md",variant:"inverse",className:"hidden group-data-[type=loading]:block"}),jsx(b,{className:a$1(a,"text-success-800 group-data-[type=success]:block")}),jsx(e,{className:a$1(a,"text-info-800 group-data-[type=info]:block")}),jsx(f,{className:a$1(a,"text-warning-800 group-data-[type=warning]:block")}),jsx(c$1,{className:a$1(a,"text-danger-800 group-data-[type=error]:block")}),jsx(Toast.Title,{className:"font-inter mr-4.5 ml-3 flex-1 truncate text-sm leading-[140%] font-medium text-neutral-900 group-data-[type=loading]:text-neutral-50",children:r.title}),jsx(Toast.CloseTrigger,{className:"ml-4.5",children:jsx(c$2,{Icon:d,size:"sm",variant:"standard",className:"group-data-[type=loading]:text-neutral-50"})})]},r.id)});export{N as a,T as b,R as c};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import*as t from'@radix-ui/react-alert-dialog';import {jsx,jsxs}from'react/jsx-runtime';var N=t.Root,x=t.Trigger,p=t.Portal,f=t.Cancel,m=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Overlay,{ref:l,className:a("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a$1}));m.displayName=t.Overlay.displayName;var g=r.forwardRef(({className:e,children:a$1,...l},c)=>jsxs(p,{children:[jsx(m,{className:"bg-neutral-900/50"}),jsx(t.Content,{ref:c,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 py-3 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),...l,children:a$1})]}));g.displayName=t.Content.displayName;var T=e=>jsx(c,{variant:"contained",...e}),b=e=>jsx(f,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),B=e=>jsx(c,{variant:"ghost",...e}),D=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4 flex flex-col gap-4 text-left",e),...a$1});D.displayName="AlertDialogHeader";var A=({className:e,...a$2})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mt-3 flex justify-end gap-2 px-6",e),...a$2})]});A.displayName="AlertDialogFooter";var v=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Title,{ref:l,className:a("font-jakarta text-lg font-semibold leading-[160%]",e),...a$1}));v.displayName=t.Title.displayName;var P=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm font-normal leading-[130%]",e),...a$1}));P.displayName=t.Description.displayName;var E=({className:e,...a$1})=>jsx("div",{className:a("mb-4.5 mx-6",e),...a$1});export{N as a,x as b,p as c,m as d,g as e,T as f,b as g,B as h,D as i,A as j,v as k,P as l,E as m};
1
+ import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-DNNDD64D.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import*as t from'@radix-ui/react-alert-dialog';import {jsx,jsxs}from'react/jsx-runtime';var N=t.Root,x=t.Trigger,p=t.Portal,f=t.Cancel,m=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Overlay,{ref:l,className:a("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a$1}));m.displayName=t.Overlay.displayName;var g=r.forwardRef(({className:e,children:a$1,...l},c)=>jsxs(p,{children:[jsx(m,{className:"bg-neutral-900/50"}),jsx(t.Content,{ref:c,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 py-3 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),...l,children:a$1})]}));g.displayName=t.Content.displayName;var T=e=>jsx(c,{variant:"contained",...e}),b=e=>jsx(f,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),B=e=>jsx(c,{variant:"ghost",...e}),D=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4 flex flex-col gap-4 text-left",e),...a$1});D.displayName="AlertDialogHeader";var A=({className:e,...a$2})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mt-3 flex justify-end gap-2 px-6",e),...a$2})]});A.displayName="AlertDialogFooter";var v=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Title,{ref:l,className:a("font-jakarta text-lg font-semibold leading-[160%]",e),...a$1}));v.displayName=t.Title.displayName;var P=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm font-normal leading-[130%]",e),...a$1}));P.displayName=t.Description.displayName;var E=({className:e,...a$1})=>jsx("div",{className:a("mb-4.5 mx-6",e),...a$1});export{N as a,x as b,p as c,m as d,g as e,T as f,b as g,B as h,D as i,A as j,v as k,P as l,E as m};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import {useCallback}from'react';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {jsxs,jsx}from'react/jsx-runtime';var H=({onOpenChange:t,...o})=>{let n=useCallback(m=>{t?.(m.open);},[t]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:n,...o})},F=Dialog.Trigger,f=r.forwardRef(({className:t,children:o,...n},m)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-900/50"}),jsx(Dialog.Positioner,{className:"fixed inset-0 z-50",children:jsx(Dialog.Content,{ref:m,className:a("elevation-9 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 fixed top-[50%] left-[50%] z-50 grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200",t),...n,children:o})})]}));f.displayName="DialogContent";var D=({className:t,...o})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",t),...o});D.displayName="DialogHeader";var u=({className:t,...o})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",t),...o})]});u.displayName="DialogFooter";var M=({className:t,...o})=>jsx("div",{className:a("mx-6 mb-4.5",t),...o}),C=r.forwardRef(({className:t,...o},n)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(Dialog.Title,{ref:n,className:a("font-jakarta pr-2 text-lg leading-[160%] font-semibold",t),...o}),jsxs(Dialog.CloseTrigger,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));C.displayName="DialogTitle";var R=r.forwardRef(({className:t,...o},n)=>jsx(Dialog.Description,{ref:n,className:a("font-inter text-sm leading-[130%] font-normal",t),...o}));R.displayName="DialogDescription";var O=t=>jsx(c,{variant:"contained",...t}),z=t=>jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(c,{variant:"secondary",...t})}),L=t=>jsx(c,{variant:"ghost",...t});export{H as a,F as b,f as c,D as d,u as e,M as f,C as g,R as h,O as i,z as j,L as k};
1
+ import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-DNNDD64D.mjs';import {d}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as r from'react';import {useCallback}from'react';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {jsxs,jsx}from'react/jsx-runtime';var H=({onOpenChange:t,...o})=>{let n=useCallback(m=>{t?.(m.open);},[t]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:n,...o})},F=Dialog.Trigger,f=r.forwardRef(({className:t,children:o,...n},m)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-900/50"}),jsx(Dialog.Positioner,{className:"fixed inset-0 z-50",children:jsx(Dialog.Content,{ref:m,className:a("elevation-9 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 fixed top-[50%] left-[50%] z-50 grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200",t),...n,children:o})})]}));f.displayName="DialogContent";var D=({className:t,...o})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",t),...o});D.displayName="DialogHeader";var u=({className:t,...o})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",t),...o})]});u.displayName="DialogFooter";var M=({className:t,...o})=>jsx("div",{className:a("mx-6 mb-4.5",t),...o}),C=r.forwardRef(({className:t,...o},n)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(Dialog.Title,{ref:n,className:a("font-jakarta pr-2 text-lg leading-[160%] font-semibold",t),...o}),jsxs(Dialog.CloseTrigger,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));C.displayName="DialogTitle";var R=r.forwardRef(({className:t,...o},n)=>jsx(Dialog.Description,{ref:n,className:a("font-inter text-sm leading-[130%] font-normal",t),...o}));R.displayName="DialogDescription";var O=t=>jsx(c,{variant:"contained",...t}),z=t=>jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(c,{variant:"secondary",...t})}),L=t=>jsx(c,{variant:"ghost",...t});export{H as a,F as b,f as c,D as d,u as e,M as f,C as g,R as h,O as i,z as j,L as k};
@@ -1 +1 @@
1
- 'use strict';var l=require('react'),e=require('@radix-ui/react-alert-dialog'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),m=require('@radix-ui/react-separator'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),tailwindVariants=require('tailwind-variants');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 l__namespace=/*#__PURE__*/_interopNamespace(l);var e__namespace=/*#__PURE__*/_interopNamespace(e);var m__namespace=/*#__PURE__*/_interopNamespace(m);function r(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var g=l__namespace.forwardRef(({className:t,orientation:o="horizontal",decorative:i=true,...n},s)=>jsxRuntime.jsx(m__namespace.Root,{ref:s,decorative:i,orientation:o,className:r("shrink-0 bg-neutral-200",o==="horizontal"?"h-px w-full":"h-full w-px",t),...n}));g.displayName=m__namespace.Root.displayName;var y=lucideReact.LoaderCircle;var k=tailwindVariants.tv({slots:{button:"font-inter flex shrink-0 items-center justify-center gap-2 rounded-lg text-base leading-[130%] font-semibold 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 hover:bg-primary-600 focus:bg-primary-500 focus:ring-primary-800 active:bg-primary-700 text-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 ring-[1.5px] ring-inset focus:ring-[3px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"focus:bg-opacity-0 focus:ring-primary-900 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40 leading-[130%] text-neutral-900 ring-[1.5px] ring-neutral-900 ring-inset focus:bg-neutral-50 focus:ring-[3px] active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-opacity-0 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 focus:bg-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},standard:{button:"hover:bg-transparent-primary-20 focus:ring-primary-800 active:bg-transparent-primary-40 disabled:bg-opacity-0 text-neutral-900 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},link:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:text-primary-500 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 underline underline-offset-2 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),p=l.forwardRef(({children:t,className:o,variant:i,size:n,startIcon:s,endIcon:f,loading:d,disabled:R,type:A="button",StartIcon:b,EndIcon:x,...P},I)=>{let{button:w,icon:c,loadingIcon:N}=k({variant:i,size:n,loading:d});return jsxRuntime.jsxs("button",{...P,ref:I,disabled:d||R,className:r(w(),o),type:A,children:[d&&jsxRuntime.jsx(y,{className:N()}),s&&l__namespace.default.cloneElement(s,{className:c()}),b&&jsxRuntime.jsx(b,{className:c()}),t,f&&l__namespace.default.cloneElement(f,{className:c()}),x&&jsxRuntime.jsx(x,{className:c()})]})});var Bt=e__namespace.Root,St=e__namespace.Trigger,z=e__namespace.Portal,F=e__namespace.Cancel,C=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Overlay,{ref:i,className:r("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o}));C.displayName=e__namespace.Overlay.displayName;var V=l__namespace.forwardRef(({className:t,children:o,...i},n)=>jsxRuntime.jsxs(z,{children:[jsxRuntime.jsx(C,{className:"bg-neutral-900/50"}),jsxRuntime.jsx(e__namespace.Content,{ref:n,className:r("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 py-3 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%]",t),...i,children:o})]}));V.displayName=e__namespace.Content.displayName;var Et=t=>jsxRuntime.jsx(p,{variant:"contained",...t}),Mt=t=>jsxRuntime.jsx(F,{asChild:true,children:jsxRuntime.jsx(p,{variant:"secondary",...t})}),kt=t=>jsxRuntime.jsx(p,{variant:"ghost",...t}),O=({className:t,...o})=>jsxRuntime.jsx("div",{className:r("mx-6 mb-4 flex flex-col gap-4 text-left",t),...o});O.displayName="AlertDialogHeader";var W=({className:t,...o})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(g,{className:"w-full"}),jsxRuntime.jsx("div",{className:r("mt-3 flex justify-end gap-2 px-6",t),...o})]});W.displayName="AlertDialogFooter";var U=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Title,{ref:i,className:r("font-jakarta text-lg font-semibold leading-[160%]",t),...o}));U.displayName=e__namespace.Title.displayName;var X=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Description,{ref:i,className:r("font-inter text-sm font-normal leading-[130%]",t),...o}));X.displayName=e__namespace.Description.displayName;var Ht=({className:t,...o})=>jsxRuntime.jsx("div",{className:r("mb-4.5 mx-6",t),...o});exports.AlertDialog=Bt;exports.AlertDialogActionButton=Et;exports.AlertDialogBody=Ht;exports.AlertDialogCloseButton=Mt;exports.AlertDialogContent=V;exports.AlertDialogDescription=X;exports.AlertDialogExtraButton=kt;exports.AlertDialogFooter=W;exports.AlertDialogHeader=O;exports.AlertDialogOverlay=C;exports.AlertDialogPortal=z;exports.AlertDialogTitle=U;exports.AlertDialogTrigger=St;
1
+ 'use strict';var l=require('react'),e=require('@radix-ui/react-alert-dialog'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),p=require('@radix-ui/react-separator'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),tailwindVariants=require('tailwind-variants');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 l__namespace=/*#__PURE__*/_interopNamespace(l);var e__namespace=/*#__PURE__*/_interopNamespace(e);var p__namespace=/*#__PURE__*/_interopNamespace(p);function r(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var g=l__namespace.forwardRef(({className:t,orientation:o="horizontal",decorative:i=true,...n},s)=>jsxRuntime.jsx(p__namespace.Root,{ref:s,decorative:i,orientation:o,className:r("shrink-0 bg-neutral-200",o==="horizontal"?"h-px w-full":"h-full w-px",t),...n}));g.displayName=p__namespace.Root.displayName;var y=lucideReact.LoaderCircle;var M=tailwindVariants.tv({slots:{button:"font-inter ring-inset flex shrink-0 items-center justify-center gap-2 rounded-md text-base leading-[130%] font-semibold transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-500"},variants:{size:{lg:{button:"h-12 px-4",icon:"size-4.5",loadingIcon:"size-6"},md:{button:"h-10 px-4 text-sm leading-[142%]",icon:"size-4.5",loadingIcon:"size-6"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[142%]",icon:"size-3.5",loadingIcon:"size-4"},xs:{button:"h-6 gap-1 rounded-sm px-3 text-xs leading-[142%]",icon:"size-3",loadingIcon:"size-4"}},variant:{contained:{button:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0 disabled:bg-neutral-200 disabled:text-neutral-500"},secondary:{button:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},ghost:{button:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 disabled:bg-opacity-0 focus:ring-3 focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},outlined:{button:"focus:ring-primary-800 [&:not([disabled])]:hover:bg-primary-100 [&:not([disabled])]:active:bg-primary-200 leading-[130%] text-neutral-900 ring-1 ring-neutral-900 active:ring-neutral-900 focus:ring-3 active:ring-1 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},standard:{button:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 disabled:bg-opacity-0 text-neutral-900 focus:ring-3 active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},white:{button:"bg-neutral-50 text-neutral-900 disabled:bg-neutral-50 disabled:text-neutral-500 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},compoundVariants:[{variant:"contained",loading:true,className:{button:"text-neutral-200!"}}],defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),d=l.forwardRef(({children:t,className:o,variant:i,size:n,startIcon:s,endIcon:f,loading:m,disabled:A,type:h="button",StartIcon:b,EndIcon:v,...P},I)=>{let{button:N,icon:c,loadingIcon:w}=M({variant:i,size:n,loading:m});return jsxRuntime.jsxs("button",{...P,ref:I,disabled:m||A,className:r(N(),o),type:h,children:[m&&jsxRuntime.jsx(y,{className:w()}),s&&l__namespace.default.cloneElement(s,{className:c()}),b&&jsxRuntime.jsx(b,{className:c()}),t,f&&l__namespace.default.cloneElement(f,{className:c()}),v&&jsxRuntime.jsx(v,{className:c()})]})});var zt=e__namespace.Root,Bt=e__namespace.Trigger,k=e__namespace.Portal,F=e__namespace.Cancel,D=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Overlay,{ref:i,className:r("bg-black/80 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o}));D.displayName=e__namespace.Overlay.displayName;var V=l__namespace.forwardRef(({className:t,children:o,...i},n)=>jsxRuntime.jsxs(k,{children:[jsxRuntime.jsx(D,{className:"bg-neutral-900/50"}),jsxRuntime.jsx(e__namespace.Content,{ref:n,className:r("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 py-3 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%]",t),...i,children:o})]}));V.displayName=e__namespace.Content.displayName;var St=t=>jsxRuntime.jsx(d,{variant:"contained",...t}),Et=t=>jsxRuntime.jsx(F,{asChild:true,children:jsxRuntime.jsx(d,{variant:"secondary",...t})}),Mt=t=>jsxRuntime.jsx(d,{variant:"ghost",...t}),O=({className:t,...o})=>jsxRuntime.jsx("div",{className:r("mx-6 mb-4 flex flex-col gap-4 text-left",t),...o});O.displayName="AlertDialogHeader";var W=({className:t,...o})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(g,{className:"w-full"}),jsxRuntime.jsx("div",{className:r("mt-3 flex justify-end gap-2 px-6",t),...o})]});W.displayName="AlertDialogFooter";var U=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Title,{ref:i,className:r("font-jakarta text-lg font-semibold leading-[160%]",t),...o}));U.displayName=e__namespace.Title.displayName;var X=l__namespace.forwardRef(({className:t,...o},i)=>jsxRuntime.jsx(e__namespace.Description,{ref:i,className:r("font-inter text-sm font-normal leading-[130%]",t),...o}));X.displayName=e__namespace.Description.displayName;var Ht=({className:t,...o})=>jsxRuntime.jsx("div",{className:r("mb-4.5 mx-6",t),...o});exports.AlertDialog=zt;exports.AlertDialogActionButton=St;exports.AlertDialogBody=Ht;exports.AlertDialogCloseButton=Et;exports.AlertDialogContent=V;exports.AlertDialogDescription=X;exports.AlertDialogExtraButton=Mt;exports.AlertDialogFooter=W;exports.AlertDialogHeader=O;exports.AlertDialogOverlay=D;exports.AlertDialogPortal=k;exports.AlertDialogTitle=U;exports.AlertDialogTrigger=Bt;
@@ -1 +1 @@
1
- export{a as AlertDialog,f as AlertDialogActionButton,m as AlertDialogBody,g as AlertDialogCloseButton,e as AlertDialogContent,l as AlertDialogDescription,h as AlertDialogExtraButton,j as AlertDialogFooter,i as AlertDialogHeader,d as AlertDialogOverlay,c as AlertDialogPortal,k as AlertDialogTitle,b as AlertDialogTrigger}from'../chunk-G24D4VG2.mjs';import'../chunk-OG3OUJ6C.mjs';import'../chunk-JWB3TN2C.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
1
+ export{a as AlertDialog,f as AlertDialogActionButton,m as AlertDialogBody,g as AlertDialogCloseButton,e as AlertDialogContent,l as AlertDialogDescription,h as AlertDialogExtraButton,j as AlertDialogFooter,i as AlertDialogHeader,d as AlertDialogOverlay,c as AlertDialogPortal,k as AlertDialogTitle,b as AlertDialogTrigger}from'../chunk-YXWDYXUX.mjs';import'../chunk-OG3OUJ6C.mjs';import'../chunk-DNNDD64D.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
@@ -1 +1 @@
1
- 'use strict';var L=require('react'),tailwindVariants=require('tailwind-variants'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);var v=lucideReact.LoaderCircle,h=lucideReact.CircleCheck,I=lucideReact.CircleX,C=lucideReact.X,N=lucideReact.Info,w=lucideReact.TriangleAlert;function u(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var X=tailwindVariants.tv({slots:{button:"font-inter flex shrink-0 items-center justify-center gap-2 rounded-lg text-base leading-[130%] font-semibold 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 hover:bg-primary-600 focus:bg-primary-500 focus:ring-primary-800 active:bg-primary-700 text-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 ring-[1.5px] ring-inset focus:ring-[3px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"focus:bg-opacity-0 focus:ring-primary-900 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40 leading-[130%] text-neutral-900 ring-[1.5px] ring-neutral-900 ring-inset focus:bg-neutral-50 focus:ring-[3px] active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-opacity-0 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 focus:bg-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},standard:{button:"hover:bg-transparent-primary-20 focus:ring-primary-800 active:bg-transparent-primary-40 disabled:bg-opacity-0 text-neutral-900 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},link:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:text-primary-500 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 underline underline-offset-2 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),M=L.forwardRef(({children:e,className:c,variant:t,size:l,startIcon:r,endIcon:n,loading:a,disabled:p,type:d="button",StartIcon:o,EndIcon:i,...m},b)=>{let{button:x,icon:s,loadingIcon:P}=X({variant:t,size:l,loading:a});return jsxRuntime.jsxs("button",{...m,ref:b,disabled:a||p,className:u(x(),c),type:d,children:[a&&jsxRuntime.jsx(v,{className:P()}),r&&L__default.default.cloneElement(r,{className:s()}),o&&jsxRuntime.jsx(o,{className:s()}),e,n&&L__default.default.cloneElement(n,{className:s()}),i&&jsxRuntime.jsx(i,{className:s()})]})});var G=tailwindVariants.tv({slots:{container:"font-inter flex items-center justify-center text-base font-semibold transition-all ring-inset",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-sm",icon:"h-4.5 w-4.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:true,className:{container:"cursor-not-allowed text-neutral-400"}},{disabled:false,className:{container:"cursor-pointer"}},{disabled:false,variant:"contained",className:{container:"bg-primary-500 hover:bg-primary-600 focus:bg-primary-500 focus:ring-primary-800 active:bg-primary-700 text-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0"}},{disabled:true,variant:"contained",className:{container:"bg-neutral-100 ring-0"}},{disabled:false,variant:"secondary",className:{container:"text-primary-500 ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:text-primary-500 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 ring-[1.5px] ring-inset focus:bg-neutral-50/0 focus:ring-[3px] active:ring-[1.5px]"}},{disabled:true,variant:"secondary",className:{container:"ring-neutral-400 disabled:ring-[1.5px]"}},{disabled:false,variant:"outlined",className:{container:"hover:bg-transparent-primary-20 active:bg-transparent-primary-40 text-neutral-900 ring-[1.5px] ring-neutral-900 focus:ring-[3px]"}},{disabled:true,variant:"outlined",className:{container:"text-neutral-400 ring-[1.5px] ring-neutral-400"}},{disabled:false,variant:"ghost",className:{container:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0"}},{disabled:true,variant:"ghost",className:{container:""}},{disabled:false,variant:"standard",className:{container:"hover:bg-transparent-primary-20 focus:bg-opacity-0 focus:ring-primary-800 active:bg-transparent-primary-40 text-neutral-900 focus:bg-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0"}},{disabled:true,variant:"standard",className:{container:""}}],defaultVariants:{variant:"contained",size:"sm",disabled:false}}),k=L.forwardRef(({className:e,variant:c,disabled:t,Icon:l,size:r,type:n="button",iconClassName:a,...p},d)=>{let{container:o,icon:i}=G({variant:c,size:r,disabled:t});return jsxRuntime.jsx("button",{ref:d,disabled:t,className:o({className:e}),type:n,...p,children:jsxRuntime.jsx(l,{className:i({className:a})})})});var W=tailwindVariants.tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),Y={warning:w,success:h,error:I,info:N},qt=({variant:e="info",className:c,description:t,title:l,hasCloseButton:r=true,actionButton:n})=>{let[a,p]=L.useState(true),{container:d,icon:o,closeIcon:i,title:m,description:b}=W({variant:e,hasCloseButton:r}),x=L.useCallback(()=>{p(false);},[]),s=Y[e||"info"];return jsxRuntime.jsxs("div",{role:"alert",className:u(d(),c,!a&&"hidden"),children:[jsxRuntime.jsxs("div",{className:"flex flex-1",children:[jsxRuntime.jsx(s,{className:o({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("h6",{className:m({className:t&&"font-semibold"}),children:l}),t&&jsxRuntime.jsx("p",{className:b(),children:t})]})]}),n&&jsxRuntime.jsx(M,{...n,variant:"white",className:u("my-auto ml-4.5",n.className),size:"md"}),r&&jsxRuntime.jsx(k,{Icon:C,className:i(),size:"sm",variant:"standard",onClick:x,"aria-label":"Close alert"})]})};exports.AlertMessage=qt;
1
+ 'use strict';var L=require('react'),tailwindVariants=require('tailwind-variants'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);var y=lucideReact.LoaderCircle,h=lucideReact.CircleCheck,I=lucideReact.CircleX,C=lucideReact.X,N=lucideReact.Info,w=lucideReact.TriangleAlert;function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var X=tailwindVariants.tv({slots:{button:"font-inter ring-inset flex shrink-0 items-center justify-center gap-2 rounded-md text-base leading-[130%] font-semibold transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-500"},variants:{size:{lg:{button:"h-12 px-4",icon:"size-4.5",loadingIcon:"size-6"},md:{button:"h-10 px-4 text-sm leading-[142%]",icon:"size-4.5",loadingIcon:"size-6"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[142%]",icon:"size-3.5",loadingIcon:"size-4"},xs:{button:"h-6 gap-1 rounded-sm px-3 text-xs leading-[142%]",icon:"size-3",loadingIcon:"size-4"}},variant:{contained:{button:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0 disabled:bg-neutral-200 disabled:text-neutral-500"},secondary:{button:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},ghost:{button:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 disabled:bg-opacity-0 focus:ring-3 focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},outlined:{button:"focus:ring-primary-800 [&:not([disabled])]:hover:bg-primary-100 [&:not([disabled])]:active:bg-primary-200 leading-[130%] text-neutral-900 ring-1 ring-neutral-900 active:ring-neutral-900 focus:ring-3 active:ring-1 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},standard:{button:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 disabled:bg-opacity-0 text-neutral-900 focus:ring-3 active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},white:{button:"bg-neutral-50 text-neutral-900 disabled:bg-neutral-50 disabled:text-neutral-500 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},compoundVariants:[{variant:"contained",loading:true,className:{button:"text-neutral-200!"}}],defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),M=L.forwardRef(({children:e,className:c,variant:t,size:l,startIcon:r,endIcon:n,loading:a,disabled:d,type:u="button",StartIcon:o,EndIcon:i,...p},b)=>{let{button:f,icon:s,loadingIcon:P}=X({variant:t,size:l,loading:a});return jsxRuntime.jsxs("button",{...p,ref:b,disabled:a||d,className:m(f(),c),type:u,children:[a&&jsxRuntime.jsx(y,{className:P()}),r&&L__default.default.cloneElement(r,{className:s()}),o&&jsxRuntime.jsx(o,{className:s()}),e,n&&L__default.default.cloneElement(n,{className:s()}),i&&jsxRuntime.jsx(i,{className:s()})]})});var G=tailwindVariants.tv({slots:{container:"font-inter flex items-center justify-center text-base font-semibold transition-all ring-inset",icon:""},variants:{variant:{contained:{},secondary:{},outlined:{},ghost:{},standard:{},white:{}},size:{lg:{container:"size-12 rounded-md",icon:"h-6 w-6"},md:{container:"size-10 rounded-md",icon:"h-6 w-6"},sm:{container:"size-8 rounded-md",icon:"h-4.5 w-4.5"},xs:{container:"size-6 rounded-sm",icon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:true,className:{container:"cursor-not-allowed text-neutral-500"}},{disabled:false,className:{container:"cursor-pointer"}},{disabled:false,variant:"contained",className:{container:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0"}},{disabled:true,variant:"contained",className:{container:"bg-neutral-200 ring-0"}},{disabled:false,variant:"secondary",className:{container:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 active:ring-1"}},{disabled:true,variant:"secondary",className:{container:"bg-neutral-50/0 ring-1 ring-neutral-500"}},{disabled:false,variant:"outlined",className:{container:"text-neutral-900 ring-1 ring-neutral-900 hover:bg-primary-100 active:bg-primary-200 focus:ring-primary-800 active:ring-neutral-900 focus:ring-3 active:ring-1"}},{disabled:true,variant:"outlined",className:{container:"bg-neutral-50/0 ring-1 ring-neutral-500"}},{disabled:false,variant:"ghost",className:{container:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 focus:ring-3 focus:ring-inset active:ring-0"}},{disabled:true,variant:"ghost",className:{container:"bg-neutral-50"}},{disabled:false,variant:"standard",className:{container:"text-neutral-900 hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 focus:ring-3 active:ring-0"}},{disabled:true,variant:"standard",className:{container:"bg-neutral-50"}},{disabled:false,variant:"white",className:{container:"bg-neutral-50 text-neutral-900 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},{disabled:true,variant:"white",className:{container:"bg-neutral-50"}}],defaultVariants:{variant:"contained",size:"sm",disabled:false}}),z=L.forwardRef(({className:e,variant:c,disabled:t,Icon:l,size:r,type:n="button",iconClassName:a,...d},u)=>{let{container:o,icon:i}=G({variant:c,size:r,disabled:t});return jsxRuntime.jsx("button",{ref:u,disabled:t,className:o({className:e}),type:n,...d,children:jsxRuntime.jsx(l,{className:i({className:a})})})});var W=tailwindVariants.tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),Y={warning:w,success:h,error:I,info:N},qt=({variant:e="info",className:c,description:t,title:l,hasCloseButton:r=true,actionButton:n})=>{let[a,d]=L.useState(true),{container:u,icon:o,closeIcon:i,title:p,description:b}=W({variant:e,hasCloseButton:r}),f=L.useCallback(()=>{d(false);},[]),s=Y[e||"info"];return jsxRuntime.jsxs("div",{role:"alert",className:m(u(),c,!a&&"hidden"),children:[jsxRuntime.jsxs("div",{className:"flex flex-1",children:[jsxRuntime.jsx(s,{className:o({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("h6",{className:p({className:t&&"font-semibold"}),children:l}),t&&jsxRuntime.jsx("p",{className:b(),children:t})]})]}),n&&jsxRuntime.jsx(M,{...n,variant:"white",className:m("my-auto ml-4.5",n.className),size:"md"}),r&&jsxRuntime.jsx(z,{Icon:C,className:i(),size:"sm",variant:"standard",onClick:f,"aria-label":"Close alert"})]})};exports.AlertMessage=qt;
@@ -1 +1 @@
1
- export{a as AlertMessage}from'../chunk-7Y2SYD4C.mjs';import'../chunk-AI4D6AOK.mjs';import'../chunk-JWB3TN2C.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
1
+ export{a as AlertMessage}from'../chunk-EQGL4PHV.mjs';import'../chunk-RQ34YRN4.mjs';import'../chunk-DNNDD64D.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
@@ -4,7 +4,7 @@ import React__default, { FC } from 'react';
4
4
  import { LucideIcon } from 'lucide-react';
5
5
 
6
6
  declare const ButtonSizes: readonly ["xs", "sm", "md", "lg"];
7
- declare const ButtonVariants: readonly ["contained", "outlined", "ghost", "standard", "link", "secondary", "white"];
7
+ declare const ButtonVariants: readonly ["contained", "outlined", "ghost", "standard", "secondary", "white"];
8
8
  declare const buttonStyles: tailwind_variants.TVReturnType<{
9
9
  size: {
10
10
  lg: {
@@ -35,16 +35,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
35
35
  secondary: {
36
36
  button: string;
37
37
  };
38
- outlined: {
39
- button: string;
40
- };
41
38
  ghost: {
42
39
  button: string;
43
40
  };
44
- standard: {
41
+ outlined: {
45
42
  button: string;
46
43
  };
47
- link: {
44
+ standard: {
48
45
  button: string;
49
46
  };
50
47
  white: {
@@ -90,16 +87,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
90
87
  secondary: {
91
88
  button: string;
92
89
  };
93
- outlined: {
94
- button: string;
95
- };
96
90
  ghost: {
97
91
  button: string;
98
92
  };
99
- standard: {
93
+ outlined: {
100
94
  button: string;
101
95
  };
102
- link: {
96
+ standard: {
103
97
  button: string;
104
98
  };
105
99
  white: {
@@ -145,16 +139,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
145
139
  secondary: {
146
140
  button: string;
147
141
  };
148
- outlined: {
149
- button: string;
150
- };
151
142
  ghost: {
152
143
  button: string;
153
144
  };
154
- standard: {
145
+ outlined: {
155
146
  button: string;
156
147
  };
157
- link: {
148
+ standard: {
158
149
  button: string;
159
150
  };
160
151
  white: {
@@ -4,7 +4,7 @@ import React__default, { FC } from 'react';
4
4
  import { LucideIcon } from 'lucide-react';
5
5
 
6
6
  declare const ButtonSizes: readonly ["xs", "sm", "md", "lg"];
7
- declare const ButtonVariants: readonly ["contained", "outlined", "ghost", "standard", "link", "secondary", "white"];
7
+ declare const ButtonVariants: readonly ["contained", "outlined", "ghost", "standard", "secondary", "white"];
8
8
  declare const buttonStyles: tailwind_variants.TVReturnType<{
9
9
  size: {
10
10
  lg: {
@@ -35,16 +35,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
35
35
  secondary: {
36
36
  button: string;
37
37
  };
38
- outlined: {
39
- button: string;
40
- };
41
38
  ghost: {
42
39
  button: string;
43
40
  };
44
- standard: {
41
+ outlined: {
45
42
  button: string;
46
43
  };
47
- link: {
44
+ standard: {
48
45
  button: string;
49
46
  };
50
47
  white: {
@@ -90,16 +87,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
90
87
  secondary: {
91
88
  button: string;
92
89
  };
93
- outlined: {
94
- button: string;
95
- };
96
90
  ghost: {
97
91
  button: string;
98
92
  };
99
- standard: {
93
+ outlined: {
100
94
  button: string;
101
95
  };
102
- link: {
96
+ standard: {
103
97
  button: string;
104
98
  };
105
99
  white: {
@@ -145,16 +139,13 @@ declare const buttonStyles: tailwind_variants.TVReturnType<{
145
139
  secondary: {
146
140
  button: string;
147
141
  };
148
- outlined: {
149
- button: string;
150
- };
151
142
  ghost: {
152
143
  button: string;
153
144
  };
154
- standard: {
145
+ outlined: {
155
146
  button: string;
156
147
  };
157
- link: {
148
+ standard: {
158
149
  button: string;
159
150
  };
160
151
  white: {
@@ -1 +1 @@
1
- 'use strict';var p=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);function c(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var l=lucideReact.LoaderCircle;var at=["xs","sm","md","lg"],it=["contained","outlined","ghost","standard","link","secondary","white"],k=tailwindVariants.tv({slots:{button:"font-inter flex shrink-0 items-center justify-center gap-2 rounded-lg text-base leading-[130%] font-semibold 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 hover:bg-primary-600 focus:bg-primary-500 focus:ring-primary-800 active:bg-primary-700 text-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-100 disabled:text-neutral-400"},secondary:{button:"text-primary-500 ring-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 hover:ring-primary-600 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 active:ring-primary-700 ring-[1.5px] ring-inset focus:ring-[3px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},outlined:{button:"focus:bg-opacity-0 focus:ring-primary-900 [&:not([disabled])]:hover:bg-transparent-primary-20 [&:not([disabled])]:active:bg-transparent-primary-40 leading-[130%] text-neutral-900 ring-[1.5px] ring-neutral-900 ring-inset focus:bg-neutral-50 focus:ring-[3px] active:ring-[1.5px] disabled:bg-neutral-50/0 disabled:text-neutral-400 disabled:ring-[1.5px] disabled:ring-neutral-400"},ghost:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:bg-opacity-0 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 focus:bg-neutral-50 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},standard:{button:"hover:bg-transparent-primary-20 focus:ring-primary-800 active:bg-transparent-primary-40 disabled:bg-opacity-0 text-neutral-900 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},link:{button:"text-primary-500 hover:bg-transparent-primary-20 hover:text-primary-600 focus:text-primary-500 focus:ring-primary-800 active:bg-transparent-primary-40 active:text-primary-700 disabled:bg-opacity-0 underline underline-offset-2 focus:bg-neutral-50/0 focus:ring-[3px] focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-400"},white:{button:"bg-neutral-50 text-neutral-900"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),st=p.forwardRef(({children:e,className:d,variant:u,size:g,startIcon:o,endIcon:a,loading:n,disabled:b,type:x="button",StartIcon:i,EndIcon:s,...m},f)=>{let{button:y,icon:t,loadingIcon:h}=k({variant:u,size:g,loading:n});return jsxRuntime.jsxs("button",{...m,ref:f,disabled:n||b,className:c(y(),d),type:x,children:[n&&jsxRuntime.jsx(l,{className:h()}),o&&p__default.default.cloneElement(o,{className:t()}),i&&jsxRuntime.jsx(i,{className:t()}),e,a&&p__default.default.cloneElement(a,{className:t()}),s&&jsxRuntime.jsx(s,{className:t()})]})});exports.Button=st;exports.ButtonSizes=at;exports.ButtonVariants=it;
1
+ 'use strict';var d=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var d__default=/*#__PURE__*/_interopDefault(d);function s(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var l=lucideReact.LoaderCircle;var at=["xs","sm","md","lg"],it=["contained","outlined","ghost","standard","secondary","white"],z=tailwindVariants.tv({slots:{button:"font-inter ring-inset flex shrink-0 items-center justify-center gap-2 rounded-md text-base leading-[130%] font-semibold transition-all ease-linear disabled:cursor-not-allowed disabled:ring-0",icon:"",loadingIcon:"absolute animate-spin text-neutral-500"},variants:{size:{lg:{button:"h-12 px-4",icon:"size-4.5",loadingIcon:"size-6"},md:{button:"h-10 px-4 text-sm leading-[142%]",icon:"size-4.5",loadingIcon:"size-6"},sm:{button:"h-8 gap-1 px-3 text-sm leading-[142%]",icon:"size-3.5",loadingIcon:"size-4"},xs:{button:"h-6 gap-1 rounded-sm px-3 text-xs leading-[142%]",icon:"size-3",loadingIcon:"size-4"}},variant:{contained:{button:"bg-primary-600 hover:bg-primary-700 focus:bg-primary-600 focus:ring-primary-800 active:bg-primary-800 text-neutral-50 focus:ring-3 active:ring-0 disabled:bg-neutral-200 disabled:text-neutral-500"},secondary:{button:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 ring-1 focus:ring-3 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},ghost:{button:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 disabled:bg-opacity-0 focus:ring-3 focus:ring-inset active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},outlined:{button:"focus:ring-primary-800 [&:not([disabled])]:hover:bg-primary-100 [&:not([disabled])]:active:bg-primary-200 leading-[130%] text-neutral-900 ring-1 ring-neutral-900 active:ring-neutral-900 focus:ring-3 active:ring-1 disabled:bg-neutral-50/0 disabled:text-neutral-500 disabled:ring-1 disabled:ring-neutral-500"},standard:{button:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 disabled:bg-opacity-0 text-neutral-900 focus:ring-3 active:ring-0 disabled:bg-neutral-50 disabled:text-neutral-500"},white:{button:"bg-neutral-50 text-neutral-900 disabled:bg-neutral-50 disabled:text-neutral-500 hover:bg-primary-100 focus:ring-primary-800 focus:ring-3 active:bg-primary-200 active:ring-0"}},loading:{true:{button:"disabled:text-opacity-0 disabled:text-neutral-50"}}},compoundVariants:[{variant:"contained",loading:true,className:{button:"text-neutral-200!"}}],defaultVariants:{variant:"contained",size:"md",loading:false,disabled:false}}),ct=d.forwardRef(({children:e,className:p,variant:u,size:g,startIcon:o,endIcon:a,loading:n,disabled:b,type:m="button",StartIcon:i,EndIcon:c,...x},y)=>{let{button:f,icon:t,loadingIcon:v}=z({variant:u,size:g,loading:n});return jsxRuntime.jsxs("button",{...x,ref:y,disabled:n||b,className:s(f(),p),type:m,children:[n&&jsxRuntime.jsx(l,{className:v()}),o&&d__default.default.cloneElement(o,{className:t()}),i&&jsxRuntime.jsx(i,{className:t()}),e,a&&d__default.default.cloneElement(a,{className:t()}),c&&jsxRuntime.jsx(c,{className:t()})]})});exports.Button=ct;exports.ButtonSizes=at;exports.ButtonVariants=it;
@@ -1 +1 @@
1
- export{c as Button,a as ButtonSizes,b as ButtonVariants}from'../chunk-JWB3TN2C.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
1
+ export{c as Button,a as ButtonSizes,b as ButtonVariants}from'../chunk-DNNDD64D.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';