sodtrack-web-ui 0.98.2 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{chunk-OPWX6EBA.js → chunk-2OJ2LRZA.js} +1 -1
  2. package/dist/{chunk-SB2JBFW6.js → chunk-3TBZ7FGN.js} +1 -1
  3. package/dist/chunk-4EGZE4NX.js +1 -0
  4. package/dist/chunk-5DHKKW3D.js +1 -0
  5. package/dist/{chunk-65WLWC63.js → chunk-5OQTVJO2.js} +1 -1
  6. package/dist/{chunk-YHQAFR3D.js → chunk-64JCYMY5.js} +1 -1
  7. package/dist/{chunk-VFP3D5WF.js → chunk-A2VW62QH.js} +1 -1
  8. package/dist/chunk-BJ5MXTGP.js +1 -0
  9. package/dist/{chunk-SXTK4LA4.js → chunk-BUM5T6I7.js} +1 -1
  10. package/dist/{chunk-N46RZTMR.js → chunk-DKI2JHBR.js} +1 -1
  11. package/dist/{chunk-F3ZDZSCG.js → chunk-E23TVVWA.js} +1 -1
  12. package/dist/chunk-FHABUQAH.js +1 -0
  13. package/dist/{chunk-HHJM6SWF.js → chunk-GYLE3EGC.js} +1 -1
  14. package/dist/chunk-GZ7UH57N.js +1 -0
  15. package/dist/chunk-JGUHGA63.js +1 -0
  16. package/dist/{chunk-OAW3XWAG.js → chunk-JX5TSRNT.js} +1 -1
  17. package/dist/{chunk-XYILEUFO.js → chunk-O2N7SQS4.js} +1 -1
  18. package/dist/{chunk-HT7JENHZ.js → chunk-PAVCJDAL.js} +1 -1
  19. package/dist/{chunk-3Q4SUKIS.js → chunk-PK7E4VZY.js} +1 -1
  20. package/dist/chunk-T2GZMGRZ.js +1 -0
  21. package/dist/{chunk-5BEBJ46Z.js → chunk-TIYCBFYY.js} +1 -1
  22. package/dist/{chunk-UGSIXJ7I.js → chunk-VCBJUVN5.js} +1 -1
  23. package/dist/{chunk-RUXFKJLX.js → chunk-WJVDLWF3.js} +1 -1
  24. package/dist/{chunk-ASGV5EOD.js → chunk-WOZN4EU3.js} +1 -1
  25. package/dist/{chunk-NYGSJ2OJ.js → chunk-ZDWTWZ36.js} +1 -1
  26. package/dist/chunk-ZMKK7PDX.js +1 -0
  27. package/dist/components/accordion-form.js +1 -1
  28. package/dist/components/accordion.js +1 -1
  29. package/dist/components/autocomplete-multiple-new-skeleton.d.ts +8 -0
  30. package/dist/components/autocomplete-multiple-new-skeleton.js +1 -0
  31. package/dist/components/autocomplete-multiple-new.d.ts +43 -0
  32. package/dist/components/autocomplete-multiple-new.js +1 -0
  33. package/dist/components/autocomplete-new.js +1 -1
  34. package/dist/components/button-active.js +1 -1
  35. package/dist/components/button-menu.js +1 -1
  36. package/dist/components/card-expandable.js +1 -1
  37. package/dist/components/chip-input.js +1 -1
  38. package/dist/components/country-text-field.js +1 -1
  39. package/dist/components/data-table.js +1 -1
  40. package/dist/components/date-picker.js +1 -1
  41. package/dist/components/dropzone.js +1 -1
  42. package/dist/components/index.d.ts +42 -4
  43. package/dist/components/index.js +1 -1
  44. package/dist/components/list-item-arrow.js +1 -1
  45. package/dist/components/list-item-button.js +1 -1
  46. package/dist/components/list-item-checkbox-left.js +1 -1
  47. package/dist/components/list-item-checkbox.js +1 -1
  48. package/dist/components/list-item.js +1 -1
  49. package/dist/components/phone-input-new-skeleton.d.ts +8 -0
  50. package/dist/components/phone-input-new-skeleton.js +1 -0
  51. package/dist/components/phone-input.js +1 -1
  52. package/dist/components/popover.d.ts +3 -1
  53. package/dist/components/popover.js +1 -1
  54. package/dist/components/radio.js +1 -1
  55. package/dist/components/search-bar.d.ts +53 -2
  56. package/dist/components/search-bar.js +1 -1
  57. package/dist/components/select-new.js +1 -1
  58. package/dist/components/select.js +1 -1
  59. package/dist/components/signature-pad.js +1 -1
  60. package/dist/components/text-field-new.js +1 -1
  61. package/dist/components/text-field.js +1 -1
  62. package/dist/components/textarea-new.js +1 -1
  63. package/dist/components/time-picker-new.js +1 -1
  64. package/dist/components/time-picker.js +1 -1
  65. package/dist/components/tracker-item.js +1 -1
  66. package/dist/phone.d.ts +1 -0
  67. package/dist/phone.js +1 -0
  68. package/dist/styles/index.css +1 -1
  69. package/package.json +27 -22
  70. package/dist/chunk-2IBP2IXU.js +0 -1
  71. package/dist/chunk-LY2YQ6ZB.js +0 -1
  72. package/dist/chunk-PLA5QILP.js +0 -1
  73. package/dist/chunk-UZ3SBSKA.js +0 -1
  74. package/dist/chunk-XGQTQ2DK.js +0 -1
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {q}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var I=forwardRef(({className:p,label:m,required:n,tooltip:g,helperText:c,error:l,...f},x)=>(useEffect(()=>{let a=r=>{let o=document.activeElement;o&&o.type==="number"&&document.elementFromPoint(r.clientX,r.clientY)===o&&r.preventDefault();};return document.addEventListener("wheel",a,{passive:false}),()=>{document.removeEventListener("wheel",a);}},[]),jsxs(Field.Root,{"data-error":l,className:a$1("group flex flex-col data-[readonly]:pointer-events-none",p),children:[jsx(a,{as:Field.Label,label:m,required:n,tooltip:g}),jsxs("div",{className:"relative",children:[jsx(Field.Input,{ref:x,required:n,className:"focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter h-10 w-full rounded-lg bg-neutral-50 px-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",...f}),l&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:"text-2xs group-data-[error=true]:text-error-500 font-inter mt-1 leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",children:c})]})));export{I as a};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {q}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var I=forwardRef(({className:p,label:m,required:n,tooltip:g,helperText:c,error:l,...f},x)=>(useEffect(()=>{let a=r=>{let o=document.activeElement;o&&o.type==="number"&&document.elementFromPoint(r.clientX,r.clientY)===o&&r.preventDefault();};return document.addEventListener("wheel",a,{passive:false}),()=>{document.removeEventListener("wheel",a);}},[]),jsxs(Field.Root,{"data-error":l,className:a$1("group flex flex-col data-[readonly]:pointer-events-none",p),children:[jsx(a,{as:Field.Label,label:m,required:n,tooltip:g}),jsxs("div",{className:"relative",children:[jsx(Field.Input,{ref:x,required:n,className:"focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter h-10 w-full rounded-lg bg-neutral-50 px-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",...f}),l&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:"text-2xs group-data-[error=true]:text-error-500 font-inter mt-1 leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",children:c})]})));export{I as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {d}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {SignaturePad}from'@ark-ui/react/signature-pad';import {forwardRef,useState,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=forwardRef((N,D)=>{let{rootClassName:v,className:V,label:m,required:k,tooltip:A,helperText:f,error:u,hasValue:b,onChange:h,readOnly:n,disabled:e,...E}=N,[F,T]=useState(false),d$1=b!==void 0,H=d$1?b:F,P=useCallback(async a=>{let[l,g]=a.split(","),w=l.match(/:(.*?);/),q=w?w[1]:"image/png",c=atob(g),S=new Uint8Array(c.length);for(let i=0;i<c.length;i++)S[i]=c.charCodeAt(i);return new File([S],"signature.png",{type:q})},[]),o=useCallback(a=>{d$1||T(!!a),h?.(a);},[d$1,h]),R=useCallback(async a=>{if(n||e)return;let l=await a.getDataUrl("image/png");if(!l){o(null);return}let g=await P(l);o(g);},[o,P,n,e]),U=H&&!n&&!e;return jsxs(SignaturePad.Root,{ref:D,"data-error":u,className:a$1("group flex flex-col",v),onDrawEnd:R,readOnly:n,disabled:e,...E,children:[m&&jsx(a,{as:SignaturePad.Label,label:m,required:k,tooltip:A}),jsxs(SignaturePad.Control,{className:a$1("group/control","relative h-40 w-full overflow-hidden","rounded-lg bg-white p-4","border border-dashed border-neutral-300",u&&"border-error-500",n&&"pointer-events-none border-neutral-300 bg-neutral-100",e&&"pointer-events-none opacity-60",V),children:[jsx(SignaturePad.Segment,{className:"h-full w-full"}),jsx(SignaturePad.Guide,{className:"absolute inset-0 opacity-20"}),U&&jsx(SignaturePad.ClearTrigger,{className:"absolute top-2 right-2 z-20 cursor-pointer rounded-lg bg-neutral-100 p-1 ring-1 ring-neutral-500",onClick:()=>o(null),children:jsx(d,{className:"size-4 text-neutral-700"})})]}),f&&jsx("p",{className:a$1("font-inter text-2xs mt-1 leading-[133.33%] font-normal",u?"text-error-500":"text-neutral-700",e&&"text-neutral-400"),children:f})]})});z.displayName="SignaturePad";export{z as a};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {d}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {SignaturePad}from'@ark-ui/react/signature-pad';import {forwardRef,useState,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=forwardRef((N,D)=>{let{rootClassName:v,className:V,label:m,required:k,tooltip:A,helperText:f,error:u,hasValue:b,onChange:h,readOnly:n,disabled:e,...E}=N,[F,T]=useState(false),d$1=b!==void 0,H=d$1?b:F,P=useCallback(async a=>{let[l,g]=a.split(","),w=l.match(/:(.*?);/),q=w?w[1]:"image/png",c=atob(g),S=new Uint8Array(c.length);for(let i=0;i<c.length;i++)S[i]=c.charCodeAt(i);return new File([S],"signature.png",{type:q})},[]),o=useCallback(a=>{d$1||T(!!a),h?.(a);},[d$1,h]),R=useCallback(async a=>{if(n||e)return;let l=await a.getDataUrl("image/png");if(!l){o(null);return}let g=await P(l);o(g);},[o,P,n,e]),U=H&&!n&&!e;return jsxs(SignaturePad.Root,{ref:D,"data-error":u,className:a$1("group flex flex-col",v),onDrawEnd:R,readOnly:n,disabled:e,...E,children:[m&&jsx(a,{as:SignaturePad.Label,label:m,required:k,tooltip:A}),jsxs(SignaturePad.Control,{className:a$1("group/control","relative h-40 w-full overflow-hidden","rounded-lg bg-white p-4","border border-dashed border-neutral-300",u&&"border-error-500",n&&"pointer-events-none border-neutral-300 bg-neutral-100",e&&"pointer-events-none opacity-60",V),children:[jsx(SignaturePad.Segment,{className:"h-full w-full"}),jsx(SignaturePad.Guide,{className:"absolute inset-0 opacity-20"}),U&&jsx(SignaturePad.ClearTrigger,{className:"absolute top-2 right-2 z-20 cursor-pointer rounded-lg bg-neutral-100 p-1 ring-1 ring-neutral-500",onClick:()=>o(null),children:jsx(d,{className:"size-4 text-neutral-700"})})]}),f&&jsx("p",{className:a$1("font-inter text-2xs mt-1 leading-[133.33%] font-normal",u?"text-error-500":"text-neutral-700",e&&"text-neutral-400"),children:f})]})});z.displayName="SignaturePad";export{z as a};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-PK7E4VZY.js';import {a as a$3}from'./chunk-4CM257A2.js';import {c}from'./chunk-55Z77FLU.js';import {a as a$2}from'./chunk-FHABUQAH.js';import {a}from'./chunk-BJ5MXTGP.js';import {d as d$1,q,g,j}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {useListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useRef,useCallback,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function pe(){let i=useComboboxContext(),c=useRef(false);return i.value.length&&i.collection.size&&!c.current&&(i.syncSelectedItems(),c.current=true),null}var ye=i=>{let{label:c$1,error:w,required:F,tooltip:G,disabled:I,readOnly:a$4,options:T,onInputChange:y,onSelect:O,defaultSelectedOptions:s,value:m,helperText:U,noResultsLabel:W,noResultsIcon:K,noResultsDescription:X,noResultsDescriptionLines:J,noResultsAsColumn:Q,noResultsButtonOnClick:A,noResultsButtonLabel:Y,optionDescriptionLines:R=1,loading:M,clearable:Z=true,growable:d$2=true,className:_,...$}=i,S=Object.getOwnPropertyNames(i),{contains:ee}=useFilter({sensitivity:"base"}),{collection:x,filter:b,set:te}=useListCollection({initialItems:[],itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:ee}),g$1=useRef(s??[]),v=useRef(void 0),L=useRef(false),oe=useCallback(e=>{let n=e.items,p=g$1.current,le=n.length===0?null:n.find(C=>!p.some(h=>String(h.value)===String(C.value)))??p.find(C=>!n.some(h=>String(h.value)===String(C.value)))??null;g$1.current=[...n],O?.(le,n),v.current?.setInputValue(""),b("");},[O,b]),ne=useCallback(e=>{b(e.inputValue),e.reason!==void 0&&y?.(e.inputValue??"");},[b,y]),u=useCombobox({collection:x,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:ne,onValueChange:oe,defaultValue:s?.map(e=>String(e.value)),value:S.includes("value")?m?.map(e=>String(e.value))??[]:void 0,readOnly:a$4,disabled:I,...$});return v.current=u,useEffect(()=>{S.includes("value")&&m!==void 0&&(g$1.current=[...m]);},[m]),useEffect(()=>{M||s?.length&&(L.current||(v.current?.setValue(s.map(e=>String(e.value))),g$1.current=[...s],L.current=true));},[s,M]),useEffect(()=>{te(T);},[T]),jsxs(Combobox.RootProvider,{value:u,"data-error":w,className:a$1("group flex flex-col",_),children:[jsx(a,{as:Combobox.Label,label:c$1,required:F,tooltip:G}),jsx(pe,{}),jsxs(Combobox.Control,{className:a$1("group/control relative flex w-full rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow","group-data-[error=true]:ring-error-500 group-data-[error=true]:ring-2","has-focus:ring-primary-800 has-focus:ring-2","data-disabled:cursor-not-allowed data-disabled:bg-neutral-100 data-disabled:ring-neutral-400",a$4&&"pointer-events-none bg-neutral-100 ring-neutral-300",!d$2&&"h-10 overflow-hidden",d$2&&"min-h-10"),children:[jsxs("div",{className:a$1("flex flex-1 items-center gap-1 px-3 py-2",d$2?"flex-wrap py-1.5":"overflow-hidden"),children:[u.selectedItems.map(e=>jsx(d,{variant:"standard",type:"fill",size:"xs",disabled:a$4||I,onClose:()=>{u.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$1("font-inter min-w-0 flex-1 bg-transparent text-sm text-neutral-900 outline-none placeholder:text-neutral-500","group-data-disabled/control:text-neutral-400 disabled:cursor-not-allowed",a$4&&"pointer-events-none"),placeholder:u.selectedItems.length===0?i.placeholder:""})]}),jsxs("div",{className:a$1("flex shrink-0 items-center gap-2 pr-3",d$2&&"self-start pt-2.5"),children:[!a$4&&Z&&jsx(Combobox.ClearTrigger,{asChild:true,onClick:e=>e.stopPropagation(),children:jsx(d$1,{className:"size-4.5 cursor-pointer text-neutral-700 group-data-disabled/control:hidden"})}),w&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),jsx(Combobox.Trigger,{className:a$1("cursor-pointer","group-data-disabled/control:cursor-not-allowed group-data-disabled/control:text-neutral-400",a$4&&"pointer-events-none text-neutral-400"),children:jsx(g,{className:"size-4.5 text-neutral-700 transition-transform will-change-transform group-data-[state=open]/control:rotate-180"})})]})]}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 empty:hidden",children:U}),jsx(Portal,{children:jsx(Combobox.Positioner,{className:"z-10000!",children:jsx(Combobox.Content,{className:"elevation-9 max-h-67.5 w-(--reference-width) overflow-auto rounded-lg bg-neutral-50",children:jsx(Combobox.ItemGroup,{children:x.items.length>0?x.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:n,disabled:p})=>jsxs("div",{className:a$1("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",p?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:R?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:R,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$1("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",n?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",p&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(j,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$2,{title:W,description:X,Icon:K,iconAsColumn:Q,descriptionLines:J}),A&&jsxs(Fragment,{children:[jsx(a$3,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{u.setOpen(false),A();},children:Y})]})]})})})})})]})};export{ye as a};
@@ -0,0 +1 @@
1
+ import {d,p}from'./chunk-QNQELNVU.js';import {forwardRef,useRef,useState,useCallback,useEffect}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var A=["md","lg"],B=tv({slots:{wrapper:"relative flex flex-1 flex-col bg-neutral-50",input:"peer focus:ring-primary-800 absolute z-20 h-full w-full bg-neutral-50/0 px-4 text-left text-sm tracking-normal text-neutral-900 placeholder-neutral-600 ring-1 ring-neutral-600 outline-0 transition-all ring-inset focus:text-neutral-900 focus:ring-2 disabled:text-neutral-400 disabled:ring-neutral-300 disabled:placeholder:text-neutral-400",clearIcon:"absolute top-1/2 right-9.5 z-20 hidden size-4.5 -translate-y-1/2 cursor-pointer text-neutral-900 peer-focus:flex",searchIcon:"absolute top-1/2 right-3 z-20 flex size-4.5 -translate-y-1/2 items-center rounded-full text-neutral-800 peer-disabled:text-neutral-400"},variants:{size:{lg:{wrapper:"h-10 rounded-md",input:"rounded-md"},md:{wrapper:"h-8 rounded-sm",input:"rounded-sm"}}},defaultVariants:{size:"lg"}}),E=forwardRef(({placeholder:c,className:d$1,size:f="lg",onClean:s,onChange:m,disabled:n,value:t,defaultValue:u,...h},r)=>{let a=useRef(null),{wrapper:g,input:b,clearIcon:x,searchIcon:I}=B({size:f}),[S,l]=useState(t!==void 0?!!t:!!u),w=useCallback(()=>{if(a.current&&!n){let e=a.current;Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(e,"");let y=new Event("input",{bubbles:true});e.dispatchEvent(y),l(false),s?.();}},[n,s]);return useEffect(()=>{t!==void 0&&l(String(t).length>0);},[t]),jsxs("div",{className:g({className:d$1}),children:[jsx("input",{disabled:n,type:"search",autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",className:b(),placeholder:c??"",ref:e=>{typeof r=="function"?r(e):r&&(r.current=e),a.current=e;},value:t,defaultValue:u,onChange:e=>{l(e.target.value.length>0),m?.(e);},...h}),!n&&S&&jsx(d,{onMouseDown:w,className:x()}),jsx(p,{className:I()})]})});E.displayName="SearchBar";export{A as a,B as b,E as c};
@@ -1 +1 @@
1
- import {d}from'./chunk-MP4CHZ2K.js';import {a as a$1}from'./chunk-R6NIURLZ.js';import {g}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import*as s from'react';import {Accordion}from'@ark-ui/react/accordion';import*as reactAccordion from'@radix-ui/react-accordion';export{reactAccordion as a };import {jsx,jsxs}from'react/jsx-runtime';var W=["sm","md"],x=s.forwardRef(({className:o,children:r,size:t="md",hasBorder:a$1=false,...c},d)=>jsx(Accordion.Root,{"data-border":a$1,"data-size":t,className:a("group/root space-y-2",o),...c,ref:d,children:r}));x.displayName="Accordion";var h=s.forwardRef(({className:o,...r},t)=>jsx(Accordion.Item,{ref:t,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",o),...r}));h.displayName="AccordionItem";var A=s.forwardRef(({className:o,children:r,...t},a$1)=>jsxs(Accordion.ItemTrigger,{ref:a$1,className:a("group flex w-full flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",o),...t,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]}));A.displayName=Accordion.ItemTrigger.displayName;var I=s.forwardRef(({className:o,title:r,description:t,onEndButtonClick:a$2,StartIcon:c,EndIcon:d$1,children:P,badgeNumber:g$1,chipStatus:p,...v},y)=>jsxs(Accordion.ItemTrigger,{ref:y,className:a("group hover:not-disabled:bg-primary-100 flex w-full flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",!t&&"min-h-12",t&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12",o),...v,children:[jsxs("div",{className:"flex",children:[c&&jsx(c,{className:"mr-2 size-4.5 shrink-0 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:size-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:t})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),d$1&&jsx(d$1,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]}));I.displayName=Accordion.ItemTrigger.displayName;var N=s.forwardRef(({className:o,children:r,...t},a$1)=>jsx(Accordion.ItemContent,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...t,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",o),children:r})}));N.displayName=Accordion.ItemContent.displayName;export{W as b,x as c,h as d,A as e,I as f,N as g};
1
+ import {a as a$1}from'./chunk-R6NIURLZ.js';import {d}from'./chunk-MP4CHZ2K.js';import {g}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import*as s from'react';import {Accordion}from'@ark-ui/react/accordion';import*as reactAccordion from'@radix-ui/react-accordion';export{reactAccordion as a };import {jsx,jsxs}from'react/jsx-runtime';var W=["sm","md"],x=s.forwardRef(({className:o,children:r,size:t="md",hasBorder:a$1=false,...c},d)=>jsx(Accordion.Root,{"data-border":a$1,"data-size":t,className:a("group/root space-y-2",o),...c,ref:d,children:r}));x.displayName="Accordion";var h=s.forwardRef(({className:o,...r},t)=>jsx(Accordion.Item,{ref:t,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",o),...r}));h.displayName="AccordionItem";var A=s.forwardRef(({className:o,children:r,...t},a$1)=>jsxs(Accordion.ItemTrigger,{ref:a$1,className:a("group flex w-full flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",o),...t,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]}));A.displayName=Accordion.ItemTrigger.displayName;var I=s.forwardRef(({className:o,title:r,description:t,onEndButtonClick:a$2,StartIcon:c,EndIcon:d$1,children:P,badgeNumber:g$1,chipStatus:p,...v},y)=>jsxs(Accordion.ItemTrigger,{ref:y,className:a("group hover:not-disabled:bg-primary-100 flex w-full flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",!t&&"min-h-12",t&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12",o),...v,children:[jsxs("div",{className:"flex",children:[c&&jsx(c,{className:"mr-2 size-4.5 shrink-0 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:size-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:t})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),d$1&&jsx(d$1,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]}));I.displayName=Accordion.ItemTrigger.displayName;var N=s.forwardRef(({className:o,children:r,...t},a$1)=>jsx(Accordion.ItemContent,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...t,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",o),children:r})}));N.displayName=Accordion.ItemContent.displayName;export{W as b,x as c,h as d,A as e,I as f,N as g};
@@ -1 +1 @@
1
- import {a}from'./chunk-VFP3D5WF.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import H,{useId,useRef,useState,useEffect}from'react';import*as h from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var b=56,s=6,D=({options:l,noResults:m,selectedOption:x,onSelect:y,onChange:O,onClick:E,className:S,...P})=>{let R=useId(),n=useRef(null),t=useRef(null),[L,C]=useState("bottom"),[o,N]=useState(),[p,f]=useState(x??null),I=e=>{n.current.style.display="none",t.current.value=e.label,f(e),y?.(e);};return useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let r=b*(l.length<s?l.length:s)+16,i=t.current.getBoundingClientRect();N(i);let T=window.innerHeight-i.bottom>r,k=i.top>r;C(T?"bottom":k?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),useEffect(()=>{function e(r){n.current&&!n.current.contains(r.target)&&(n.current.style.display="none");}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[n.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full cursor-pointer!",S),readOnly:true,ref:t,autoComplete:"off",list:"",selectMode:true,value:p?.label,showClearButton:false,onClick:e=>{n.current.style.display="flex",E?.(e);},onChange:e=>{f(null),O?.(e);},...P}),jsx(h.Root,{asChild:true,children:jsxs("ul",{ref:n,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:o?{width:`${o.width}px`,left:o.left,top:L==="bottom"?`${o.height+o.top+window.scrollY}px`:window.scrollY+o.top-(l.length<s?l.length:s)*b-16}:void 0,children:[l.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[H.cloneElement(m.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:m.message})]}),l.map(e=>jsx("li",{onClick:()=>{e.disabled||I(e);},className:a$1("w-full shrink-0 py-4 pr-6 pl-4 text-left",p?.value===e.value&&"bg-primary-200",e.disabled?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 cursor-pointer"),children:e.label},`select-option-${R}-${e.key??e.value}`))]})})]})};export{D as a};
1
+ import {a}from'./chunk-A2VW62QH.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import H,{useId,useRef,useState,useEffect}from'react';import*as h from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var b=56,s=6,D=({options:l,noResults:m,selectedOption:x,onSelect:y,onChange:O,onClick:E,className:S,...P})=>{let R=useId(),n=useRef(null),t=useRef(null),[L,C]=useState("bottom"),[o,N]=useState(),[p,f]=useState(x??null),I=e=>{n.current.style.display="none",t.current.value=e.label,f(e),y?.(e);};return useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let r=b*(l.length<s?l.length:s)+16,i=t.current.getBoundingClientRect();N(i);let T=window.innerHeight-i.bottom>r,k=i.top>r;C(T?"bottom":k?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),useEffect(()=>{function e(r){n.current&&!n.current.contains(r.target)&&(n.current.style.display="none");}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[n.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full cursor-pointer!",S),readOnly:true,ref:t,autoComplete:"off",list:"",selectMode:true,value:p?.label,showClearButton:false,onClick:e=>{n.current.style.display="flex",E?.(e);},onChange:e=>{f(null),O?.(e);},...P}),jsx(h.Root,{asChild:true,children:jsxs("ul",{ref:n,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:o?{width:`${o.width}px`,left:o.left,top:L==="bottom"?`${o.height+o.top+window.scrollY}px`:window.scrollY+o.top-(l.length<s?l.length:s)*b-16}:void 0,children:[l.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[H.cloneElement(m.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:m.message})]}),l.map(e=>jsx("li",{onClick:()=>{e.disabled||I(e);},className:a$1("w-full shrink-0 py-4 pr-6 pl-4 text-left",p?.value===e.value&&"bg-primary-200",e.disabled?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 cursor-pointer"),children:e.label},`select-option-${R}-${e.key??e.value}`))]})})]})};export{D as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-T2Q6B32U.js';import {q,d,g as g$1}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import g,{forwardRef,useId,useRef,useState,useCallback,useEffect}from'react';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var U=forwardRef(({label:x,placeholder:y,error:t,selectMode:b=false,showClearButton:H=true,helperText:M,className:I,size:e="md",onClean:P,onChange:f,startIcon:u,endIcon:p,startComponent:c,fixedTopLabel:C,startText:i,disabled:o,required:v,...D},m)=>{let w=useId(),l=useRef(null),[s,h]=useState(false),T=!l.current?.value,F=useCallback(()=>{if(l.current&&!o){l.current.value="",h(false),P?.();let a={target:l.current,currentTarget:l.current,type:"change",bubbles:true,cancelable:false,defaultPrevented:false,eventPhase:0,isTrusted:true,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>false,isPropagationStopped:()=>false,timeStamp:Date.now(),nativeEvent:new Event("change")};f?.(a);}},[o,f,l.current]);return useEffect(()=>{l.current&&h(l.current.value.length>0);},[]),jsxs("div",{className:a("flex flex-col",I),children:[jsxs("div",{className:a("relative flex flex-col rounded-lg bg-neutral-50",e==="lg"&&"h-12",e==="md"&&"h-10",e==="sm"&&"h-8"),children:[jsx("input",{id:w,disabled:o,required:v,className:a("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral no-spinner peer focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-primary-800 disabled:bg-neutral-80 absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500 caret-neutral-900 ring-1 ring-neutral-400 outline-0 transition-all ease-linear ring-inset not-placeholder-shown:z-10 focus:text-neutral-900 focus:placeholder-neutral-500 focus:ring-2 disabled:text-neutral-400 disabled:ring-neutral-100",x&&"placeholder-neutral-500/0",t&&"placeholder-error-700/0 ring-error-700 hover:ring-error-700 focus:ring-error-700 hover:text-neutral-900",e==="lg"&&"text-base",e==="md"&&"text-sm",e==="sm"&&"text-sm",u?e==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":c?"pl-[6.5rem]":"pl-4",i&&"pl-[1.94rem]",p?e==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:y??"",ref:a=>{typeof m=="function"?m(a):m&&(m.current=a),l.current=a;},onChange:a=>{h(a.target.value.length>0),f?.(a);},...D}),c&&g.cloneElement(c,{className:a("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),u&&g.cloneElement(u,{size:18,className:a("absolute flex peer-focus:text-neutral-900 z-20 text-neutral-500 left-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),i&&jsx("div",{className:"flex h-full items-center pl-3",children:jsx("p",{className:a("text-neutral-700",t&&"text-error-700"),children:i})}),x&&jsxs(Label,{htmlFor:w,className:a("peer-hover:text-primary-800 absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-50 transition-all duration-75 ease-linear peer-disabled:z-20 peer-disabled:text-neutral-400","peer-focus:text-primary-800 peer-disabled:peer-not-focus:peer-placeholder-shown:bg-neutral-80 peer-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs",!t&&"peer-not-disabled:peer-not-focus:text-neutral-400 peer-not-disabled:peer-not-focus:peer-not-placeholder-shown:text-neutral-900",s&&"peer-disabled:bg-neutral-80",e==="lg"?"text-base peer-placeholder-shown:top-3 placeholder-shown:text-xs":e==="md"?"text-sm peer-placeholder-shown:top-2.5 placeholder-shown:text-xs":"text-sm peer-placeholder-shown:top-1.5 placeholder-shown:text-xs",!T&&"text-xs",t&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",u?e==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":c?"peer-placeholder-shown:ml-[6rem]":"ml-3",C&&"-top-[0.375rem]! z-20 ml-3 text-xs! transition-none!",i&&"peer-placeholder-shown:ml-[1.94rem]"),children:[v&&"*",x]}),(H&&(!T||s)||t)&&jsxs("div",{className:a("absolute z-10 hidden h-full items-center peer-focus:flex",t&&!o&&"flex",b||p?e==="lg"?"right-[2.81rem]":e==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:[t&&jsx(q,{size:e==="sm"?14:18,className:"text-error-700"}),!t&&jsx(d,{onMouseDown:F,size:e==="sm"?14:18,className:"cursor-pointer text-neutral-900"})]}),p&&g.cloneElement(p,{size:e==="sm"?14:18,className:a("absolute peer-focus:text-neutral-900 z-20 text-neutral-500 flex right-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),b&&jsx("div",{className:a("peer-hover:text-neutral peer-focus:text-primary-900 absolute right-4 z-20 flex h-full items-center rounded-full transition-all ease-linear peer-focus:rotate-180 peer-disabled:text-neutral-400"),children:jsx(g$1,{className:e==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsx(a$1,{helperText:M,error:t,disabled:o})]})});export{U as a};
1
+ import {a as a$1}from'./chunk-T2Q6B32U.js';import {q,d,g as g$1}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import g,{forwardRef,useId,useRef,useState,useCallback,useEffect}from'react';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var W=forwardRef(({label:x,placeholder:R,error:t,selectMode:b=false,showClearButton:H=true,helperText:M,className:I,size:e="md",onClean:P,onChange:f,startIcon:u,endIcon:p,startComponent:c,fixedTopLabel:C,startText:i,disabled:o,required:v,...D},m)=>{let w=useId(),l=useRef(null),[s,h]=useState(false),T=!l.current?.value,F=useCallback(()=>{if(l.current&&!o){l.current.value="",h(false),P?.();let a={target:l.current,currentTarget:l.current,type:"change",bubbles:true,cancelable:false,defaultPrevented:false,eventPhase:0,isTrusted:true,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>false,isPropagationStopped:()=>false,timeStamp:Date.now(),nativeEvent:new Event("change")};f?.(a);}},[o,f,l.current]);return useEffect(()=>{l.current&&h(l.current.value.length>0);},[]),jsxs("div",{className:a("flex flex-col",I),children:[jsxs("div",{className:a("relative flex flex-col rounded-lg bg-neutral-50",e==="lg"&&"h-12",e==="md"&&"h-10",e==="sm"&&"h-8"),children:[jsx("input",{id:w,disabled:o,required:v,className:a("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral no-spinner peer focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-primary-800 disabled:bg-neutral-80 absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500 caret-neutral-900 ring-1 ring-neutral-400 outline-0 transition-all ease-linear ring-inset not-placeholder-shown:z-10 focus:text-neutral-900 focus:placeholder-neutral-500 focus:ring-2 disabled:text-neutral-400 disabled:ring-neutral-100",x&&"placeholder-neutral-500/0",t&&"placeholder-error-700/0 ring-error-700 hover:ring-error-700 focus:ring-error-700 hover:text-neutral-900",e==="lg"&&"text-base",e==="md"&&"text-sm",e==="sm"&&"text-sm",u?e==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":c?"pl-[6.5rem]":"pl-4",i&&"pl-[1.94rem]",p?e==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:R??"",ref:a=>{typeof m=="function"?m(a):m&&(m.current=a),l.current=a;},onChange:a=>{h(a.target.value.length>0),f?.(a);},...D}),c&&g.cloneElement(c,{className:a("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),u&&g.cloneElement(u,{size:18,className:a("absolute flex peer-focus:text-neutral-900 z-20 text-neutral-500 left-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),i&&jsx("div",{className:"flex h-full items-center pl-3",children:jsx("p",{className:a("text-neutral-700",t&&"text-error-700"),children:i})}),x&&jsxs(Label,{htmlFor:w,className:a("peer-hover:text-primary-800 absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-50 transition-all duration-75 ease-linear peer-disabled:z-20 peer-disabled:text-neutral-400","peer-focus:text-primary-800 peer-disabled:peer-not-focus:peer-placeholder-shown:bg-neutral-80 peer-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs",!t&&"peer-not-disabled:peer-not-focus:text-neutral-400 peer-not-disabled:peer-not-focus:peer-not-placeholder-shown:text-neutral-900",s&&"peer-disabled:bg-neutral-80",e==="lg"?"text-base peer-placeholder-shown:top-3 placeholder-shown:text-xs":e==="md"?"text-sm peer-placeholder-shown:top-2.5 placeholder-shown:text-xs":"text-sm peer-placeholder-shown:top-1.5 placeholder-shown:text-xs",!T&&"text-xs",t&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",u?e==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":c?"peer-placeholder-shown:ml-[6rem]":"ml-3",C&&"-top-[0.375rem]! z-20 ml-3 text-xs! transition-none!",i&&"peer-placeholder-shown:ml-[1.94rem]"),children:[v&&"*",x]}),(H&&(!T||s)||t)&&jsxs("div",{className:a("absolute z-10 hidden h-full items-center peer-focus:flex",t&&!o&&"flex",b||p?e==="lg"?"right-[2.81rem]":e==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:[t&&jsx(q,{size:e==="sm"?14:18,className:"text-error-700"}),!t&&jsx(d,{onMouseDown:F,size:e==="sm"?14:18,className:"cursor-pointer text-neutral-900"})]}),p&&g.cloneElement(p,{size:e==="sm"?14:18,className:a("absolute peer-focus:text-neutral-900 z-20 text-neutral-500 flex right-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),b&&jsx("div",{className:a("peer-hover:text-neutral peer-focus:text-primary-900 absolute right-4 z-20 flex h-full items-center rounded-full transition-all ease-linear peer-focus:rotate-180 peer-disabled:text-neutral-400"),children:jsx(g$1,{className:e==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsx(a$1,{helperText:M,error:t,disabled:o})]})});export{W as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-CM6ALMTT.js';import {q}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var d=({as:m,label:t,required:l,tooltip:o,className:p,htmlFor:c})=>jsxs(m,{className:a$1("font-inter mb-2 flex items-center text-xs leading-[133.33%] font-medium text-neutral-900",p),htmlFor:c,children:[l?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-danger-500",children:"*"}),t]}):t,o&&jsx(a,{content:o,className:"ml-2",children:jsx(q,{className:"size-3.5"})})]});export{d as a};
@@ -1 +1 @@
1
- import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-EU3IUSBX.js';import {a as a$1}from'./chunk-GFVJRSZI.js';import {a as a$2}from'./chunk-VFP3D5WF.js';import {g as g$1}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import _,{useId,useRef,useState,useEffect,useMemo}from'react';import*as I from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var L=56,p=6,q=(t=>(t.CL="CL",t.AR="AR",t.CO="CO",t.GT="GT",t.MX="MX",t.PE="PE",t.BR="BR",t.UY="UY",t.US="US",t))(q||{}),M=new Map([["CL",{name:"Chile",flag:a}],["AR",{name:"Argentina",flag:b}],["CO",{name:"Colombia",flag:c}],["GT",{name:"Guatemala",flag:d}],["MX",{name:"Mexico",flag:e}],["PE",{name:"Per\xFA",flag:f}],["BR",{name:"Brasil",flag:g}],["UY",{name:"Uruguay",flag:h}],["US",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(M.entries()),de=({noResults:g,selectedCountry:d,onSelect:S,className:U,size:B="md",...m})=>{let A=useId(),l=useRef(null),r=useRef(null),[t,G]=useState("bottom"),[s,H]=useState(),[Y,$]=useState(-1),k=e=>{l.current.style.display="none",S?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=L*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();H(c);let z=window.innerHeight-c.bottom>a,X=c.top>a;G(z?"bottom":X?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",$(-1));});let x=useMemo(()=>M.get(d),[d]);return jsx("div",{className:a$3("flex flex-col",U),children:jsxs("div",{className:a$3("relative flex flex-col"),children:[jsx(a$2,{ref:r,startComponent:jsxs("div",{className:"z-100000 ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{m.disabled||(l.current.style.display="flex");},children:[jsx("img",{src:x?.flag,alt:x?.name,className:a$3("h-6 w-6 cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$3("ml-1",m.disabled&&"cursor-not-allowed text-neutral-400"),children:d}),jsx(g$1,{className:a$3(B==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")})]}),...m}),jsx(I.Root,{asChild:true,children:jsxs("ul",{ref:l,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:s?{width:`${s.width}px`,left:s.left,top:t==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*L-16}:void 0,children:[i.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[_.cloneElement(g.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:g.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{k(e);},className:a$3("hover:bg-primary-100 shrink-0 cursor-pointer py-4 pr-6 pl-4 text-left",d===e&&"bg-primary-200",Y===c&&"bg-primary-200"),children:jsxs("div",{className:a$3("flex items-center space-x-3"),children:[jsx("img",{src:a.flag,alt:a.name,className:"h-6 w-6"}),jsx("p",{children:a.name}),jsx("p",{className:"text-primary-500",children:`(${e})`})]})},`select-option-${A}-${e}`))]})})]})})};export{q as a,de as b};
1
+ import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-EU3IUSBX.js';import {a as a$1}from'./chunk-GFVJRSZI.js';import {a as a$2}from'./chunk-A2VW62QH.js';import {g as g$1}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import _,{useId,useRef,useState,useEffect,useMemo}from'react';import*as I from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var L=56,p=6,q=(t=>(t.CL="CL",t.AR="AR",t.CO="CO",t.GT="GT",t.MX="MX",t.PE="PE",t.BR="BR",t.UY="UY",t.US="US",t))(q||{}),M=new Map([["CL",{name:"Chile",flag:a}],["AR",{name:"Argentina",flag:b}],["CO",{name:"Colombia",flag:c}],["GT",{name:"Guatemala",flag:d}],["MX",{name:"Mexico",flag:e}],["PE",{name:"Per\xFA",flag:f}],["BR",{name:"Brasil",flag:g}],["UY",{name:"Uruguay",flag:h}],["US",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(M.entries()),de=({noResults:g,selectedCountry:d,onSelect:S,className:U,size:B="md",...m})=>{let A=useId(),l=useRef(null),r=useRef(null),[t,G]=useState("bottom"),[s,H]=useState(),[Y,$]=useState(-1),k=e=>{l.current.style.display="none",S?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=L*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();H(c);let z=window.innerHeight-c.bottom>a,X=c.top>a;G(z?"bottom":X?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",$(-1));});let x=useMemo(()=>M.get(d),[d]);return jsx("div",{className:a$3("flex flex-col",U),children:jsxs("div",{className:a$3("relative flex flex-col"),children:[jsx(a$2,{ref:r,startComponent:jsxs("div",{className:"z-100000 ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{m.disabled||(l.current.style.display="flex");},children:[jsx("img",{src:x?.flag,alt:x?.name,className:a$3("h-6 w-6 cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$3("ml-1",m.disabled&&"cursor-not-allowed text-neutral-400"),children:d}),jsx(g$1,{className:a$3(B==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")})]}),...m}),jsx(I.Root,{asChild:true,children:jsxs("ul",{ref:l,className:"elevation-8 pointer-events-auto absolute z-10000 my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:s?{width:`${s.width}px`,left:s.left,top:t==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*L-16}:void 0,children:[i.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[_.cloneElement(g.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:g.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{k(e);},className:a$3("hover:bg-primary-100 shrink-0 cursor-pointer py-4 pr-6 pl-4 text-left",d===e&&"bg-primary-200",Y===c&&"bg-primary-200"),children:jsxs("div",{className:a$3("flex items-center space-x-3"),children:[jsx("img",{src:a.flag,alt:a.name,className:"h-6 w-6"}),jsx("p",{children:a.name}),jsx("p",{className:"text-primary-500",children:`(${e})`})]})},`select-option-${A}-${e}`))]})})]})})};export{q as a,de as b};
@@ -1 +1 @@
1
- import {d}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {g}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as a from'react';import*as e from'@radix-ui/react-accordion';import {jsx,jsxs}from'react/jsx-runtime';var b=["sm","md"],w=a.forwardRef(({className:i,children:o,size:r="md",...n},d)=>jsx(e.Root,{"data-size":r,className:a$1("group/root space-y-2",i),...n,ref:d,children:o})),y=a.forwardRef(({className:i,...o},r)=>jsx(e.Item,{ref:r,className:i,...o}));y.displayName="AccordionFormItem";var R=a.forwardRef(({className:i,title:o,onEndButtonClick:r,StartIcon:n,children:d$1,badgeNumber:p,chipStatus:c,...g$1},u)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:o,ref:u,className:a$1("group flex h-8 items-center gap-4 [&[data-state=open]>div>.chevron-icon]:rotate-180",i),...g$1,children:[jsxs("div",{className:"group flex items-center",children:[n&&jsx(n,{className:"text-primary-500 group-enabled:group-hover:text-primary-700 mr-2 h-4.5 w-4.5 shrink-0 transition-colors group-disabled:text-neutral-500 group-data-[size=sm]/root:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsx("div",{children:jsx("p",{className:"text-primary-500 group-enabled:group-hover:text-primary-700 line-clamp-1 text-left text-base leading-[130%]! font-semibold transition-colors group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:o})})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c&&jsx(d,{variant:c.variant,type:c.type,size:"xs",className:"shrink-0",children:c.text}),p?.toString()&&jsx(a$2,{variant:"alert",size:"md",content:p.toString()}),jsx(g,{className:"chevron-icon text-primary-500 group-enabled:group-hover:text-primary-700 h-4.5 w-4.5 shrink-0 transition-transform group-disabled:text-neutral-500"})]})]})}));R.displayName=e.Trigger.displayName;var A=a.forwardRef(({className:i,children:o,...r},n)=>jsx(e.Content,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...r,children:jsx("div",{className:i,children:o})}));A.displayName=e.Content.displayName;export{b as a,w as b,y as c,R as d,A as e};
1
+ import {a as a$2}from'./chunk-R6NIURLZ.js';import {d}from'./chunk-MP4CHZ2K.js';import {g}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as a from'react';import*as e from'@radix-ui/react-accordion';import {jsx,jsxs}from'react/jsx-runtime';var b=["sm","md"],w=a.forwardRef(({className:i,children:o,size:r="md",...n},d)=>jsx(e.Root,{"data-size":r,className:a$1("group/root space-y-2",i),...n,ref:d,children:o})),y=a.forwardRef(({className:i,...o},r)=>jsx(e.Item,{ref:r,className:i,...o}));y.displayName="AccordionFormItem";var R=a.forwardRef(({className:i,title:o,onEndButtonClick:r,StartIcon:n,children:d$1,badgeNumber:p,chipStatus:c,...g$1},u)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:o,ref:u,className:a$1("group flex h-8 items-center gap-4 [&[data-state=open]>div>.chevron-icon]:rotate-180",i),...g$1,children:[jsxs("div",{className:"group flex items-center",children:[n&&jsx(n,{className:"text-primary-500 group-enabled:group-hover:text-primary-700 mr-2 h-4.5 w-4.5 shrink-0 transition-colors group-disabled:text-neutral-500 group-data-[size=sm]/root:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsx("div",{children:jsx("p",{className:"text-primary-500 group-enabled:group-hover:text-primary-700 line-clamp-1 text-left text-base leading-[130%]! font-semibold transition-colors group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:o})})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c&&jsx(d,{variant:c.variant,type:c.type,size:"xs",className:"shrink-0",children:c.text}),p?.toString()&&jsx(a$2,{variant:"alert",size:"md",content:p.toString()}),jsx(g,{className:"chevron-icon text-primary-500 group-enabled:group-hover:text-primary-700 h-4.5 w-4.5 shrink-0 transition-transform group-disabled:text-neutral-500"})]})]})}));R.displayName=e.Trigger.displayName;var A=a.forwardRef(({className:i,children:o,...r},n)=>jsx(e.Content,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...r,children:jsx("div",{className:i,children:o})}));A.displayName=e.Content.displayName;export{b as a,w as b,y as c,R as d,A as e};
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {q}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=forwardRef(({className:u,label:s,required:o,tooltip:p,helperText:g,error:r,placeholder:x,...a$2},m)=>jsx("div",{className:"w-full",children:jsxs(Field.Root,{"data-error":r,"data-readonly":a$2.readOnly,"data-disabled":a$2.disabled,className:a$1("group flex w-full flex-col data-[readonly]:pointer-events-none",u),children:[jsx(a,{as:Field.Label,label:s,required:o,tooltip:p}),jsxs("div",{className:"relative flex flex-col rounded-lg bg-neutral-50",children:[jsx(Field.Textarea,{ref:m,required:o,className:"no-scrollbar focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter group-dta-[readony]:bg-neutral-100 h-20 w-full rounded-lg bg-neutral-50 p-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",placeholder:x,"aria-invalid":r,...a$2}),r&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:a$1("text-2xs font-inter group-data-[error=true]:text-error-500 mx-2 mt-1 text-start text-xs leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",r&&"text-error-500"),children:g})]})}));export{v as a};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {q}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=forwardRef(({className:u,label:s,required:o,tooltip:p,helperText:g,error:r,placeholder:x,...a$2},m)=>jsx("div",{className:"w-full",children:jsxs(Field.Root,{"data-error":r,"data-readonly":a$2.readOnly,"data-disabled":a$2.disabled,className:a$1("group flex w-full flex-col data-[readonly]:pointer-events-none",u),children:[jsx(a,{as:Field.Label,label:s,required:o,tooltip:p}),jsxs("div",{className:"relative flex flex-col rounded-lg bg-neutral-50",children:[jsx(Field.Textarea,{ref:m,required:o,className:"no-scrollbar focus:ring-primary-800 group-data-[error=true]:ring-error-500 font-inter group-dta-[readony]:bg-neutral-100 h-20 w-full rounded-lg bg-neutral-50 p-3 text-sm leading-[142.86%] font-normal text-neutral-900 ring ring-neutral-500 transition-all ring-inset group-data-[disabled]:text-neutral-400 group-data-[disabled]:ring-neutral-400 group-data-[error=true]:pr-10.5 group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 placeholder:text-neutral-500 group-data-[disabled]:placeholder:text-neutral-400 focus:ring-2 focus:outline-none",placeholder:x,"aria-invalid":r,...a$2}),r&&jsx(q,{className:"text-error-500 absolute top-1/2 right-3 size-4.5 -translate-y-1/2 cursor-text"})]}),jsx(Field.HelperText,{className:a$1("text-2xs font-inter group-data-[error=true]:text-error-500 mx-2 mt-1 text-start text-xs leading-[133.33%] font-normal text-neutral-700 group-data-[disabled]:text-neutral-400 empty:hidden",r&&"text-error-500"),children:g})]})}));export{v as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var d=({title:n,titleLines:a$1=2,description:t,descriptionLines:r=1,Icon:s,iconAsColumn:i=true,className:m,...p})=>jsxs("div",{className:a("flex gap-2 py-4 pr-6 pl-4",i&&"flex-col items-center gap-1",!i&&!t&&"items-center",m),...p,children:[s&&jsx(s,{className:a("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a("leading-[130%] text-neutral-500",!!t&&"font-medium"),style:a$1?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a$1}:void 0,children:n}),t&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:t})]})]}),f=d;export{f as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {RadioGroupRoot,RadioGroupLabel,RadioGroupItem,RadioGroupItemControl,RadioGroupItemText,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {forwardRef,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var E=["horizontal","vertical"];var N=tv({slots:{item:["group/item flex items-center gap-1.5","data-disabled:cursor-not-allowed"],control:["relative size-4.5 rounded-full border ring-inset","before:absolute before:h-full before:w-full before:rounded-full before:border-3 before:border-transparent","border-neutral-700 bg-neutral-50","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:bg-primary-200","data-[state=checked]:border-primary-600","data-[state=checked]:bg-primary-600","data-[state=checked]:before:border-neutral-50","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:bg-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:absolute","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:h-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:w-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:rounded-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:bg-transparent","focus:border-2","focus:border-primary-800","data-[state=checked]:focus:before:bg-primary-800","data-disabled:border-neutral-300","data-disabled:bg-neutral-100","data-disabled:data-[state=checked]:border-neutral-300","data-disabled:data-[state=checked]:bg-neutral-100","data-disabled:data-[state=checked]:before:bg-neutral-300"],text:["font-inter text-sm leading-[143%]","text-neutral-900","group-data-[error=true]:text-error-500","data-disabled:text-neutral-400"]}}),C=tv({base:"group",variants:{labelOrientation:{horizontal:"flex gap-4.5",vertical:"flex flex-col gap-4.5"}}}),L=tv({base:"flex",variants:{orientation:{horizontal:"flex-wrap gap-8.5",vertical:"flex-col gap-5"}}}),z=forwardRef(({className:d,innerClassName:a$1,orientation:t="horizontal",labelOrientation:i="vertical",onValueChange:r,error:l,label:o,required:s,tooltip:c,children:b,...h},f)=>{let g=useCallback(R=>{r?.(R.value);},[r]);return jsxs(RadioGroupRoot,{"data-error":l,className:C({className:d,labelOrientation:i}),orientation:t,ref:f,onValueChange:g,...h,children:[o&&jsx(a,{as:RadioGroupLabel,label:o,required:s,tooltip:c,className:"mb-0"}),jsx("div",{className:L({orientation:t,className:a$1}),children:b})]})});z.displayName="RadioGroup";var O=forwardRef(({value:d,label:a,className:t,...i},r)=>{let{item:l,control:o,text:s}=N();return jsxs(RadioGroupItem,{value:d,className:l({className:t}),ref:r,...i,children:[jsx(RadioGroupItemControl,{className:o()}),a&&jsx(RadioGroupItemText,{className:s(),children:a}),jsx(RadioGroupItemHiddenInput,{})]})});O.displayName="RadioGroupItem";export{E as a,z as b,O as c};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {RadioGroupRoot,RadioGroupLabel,RadioGroupItem,RadioGroupItemControl,RadioGroupItemText,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {forwardRef,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var E=["horizontal","vertical"];var N=tv({slots:{item:["group/item flex items-center gap-1.5","data-disabled:cursor-not-allowed"],control:["relative size-4.5 rounded-full border ring-inset","before:absolute before:h-full before:w-full before:rounded-full before:border-3 before:border-transparent","border-neutral-700 bg-neutral-50","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:bg-primary-200","data-[state=checked]:border-primary-600","data-[state=checked]:bg-primary-600","data-[state=checked]:before:border-neutral-50","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:bg-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:absolute","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:h-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:w-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:rounded-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:bg-transparent","focus:border-2","focus:border-primary-800","data-[state=checked]:focus:before:bg-primary-800","data-disabled:border-neutral-300","data-disabled:bg-neutral-100","data-disabled:data-[state=checked]:border-neutral-300","data-disabled:data-[state=checked]:bg-neutral-100","data-disabled:data-[state=checked]:before:bg-neutral-300"],text:["font-inter text-sm leading-[143%]","text-neutral-900","group-data-[error=true]:text-error-500","data-disabled:text-neutral-400"]}}),C=tv({base:"group",variants:{labelOrientation:{horizontal:"flex gap-4.5",vertical:"flex flex-col gap-4.5"}}}),L=tv({base:"flex",variants:{orientation:{horizontal:"flex-wrap gap-8.5",vertical:"flex-col gap-5"}}}),z=forwardRef(({className:d,innerClassName:a$1,orientation:t="horizontal",labelOrientation:i="vertical",onValueChange:r,error:l,label:o,required:s,tooltip:c,children:b,...h},f)=>{let g=useCallback(R=>{r?.(R.value);},[r]);return jsxs(RadioGroupRoot,{"data-error":l,className:C({className:d,labelOrientation:i}),orientation:t,ref:f,onValueChange:g,...h,children:[o&&jsx(a,{as:RadioGroupLabel,label:o,required:s,tooltip:c,className:"mb-0"}),jsx("div",{className:L({orientation:t,className:a$1}),children:b})]})});z.displayName="RadioGroup";var O=forwardRef(({value:d,label:a,className:t,...i},r)=>{let{item:l,control:o,text:s}=N();return jsxs(RadioGroupItem,{value:d,className:l({className:t}),ref:r,...i,children:[jsx(RadioGroupItemControl,{className:o()}),a&&jsx(RadioGroupItemText,{className:s(),children:a}),jsx(RadioGroupItemHiddenInput,{})]})});O.displayName="RadioGroupItem";export{E as a,z as b,O as c};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var m=({className:l})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",l),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:"h-10 w-full rounded-lg"})]});export{m as a};
@@ -0,0 +1 @@
1
+ import {a as a$2}from'./chunk-JW7HS6NX.js';import {a as a$3}from'./chunk-FHABUQAH.js';import {a}from'./chunk-BJ5MXTGP.js';import {q,d,g}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {useListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useRef,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';function Y(){let n=useComboboxContext(),r=useRef(false);return n.value.length&&n.collection.size&&!r.current&&(n.syncSelectedItems(),r.current=true),null}var ce=n=>{let{label:r,error:p,required:L,tooltip:P,readOnly:m,options:a$4,onInputValueChange:b,onSelect:i,defaultValue:f,helperText:S,noResultsTitle:O,noResultsDescription:A,noResultsIcon:D,noResultsTitleLines:E,noResultsDescriptionLines:k,value:x,className:z,...M}=n,j=Object.getOwnPropertyNames(n),s=useRef(null),{contains:B}=useFilter({sensitivity:"base"}),{collection:u,filter:c,set:H}=useListCollection({initialItems:[],itemToString:t=>t.label,itemToValue:t=>String(t.value),filter:B}),q$1=useCallback(t=>{let v=a$4.find(U=>String(U.value)===t.itemValue);v&&i?.(v);},[i,a$4]),C=useCallback(t=>{c(t.inputValue),t.reason!==void 0&&b?.(t.inputValue??"");},[c,b]),F=useCombobox({collection:u,defaultValue:f?[String(f)]:void 0,placeholder:n.placeholder,inputValue:n.inputValue,onInputValueChange:C,value:j.includes("value")?x?[String(x)]:[]:void 0,onSelect:q$1,inputBehavior:"autocomplete",openOnClick:true,...M}),G=useCallback(()=>{i?.(null),C?.({inputValue:"",reason:"clear-trigger"});},[i,b]);return useEffect(()=>{H(a$4);},[a$4]),useEffect(()=>{s.current&&s.current.value===""&&c("");},[c,s.current?.value]),jsxs(Combobox.RootProvider,{value:F,"data-error":p,className:a$1("group flex flex-col",z),children:[jsx(a,{as:Combobox.Label,label:r,required:L,tooltip:P}),jsx(Y,{}),jsxs(Combobox.Control,{className:a$1("group/control data-focus:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full items-center justify-between gap-2 overflow-hidden rounded-lg bg-neutral-50 px-3 ring ring-neutral-500 transition-shadow ring-inset group-data-readonly:bg-neutral-100 group-data-readonly:ring-neutral-300 group-data-[error=true]:ring-2 has-focus:ring-2 data-disabled:ring-neutral-400",m&&"pointer-events-none"),children:[jsx(Combobox.Input,{className:a$1("font-inter flex w-full justify-between text-left text-sm text-neutral-900 outline-0 group-data-disabled/control:text-neutral-400 disabled:cursor-not-allowed data-placeholder-shown:text-neutral-500",m&&"pointer-events-none",p&&"pr-16"),ref:s}),p&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),!m&&jsx(Combobox.ClearTrigger,{className:"cursor-pointer",onClick:G,children:jsx(d,{className:"size-4.5"})}),jsx(Combobox.Trigger,{className:"cursor-pointer group-data-disabled/control:cursor-not-allowed group-data-disabled/control:text-neutral-400",children:jsx(g,{className:"size-4.5 transition-transform will-change-transform group-data-[state=open]/control:rotate-180"})})]}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-disabled:text-neutral-400 empty:hidden",children:S}),jsx(Portal,{children:jsx(Combobox.Positioner,{className:"z-10000!",children:jsx(Combobox.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:jsxs(Combobox.ItemGroup,{children:[u.items.length>0&&u.items.map(t=>jsx(Combobox.Item,{item:t,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:t.label}),t.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$2,{size:"sm",...t.badgeExpandable})})]}),t.description&&jsx("p",{className:"text-xs leading-[130%]",children:t.description})]})})},t.value)),u.items.length===0&&jsx(a$3,{title:O,description:A,Icon:D,descriptionLines:k,titleLines:E})]})})})})]})};export{ce as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-GFVJRSZI.js';import {a as a$2}from'./chunk-VFP3D5WF.js';import {o}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useEffect}from'react';import*as k from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var D=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],v=56,a=6,_=({value:c,onChange:h,locale:b,minTime:p,maxTime:u,...R})=>{let[F,m]=useState(false),[i,f]=useState(c),[o$1,P]=useState(),[O,M]=useState("bottom"),w=useRef(null),t=useRef(null),N=e=>{f(e),h?.(e),m(false);},z=useMemo(()=>i?format(new Date("2024-01-01T"+i),"p"):"",[i,b]),H=()=>{f(void 0),h?.(void 0);},n=useMemo(()=>D.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:p&&e<p||u&&e>u})),[b,p,u]);return useEffect(()=>{f(c);},[c]),a$1(w,()=>{m(false);}),useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let l=v*(n.length<a?n.length:a)+16,s=t.current.getBoundingClientRect();P(s);let S=window.innerHeight-s.bottom>l,B=s.top+s.height>l;M(S?"bottom":B?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),jsxs(Fragment,{children:[jsx(a$2,{ref:t,autoComplete:"off",startIcon:jsx(o,{}),onClean:H,readOnly:true,value:z,onClick:e=>{P(e.currentTarget.getBoundingClientRect()),m(l=>!l);},...R}),jsx(k.Root,{children:jsx("div",{ref:w,className:a$3("elevation-8 pointer-events-auto fixed z-50 my-2 hidden max-h-84 w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",F&&"block"),style:o$1?{width:`${o$1.width}px`,top:O==="bottom"?`${o$1.height+o$1.top}px`:o$1.top-(n.length<a?n.length:a)*v-16,left:o$1?.left}:void 0,children:n.map(e=>jsx("div",{onClick:()=>!e.disabled&&N(e.value),className:a$3("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",i===e.value&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:v},children:e.label},e.value))})})]})};_.displayName="TimePicker";export{_ as a};
1
+ import {a as a$1}from'./chunk-GFVJRSZI.js';import {a as a$2}from'./chunk-A2VW62QH.js';import {o}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useEffect}from'react';import*as k from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var D=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],v=56,a=6,_=({value:c,onChange:h,locale:b,minTime:p,maxTime:u,...R})=>{let[F,m]=useState(false),[i,f]=useState(c),[o$1,P]=useState(),[O,M]=useState("bottom"),w=useRef(null),t=useRef(null),N=e=>{f(e),h?.(e),m(false);},z=useMemo(()=>i?format(new Date("2024-01-01T"+i),"p"):"",[i,b]),H=()=>{f(void 0),h?.(void 0);},n=useMemo(()=>D.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:p&&e<p||u&&e>u})),[b,p,u]);return useEffect(()=>{f(c);},[c]),a$1(w,()=>{m(false);}),useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let l=v*(n.length<a?n.length:a)+16,s=t.current.getBoundingClientRect();P(s);let S=window.innerHeight-s.bottom>l,B=s.top+s.height>l;M(S?"bottom":B?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),jsxs(Fragment,{children:[jsx(a$2,{ref:t,autoComplete:"off",startIcon:jsx(o,{}),onClean:H,readOnly:true,value:z,onClick:e=>{P(e.currentTarget.getBoundingClientRect()),m(l=>!l);},...R}),jsx(k.Root,{children:jsx("div",{ref:w,className:a$3("elevation-8 pointer-events-auto fixed z-50 my-2 hidden max-h-84 w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",F&&"block"),style:o$1?{width:`${o$1.width}px`,top:O==="bottom"?`${o$1.height+o$1.top}px`:o$1.top-(n.length<a?n.length:a)*v-16,left:o$1?.left}:void 0,children:n.map(e=>jsx("div",{onClick:()=>!e.disabled&&N(e.value),className:a$3("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",i===e.value&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:v},children:e.label},e.value))})})]})};_.displayName="TimePicker";export{_ as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-JB6QLQCK.js';import {c as c$1}from'./chunk-JYNJHAGL.js';import {a as a$1}from'./chunk-CM6ALMTT.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {d}from'./chunk-MP4CHZ2K.js';import {c as c$2}from'./chunk-WQPZV6HK.js';import {c as c$3}from'./chunk-55Z77FLU.js';import {e,s,t}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';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:k,checkbox:b$1,...w})=>{let{header:z,headerLabel:D,complementaryText:M,subtitle:O}=c(),v=useCollapsibleContext(),{locale:F}=getDefaultOptions(),A=j(v.open,F?.code);return jsxs("div",{...w,className:a(z(),m),children:[b$1&&jsx(b,{...b$1,className:a("mt-0.25 mr-1",b$1.className)}),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$1,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),k?.map((d,x)=>{let{tooltipContent:E,...R}=d;return jsx(a$1,{content:E,disabled:!E,children:jsx(c$2,{...R,variant:"standard",size:"sm"})},x)}),i&&(()=>{let{tooltipContent:d,...x}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(c$3,{...x,size:"sm",variant:"standard"})})})(),jsx(a$1,{content:A,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$2,{Icon:v.open?s:t,variant:"standard",size:"sm"})})})]})]}),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 {b}from'./chunk-JB6QLQCK.js';import {c as c$1}from'./chunk-JYNJHAGL.js';import {d}from'./chunk-MP4CHZ2K.js';import {c as c$2}from'./chunk-WQPZV6HK.js';import {c as c$3}from'./chunk-55Z77FLU.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {a as a$1}from'./chunk-CM6ALMTT.js';import {e,s,t}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';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:k,checkbox:b$1,...w})=>{let{header:z,headerLabel:D,complementaryText:M,subtitle:O}=c(),v=useCollapsibleContext(),{locale:F}=getDefaultOptions(),A=j(v.open,F?.code);return jsxs("div",{...w,className:a(z(),m),children:[b$1&&jsx(b,{...b$1,className:a("mt-0.25 mr-1",b$1.className)}),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$1,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),k?.map((d,x)=>{let{tooltipContent:E,...R}=d;return jsx(a$1,{content:E,disabled:!E,children:jsx(c$2,{...R,variant:"standard",size:"sm"})},x)}),i&&(()=>{let{tooltipContent:d,...x}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(c$3,{...x,size:"sm",variant:"standard"})})})(),jsx(a$1,{content:A,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$2,{Icon:v.open?s:t,variant:"standard",size:"sm"})})})]})]}),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 {a}from'./chunk-GFVJRSZI.js';import {a as a$1}from'./chunk-VFP3D5WF.js';import {a as a$2}from'./chunk-CYV6IFY6.js';import {n}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as x from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var $=({value:d,onChange:m,locale:w,disabledDates:D,disabled:E,...L})=>{let[c,f]=useState(false),[a$4,u]=useState(d),[n$1,P]=useState(),[R,F]=useState("bottom"),[k,y]=useState(0),o=useRef(null),r=useRef(null);a(o,()=>{f(false);});let H=t=>{u(t),m?.(t);},z=useMemo(()=>a$4?format(a$4,"P"):"",[a$4]),I=()=>{u(void 0),m?.(void 0);},e=useCallback(()=>{if(!r.current)return;let t=r.current.getBoundingClientRect();if(!o.current)return;let i=o.current.getBoundingClientRect().height;y(i),P(t);let N=window.innerHeight-t.bottom>i,B=t.top+t.height>i;F(N?"bottom":B?"top":"bottom");},[r.current,o.current]);return useEffect(()=>{u(d);},[d]),useEffect(()=>{if(r?.current)return e(),r.current.addEventListener("mousedown",e),r.current.addEventListener("input",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),r.current?.removeEventListener("input",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current,e]),useEffect(()=>{if(c&&o.current){let t=setTimeout(()=>{e();},0);return ()=>clearTimeout(t)}},[c,e]),jsxs(Fragment,{children:[jsx(a$1,{disabled:E,ref:r,startIcon:jsx(n,{}),onClean:I,readOnly:true,value:z,onClick:t=>{P(t.currentTarget.getBoundingClientRect()),f(i=>!i);},...L}),jsx(x.Root,{asChild:true,children:jsx("div",{ref:o,className:a$3("pointer-events-auto fixed z-50 hidden",c&&"block"),style:n$1?{top:R==="bottom"?`${n$1.height+n$1.y}px`:n$1.top-k,left:n$1?.left}:void 0,children:jsx(a$2,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onSelect:H,locale:w,disabled:D})})})]})};$.displayName="DatePicker";export{$ as a};
1
+ import {a}from'./chunk-GFVJRSZI.js';import {a as a$1}from'./chunk-A2VW62QH.js';import {a as a$2}from'./chunk-CYV6IFY6.js';import {n}from'./chunk-QNQELNVU.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as x from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var $=({value:d,onChange:m,locale:w,disabledDates:D,disabled:E,...L})=>{let[c,f]=useState(false),[a$4,u]=useState(d),[n$1,P]=useState(),[R,F]=useState("bottom"),[k,y]=useState(0),o=useRef(null),r=useRef(null);a(o,()=>{f(false);});let H=t=>{u(t),m?.(t);},z=useMemo(()=>a$4?format(a$4,"P"):"",[a$4]),I=()=>{u(void 0),m?.(void 0);},e=useCallback(()=>{if(!r.current)return;let t=r.current.getBoundingClientRect();if(!o.current)return;let i=o.current.getBoundingClientRect().height;y(i),P(t);let N=window.innerHeight-t.bottom>i,B=t.top+t.height>i;F(N?"bottom":B?"top":"bottom");},[r.current,o.current]);return useEffect(()=>{u(d);},[d]),useEffect(()=>{if(r?.current)return e(),r.current.addEventListener("mousedown",e),r.current.addEventListener("input",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),r.current?.removeEventListener("input",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current,e]),useEffect(()=>{if(c&&o.current){let t=setTimeout(()=>{e();},0);return ()=>clearTimeout(t)}},[c,e]),jsxs(Fragment,{children:[jsx(a$1,{disabled:E,ref:r,startIcon:jsx(n,{}),onClean:I,readOnly:true,value:z,onClick:t=>{P(t.currentTarget.getBoundingClientRect()),f(i=>!i);},...L}),jsx(x.Root,{asChild:true,children:jsx("div",{ref:o,className:a$3("pointer-events-auto fixed z-50 hidden",c&&"block"),style:n$1?{top:R==="bottom"?`${n$1.height+n$1.y}px`:n$1.top-k,left:n$1?.left}:void 0,children:jsx(a$2,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onSelect:H,locale:w,disabled:D})})})]})};$.displayName="DatePicker";export{$ as a};
@@ -1 +1 @@
1
- import {d}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var V=["xs","sm","md"],L=["standard","primary"],R=["fill","outlined"],b=tv({slots:{container:"flex cursor-default items-center gap-2 rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"min-h-8 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"min-h-6 px-3 text-sm",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"},xs:{container:"min-h-4 px-2 text-xs",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:true,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:false,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:true,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:false,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:false,variant:"standard",type:"outlined",className:{container:"hover:bg-primary-100 text-neutral-700 ring-1 ring-neutral-700 ring-inset"}},{disabled:true,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-neutral-400 ring-inset"}},{disabled:false,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-primary-500 hover:bg-primary-100 ring-1 ring-inset"}}],defaultVariants:{disabled:false,size:"md"}}),g=forwardRef(({children:i,onClose:s,StartIcon:t,className:o,hasCloseIcon:l=true,disabled:a$1,variant:p,type:c,size:d$1,...m},u)=>{let{container:y,startIcon:I,closeIcon:f}=b({variant:p,type:c,size:d$1,disabled:a$1});return jsxs("span",{ref:u,className:a(y(),o),...m,children:[t&&jsx(t,{className:I()}),i,l&&jsx(d,{onClick:()=>!a$1&&s?.(),className:f()})]})});g.displayName="ChipInput";export{V as a,L as b,R as c,g as d};
1
+ import {d}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var V=["xs","sm","md"],L=["standard","primary"],R=["fill","outlined"],b=tv({slots:{container:"flex cursor-default items-center gap-2 rounded-3xl transition-all",startIcon:"",closeIcon:"cursor-pointer"},variants:{variant:{standard:{},primary:{}},type:{fill:{},outlined:{}},size:{md:{container:"min-h-8 px-3",startIcon:"h-4.5 w-4.5",closeIcon:"h-4.5 w-4.5"},sm:{container:"min-h-6 px-3 text-sm",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"},xs:{container:"min-h-4 px-2 text-xs",startIcon:"h-3.5 w-3.5",closeIcon:"h-3.5 w-3.5"}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:true,className:{container:"cursor-not-allowed",closeIcon:"cursor-not-allowed"}},{disabled:false,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"}},{disabled:true,variant:"standard",type:"fill",className:{container:"bg-neutral-100 text-neutral-400"}},{disabled:false,variant:"primary",type:"fill",className:{container:"bg-primary-200 text-primary-800 hover:bg-primary-300"}},{disabled:false,variant:"standard",type:"outlined",className:{container:"hover:bg-primary-100 text-neutral-700 ring-1 ring-neutral-700 ring-inset"}},{disabled:true,variant:"standard",type:"outlined",className:{container:"text-neutral-400 ring-1 ring-neutral-400 ring-inset"}},{disabled:false,variant:"primary",type:"outlined",className:{container:"text-primary-500 ring-primary-500 hover:bg-primary-100 ring-1 ring-inset"}}],defaultVariants:{disabled:false,size:"md"}}),g=forwardRef(({children:i,onClose:s,StartIcon:t,className:o,hasCloseIcon:l=true,disabled:a$1,variant:p,type:c,size:d$1,...m},u)=>{let{container:y,startIcon:I,closeIcon:f}=b({variant:p,type:c,size:d$1,disabled:a$1});return jsxs("span",{ref:u,className:a(y(),o),...m,children:[t&&jsx(t,{className:I()}),i,l&&!a$1&&jsx(d,{onClick:s,className:f()})]})});g.displayName="ChipInput";export{V as a,L as b,R as c,g as d};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-OBZIYJO7.js';import {forwardRef,useCallback}from'react';import {Popover}from'@ark-ui/react/popover';import {Portal}from'@ark-ui/react/portal';import {jsx}from'react/jsx-runtime';var F=({portalled:n,lazyMount:r=true,autoFocus:i=false,onOpenChange:o,unmountOnExit:e=true,modal:l=true,positioning:d={placement:"bottom-end"},...m})=>{let s=useCallback(g=>{o?.(g.open);},[o]);return jsx(Popover.Root,{portalled:n,positioning:d,lazyMount:r,autoFocus:i,modal:l,onOpenChange:s,unmountOnExit:e,...m})},N=Popover.Trigger,v=forwardRef(({className:n,portalled:r=true,...i},o)=>{let e=jsx(Popover.Positioner,{children:jsx(Popover.Content,{ref:o,className:a("elevation-9 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-sm bg-neutral-50","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[placement=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left","data-[placement=top]:origin-bottom data-[placement=top-end]:origin-bottom-right data-[placement=top-start]:origin-bottom-left","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-start]:origin-top-left","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right",n),...i})});return r?jsx(Portal,{children:e}):e});v.displayName=Popover.Content.displayName;export{F as a,N as b,v as c};
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {d,q,v}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"],D="00:00",F=forwardRef((r,x)=>{let{className:b,label:y,required:w,tooltip:C,error:o,isItemDisabled:i,value:s,helperText:v$1,placeholder:N=D,onValueChange:u,defaultValue:d$1,...P}=r,n=Object.getOwnPropertyNames(r),c=useMemo(()=>createListCollection({items:z,isItemDisabled:i}),[i]),S=useCallback(l=>{u?.(l.value.at(0)??null);},[u]);if(n.includes("defaultValue")&&n.includes("value"))throw new Error("Cannot set both defaultValue and value props on TimePickerNew. Use one or the other.");return jsxs(Select.Root,{ref:x,"data-error":o,collection:c,className:a$1("group flex flex-col",b),positioning:{placement:"bottom-end"},onValueChange:S,value:n.includes("value")?s?[s]:[]:void 0,defaultValue:d$1?[d$1]:void 0,...P,children:[jsx(a,{as:Select.Label,label:y,required:w,tooltip:C}),jsx(Select.Control,{className:a$1("group/control data-[focus]:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full justify-between overflow-hidden rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 has-focus:ring-2 data-[disabled]:ring-neutral-400",r.readOnly&&"pointer-events-none"),children:jsxs(Select.Trigger,{className:"flex w-full cursor-pointer items-center gap-1 text-neutral-900 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",children:[jsx(Select.ValueText,{className:a$1("font-inter min-w-0 flex-1 py-2.5 pl-3 text-left text-sm",r.readOnly&&"pointer-events-none"),placeholder:N}),!r.readOnly&&jsx(Select.ClearTrigger,{asChild:true,className:a$1("z-10 cursor-pointer",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),o&&jsx(q,{className:"text-error-500 z-10 size-4.5 cursor-pointer"}),jsx(Select.Indicator,{className:a$1("group-data-[focus]/control:ring-primary-800 group-data-[error=true]:ring-error-500 ml-2 flex h-full w-10 shrink-0 items-center justify-center bg-neutral-100 text-neutral-700 ring ring-neutral-500 transition-shadow group-data-[disabled]/control:text-neutral-400 group-data-[disabled]/control:ring-neutral-400 group-data-[error=true]:ring-2 group-data-[focus]/control:ring-2 group-data-[readonly]:text-neutral-400 group-data-[readonly]:ring-neutral-300",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(v,{className:"size-4.5"})})]})}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-[disabled]:text-neutral-400 empty:hidden",children:v$1}),jsx(Portal,{children:jsx(Select.Positioner,{className:"!z-10000",children:jsx(Select.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:c.items.map(l=>jsx(Select.Item,{item:l,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Select.ItemText,{children:l})},l))})})}),jsx(Select.HiddenSelect,{})]})});export{F as a};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {d,q,v}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"],D="00:00",F=forwardRef((r,x)=>{let{className:b,label:y,required:w,tooltip:C,error:o,isItemDisabled:i,value:s,helperText:v$1,placeholder:N=D,onValueChange:u,defaultValue:d$1,...P}=r,n=Object.getOwnPropertyNames(r),c=useMemo(()=>createListCollection({items:z,isItemDisabled:i}),[i]),S=useCallback(l=>{u?.(l.value.at(0)??null);},[u]);if(n.includes("defaultValue")&&n.includes("value"))throw new Error("Cannot set both defaultValue and value props on TimePickerNew. Use one or the other.");return jsxs(Select.Root,{ref:x,"data-error":o,collection:c,className:a$1("group flex flex-col",b),positioning:{placement:"bottom-end"},onValueChange:S,value:n.includes("value")?s?[s]:[]:void 0,defaultValue:d$1?[d$1]:void 0,...P,children:[jsx(a,{as:Select.Label,label:y,required:w,tooltip:C}),jsx(Select.Control,{className:a$1("group/control data-[focus]:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full justify-between overflow-hidden rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 has-focus:ring-2 data-[disabled]:ring-neutral-400",r.readOnly&&"pointer-events-none"),children:jsxs(Select.Trigger,{className:"flex w-full cursor-pointer items-center gap-1 text-neutral-900 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",children:[jsx(Select.ValueText,{className:a$1("font-inter min-w-0 flex-1 py-2.5 pl-3 text-left text-sm",r.readOnly&&"pointer-events-none"),placeholder:N}),!r.readOnly&&jsx(Select.ClearTrigger,{asChild:true,className:a$1("z-10 cursor-pointer",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),o&&jsx(q,{className:"text-error-500 z-10 size-4.5 cursor-pointer"}),jsx(Select.Indicator,{className:a$1("group-data-[focus]/control:ring-primary-800 group-data-[error=true]:ring-error-500 ml-2 flex h-full w-10 shrink-0 items-center justify-center bg-neutral-100 text-neutral-700 ring ring-neutral-500 transition-shadow group-data-[disabled]/control:text-neutral-400 group-data-[disabled]/control:ring-neutral-400 group-data-[error=true]:ring-2 group-data-[focus]/control:ring-2 group-data-[readonly]:text-neutral-400 group-data-[readonly]:ring-neutral-300",r.readOnly&&"pointer-events-none"),tabIndex:r.readOnly?-1:void 0,children:jsx(v,{className:"size-4.5"})})]})}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-[disabled]:text-neutral-400 empty:hidden",children:v$1}),jsx(Portal,{children:jsx(Select.Positioner,{className:"!z-10000",children:jsx(Select.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:c.items.map(l=>jsx(Select.Item,{item:l,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Select.ItemText,{children:l})},l))})})}),jsx(Select.HiddenSelect,{})]})});export{F as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-UZ3SBSKA.js';import {d,q,g}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var K=forwardRef((l,x)=>{let{className:w,label:S,required:v,tooltip:y,error:o,isItemDisabled:i,value:s,helperText:N,placeholder:C,onValueChange:d$1,defaultValue:u,options:c,clearable:O=true,...I}=l,n=Object.getOwnPropertyNames(l),g$1=useMemo(()=>createListCollection({items:c,isItemDisabled:i}),[c,i]),V=useCallback(r=>{let P=r.items.at(0);d$1?.(P?.value??null);},[d$1]);if(n.includes("defaultValue")&&n.includes("value"))throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");return jsxs(Select.Root,{ref:x,"data-error":o,collection:g$1,className:a$1("group flex flex-col",w),positioning:{placement:"bottom-end"},onValueChange:V,value:n.includes("value")?s?[s]:[]:void 0,defaultValue:u?[u]:void 0,...I,children:[jsx(a,{as:Select.Label,label:S,required:v,tooltip:y}),jsx(Select.Control,{className:a$1("group/control data-[focus]:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full justify-between overflow-hidden rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 has-focus:ring-2 data-[disabled]:ring-neutral-400",l.readOnly&&"pointer-events-none"),children:jsxs(Select.Trigger,{className:"flex w-full cursor-pointer items-center justify-between gap-2 px-3 text-neutral-900 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",children:[jsx(Select.ValueText,{className:a$1("font-inter w-full py-2.5 text-left text-sm",l.readOnly&&"pointer-events-none",o&&"pr-16"),placeholder:C}),!l.readOnly&&O&&jsx(Select.ClearTrigger,{asChild:true,onClick:r=>r.stopPropagation(),className:a$1("cursor-pointer",l.readOnly&&"pointer-events-none"),tabIndex:l.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),o&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),jsx(Select.Indicator,{className:a$1("flex shrink-0 items-center justify-center text-neutral-700 transition-shadow group-data-[disabled]/control:text-neutral-400 group-data-[readonly]:text-neutral-400",l.readOnly&&"pointer-events-none"),tabIndex:l.readOnly?-1:void 0,children:jsx(g,{className:"size-4.5"})})]})}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-[disabled]:text-neutral-400 empty:hidden",children:N}),jsx(Portal,{children:jsx(Select.Positioner,{className:"!z-10000",children:jsx(Select.Content,{className:"elevation-9 max-h-67.5 w-[var(--reference-width)] overflow-auto rounded-lg bg-neutral-50",children:g$1.items.map(r=>jsx(Select.Item,{item:r,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Select.ItemText,{children:r.label})},r.value))})})}),jsx(Select.HiddenSelect,{})]})});export{K as a};
1
+ import {a}from'./chunk-BJ5MXTGP.js';import {d,q,g}from'./chunk-QNQELNVU.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var K=forwardRef((l,x)=>{let{className:w,label:S,required:v,tooltip:y,error:o,isItemDisabled:i,value:s,helperText:N,placeholder:C,onValueChange:d$1,defaultValue:u,options:c,clearable:O=true,...I}=l,n=Object.getOwnPropertyNames(l),g$1=useMemo(()=>createListCollection({items:c,isItemDisabled:i}),[c,i]),V=useCallback(r=>{let P=r.items.at(0);d$1?.(P?.value??null);},[d$1]);if(n.includes("defaultValue")&&n.includes("value"))throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");return jsxs(Select.Root,{ref:x,"data-error":o,collection:g$1,className:a$1("group flex flex-col",w),positioning:{placement:"bottom-end"},onValueChange:V,value:n.includes("value")?s?[s]:[]:void 0,defaultValue:u?[u]:void 0,...I,children:[jsx(a,{as:Select.Label,label:S,required:v,tooltip:y}),jsx(Select.Control,{className:a$1("group/control data-[focus]:ring-primary-800 group-data-[error=true]:ring-error-500 relative flex h-10 w-full justify-between overflow-hidden rounded-lg bg-neutral-50 ring ring-neutral-500 transition-shadow group-data-[error=true]:ring-2 group-data-[readonly]:bg-neutral-100 group-data-[readonly]:ring-neutral-300 has-focus:ring-2 data-[disabled]:ring-neutral-400",l.readOnly&&"pointer-events-none"),children:jsxs(Select.Trigger,{className:"flex w-full cursor-pointer items-center justify-between gap-2 px-3 text-neutral-900 group-data-[disabled]/control:text-neutral-400 disabled:cursor-not-allowed data-[placeholder-shown]:text-neutral-500",children:[jsx(Select.ValueText,{className:a$1("font-inter w-full py-2.5 text-left text-sm",l.readOnly&&"pointer-events-none",o&&"pr-16"),placeholder:C}),!l.readOnly&&O&&jsx(Select.ClearTrigger,{asChild:true,onClick:r=>r.stopPropagation(),className:a$1("cursor-pointer",l.readOnly&&"pointer-events-none"),tabIndex:l.readOnly?-1:void 0,children:jsx(d,{className:"size-4.5 text-neutral-700"})}),o&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),jsx(Select.Indicator,{className:a$1("flex shrink-0 items-center justify-center text-neutral-700 transition-shadow group-data-[disabled]/control:text-neutral-400 group-data-[readonly]:text-neutral-400",l.readOnly&&"pointer-events-none"),tabIndex:l.readOnly?-1:void 0,children:jsx(g,{className:"size-4.5"})})]})}),jsx("p",{className:"font-inter text-2xs group-data-[error=true]:text-error-500 mt-1 leading-[133.33%] font-normal text-neutral-700 peer-data-[disabled]:text-neutral-400 empty:hidden",children:N}),jsx(Portal,{children:jsx(Select.Positioner,{className:"!z-10000",children:jsx(Select.Content,{className:"elevation-9 max-h-67.5 w-[var(--reference-width)] overflow-auto rounded-lg bg-neutral-50",children:g$1.items.map(r=>jsx(Select.Item,{item:r,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Select.ItemText,{children:r.label})},r.value))})})}),jsx(Select.HiddenSelect,{})]})});export{K as a};
@@ -1 +1 @@
1
- import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-NVYSWZZC.js';import {a as a$4,b as b$2,c as c$2}from'./chunk-PLA5QILP.js';import {b as b$1}from'./chunk-JB6QLQCK.js';import {a as a$2}from'./chunk-CM6ALMTT.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {c as c$1}from'./chunk-WQPZV6HK.js';import {c as c$3}from'./chunk-55Z77FLU.js';import {e as e$1}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {Component,KeyRound,MailWarning,MapPinOff,TriangleAlert,Siren,Plus}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var ke=["siren","warning","map-pin-off","email-alert","key-round","component"],ie={siren:{Icon:Siren,bgClassName:"bg-orange-50",iconClassName:"text-orange-700"},warning:{Icon:TriangleAlert,bgClassName:"bg-warning-100",iconClassName:"text-warning-900"},"map-pin-off":{Icon:MapPinOff,bgClassName:"bg-coral-50",iconClassName:"text-coral-700"},"email-alert":{Icon:MailWarning,bgClassName:"bg-danger-100",iconClassName:"text-danger-700"},"key-round":{Icon:KeyRound,bgClassName:"bg-orchid-100",iconClassName:"text-orchid-700"},component:{Icon:Component,bgClassName:"bg-aqua-100",iconClassName:"text-aqua-800"}},dt=o=>({id:"__select__",size:54,enableResizing:false,header:({table:i})=>{let u=i.getRowModel().rows.some(s=>s.getCanSelect()),r=i.getIsAllPageRowsSelected()?true:i.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:r,disabled:!u,className:"ml-1",onCheckedChange:s=>i.toggleAllPageRowsSelected(s===true)})},cell:({row:i})=>{let u=i.getCanSelect(),r=u?i.getIsSelected():typeof o.setDisabledRowState=="function"?o.setDisabledRowState(i.original):o.setDisabledRowState??false,s=jsx(b$1,{checked:r,onCheckedChange:R=>i.toggleSelected(R===true),disabled:!u}),c=o.rowSelectionTooltip?.content(i.original);return c?jsx(a$2,{className:"w-fit",content:c,positioning:o.rowSelectionTooltip?.positioning??{placement:"right"},children:s}):s},enableSorting:false}),q=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],Me=({columns:o,rows:i$1,hasSelection:u,hasRowActions:r,hasPagination:s,className:c$1,...R})=>jsxs(a$1,{className:c$1,...R,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[u&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),r&&jsx(h,{className:"w-[30px] max-w-[30px] min-w-[30px] p-0 px-0",style:{width:"30px",minWidth:"30px",maxWidth:"30px"}}),Array.from({length:o},(b,y)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},y))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--color-primary-200)]",children:Array.from({length:i$1},(b,y)=>jsxs(e,{children:[u&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),r&&jsx(i,{className:"!bg-primary-50 w-[30px] max-w-[30px] min-w-[30px] p-0 align-middle",style:{width:"30px",minWidth:"30px",maxWidth:"30px"},children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),Array.from({length:o},(x,d)=>jsx(i,{children:jsx(a$3,{className:a("h-4",q[(y+d)%q.length])})},d))]},y))})]}),s&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});Me.displayName="DataTableFullSkeleton";var ut={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},N="__row_actions__",_e="!bg-transparent hover:!bg-transparent focus:!bg-transparent active:!bg-transparent !h-[30px] !max-h-[30px] !min-h-[30px] !w-[30px] !max-w-[30px] !min-w-[30px] !rounded-none",mt=(o,i)=>typeof o=="function"?o(i):o??false,gt=({row:o,rowActions:i})=>{let[u,r]=useState(false),s=o.original,c=i(s).filter(d=>d.isActive===void 0?true:mt(d.isActive,s)).sort((d,h)=>ke.indexOf(d.name)-ke.indexOf(h.name));if(c.length===0)return null;let R=c.length>3,b=R?c.slice(0,2):c,y=(d,h)=>{let l=ie[d.name];return jsx(c$1,{Icon:l.Icon,"aria-label":d.label,variant:"ghost",size:"sm",iconClassName:l.iconClassName,className:_e,onClick:m=>{m.stopPropagation(),d.onClick(s);},type:"button"},`${d.name}-${h}`)},x=R?3:b.length;return jsxs("div",{className:"grid h-full w-full justify-start overflow-hidden",style:{gridTemplateRows:`repeat(${x}, minmax(0, 1fr))`},children:[b.map((d,h)=>jsx("div",{className:a("flex h-full w-full items-center justify-center",ie[d.name].bgClassName),children:y(d,h)},`${d.name}-${h}`)),R&&jsx("div",{className:"bg-primary-300 flex h-full w-full items-center justify-center",children:jsxs(a$4,{open:u,onOpenChange:r,modal:false,positioning:{placement:"right-start"},children:[jsx(b$2,{asChild:true,children:jsx(c$1,{Icon:Plus,"aria-label":"More actions",variant:"ghost",size:"sm",iconClassName:"text-primary-700",className:_e,type:"button",onClick:d=>{d.stopPropagation();}})}),jsx(c$2,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:c.map((d,h)=>{let l=ie[d.name];return jsx(c$3,{variant:"ghost",size:"md",StartIcon:l.Icon,className:"!h-auto !min-h-0 w-full justify-start !gap-2 !px-3 !py-4 !text-neutral-900 hover:!text-neutral-900 disabled:!text-neutral-900",onClick:m=>{m.stopPropagation(),d.onClick(s),r(false);},type:"button",children:d.label},`${d.name}-${h}`)})})})]})})]})},ft=({rowActions:o})=>({id:N,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:i})=>o?jsx(gt,{row:i,rowActions:o}):null}),We=memo(({row:o,isSelected:i$1,resizable:u,type:r})=>jsx(e,{"data-state":i$1&&"selected",className:a(r&&r!=="default"&&ut[r]),style:r&&r!=="default"?{"--color-primary-200":`var(--color-${r}-100)`}:void 0,children:o.getVisibleCells().map(s=>jsx(i,{className:s.column.id===N?"p-0 align-middle":void 0,style:s.column.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:u?{width:`calc(var(--col-${s.column.id}-size) * 1px)`,minWidth:`calc(var(--col-${s.column.id}-size) * 1px)`,maxWidth:`calc(var(--col-${s.column.id}-size) * 1px)`}:void 0,children:flexRender(s.column.columnDef.cell,s.getContext())},s.id))}),(o,i)=>o.isSelected===i.isSelected&&o.row.original===i.row.original&&o.resizable===i.resizable&&o.type===i.type);We.displayName="DataTableRow";var $e="dt-col-ratios-",pt=o=>{try{let i=localStorage.getItem(`${$e}${o}`);return i?JSON.parse(i):{}}catch{return {}}},bt=(o,i)=>{try{localStorage.setItem(`${$e}${o}`,JSON.stringify(i));}catch{}},Oe=(o,i,u)=>{let r={},s=i,c=[];for(let l of o)l.canResize?c.push(l):(r[l.id]=l.defaultSize,s-=l.defaultSize);if(c.length===0||s<=0)return r;let R=new Set(c.map(l=>l.id)),b={};for(let[l,m]of Object.entries(u))R.has(l)&&(b[l]=m);let y=c.filter(l=>!(l.id in b)),x={};if(Object.keys(b).length===0){let l=c.reduce((m,P)=>m+P.defaultSize,0);for(let m of c)x[m.id]=m.defaultSize/l;}else if(y.length===0){let l=Object.values(b).reduce((m,P)=>m+P,0);for(let m of c)x[m.id]=b[m.id]/l;}else {let l=c.reduce((S,v)=>S+v.defaultSize,0),P=y.reduce((S,v)=>S+v.defaultSize,0)/l,k=Object.values(b).reduce((S,v)=>S+v,0),B=(1-P)/k;for(let S of c)S.id in b?x[S.id]=b[S.id]*B:x[S.id]=S.defaultSize/l;}for(let l of c)r[l.id]=Math.max(Math.round(x[l.id]*s),l.defaultSize);let h=c.reduce((l,m)=>l+r[m.id],0)-s;if(h!==0&&c.length>0){let l=c[c.length-1];r[l.id]=Math.max(r[l.id]-h,l.defaultSize);}return r},Ie=(o,i)=>{let u=0;for(let s of i)u+=o[s]??0;if(u===0)return {};let r={};for(let s of i)o[s]!=null&&(r[s]=o[s]/u);return r};function Vt({columns:o,data:i$1,rowsCount:u,pagination:r,onPaginationChange:s,noResults:c$1,onNextPageClick:R,onPreviousPageClick:b$1,disableNextPage:y,disablePreviousPage:x,className:d$1,onRowsPerPageChange:h$1,columnOrder:l,columnVisibility:m,rowsPerPageOptions:P,enableRowSelection:k=false,rowSelection:B,onRowSelectionChange:S,getRowId:v,rowSelectionTooltip:se,setDisabledRowState:re,tableId:w,isLoading:H,isInitialLoading:ce,skeletonRowCount:He,skeletonColumns:Le=6,getRowType:de,rowActions:O,...ue}){let I=typeof k=="function"||k===true,me=useMemo(()=>{if(!l)return;let t=[I?"__select__":null,O?N:null].filter(a=>a!=null),n=new Set(t);return [...t,...l.filter(a=>!n.has(a))]},[l,I,O]),Ee=useMemo(()=>{let t=I?[dt({rowSelectionTooltip:se,setDisabledRowState:re}),...o]:o;if(!O)return t;let n=ft({rowActions:O});return I?[t[0],n,...t.slice(1)]:[n,...t]},[I,o,se,re,O]),[j$1,Be]=useState(null),je=useCallback(t=>Be(t),[]),L=useRef({}),J=useRef(null),[V,X]=useState({}),Ve=t=>{X(n=>{let a=typeof t=="function"?t(n):t,p=J.current;if(!p)return a;let C=p.getState().columnSizingInfo.isResizingColumn;if(!C)return a;let z=p.getVisibleLeafColumns(),D=z.findIndex(A=>A.id===C);if(D===-1)return a;let _=null;for(let A=D+1;A<z.length;A++)if(z[A].getCanResize()){_=z[A];break}if(!_)return a;let F=z[D].columnDef,Ue=F.size??150,qe=F.minSize??80,Y=n[C]??Ue,Je=a[C]??Y,be=Math.max(Je,qe),Ce=be-Y;if(Ce===0)return {...a,[C]:be};let Te=_.id,Xe=_.columnDef.size??150,Ye=_.columnDef.minSize??80,he=n[Te]??Xe,Se=Math.max(he-Ce,Ye),Ge=he-Se,Qe=Y+Ge;return {...a,[C]:Qe,[Te]:Se}});},g$1=useReactTable({data:i$1,columns:Ee,rowCount:u,state:{pagination:r,...me!==void 0&&{columnOrder:me},columnVisibility:m,...B!==void 0&&{rowSelection:B},...w&&{columnSizing:V}},onPaginationChange:s,onRowSelectionChange:S,...w&&{columnResizeMode:"onChange",onColumnSizingChange:Ve,defaultColumn:{minSize:80}},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof k=="function"?t=>k(t.original):k,getRowId:v?t=>v(t):void 0});J.current=g$1;let Fe=g$1.getVisibleLeafColumns().map(t=>t.id).join(","),Ke=()=>g$1.getVisibleLeafColumns().map(t=>({id:t.id,defaultSize:t.columnDef.size??150,canResize:t.getCanResize()})),ge=()=>new Set(g$1.getVisibleLeafColumns().filter(t=>t.getCanResize()).map(t=>t.id));useEffect(()=>{if(!w||!j$1)return;(a=>{let p=Object.keys(L.current).length>0?L.current:pt(w),C=Ke(),z=Oe(C,a,p);L.current=Ie(z,ge()),X(z);})(j$1.clientWidth);let n=new ResizeObserver(([a])=>{if(!a)return;let p=J.current;if(!p||p.getState().columnSizingInfo.isResizingColumn)return;let C=p.getVisibleLeafColumns().map(D=>({id:D.id,defaultSize:D.columnDef.size??150,canResize:D.getCanResize()})),z=Oe(C,a.contentRect.width,L.current);X(z);});return n.observe(j$1),()=>n.disconnect()},[w,Fe,j$1]);let E=useMemo(()=>{if(!w||Object.keys(V).length===0)return;let t=g$1.getFlatHeaders(),n={};for(let a of t)n[`--header-${a.id}-size`]=a.getSize(),n[`--col-${a.column.id}-size`]=a.column.getSize();return n},[w,g$1.getState().columnSizingInfo,g$1.getState().columnSizing]),fe=g$1.getState().columnSizingInfo.isResizingColumn;useEffect(()=>{if(w&&!fe&&Object.keys(V).length>0){let t=ge(),n=Ie(V,t);L.current=n,bt(w,n);}},[w,fe]);let pe=He??r?.pageSize??10;return ce?jsx(Me,{columns:Le,rows:pe,hasSelection:I,hasRowActions:!!O,hasPagination:!!r,className:d$1,...ue}):!H&&!ce&&!g$1.getRowModel().rows?.length?jsx(f,{...c$1}):jsxs(a$1,{ref:je,className:d$1,...ue,children:[jsxs(b,{style:E?{...E,width:g$1.getTotalSize(),tableLayout:"fixed"}:{tableLayout:"fixed"},children:[!E&&jsx("colgroup",{children:(()=>{let t=g$1.getHeaderGroups()[0].headers,n=t.reduce((a,p)=>a+p.getSize(),0);return t.map(a=>jsx("col",{span:1,style:{width:`${a.column.getSize()/n*100}%`,minWidth:`${a.column.getSize()}px`}},a.id))})()}),jsx(c,{children:g$1.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(n=>{if(n.isPlaceholder)return jsx(h,{style:E?{width:`calc(var(--header-${n.id}-size) * 1px)`,minWidth:`calc(var(--header-${n.id}-size) * 1px)`,maxWidth:`calc(var(--header-${n.id}-size) * 1px)`}:void 0},n.id);let a$1=n.column.columnDef,p=flexRender(a$1.header,n.getContext()),C=n.column.id!=="__select__"&&a$1.headerTooltip!==false,z=a$1.headerTooltip&&typeof a$1.headerTooltip!="boolean"?a$1.headerTooltip:p,D=jsx("span",{className:"font-inter line-clamp-1 text-xs leading-[133%] text-neutral-900 uppercase",children:p});return jsxs(h,{className:n.column.id===N?"p-0 px-0":w?"group/resize relative overflow-clip":void 0,style:n.column.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:E?{width:`calc(var(--header-${n.id}-size) * 1px)`,minWidth:`calc(var(--header-${n.id}-size) * 1px)`,maxWidth:`calc(var(--header-${n.id}-size) * 1px)`}:void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:z,contentClassName:"font-normal normal-case",children:D}):D,a$1.headerInfoTooltip&&jsx(a$2,{content:a$1.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),w&&n.column.getCanResize()&&t.headers.some((_,F)=>F>t.headers.indexOf(n)&&_.column.getCanResize())&&jsx("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",n.column.getIsResizing()&&"bg-primary-600 opacity-100")})]},n.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--color-primary-200)]",children:H?Array.from({length:pe},(t,n)=>jsx(e,{children:g$1.getVisibleLeafColumns().map((a$1,p)=>{let C=a$1.columnDef;return jsx(i,{className:a$1.id==="__select__"?"align-middle":a$1.id===N?"!bg-primary-50 p-0 align-middle":void 0,style:a$1.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:void 0,children:a$1.id==="__select__"?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):a$1.id===N?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):C.skeleton!=null?C.skeleton:jsx(a$3,{className:a("h-4",q[(n+p)%q.length])})},a$1.id)})},n)):g$1.getRowModel().rows.map(t=>jsx(We,{row:t,isSelected:t.getIsSelected(),resizable:!!w,type:de?de(t.original):"default"},t.id))})]}),r&&s&&(i$1.length>0||H)&&jsx(j,{rowsPerPageOptions:P,rowsCount:u,pagination:r,onPageSizeChange:t=>{g$1.setPagination({pageIndex:0,pageSize:t}),h$1?.(t);},onPreviousPageClick:b$1,onNextPageClick:R,isDisableNextPageButton:H||y||!!u&&!g$1.getCanNextPage(),isDisablePreviousPageButton:H||x||!!u&&!g$1.getCanPreviousPage(),onPageChange:t=>{g$1.setPageIndex(t-1);}})]})}export{Vt as a};
1
+ import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-NVYSWZZC.js';import {a as a$4,b as b$2,c as c$2}from'./chunk-T2GZMGRZ.js';import {b as b$1}from'./chunk-JB6QLQCK.js';import {c as c$1}from'./chunk-WQPZV6HK.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {c as c$3}from'./chunk-55Z77FLU.js';import {a as a$2}from'./chunk-CM6ALMTT.js';import {e as e$1}from'./chunk-QNQELNVU.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {Component,KeyRound,MailWarning,MapPinOff,TriangleAlert,Siren,Plus}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var ke=["siren","warning","map-pin-off","email-alert","key-round","component"],ie={siren:{Icon:Siren,bgClassName:"bg-orange-50",iconClassName:"text-orange-700"},warning:{Icon:TriangleAlert,bgClassName:"bg-warning-100",iconClassName:"text-warning-900"},"map-pin-off":{Icon:MapPinOff,bgClassName:"bg-coral-50",iconClassName:"text-coral-700"},"email-alert":{Icon:MailWarning,bgClassName:"bg-danger-100",iconClassName:"text-danger-700"},"key-round":{Icon:KeyRound,bgClassName:"bg-orchid-100",iconClassName:"text-orchid-700"},component:{Icon:Component,bgClassName:"bg-aqua-100",iconClassName:"text-aqua-800"}},dt=o=>({id:"__select__",size:54,enableResizing:false,header:({table:i})=>{let u=i.getRowModel().rows.some(s=>s.getCanSelect()),r=i.getIsAllPageRowsSelected()?true:i.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:r,disabled:!u,className:"ml-1",onCheckedChange:s=>i.toggleAllPageRowsSelected(s===true)})},cell:({row:i})=>{let u=i.getCanSelect(),r=u?i.getIsSelected():typeof o.setDisabledRowState=="function"?o.setDisabledRowState(i.original):o.setDisabledRowState??false,s=jsx(b$1,{checked:r,onCheckedChange:R=>i.toggleSelected(R===true),disabled:!u}),c=o.rowSelectionTooltip?.content(i.original);return c?jsx(a$2,{className:"w-fit",content:c,positioning:o.rowSelectionTooltip?.positioning??{placement:"right"},children:s}):s},enableSorting:false}),q=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],Me=({columns:o,rows:i$1,hasSelection:u,hasRowActions:r,hasPagination:s,className:c$1,...R})=>jsxs(a$1,{className:c$1,...R,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[u&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),r&&jsx(h,{className:"w-[30px] max-w-[30px] min-w-[30px] p-0 px-0",style:{width:"30px",minWidth:"30px",maxWidth:"30px"}}),Array.from({length:o},(b,y)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},y))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--color-primary-200)]",children:Array.from({length:i$1},(b,y)=>jsxs(e,{children:[u&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),r&&jsx(i,{className:"!bg-primary-50 w-[30px] max-w-[30px] min-w-[30px] p-0 align-middle",style:{width:"30px",minWidth:"30px",maxWidth:"30px"},children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),Array.from({length:o},(x,d)=>jsx(i,{children:jsx(a$3,{className:a("h-4",q[(y+d)%q.length])})},d))]},y))})]}),s&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});Me.displayName="DataTableFullSkeleton";var ut={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},N="__row_actions__",_e="!bg-transparent hover:!bg-transparent focus:!bg-transparent active:!bg-transparent !h-[30px] !max-h-[30px] !min-h-[30px] !w-[30px] !max-w-[30px] !min-w-[30px] !rounded-none",mt=(o,i)=>typeof o=="function"?o(i):o??false,gt=({row:o,rowActions:i})=>{let[u,r]=useState(false),s=o.original,c=i(s).filter(d=>d.isActive===void 0?true:mt(d.isActive,s)).sort((d,h)=>ke.indexOf(d.name)-ke.indexOf(h.name));if(c.length===0)return null;let R=c.length>3,b=R?c.slice(0,2):c,y=(d,h)=>{let l=ie[d.name];return jsx(c$1,{Icon:l.Icon,"aria-label":d.label,variant:"ghost",size:"sm",iconClassName:l.iconClassName,className:_e,onClick:m=>{m.stopPropagation(),d.onClick(s);},type:"button"},`${d.name}-${h}`)},x=R?3:b.length;return jsxs("div",{className:"grid h-full w-full justify-start overflow-hidden",style:{gridTemplateRows:`repeat(${x}, minmax(0, 1fr))`},children:[b.map((d,h)=>jsx("div",{className:a("flex h-full w-full items-center justify-center",ie[d.name].bgClassName),children:y(d,h)},`${d.name}-${h}`)),R&&jsx("div",{className:"bg-primary-300 flex h-full w-full items-center justify-center",children:jsxs(a$4,{open:u,onOpenChange:r,modal:false,positioning:{placement:"right-start"},children:[jsx(b$2,{asChild:true,children:jsx(c$1,{Icon:Plus,"aria-label":"More actions",variant:"ghost",size:"sm",iconClassName:"text-primary-700",className:_e,type:"button",onClick:d=>{d.stopPropagation();}})}),jsx(c$2,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:c.map((d,h)=>{let l=ie[d.name];return jsx(c$3,{variant:"ghost",size:"md",StartIcon:l.Icon,className:"!h-auto !min-h-0 w-full justify-start !gap-2 !px-3 !py-4 !text-neutral-900 hover:!text-neutral-900 disabled:!text-neutral-900",onClick:m=>{m.stopPropagation(),d.onClick(s),r(false);},type:"button",children:d.label},`${d.name}-${h}`)})})})]})})]})},ft=({rowActions:o})=>({id:N,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:i})=>o?jsx(gt,{row:i,rowActions:o}):null}),We=memo(({row:o,isSelected:i$1,resizable:u,type:r})=>jsx(e,{"data-state":i$1&&"selected",className:a(r&&r!=="default"&&ut[r]),style:r&&r!=="default"?{"--color-primary-200":`var(--color-${r}-100)`}:void 0,children:o.getVisibleCells().map(s=>jsx(i,{className:s.column.id===N?"p-0 align-middle":void 0,style:s.column.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:u?{width:`calc(var(--col-${s.column.id}-size) * 1px)`,minWidth:`calc(var(--col-${s.column.id}-size) * 1px)`,maxWidth:`calc(var(--col-${s.column.id}-size) * 1px)`}:void 0,children:flexRender(s.column.columnDef.cell,s.getContext())},s.id))}),(o,i)=>o.isSelected===i.isSelected&&o.row.original===i.row.original&&o.resizable===i.resizable&&o.type===i.type);We.displayName="DataTableRow";var $e="dt-col-ratios-",pt=o=>{try{let i=localStorage.getItem(`${$e}${o}`);return i?JSON.parse(i):{}}catch{return {}}},bt=(o,i)=>{try{localStorage.setItem(`${$e}${o}`,JSON.stringify(i));}catch{}},Oe=(o,i,u)=>{let r={},s=i,c=[];for(let l of o)l.canResize?c.push(l):(r[l.id]=l.defaultSize,s-=l.defaultSize);if(c.length===0||s<=0)return r;let R=new Set(c.map(l=>l.id)),b={};for(let[l,m]of Object.entries(u))R.has(l)&&(b[l]=m);let y=c.filter(l=>!(l.id in b)),x={};if(Object.keys(b).length===0){let l=c.reduce((m,P)=>m+P.defaultSize,0);for(let m of c)x[m.id]=m.defaultSize/l;}else if(y.length===0){let l=Object.values(b).reduce((m,P)=>m+P,0);for(let m of c)x[m.id]=b[m.id]/l;}else {let l=c.reduce((S,v)=>S+v.defaultSize,0),P=y.reduce((S,v)=>S+v.defaultSize,0)/l,k=Object.values(b).reduce((S,v)=>S+v,0),B=(1-P)/k;for(let S of c)S.id in b?x[S.id]=b[S.id]*B:x[S.id]=S.defaultSize/l;}for(let l of c)r[l.id]=Math.max(Math.round(x[l.id]*s),l.defaultSize);let h=c.reduce((l,m)=>l+r[m.id],0)-s;if(h!==0&&c.length>0){let l=c[c.length-1];r[l.id]=Math.max(r[l.id]-h,l.defaultSize);}return r},Ie=(o,i)=>{let u=0;for(let s of i)u+=o[s]??0;if(u===0)return {};let r={};for(let s of i)o[s]!=null&&(r[s]=o[s]/u);return r};function Vt({columns:o,data:i$1,rowsCount:u,pagination:r,onPaginationChange:s,noResults:c$1,onNextPageClick:R,onPreviousPageClick:b$1,disableNextPage:y,disablePreviousPage:x,className:d$1,onRowsPerPageChange:h$1,columnOrder:l,columnVisibility:m,rowsPerPageOptions:P,enableRowSelection:k=false,rowSelection:B,onRowSelectionChange:S,getRowId:v,rowSelectionTooltip:se,setDisabledRowState:re,tableId:w,isLoading:H,isInitialLoading:ce,skeletonRowCount:He,skeletonColumns:Le=6,getRowType:de,rowActions:O,...ue}){let I=typeof k=="function"||k===true,me=useMemo(()=>{if(!l)return;let t=[I?"__select__":null,O?N:null].filter(a=>a!=null),n=new Set(t);return [...t,...l.filter(a=>!n.has(a))]},[l,I,O]),Ee=useMemo(()=>{let t=I?[dt({rowSelectionTooltip:se,setDisabledRowState:re}),...o]:o;if(!O)return t;let n=ft({rowActions:O});return I?[t[0],n,...t.slice(1)]:[n,...t]},[I,o,se,re,O]),[j$1,Be]=useState(null),je=useCallback(t=>Be(t),[]),L=useRef({}),J=useRef(null),[V,X]=useState({}),Ve=t=>{X(n=>{let a=typeof t=="function"?t(n):t,p=J.current;if(!p)return a;let C=p.getState().columnSizingInfo.isResizingColumn;if(!C)return a;let z=p.getVisibleLeafColumns(),D=z.findIndex(A=>A.id===C);if(D===-1)return a;let _=null;for(let A=D+1;A<z.length;A++)if(z[A].getCanResize()){_=z[A];break}if(!_)return a;let F=z[D].columnDef,Ue=F.size??150,qe=F.minSize??80,Y=n[C]??Ue,Je=a[C]??Y,be=Math.max(Je,qe),Ce=be-Y;if(Ce===0)return {...a,[C]:be};let Te=_.id,Xe=_.columnDef.size??150,Ye=_.columnDef.minSize??80,he=n[Te]??Xe,Se=Math.max(he-Ce,Ye),Ge=he-Se,Qe=Y+Ge;return {...a,[C]:Qe,[Te]:Se}});},g$1=useReactTable({data:i$1,columns:Ee,rowCount:u,state:{pagination:r,...me!==void 0&&{columnOrder:me},columnVisibility:m,...B!==void 0&&{rowSelection:B},...w&&{columnSizing:V}},onPaginationChange:s,onRowSelectionChange:S,...w&&{columnResizeMode:"onChange",onColumnSizingChange:Ve,defaultColumn:{minSize:80}},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof k=="function"?t=>k(t.original):k,getRowId:v?t=>v(t):void 0});J.current=g$1;let Fe=g$1.getVisibleLeafColumns().map(t=>t.id).join(","),Ke=()=>g$1.getVisibleLeafColumns().map(t=>({id:t.id,defaultSize:t.columnDef.size??150,canResize:t.getCanResize()})),ge=()=>new Set(g$1.getVisibleLeafColumns().filter(t=>t.getCanResize()).map(t=>t.id));useEffect(()=>{if(!w||!j$1)return;(a=>{let p=Object.keys(L.current).length>0?L.current:pt(w),C=Ke(),z=Oe(C,a,p);L.current=Ie(z,ge()),X(z);})(j$1.clientWidth);let n=new ResizeObserver(([a])=>{if(!a)return;let p=J.current;if(!p||p.getState().columnSizingInfo.isResizingColumn)return;let C=p.getVisibleLeafColumns().map(D=>({id:D.id,defaultSize:D.columnDef.size??150,canResize:D.getCanResize()})),z=Oe(C,a.contentRect.width,L.current);X(z);});return n.observe(j$1),()=>n.disconnect()},[w,Fe,j$1]);let E=useMemo(()=>{if(!w||Object.keys(V).length===0)return;let t=g$1.getFlatHeaders(),n={};for(let a of t)n[`--header-${a.id}-size`]=a.getSize(),n[`--col-${a.column.id}-size`]=a.column.getSize();return n},[w,g$1.getState().columnSizingInfo,g$1.getState().columnSizing]),fe=g$1.getState().columnSizingInfo.isResizingColumn;useEffect(()=>{if(w&&!fe&&Object.keys(V).length>0){let t=ge(),n=Ie(V,t);L.current=n,bt(w,n);}},[w,fe]);let pe=He??r?.pageSize??10;return ce?jsx(Me,{columns:Le,rows:pe,hasSelection:I,hasRowActions:!!O,hasPagination:!!r,className:d$1,...ue}):!H&&!ce&&!g$1.getRowModel().rows?.length?jsx(f,{...c$1}):jsxs(a$1,{ref:je,className:d$1,...ue,children:[jsxs(b,{style:E?{...E,width:g$1.getTotalSize(),tableLayout:"fixed"}:{tableLayout:"fixed"},children:[!E&&jsx("colgroup",{children:(()=>{let t=g$1.getHeaderGroups()[0].headers,n=t.reduce((a,p)=>a+p.getSize(),0);return t.map(a=>jsx("col",{span:1,style:{width:`${a.column.getSize()/n*100}%`,minWidth:`${a.column.getSize()}px`}},a.id))})()}),jsx(c,{children:g$1.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(n=>{if(n.isPlaceholder)return jsx(h,{style:E?{width:`calc(var(--header-${n.id}-size) * 1px)`,minWidth:`calc(var(--header-${n.id}-size) * 1px)`,maxWidth:`calc(var(--header-${n.id}-size) * 1px)`}:void 0},n.id);let a$1=n.column.columnDef,p=flexRender(a$1.header,n.getContext()),C=n.column.id!=="__select__"&&a$1.headerTooltip!==false,z=a$1.headerTooltip&&typeof a$1.headerTooltip!="boolean"?a$1.headerTooltip:p,D=jsx("span",{className:"font-inter line-clamp-1 text-xs leading-[133%] text-neutral-900 uppercase",children:p});return jsxs(h,{className:n.column.id===N?"p-0 px-0":w?"group/resize relative overflow-clip":void 0,style:n.column.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:E?{width:`calc(var(--header-${n.id}-size) * 1px)`,minWidth:`calc(var(--header-${n.id}-size) * 1px)`,maxWidth:`calc(var(--header-${n.id}-size) * 1px)`}:void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:z,contentClassName:"font-normal normal-case",children:D}):D,a$1.headerInfoTooltip&&jsx(a$2,{content:a$1.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),w&&n.column.getCanResize()&&t.headers.some((_,F)=>F>t.headers.indexOf(n)&&_.column.getCanResize())&&jsx("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",n.column.getIsResizing()&&"bg-primary-600 opacity-100")})]},n.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--color-primary-200)]",children:H?Array.from({length:pe},(t,n)=>jsx(e,{children:g$1.getVisibleLeafColumns().map((a$1,p)=>{let C=a$1.columnDef;return jsx(i,{className:a$1.id==="__select__"?"align-middle":a$1.id===N?"!bg-primary-50 p-0 align-middle":void 0,style:a$1.id===N?{width:"30px",minWidth:"30px",maxWidth:"30px"}:void 0,children:a$1.id==="__select__"?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):a$1.id===N?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):C.skeleton!=null?C.skeleton:jsx(a$3,{className:a("h-4",q[(n+p)%q.length])})},a$1.id)})},n)):g$1.getRowModel().rows.map(t=>jsx(We,{row:t,isSelected:t.getIsSelected(),resizable:!!w,type:de?de(t.original):"default"},t.id))})]}),r&&s&&(i$1.length>0||H)&&jsx(j,{rowsPerPageOptions:P,rowsCount:u,pagination:r,onPageSizeChange:t=>{g$1.setPagination({pageIndex:0,pageSize:t}),h$1?.(t);},onPreviousPageClick:b$1,onNextPageClick:R,isDisableNextPageButton:H||y||!!u&&!g$1.getCanNextPage(),isDisablePreviousPageButton:H||x||!!u&&!g$1.getCanPreviousPage(),onPageChange:t=>{g$1.setPageIndex(t-1);}})]})}export{Vt as a};