sodtrack-web-ui 0.74.5 → 0.74.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CGNFGCW5.mjs → chunk-5ZRYC3YS.mjs} +1 -1
- package/dist/chunk-JEPSI76M.mjs +1 -0
- package/dist/components/autocomplete-new.d.mts +5 -3
- package/dist/components/autocomplete-new.d.ts +5 -3
- package/dist/components/autocomplete-new.js +2 -2
- package/dist/components/autocomplete-new.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox-left.d.mts +1 -1
- package/dist/components/list-item-checkbox-left.d.ts +1 -1
- package/dist/components/list-item-checkbox-left.js +1 -1
- package/dist/components/list-item-checkbox-left.mjs +1 -1
- package/dist/components/list-item-checkbox.mjs +1 -1
- package/dist/components/list-item.mjs +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-RE4QNXBE.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$3}from'./chunk-35JUETHD.mjs';import {d}from'./chunk-KTTNV2CJ.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-5JYXZUPM.mjs';import {c as c$2}from'./chunk-ASMH3P7K.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {a}from'./chunk-RE4QNXBE.mjs';import {a as a$3}from'./chunk-SXEHG5TZ.mjs';import {c}from'./chunk-KKWH3QUT.mjs';import {c as c$1,h}from'./chunk-4HYLZVI5.mjs';import {a as a$2}from'./chunk-BO6XI5BE.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:v,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(x=>{O.current.style.display="none",d.current.value=x.label,M(x),t?.(x);},[t]),w=useCallback(()=>{if(!d?.current)return;let x=d.current.getBoundingClientRect();ue(x);let k=U?U.height:q,I=window.innerHeight-x.bottom>k,te=x.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let x=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(x),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:x=>{x.target.value||(M(null),t?.(null)),s?.(x);},onClean:()=>{M(null),z(e),t?.(null);},onClick:x=>{O.current.style.display="flex",o?.(x);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:v,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,v]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:v,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),v=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var xt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=xt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:v,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:v}=D();return jsx(a$4,{ref:v,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:v,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),x=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",x),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",x),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,x,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:v,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipStatusExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
1
|
+
import {c as c$3}from'./chunk-35JUETHD.mjs';import {d}from'./chunk-KTTNV2CJ.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-5JYXZUPM.mjs';import {c as c$2}from'./chunk-ASMH3P7K.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-T2IU5QUU.mjs';import {a}from'./chunk-JEPSI76M.mjs';import {a as a$3}from'./chunk-SXEHG5TZ.mjs';import {c}from'./chunk-KKWH3QUT.mjs';import {c as c$1,h}from'./chunk-4HYLZVI5.mjs';import {a as a$2}from'./chunk-BO6XI5BE.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:v,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(x=>{O.current.style.display="none",d.current.value=x.label,M(x),t?.(x);},[t]),w=useCallback(()=>{if(!d?.current)return;let x=d.current.getBoundingClientRect();ue(x);let k=U?U.height:q,I=window.innerHeight-x.bottom>k,te=x.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let x=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(x),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:x=>{x.target.value||(M(null),t?.(null)),s?.(x);},onClean:()=>{M(null),z(e),t?.(null);},onClick:x=>{O.current.style.display="flex",o?.(x);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:v,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,v]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:v,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),v=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var xt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=xt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:v,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:v}=D();return jsx(a$4,{ref:v,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:v,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),x=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",x),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",x),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,x,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:v,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-PF2FHSIC.mjs';import {q,d,g}from'./chunk-4HYLZVI5.mjs';import {a}from'./chunk-BO6XI5BE.mjs';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';var K=({title:n,titleLines:l=2,description:a$1,descriptionLines:p=1,Icon:u,iconAsColumn:s=true,className:c,...m})=>jsxs("div",{className:a("flex gap-2 py-4 pl-4 pr-6",s&&"flex-col items-center gap-1",!s&&!a$1&&"items-center"),...m,children:[u&&jsx(u,{className:a("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a("flex flex-col gap-1",s&&"text-center"),children:[jsx("p",{className:a("leading-[130%] text-neutral-500",!!a$1&&"font-medium"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:n}),a$1&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:p?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:p}:void 0,children:a$1})]})]}),V=K;function _(){let n=useComboboxContext(),l=useRef(false);return n.value.length&&n.collection.size&&!l.current&&(n.syncSelectedItems(),l.current=true),null}var de=n=>{let{label:l,error:a$1,required:p,tooltip:u,readOnly:s,options:c,onInputValueChange:m,onSelect:d$1,defaultValue:v,helperText:O,noResultsTitle:k,noResultsDescription:A,noResultsIcon:D,noResultsTitleLines:M,noResultsDescriptionLines:z,value:h,className:E,...H}=n,F=Object.getOwnPropertyNames(n),b$1=useRef(null),{contains:G}=useFilter({sensitivity:"base"}),{collection:g$1,filter:x,set:W}=useListCollection({initialItems:[],itemToString:t=>t.label,itemToValue:t=>String(t.value),filter:G}),B=useCallback(t=>{let w=c.find(j=>String(j.value)===t.itemValue);w&&d$1?.(w);},[d$1,c]),T=useCallback(t=>{x(t.inputValue),t.reason!==void 0&&m?.(t.inputValue??"");},[x,m]),q$1=useCombobox({collection:g$1,defaultValue:v?[String(v)]:void 0,placeholder:n.placeholder,inputValue:n.inputValue,onInputValueChange:T,value:F.includes("value")?h?[String(h)]:[]:void 0,onSelect:B,inputBehavior:"autocomplete",openOnClick:true,...H}),U=useCallback(()=>{d$1?.(null),T?.({inputValue:"",reason:"clear-trigger"});},[d$1,m]);return useEffect(()=>{W(c);},[c]),useEffect(()=>{b$1.current&&b$1.current.value===""&&x("");},[x,b$1.current?.value]),jsxs(Combobox.RootProvider,{value:q$1,"data-error":a$1,className:a("group flex flex-col gap-2",E),children:[jsxs(Combobox.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[p?jsxs("span",{className:"flex items-center gap-1",children:[jsx("span",{className:"text-red-500",children:"*"}),l]}):l,u&&jsx(b,{content:u,size:"sm",className:"ml-2",children:jsx(q,{className:"size-3.5"})})]}),jsx(_,{}),jsxs(Combobox.Control,{className:a("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 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",s&&"pointer-events-none"),children:[jsx(Combobox.Input,{className:a("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",s&&"pointer-events-none",a$1&&"pr-16"),ref:b$1}),a$1&&jsx(q,{className:"text-error-500 size-4.5 shrink-0"}),!s&&jsx(Combobox.ClearTrigger,{className:"cursor-pointer",onClick:U,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:O}),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:[g$1.items.length>0&&g$1.items.map(t=>jsx(Combobox.Item,{item:t,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer p-3 data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex flex-col gap-1",asChild:true,children:jsxs("div",{children:[jsx("p",{className:"text-sm leading-[130%] font-medium",children:t.label}),t.description&&jsx("p",{className:"text-xs leading-[130%]",children:t.description})]})})},t.value)),g$1.items.length===0&&jsx(V,{title:k,description:A,Icon:D,descriptionLines:z,titleLines:M})]})})})})]})};export{V as a,de as b};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { UseComboboxProps } from '@ark-ui/react/combobox';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
3
4
|
import { LucideIcon } from 'lucide-react';
|
|
4
5
|
|
|
5
6
|
type AutocompleteNewOption<T extends string | number = string> = {
|
|
@@ -7,7 +8,7 @@ type AutocompleteNewOption<T extends string | number = string> = {
|
|
|
7
8
|
description?: string;
|
|
8
9
|
value: T;
|
|
9
10
|
};
|
|
10
|
-
type AutocompleteNewProps<T extends string | number = string> = Omit<
|
|
11
|
+
type AutocompleteNewProps<T extends string | number = string> = Omit<UseComboboxProps<AutocompleteNewOption<T>>, "collection" | "onInputValueChange" | "defaultValue" | "onSelect" | "multiple" | "value"> & {
|
|
11
12
|
label: string;
|
|
12
13
|
required?: boolean;
|
|
13
14
|
tooltip?: string;
|
|
@@ -23,7 +24,8 @@ type AutocompleteNewProps<T extends string | number = string> = Omit<ComboboxRoo
|
|
|
23
24
|
noResultsTitleLines?: number;
|
|
24
25
|
noResultsDescriptionLines?: number;
|
|
25
26
|
value?: T;
|
|
27
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
26
28
|
};
|
|
27
|
-
declare const AutocompleteNew: <T extends string | number = string>(
|
|
29
|
+
declare const AutocompleteNew: <T extends string | number = string>(props: AutocompleteNewProps<T>) => react_jsx_runtime.JSX.Element;
|
|
28
30
|
|
|
29
31
|
export { AutocompleteNew, type AutocompleteNewOption };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { UseComboboxProps } from '@ark-ui/react/combobox';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
3
4
|
import { LucideIcon } from 'lucide-react';
|
|
4
5
|
|
|
5
6
|
type AutocompleteNewOption<T extends string | number = string> = {
|
|
@@ -7,7 +8,7 @@ type AutocompleteNewOption<T extends string | number = string> = {
|
|
|
7
8
|
description?: string;
|
|
8
9
|
value: T;
|
|
9
10
|
};
|
|
10
|
-
type AutocompleteNewProps<T extends string | number = string> = Omit<
|
|
11
|
+
type AutocompleteNewProps<T extends string | number = string> = Omit<UseComboboxProps<AutocompleteNewOption<T>>, "collection" | "onInputValueChange" | "defaultValue" | "onSelect" | "multiple" | "value"> & {
|
|
11
12
|
label: string;
|
|
12
13
|
required?: boolean;
|
|
13
14
|
tooltip?: string;
|
|
@@ -23,7 +24,8 @@ type AutocompleteNewProps<T extends string | number = string> = Omit<ComboboxRoo
|
|
|
23
24
|
noResultsTitleLines?: number;
|
|
24
25
|
noResultsDescriptionLines?: number;
|
|
25
26
|
value?: T;
|
|
27
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
26
28
|
};
|
|
27
|
-
declare const AutocompleteNew: <T extends string | number = string>(
|
|
29
|
+
declare const AutocompleteNew: <T extends string | number = string>(props: AutocompleteNewProps<T>) => react_jsx_runtime.JSX.Element;
|
|
28
30
|
|
|
29
31
|
export { AutocompleteNew, type AutocompleteNewOption };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var combobox=require('@ark-ui/react/combobox'),locale=require('@ark-ui/react/locale'),portal=require('@ark-ui/react/portal'),react=require('react'),tooltip=require('@ark-ui/react/tooltip'),jsxRuntime=require('react/jsx-runtime');var Me=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ta=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase()),ce=e=>{let t=ta(e);return t.charAt(0).toUpperCase()+t.slice(1)},de=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim(),ye=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return true};var Fe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Re=react.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:d="",children:r,iconNode:s,...p},n)=>react.createElement("svg",{ref:n,...Fe,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:de("lucide",d),...!r&&!ye(p)&&{"aria-hidden":"true"},...p},[...s.map(([L,x])=>react.createElement(L,x)),...Array.isArray(r)?r:[r]]));var N=(e,t)=>{let o=react.forwardRef(({className:a,...d},r)=>react.createElement(Re,{ref:r,iconNode:t,className:de(`lucide-${Me(ce(e))}`,`lucide-${e}`,a),...d}));return o.displayName=ce(e),o};var da=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_=N("chevron-down",da);var ra=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],O=N("circle-alert",ra);var sa=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],j=N("x",sa);var Te=j;var ve=_;var pe=O;function qe(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(t=0;t<d;t++)e[t]&&(o=qe(e[t]))&&(a&&(a+=" "),a+=o);}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Ue(){for(var e,t,o=0,a="",d=arguments.length;o<d;o++)(e=arguments[o])&&(t=qe(e))&&(a&&(a+=" "),a+=t);return a}var ge="-",fa=e=>{let t=na(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return {getClassGroupId:s=>{let p=s.split(ge);return p[0]===""&&p.length!==1&&p.shift(),Ve(p,t)||ia(s)},getConflictingClassGroupIds:(s,p)=>{let n=o[s]||[];return p&&a[s]?[...n,...a[s]]:n}}},Ve=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),d=a?Ve(e.slice(1),a):void 0;if(d)return d;if(t.validators.length===0)return;let r=e.join(ge);return t.validators.find(({validator:s})=>s(r))?.classGroupId},Oe=/^\[(.+)\]$/,ia=e=>{if(Oe.test(e)){let t=Oe.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return "arbitrary.."+o}},na=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let d in o)xe(o[d],a,d,t);return a},xe=(e,t,o,a)=>{e.forEach(d=>{if(typeof d=="string"){let r=d===""?t:He(t,d);r.classGroupId=o;return}if(typeof d=="function"){if(ca(d)){xe(d(a),t,o,a);return}t.validators.push({validator:d,classGroupId:o});return}Object.entries(d).forEach(([r,s])=>{xe(s,He(t,r),o,a);});});},He=(e,t)=>{let o=e;return t.split(ge).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a);}),o},ca=e=>e.isThemeGetter,pa=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,d=(r,s)=>{o.set(r,s),t++,t>e&&(t=0,a=o,o=new Map);};return {get(r){let s=o.get(r);if(s!==void 0)return s;if((s=a.get(r))!==void 0)return d(r,s),s},set(r,s){o.has(r)?o.set(r,s):d(r,s);}}},Ie="!",Ce=":",ma=Ce.length,La=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=d=>{let r=[],s=0,p=0,n=0,L;for(let h=0;h<d.length;h++){let S=d[h];if(s===0&&p===0){if(S===Ce){r.push(d.slice(n,h)),n=h+ma;continue}if(S==="/"){L=h;continue}}S==="["?s++:S==="]"?s--:S==="("?p++:S===")"&&p--;}let x=r.length===0?d:d.substring(n),k=xa(x),B=k!==x,y=L&&L>n?L-n:void 0;return {modifiers:r,hasImportantModifier:B,baseClassName:k,maybePostfixModifierPosition:y}};if(t){let d=t+Ce,r=a;a=s=>s.startsWith(d)?r(s.substring(d.length)):{isExternal:true,modifiers:[],hasImportantModifier:false,baseClassName:s,maybePostfixModifierPosition:void 0};}if(o){let d=a;a=r=>o({className:r,parseClassName:d});}return a},xa=e=>e.endsWith(Ie)?e.substring(0,e.length-1):e.startsWith(Ie)?e.substring(1):e,Ia=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,true]));return a=>{if(a.length<=1)return a;let d=[],r=[];return a.forEach(s=>{s[0]==="["||t[s]?(d.push(...r.sort(),s),r=[]):r.push(s);}),d.push(...r.sort()),d}},Ca=e=>({cache:pa(e.cacheSize),parseClassName:La(e),sortModifiers:Ia(e),...fa(e)}),ga=/\s+/,ha=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:d,sortModifiers:r}=t,s=[],p=e.trim().split(ga),n="";for(let L=p.length-1;L>=0;L-=1){let x=p[L],{isExternal:k,modifiers:B,hasImportantModifier:y,baseClassName:h,maybePostfixModifierPosition:S}=o(x);if(k){n=x+(n.length>0?" "+n:n);continue}let F=!!S,D=a(F?h.substring(0,S):h);if(!D){if(!F){n=x+(n.length>0?" "+n:n);continue}if(D=a(h),!D){n=x+(n.length>0?" "+n:n);continue}F=false;}let E=r(B).join(":"),M=y?E+Ie:E,R=M+D;if(s.includes(R))continue;s.push(R);let U=d(D,F);for(let T=0;T<U.length;++T){let G=U[T];s.push(M+G);}n=x+(n.length>0?" "+n:n);}return n};function Sa(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ee(t))&&(a&&(a+=" "),a+=o);return a}var Ee=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Ee(e[a]))&&(o&&(o+=" "),o+=t);return o};function wa(e,...t){let o,a,d,r=s;function s(n){let L=t.reduce((x,k)=>k(x),e());return o=Ca(L),a=o.cache.get,d=o.cache.set,r=p,p(n)}function p(n){let L=a(n);if(L)return L;let x=ha(n,o);return d(n,x),x}return function(){return r(Sa.apply(null,arguments))}}var I=e=>{let t=o=>o[e]||[];return t.isThemeGetter=true,t},We=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ka=/^\d+\/\d+$/,Pa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ba=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Aa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ma=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>ka.test(e),c=e=>!!e&&!Number.isNaN(Number(e)),H=e=>!!e&&Number.isInteger(Number(e)),me=e=>e.endsWith("%")&&c(e.slice(0,-1)),q=e=>Pa.test(e),ya=()=>true,Fa=e=>ba.test(e)&&!Aa.test(e),Xe=()=>false,Da=e=>Ba.test(e),Ra=e=>Ma.test(e),Ta=e=>!l(e)&&!u(e),va=e=>K(e,Je,Xe),l=e=>We.test(e),V=e=>K(e,Qe,Fa),Le=e=>K(e,Ga,c),Ge=e=>K(e,Ke,Xe),qa=e=>K(e,Ze,Ra),re=e=>K(e,_e,Da),u=e=>Ne.test(e),Y=e=>Z(e,Qe),Ua=e=>Z(e,za),ze=e=>Z(e,Ke),Oa=e=>Z(e,Je),Ha=e=>Z(e,Ze),se=e=>Z(e,_e,true),K=(e,t,o)=>{let a=We.exec(e);return a?a[1]?t(a[1]):o(a[2]):false},Z=(e,t,o=false)=>{let a=Ne.exec(e);return a?a[1]?t(a[1]):o:false},Ke=e=>e==="position"||e==="percentage",Ze=e=>e==="image"||e==="url",Je=e=>e==="length"||e==="size"||e==="bg-size",Qe=e=>e==="length",Ga=e=>e==="number",za=e=>e==="family-name",_e=e=>e==="shadow";var Va=()=>{let e=I("color"),t=I("font"),o=I("text"),a=I("font-weight"),d=I("tracking"),r=I("leading"),s=I("breakpoint"),p=I("container"),n=I("spacing"),L=I("radius"),x=I("shadow"),k=I("inset-shadow"),B=I("text-shadow"),y=I("drop-shadow"),h=I("blur"),S=I("perspective"),F=I("aspect"),D=I("ease"),E=I("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...R(),u,l],T=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],i=()=>[u,l,n],m=()=>[X,"full","auto",...i()],Q=()=>[H,"none","subgrid",u,l],ee=()=>["auto",{span:["full",H,u,l]},H,u,l],ae=()=>[H,"auto",u,l],we=()=>["auto","min","max","fr",u,l],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],v=()=>["auto",...i()],z=()=>[X,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...i()],f=()=>[e,u,l],ke=()=>[...R(),ze,Ge,{position:[u,l]}],Pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],be=()=>["auto","cover","contain",Oa,va,{size:[u,l]}],ie=()=>[me,Y,V],w=()=>["","none","full",L,u,l],P=()=>["",c,Y,V],te=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>[c,me,ze,Ge],Be=()=>["","none",h,u,l],oe=()=>["none",c,u,l],le=()=>["none",c,u,l],ne=()=>[c,u,l],ue=()=>[X,"full",...i()];return {cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[q],breakpoint:[q],color:[ya],container:[q],"drop-shadow":[q],ease:["in","out","in-out"],font:[Ta],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[q],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[q],shadow:[q],spacing:["px",c],text:[q],"text-shadow":[q],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",X,l,u,F]}],container:["container"],columns:[{columns:[c,l,u,p]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:m()}],"inset-x":[{"inset-x":m()}],"inset-y":[{"inset-y":m()}],start:[{start:m()}],end:[{end:m()}],top:[{top:m()}],right:[{right:m()}],bottom:[{bottom:m()}],left:[{left:m()}],visibility:["visible","invisible","collapse"],z:[{z:[H,"auto",u,l]}],basis:[{basis:[X,"full","auto",p,...i()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[c,X,"auto","initial","none",l]}],grow:[{grow:["",c,u,l]}],shrink:[{shrink:["",c,u,l]}],order:[{order:[H,"first","last","none",u,l]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:i()}],"gap-x":[{"gap-x":i()}],"gap-y":[{"gap-y":i()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:i()}],px:[{px:i()}],py:[{py:i()}],ps:[{ps:i()}],pe:[{pe:i()}],pt:[{pt:i()}],pr:[{pr:i()}],pb:[{pb:i()}],pl:[{pl:i()}],m:[{m:v()}],mx:[{mx:v()}],my:[{my:v()}],ms:[{ms:v()}],me:[{me:v()}],mt:[{mt:v()}],mr:[{mr:v()}],mb:[{mb:v()}],ml:[{ml:v()}],"space-x":[{"space-x":i()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":i()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[p,"screen",...z()]}],"min-w":[{"min-w":[p,"screen","none",...z()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",o,Y,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,u,Le]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",me,l]}],"font-family":[{font:[Ua,l,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,u,l]}],"line-clamp":[{"line-clamp":[c,"none",u,Le]}],leading:[{leading:[r,...i()]}],"list-image":[{"list-image":["none",u,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",u,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:f()}],"text-color":[{text:f()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[c,"from-font","auto",u,V]}],"text-decoration-color":[{decoration:f()}],"underline-offset":[{"underline-offset":[c,"auto",u,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:i()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u,l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ke()}],"bg-repeat":[{bg:Pe()}],"bg-size":[{bg:be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},H,u,l],radial:["",u,l],conic:[H,u,l]},Ha,qa]}],"bg-color":[{bg:f()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:f()}],"gradient-via":[{via:f()}],"gradient-to":[{to:f()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:f()}],"border-color-x":[{"border-x":f()}],"border-color-y":[{"border-y":f()}],"border-color-s":[{"border-s":f()}],"border-color-e":[{"border-e":f()}],"border-color-t":[{"border-t":f()}],"border-color-r":[{"border-r":f()}],"border-color-b":[{"border-b":f()}],"border-color-l":[{"border-l":f()}],"divide-color":[{divide:f()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[c,u,l]}],"outline-w":[{outline:["",c,Y,V]}],"outline-color":[{outline:f()}],shadow:[{shadow:["","none",x,se,re]}],"shadow-color":[{shadow:f()}],"inset-shadow":[{"inset-shadow":["none",k,se,re]}],"inset-shadow-color":[{"inset-shadow":f()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:f()}],"ring-offset-w":[{"ring-offset":[c,V]}],"ring-offset-color":[{"ring-offset":f()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":f()}],"text-shadow":[{"text-shadow":["none",B,se,re]}],"text-shadow-color":[{"text-shadow":f()}],opacity:[{opacity:[c,u,l]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[c]}],"mask-image-linear-from-pos":[{"mask-linear-from":C()}],"mask-image-linear-to-pos":[{"mask-linear-to":C()}],"mask-image-linear-from-color":[{"mask-linear-from":f()}],"mask-image-linear-to-color":[{"mask-linear-to":f()}],"mask-image-t-from-pos":[{"mask-t-from":C()}],"mask-image-t-to-pos":[{"mask-t-to":C()}],"mask-image-t-from-color":[{"mask-t-from":f()}],"mask-image-t-to-color":[{"mask-t-to":f()}],"mask-image-r-from-pos":[{"mask-r-from":C()}],"mask-image-r-to-pos":[{"mask-r-to":C()}],"mask-image-r-from-color":[{"mask-r-from":f()}],"mask-image-r-to-color":[{"mask-r-to":f()}],"mask-image-b-from-pos":[{"mask-b-from":C()}],"mask-image-b-to-pos":[{"mask-b-to":C()}],"mask-image-b-from-color":[{"mask-b-from":f()}],"mask-image-b-to-color":[{"mask-b-to":f()}],"mask-image-l-from-pos":[{"mask-l-from":C()}],"mask-image-l-to-pos":[{"mask-l-to":C()}],"mask-image-l-from-color":[{"mask-l-from":f()}],"mask-image-l-to-color":[{"mask-l-to":f()}],"mask-image-x-from-pos":[{"mask-x-from":C()}],"mask-image-x-to-pos":[{"mask-x-to":C()}],"mask-image-x-from-color":[{"mask-x-from":f()}],"mask-image-x-to-color":[{"mask-x-to":f()}],"mask-image-y-from-pos":[{"mask-y-from":C()}],"mask-image-y-to-pos":[{"mask-y-to":C()}],"mask-image-y-from-color":[{"mask-y-from":f()}],"mask-image-y-to-color":[{"mask-y-to":f()}],"mask-image-radial":[{"mask-radial":[u,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":C()}],"mask-image-radial-to-pos":[{"mask-radial-to":C()}],"mask-image-radial-from-color":[{"mask-radial-from":f()}],"mask-image-radial-to-color":[{"mask-radial-to":f()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[c]}],"mask-image-conic-from-pos":[{"mask-conic-from":C()}],"mask-image-conic-to-pos":[{"mask-conic-to":C()}],"mask-image-conic-from-color":[{"mask-conic-from":f()}],"mask-image-conic-to-color":[{"mask-conic-to":f()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ke()}],"mask-repeat":[{mask:Pe()}],"mask-size":[{mask:be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",u,l]}],filter:[{filter:["","none",u,l]}],blur:[{blur:Be()}],brightness:[{brightness:[c,u,l]}],contrast:[{contrast:[c,u,l]}],"drop-shadow":[{"drop-shadow":["","none",y,se,re]}],"drop-shadow-color":[{"drop-shadow":f()}],grayscale:[{grayscale:["",c,u,l]}],"hue-rotate":[{"hue-rotate":[c,u,l]}],invert:[{invert:["",c,u,l]}],saturate:[{saturate:[c,u,l]}],sepia:[{sepia:["",c,u,l]}],"backdrop-filter":[{"backdrop-filter":["","none",u,l]}],"backdrop-blur":[{"backdrop-blur":Be()}],"backdrop-brightness":[{"backdrop-brightness":[c,u,l]}],"backdrop-contrast":[{"backdrop-contrast":[c,u,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",c,u,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c,u,l]}],"backdrop-invert":[{"backdrop-invert":["",c,u,l]}],"backdrop-opacity":[{"backdrop-opacity":[c,u,l]}],"backdrop-saturate":[{"backdrop-saturate":[c,u,l]}],"backdrop-sepia":[{"backdrop-sepia":["",c,u,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":i()}],"border-spacing-x":[{"border-spacing-x":i()}],"border-spacing-y":[{"border-spacing-y":i()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",u,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[c,"initial",u,l]}],ease:[{ease:["linear","initial",D,u,l]}],delay:[{delay:[c,u,l]}],animate:[{animate:["none",E,u,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,u,l]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[u,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:f()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:f()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u,l]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":i()}],"scroll-mx":[{"scroll-mx":i()}],"scroll-my":[{"scroll-my":i()}],"scroll-ms":[{"scroll-ms":i()}],"scroll-me":[{"scroll-me":i()}],"scroll-mt":[{"scroll-mt":i()}],"scroll-mr":[{"scroll-mr":i()}],"scroll-mb":[{"scroll-mb":i()}],"scroll-ml":[{"scroll-ml":i()}],"scroll-p":[{"scroll-p":i()}],"scroll-px":[{"scroll-px":i()}],"scroll-py":[{"scroll-py":i()}],"scroll-ps":[{"scroll-ps":i()}],"scroll-pe":[{"scroll-pe":i()}],"scroll-pt":[{"scroll-pt":i()}],"scroll-pr":[{"scroll-pr":i()}],"scroll-pb":[{"scroll-pb":i()}],"scroll-pl":[{"scroll-pl":i()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",u,l]}],fill:[{fill:["none",...f()]}],"stroke-w":[{stroke:[c,Y,V,Le]}],stroke:[{stroke:["none",...f()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var je=wa(Va);function b(...e){return je(Ue(e))}var $e=({size:e="md",closeDelay:t=500,closeOnClick:o=true,closeOnEscape:a=true,closeOnPointerDown:d=true,closeOnScroll:r=true,interactive:s=true,lazyMount:p=false,openDelay:n=700,unmountOnExit:L=false,content:x,children:k,asChild:B=true,contentClassName:y,className:h,...S})=>jsxRuntime.jsxs(tooltip.TooltipRoot,{closeDelay:t,closeOnClick:o,closeOnEscape:a,closeOnPointerDown:d,closeOnScroll:r,interactive:s,lazyMount:p,openDelay:n,unmountOnExit:L,...S,children:[jsxRuntime.jsx(tooltip.TooltipTrigger,{asChild:B,className:b("cursor-inherit text-left",h),children:B?jsxRuntime.jsx("div",{children:k}):k}),jsxRuntime.jsx(tooltip.TooltipPositioner,{children:jsxRuntime.jsxs(tooltip.TooltipContent,{"data-size":e,className:b("font-inter z-30 rounded-lg bg-neutral-900 text-center text-sm leading-[130%] whitespace-break-spaces text-neutral-50","data-[size=md]:p-4 data-[size=sm]:p-2","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right","data-[placement=right-end]:right-right data-[placement=right]:text-right data-[placement=right-start]:text-right","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-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=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=right]:text-left data-[placement=right-end]:text-left data-[placement=right-start]:text-left",y),children:[jsxRuntime.jsx(tooltip.TooltipArrow,{children:jsxRuntime.jsx(tooltip.TooltipArrowTip,{})}),x]})})]});var Ja=({title:e,titleLines:t=2,description:o,descriptionLines:a=1,Icon:d,iconAsColumn:r=true,className:s,...p})=>jsxRuntime.jsxs("div",{className:b("flex gap-2 py-4 pl-4 pr-6",r&&"flex-col items-center gap-1",!r&&!o&&"items-center"),...p,children:[d&&jsxRuntime.jsx(d,{className:b("shrink-0 text-neutral-300"),size:24}),jsxRuntime.jsxs("div",{className:b("flex flex-col gap-1",r&&"text-center"),children:[jsxRuntime.jsx("p",{className:b("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsxRuntime.jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:a?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a}:void 0,children:o})]})]}),aa=Ja;var co=({label:e,error:t,required:o,tooltip:a,readOnly:d,options:r,onInputValueChange:s,onSelect:p,defaultValue:n,className:L,helperText:x,noResultsTitle:k,noResultsDescription:B,noResultsIcon:y,noResultsTitleLines:h,noResultsDescriptionLines:S,value:F,...D})=>{let{contains:E}=locale.useFilter({sensitivity:"base"}),{collection:M,filter:R,set:U}=combobox.useListCollection({initialItems:r,filter:E,itemToString:m=>m.label,itemToValue:m=>String(m.value)}),T=react.useCallback(m=>{R(m.inputValue),s?.(m.inputValue);},[R,s]),G=react.useCallback(m=>{let Q=r.find(ee=>String(ee.value)===m.itemValue);Q&&p?.(Q);},[p,r]),i=react.useCallback(()=>{p?.(null);},[p]);return react.useEffect(()=>{U(r);},[r]),jsxRuntime.jsxs(combobox.Combobox.Root,{"data-error":t,collection:M,onInputValueChange:T,onSelect:G,className:b("group flex flex-col gap-2",L),defaultValue:n?[String(n)]:void 0,value:F?[String(F)]:void 0,...D,children:[jsxRuntime.jsxs(combobox.Combobox.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[o?jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("span",{className:"text-red-500",children:"*"}),e]}):e,a&&jsxRuntime.jsx($e,{content:a,size:"sm",className:"ml-2",children:jsxRuntime.jsx(pe,{className:"size-3.5"})})]}),jsxRuntime.jsxs(combobox.Combobox.Control,{className:b("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 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",d&&"pointer-events-none"),children:[jsxRuntime.jsx(combobox.Combobox.Input,{className:b("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",d&&"pointer-events-none",t&&"pr-16")}),t&&jsxRuntime.jsx(pe,{className:"text-error-500 size-4.5 shrink-0"}),!d&&jsxRuntime.jsx(combobox.Combobox.ClearTrigger,{className:"cursor-pointer",onClick:i,children:jsxRuntime.jsx(Te,{className:"size-4.5"})}),jsxRuntime.jsx(combobox.Combobox.Trigger,{className:"cursor-pointer group-data-[disabled]/control:cursor-not-allowed group-data-[disabled]/control:text-neutral-400",children:jsxRuntime.jsx(ve,{className:"size-4.5 transition-transform will-change-transform group-data-[state=open]/control:rotate-180"})})]}),jsxRuntime.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:x}),jsxRuntime.jsx(portal.Portal,{children:jsxRuntime.jsx(combobox.Combobox.Positioner,{className:"!z-10000",children:jsxRuntime.jsx(combobox.Combobox.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:jsxRuntime.jsxs(combobox.Combobox.ItemGroup,{children:[M.items.length>0&&M.items.map(m=>jsxRuntime.jsx(combobox.Combobox.Item,{item:m,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer p-3 data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsxRuntime.jsx(combobox.Combobox.ItemText,{className:"flex flex-col gap-1",asChild:true,children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm leading-[130%] font-medium",children:m.label}),m.description&&jsxRuntime.jsx("p",{className:"text-xs leading-[130%]",children:m.description})]})})},m.value)),M.items.length===0&&jsxRuntime.jsx(aa,{title:k,description:B,Icon:y,descriptionLines:S,titleLines:h})]})})})})]})};/*! Bundled license information:
|
|
1
|
+
'use strict';var combobox=require('@ark-ui/react/combobox'),locale=require('@ark-ui/react/locale'),portal=require('@ark-ui/react/portal'),react=require('react'),tooltip=require('@ark-ui/react/tooltip'),jsxRuntime=require('react/jsx-runtime');var Me=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),la=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase()),pe=e=>{let t=la(e);return t.charAt(0).toUpperCase()+t.slice(1)},se=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim(),ye=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return true};var De={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Re=react.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:d,iconNode:s,...p},i)=>react.createElement("svg",{ref:i,...De,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:se("lucide",r),...!d&&!ye(p)&&{"aria-hidden":"true"},...p},[...s.map(([m,L])=>react.createElement(m,L)),...Array.isArray(d)?d:[d]]));var Z=(e,t)=>{let o=react.forwardRef(({className:a,...r},d)=>react.createElement(Re,{ref:d,iconNode:t,className:se(`lucide-${Me(pe(e))}`,`lucide-${e}`,a),...r}));return o.displayName=pe(e),o};var sa=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$=Z("chevron-down",sa);var fa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],G=Z("circle-alert",fa);var ia=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ee=Z("x",ia);var Te=ee;var ve=$;var me=G;function qe(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=qe(e[t]))&&(a&&(a+=" "),a+=o);}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Ue(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=qe(e))&&(a&&(a+=" "),a+=t);return a}var he="-",na=e=>{let t=pa(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return {getClassGroupId:s=>{let p=s.split(he);return p[0]===""&&p.length!==1&&p.shift(),Ve(p,t)||ca(s)},getConflictingClassGroupIds:(s,p)=>{let i=o[s]||[];return p&&a[s]?[...i,...a[s]]:i}}},Ve=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?Ve(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let d=e.join(he);return t.validators.find(({validator:s})=>s(d))?.classGroupId},Oe=/^\[(.+)\]$/,ca=e=>{if(Oe.test(e)){let t=Oe.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return "arbitrary.."+o}},pa=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)Ie(o[r],a,r,t);return a},Ie=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let d=r===""?t:He(t,r);d.classGroupId=o;return}if(typeof r=="function"){if(ma(r)){Ie(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([d,s])=>{Ie(s,He(t,d),o,a);});});},He=(e,t)=>{let o=e;return t.split(he).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a);}),o},ma=e=>e.isThemeGetter,La=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(d,s)=>{o.set(d,s),t++,t>e&&(t=0,a=o,o=new Map);};return {get(d){let s=o.get(d);if(s!==void 0)return s;if((s=a.get(d))!==void 0)return r(d,s),s},set(d,s){o.has(d)?o.set(d,s):r(d,s);}}},Ce="!",ge=":",xa=ge.length,Ia=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let d=[],s=0,p=0,i=0,m;for(let h=0;h<r.length;h++){let S=r[h];if(s===0&&p===0){if(S===ge){d.push(r.slice(i,h)),i=h+xa;continue}if(S==="/"){m=h;continue}}S==="["?s++:S==="]"?s--:S==="("?p++:S===")"&&p--;}let L=d.length===0?r:r.substring(i),k=Ca(L),D=k!==L,R=m&&m>i?m-i:void 0;return {modifiers:d,hasImportantModifier:D,baseClassName:k,maybePostfixModifierPosition:R}};if(t){let r=t+ge,d=a;a=s=>s.startsWith(r)?d(s.substring(r.length)):{isExternal:true,modifiers:[],hasImportantModifier:false,baseClassName:s,maybePostfixModifierPosition:void 0};}if(o){let r=a;a=d=>o({className:d,parseClassName:r});}return a},Ca=e=>e.endsWith(Ce)?e.substring(0,e.length-1):e.startsWith(Ce)?e.substring(1):e,ga=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,true]));return a=>{if(a.length<=1)return a;let r=[],d=[];return a.forEach(s=>{s[0]==="["||t[s]?(r.push(...d.sort(),s),d=[]):d.push(s);}),r.push(...d.sort()),r}},ha=e=>({cache:La(e.cacheSize),parseClassName:Ia(e),sortModifiers:ga(e),...na(e)}),Sa=/\s+/,wa=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:d}=t,s=[],p=e.trim().split(Sa),i="";for(let m=p.length-1;m>=0;m-=1){let L=p[m],{isExternal:k,modifiers:D,hasImportantModifier:R,baseClassName:h,maybePostfixModifierPosition:S}=o(L);if(k){i=L+(i.length>0?" "+i:i);continue}let T=!!S,v=a(T?h.substring(0,S):h);if(!v){if(!T){i=L+(i.length>0?" "+i:i);continue}if(v=a(h),!v){i=L+(i.length>0?" "+i:i);continue}T=false;}let N=d(D).join(":"),V=R?N+Ce:N,B=V+v;if(s.includes(B))continue;s.push(B);let O=r(v,T);for(let b=0;b<O.length;++b){let F=O[b];s.push(V+F);}i=L+(i.length>0?" "+i:i);}return i};function ka(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ee(t))&&(a&&(a+=" "),a+=o);return a}var Ee=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Ee(e[a]))&&(o&&(o+=" "),o+=t);return o};function Pa(e,...t){let o,a,r,d=s;function s(i){let m=t.reduce((L,k)=>k(L),e());return o=ha(m),a=o.cache.get,r=o.cache.set,d=p,p(i)}function p(i){let m=a(i);if(m)return m;let L=wa(i,o);return r(i,L),L}return function(){return d(ka.apply(null,arguments))}}var x=e=>{let t=o=>o[e]||[];return t.isThemeGetter=true,t},We=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ba=/^\d+\/\d+$/,Aa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ba=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ma=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ya=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Da=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,J=e=>ba.test(e),c=e=>!!e&&!Number.isNaN(Number(e)),z=e=>!!e&&Number.isInteger(Number(e)),Le=e=>e.endsWith("%")&&c(e.slice(0,-1)),U=e=>Aa.test(e),Fa=()=>true,Ra=e=>Ba.test(e)&&!Ma.test(e),Xe=()=>false,Ta=e=>ya.test(e),va=e=>Da.test(e),qa=e=>!l(e)&&!u(e),Ua=e=>Q(e,Je,Xe),l=e=>We.test(e),W=e=>Q(e,Qe,Ra),xe=e=>Q(e,Va,c),Ge=e=>Q(e,Ke,Xe),Oa=e=>Q(e,Ze,va),fe=e=>Q(e,_e,Ta),u=e=>Ne.test(e),ae=e=>_(e,Qe),Ha=e=>_(e,Ea),ze=e=>_(e,Ke),Ga=e=>_(e,Je),za=e=>_(e,Ze),ie=e=>_(e,_e,true),Q=(e,t,o)=>{let a=We.exec(e);return a?a[1]?t(a[1]):o(a[2]):false},_=(e,t,o=false)=>{let a=Ne.exec(e);return a?a[1]?t(a[1]):o:false},Ke=e=>e==="position"||e==="percentage",Ze=e=>e==="image"||e==="url",Je=e=>e==="length"||e==="size"||e==="bg-size",Qe=e=>e==="length",Va=e=>e==="number",Ea=e=>e==="family-name",_e=e=>e==="shadow";var Wa=()=>{let e=x("color"),t=x("font"),o=x("text"),a=x("font-weight"),r=x("tracking"),d=x("leading"),s=x("breakpoint"),p=x("container"),i=x("spacing"),m=x("radius"),L=x("shadow"),k=x("inset-shadow"),D=x("text-shadow"),R=x("drop-shadow"),h=x("blur"),S=x("perspective"),T=x("aspect"),v=x("ease"),N=x("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...B(),u,l],b=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],n=()=>[u,l,i],M=()=>[J,"full","auto",...n()],Y=()=>[z,"none","subgrid",u,l],oe=()=>["auto",{span:["full",z,u,l]},z,u,l],X=()=>[z,"auto",u,l],C=()=>["auto","min","max","fr",u,l],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...n()],E=()=>[J,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...n()],f=()=>[e,u,l],ke=()=>[...B(),ze,Ge,{position:[u,l]}],Pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],be=()=>["auto","cover","contain",Ga,Ua,{size:[u,l]}],ne=()=>[Le,ae,W],w=()=>["","none","full",m,u,l],P=()=>["",c,ae,W],le=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],g=()=>[c,Le,ze,Ge],Be=()=>["","none",h,u,l],ue=()=>["none",c,u,l],re=()=>["none",c,u,l],ce=()=>[c,u,l],de=()=>[J,"full",...n()];return {cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[Fa],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[qa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",c],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",J,l,u,T]}],container:["container"],columns:[{columns:[c,l,u,p]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:b()}],"overflow-x":[{"overflow-x":b()}],"overflow-y":[{"overflow-y":b()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[z,"auto",u,l]}],basis:[{basis:[J,"full","auto",p,...n()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[c,J,"auto","initial","none",l]}],grow:[{grow:["",c,u,l]}],shrink:[{shrink:["",c,u,l]}],order:[{order:[z,"first","last","none",u,l]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:n()}],"gap-x":[{"gap-x":n()}],"gap-y":[{"gap-y":n()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:n()}],px:[{px:n()}],py:[{py:n()}],ps:[{ps:n()}],pe:[{pe:n()}],pt:[{pt:n()}],pr:[{pr:n()}],pb:[{pb:n()}],pl:[{pl:n()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":n()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":n()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],w:[{w:[p,"screen",...E()]}],"min-w":[{"min-w":[p,"screen","none",...E()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[s]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh",...E()]}],"font-size":[{text:["base",o,ae,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,u,xe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Le,l]}],"font-family":[{font:[Ha,l,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,u,l]}],"line-clamp":[{"line-clamp":[c,"none",u,xe]}],leading:[{leading:[d,...n()]}],"list-image":[{"list-image":["none",u,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",u,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:f()}],"text-color":[{text:f()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[c,"from-font","auto",u,W]}],"text-decoration-color":[{decoration:f()}],"underline-offset":[{"underline-offset":[c,"auto",u,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:n()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u,l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ke()}],"bg-repeat":[{bg:Pe()}],"bg-size":[{bg:be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},z,u,l],radial:["",u,l],conic:[z,u,l]},za,Oa]}],"bg-color":[{bg:f()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:f()}],"gradient-via":[{via:f()}],"gradient-to":[{to:f()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:f()}],"border-color-x":[{"border-x":f()}],"border-color-y":[{"border-y":f()}],"border-color-s":[{"border-s":f()}],"border-color-e":[{"border-e":f()}],"border-color-t":[{"border-t":f()}],"border-color-r":[{"border-r":f()}],"border-color-b":[{"border-b":f()}],"border-color-l":[{"border-l":f()}],"divide-color":[{divide:f()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[c,u,l]}],"outline-w":[{outline:["",c,ae,W]}],"outline-color":[{outline:f()}],shadow:[{shadow:["","none",L,ie,fe]}],"shadow-color":[{shadow:f()}],"inset-shadow":[{"inset-shadow":["none",k,ie,fe]}],"inset-shadow-color":[{"inset-shadow":f()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:f()}],"ring-offset-w":[{"ring-offset":[c,W]}],"ring-offset-color":[{"ring-offset":f()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":f()}],"text-shadow":[{"text-shadow":["none",D,ie,fe]}],"text-shadow-color":[{"text-shadow":f()}],opacity:[{opacity:[c,u,l]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[c]}],"mask-image-linear-from-pos":[{"mask-linear-from":g()}],"mask-image-linear-to-pos":[{"mask-linear-to":g()}],"mask-image-linear-from-color":[{"mask-linear-from":f()}],"mask-image-linear-to-color":[{"mask-linear-to":f()}],"mask-image-t-from-pos":[{"mask-t-from":g()}],"mask-image-t-to-pos":[{"mask-t-to":g()}],"mask-image-t-from-color":[{"mask-t-from":f()}],"mask-image-t-to-color":[{"mask-t-to":f()}],"mask-image-r-from-pos":[{"mask-r-from":g()}],"mask-image-r-to-pos":[{"mask-r-to":g()}],"mask-image-r-from-color":[{"mask-r-from":f()}],"mask-image-r-to-color":[{"mask-r-to":f()}],"mask-image-b-from-pos":[{"mask-b-from":g()}],"mask-image-b-to-pos":[{"mask-b-to":g()}],"mask-image-b-from-color":[{"mask-b-from":f()}],"mask-image-b-to-color":[{"mask-b-to":f()}],"mask-image-l-from-pos":[{"mask-l-from":g()}],"mask-image-l-to-pos":[{"mask-l-to":g()}],"mask-image-l-from-color":[{"mask-l-from":f()}],"mask-image-l-to-color":[{"mask-l-to":f()}],"mask-image-x-from-pos":[{"mask-x-from":g()}],"mask-image-x-to-pos":[{"mask-x-to":g()}],"mask-image-x-from-color":[{"mask-x-from":f()}],"mask-image-x-to-color":[{"mask-x-to":f()}],"mask-image-y-from-pos":[{"mask-y-from":g()}],"mask-image-y-to-pos":[{"mask-y-to":g()}],"mask-image-y-from-color":[{"mask-y-from":f()}],"mask-image-y-to-color":[{"mask-y-to":f()}],"mask-image-radial":[{"mask-radial":[u,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":g()}],"mask-image-radial-to-pos":[{"mask-radial-to":g()}],"mask-image-radial-from-color":[{"mask-radial-from":f()}],"mask-image-radial-to-color":[{"mask-radial-to":f()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[c]}],"mask-image-conic-from-pos":[{"mask-conic-from":g()}],"mask-image-conic-to-pos":[{"mask-conic-to":g()}],"mask-image-conic-from-color":[{"mask-conic-from":f()}],"mask-image-conic-to-color":[{"mask-conic-to":f()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ke()}],"mask-repeat":[{mask:Pe()}],"mask-size":[{mask:be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",u,l]}],filter:[{filter:["","none",u,l]}],blur:[{blur:Be()}],brightness:[{brightness:[c,u,l]}],contrast:[{contrast:[c,u,l]}],"drop-shadow":[{"drop-shadow":["","none",R,ie,fe]}],"drop-shadow-color":[{"drop-shadow":f()}],grayscale:[{grayscale:["",c,u,l]}],"hue-rotate":[{"hue-rotate":[c,u,l]}],invert:[{invert:["",c,u,l]}],saturate:[{saturate:[c,u,l]}],sepia:[{sepia:["",c,u,l]}],"backdrop-filter":[{"backdrop-filter":["","none",u,l]}],"backdrop-blur":[{"backdrop-blur":Be()}],"backdrop-brightness":[{"backdrop-brightness":[c,u,l]}],"backdrop-contrast":[{"backdrop-contrast":[c,u,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",c,u,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c,u,l]}],"backdrop-invert":[{"backdrop-invert":["",c,u,l]}],"backdrop-opacity":[{"backdrop-opacity":[c,u,l]}],"backdrop-saturate":[{"backdrop-saturate":[c,u,l]}],"backdrop-sepia":[{"backdrop-sepia":["",c,u,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":n()}],"border-spacing-x":[{"border-spacing-x":n()}],"border-spacing-y":[{"border-spacing-y":n()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",u,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[c,"initial",u,l]}],ease:[{ease:["linear","initial",v,u,l]}],delay:[{delay:[c,u,l]}],animate:[{animate:["none",N,u,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,u,l]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[u,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:f()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:f()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u,l]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":n()}],"scroll-mx":[{"scroll-mx":n()}],"scroll-my":[{"scroll-my":n()}],"scroll-ms":[{"scroll-ms":n()}],"scroll-me":[{"scroll-me":n()}],"scroll-mt":[{"scroll-mt":n()}],"scroll-mr":[{"scroll-mr":n()}],"scroll-mb":[{"scroll-mb":n()}],"scroll-ml":[{"scroll-ml":n()}],"scroll-p":[{"scroll-p":n()}],"scroll-px":[{"scroll-px":n()}],"scroll-py":[{"scroll-py":n()}],"scroll-ps":[{"scroll-ps":n()}],"scroll-pe":[{"scroll-pe":n()}],"scroll-pt":[{"scroll-pt":n()}],"scroll-pr":[{"scroll-pr":n()}],"scroll-pb":[{"scroll-pb":n()}],"scroll-pl":[{"scroll-pl":n()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",u,l]}],fill:[{fill:["none",...f()]}],"stroke-w":[{stroke:[c,ae,W,xe]}],stroke:[{stroke:["none",...f()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var je=Pa(Wa);function A(...e){return je(Ue(e))}var $e=({size:e="md",closeDelay:t=500,closeOnClick:o=true,closeOnEscape:a=true,closeOnPointerDown:r=true,closeOnScroll:d=true,interactive:s=true,lazyMount:p=false,openDelay:i=700,unmountOnExit:m=false,content:L,children:k,asChild:D=true,contentClassName:R,className:h,...S})=>jsxRuntime.jsxs(tooltip.TooltipRoot,{closeDelay:t,closeOnClick:o,closeOnEscape:a,closeOnPointerDown:r,closeOnScroll:d,interactive:s,lazyMount:p,openDelay:i,unmountOnExit:m,...S,children:[jsxRuntime.jsx(tooltip.TooltipTrigger,{asChild:D,className:A("cursor-inherit text-left",h),children:D?jsxRuntime.jsx("div",{children:k}):k}),jsxRuntime.jsx(tooltip.TooltipPositioner,{children:jsxRuntime.jsxs(tooltip.TooltipContent,{"data-size":e,className:A("font-inter z-30 rounded-lg bg-neutral-900 text-center text-sm leading-[130%] whitespace-break-spaces text-neutral-50","data-[size=md]:p-4 data-[size=sm]:p-2","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right","data-[placement=right-end]:right-right data-[placement=right]:text-right data-[placement=right-start]:text-right","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-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=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=right]:text-left data-[placement=right-end]:text-left data-[placement=right-start]:text-left",R),children:[jsxRuntime.jsx(tooltip.TooltipArrow,{children:jsxRuntime.jsx(tooltip.TooltipArrowTip,{})}),L]})})]});var _a=({title:e,titleLines:t=2,description:o,descriptionLines:a=1,Icon:r,iconAsColumn:d=true,className:s,...p})=>jsxRuntime.jsxs("div",{className:A("flex gap-2 py-4 pl-4 pr-6",d&&"flex-col items-center gap-1",!d&&!o&&"items-center"),...p,children:[r&&jsxRuntime.jsx(r,{className:A("shrink-0 text-neutral-300"),size:24}),jsxRuntime.jsxs("div",{className:A("flex flex-col gap-1",d&&"text-center"),children:[jsxRuntime.jsx("p",{className:A("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsxRuntime.jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:a?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a}:void 0,children:o})]})]}),aa=_a;function tt(){let e=combobox.useComboboxContext(),t=react.useRef(false);return e.value.length&&e.collection.size&&!t.current&&(e.syncSelectedItems(),t.current=true),null}var Io=e=>{let{label:t,error:o,required:a,tooltip:r,readOnly:d,options:s,onInputValueChange:p,onSelect:i,defaultValue:m,helperText:L,noResultsTitle:k,noResultsDescription:D,noResultsIcon:R,noResultsTitleLines:h,noResultsDescriptionLines:S,value:T,className:v,...N}=e,V=Object.getOwnPropertyNames(e),B=react.useRef(null),{contains:O}=locale.useFilter({sensitivity:"base"}),{collection:b,filter:F,set:n}=combobox.useListCollection({initialItems:[],itemToString:C=>C.label,itemToValue:C=>String(C.value),filter:O}),M=react.useCallback(C=>{let K=s.find(H=>String(H.value)===C.itemValue);K&&i?.(K);},[i,s]),Y=react.useCallback(C=>{F(C.inputValue),C.reason!==void 0&&p?.(C.inputValue??"");},[F,p]),oe=combobox.useCombobox({collection:b,defaultValue:m?[String(m)]:void 0,placeholder:e.placeholder,inputValue:e.inputValue,onInputValueChange:Y,value:V.includes("value")?T?[String(T)]:[]:void 0,onSelect:M,inputBehavior:"autocomplete",openOnClick:true,...N}),X=react.useCallback(()=>{i?.(null),Y?.({inputValue:"",reason:"clear-trigger"});},[i,p]);return react.useEffect(()=>{n(s);},[s]),react.useEffect(()=>{B.current&&B.current.value===""&&F("");},[F,B.current?.value]),jsxRuntime.jsxs(combobox.Combobox.RootProvider,{value:oe,"data-error":o,className:A("group flex flex-col gap-2",v),children:[jsxRuntime.jsxs(combobox.Combobox.Label,{className:"font-inter flex items-center text-xs leading-[133.33%] font-medium text-neutral-700 data-[disabled]:text-neutral-400",children:[a?jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("span",{className:"text-red-500",children:"*"}),t]}):t,r&&jsxRuntime.jsx($e,{content:r,size:"sm",className:"ml-2",children:jsxRuntime.jsx(me,{className:"size-3.5"})})]}),jsxRuntime.jsx(tt,{}),jsxRuntime.jsxs(combobox.Combobox.Control,{className:A("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 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",d&&"pointer-events-none"),children:[jsxRuntime.jsx(combobox.Combobox.Input,{className:A("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",d&&"pointer-events-none",o&&"pr-16"),ref:B}),o&&jsxRuntime.jsx(me,{className:"text-error-500 size-4.5 shrink-0"}),!d&&jsxRuntime.jsx(combobox.Combobox.ClearTrigger,{className:"cursor-pointer",onClick:X,children:jsxRuntime.jsx(Te,{className:"size-4.5"})}),jsxRuntime.jsx(combobox.Combobox.Trigger,{className:"cursor-pointer group-data-[disabled]/control:cursor-not-allowed group-data-[disabled]/control:text-neutral-400",children:jsxRuntime.jsx(ve,{className:"size-4.5 transition-transform will-change-transform group-data-[state=open]/control:rotate-180"})})]}),jsxRuntime.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:L}),jsxRuntime.jsx(portal.Portal,{children:jsxRuntime.jsx(combobox.Combobox.Positioner,{className:"!z-10000",children:jsxRuntime.jsx(combobox.Combobox.Content,{className:"elevation-9 max-h-67.5 min-w-27.5 overflow-auto rounded-lg bg-neutral-50",children:jsxRuntime.jsxs(combobox.Combobox.ItemGroup,{children:[b.items.length>0&&b.items.map(C=>jsxRuntime.jsx(combobox.Combobox.Item,{item:C,className:"font-inter data-[highlighted]:bg-primary-100 cursor-pointer p-3 data-[disabled]:cursor-not-allowed data-[disabled]:text-neutral-400",children:jsxRuntime.jsx(combobox.Combobox.ItemText,{className:"flex flex-col gap-1",asChild:true,children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm leading-[130%] font-medium",children:C.label}),C.description&&jsxRuntime.jsx("p",{className:"text-xs leading-[130%]",children:C.description})]})})},C.value)),b.items.length===0&&jsxRuntime.jsx(aa,{title:k,description:D,Icon:R,descriptionLines:S,titleLines:h})]})})})})]})};/*! Bundled license information:
|
|
2
2
|
|
|
3
3
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
4
4
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
@@ -14,4 +14,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*)
|
|
17
|
-
*/exports.AutocompleteNew=
|
|
17
|
+
*/exports.AutocompleteNew=Io;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as AutocompleteNew}from'../chunk-
|
|
1
|
+
export{b as AutocompleteNew}from'../chunk-JEPSI76M.mjs';import'../chunk-PF2FHSIC.mjs';import'../chunk-4HYLZVI5.mjs';import'../chunk-BO6XI5BE.mjs';
|