sodtrack-web-ui 0.117.0 → 0.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-JKZOOHQ3.js → chunk-5KOFK3Q6.js} +1 -1
- package/dist/chunk-734IEMNP.js +1 -0
- package/dist/chunk-FGCLFX33.js +1 -0
- package/dist/chunk-GOQXRKKT.js +1 -0
- package/dist/chunk-OLJ5WJMI.js +1 -0
- package/dist/{chunk-XVT4DHX3.js → chunk-OOX7ZNVZ.js} +1 -1
- package/dist/{chunk-QLJJMFDK.js → chunk-TVAUTXNN.js} +1 -1
- package/dist/components/autocomplete-multiple.d.ts +2 -12
- package/dist/components/autocomplete-multiple.js +1 -1
- package/dist/components/autocomplete-skeleton.d.ts +1 -1
- package/dist/components/autocomplete-skeleton.js +1 -1
- package/dist/components/autocomplete.d.ts +18 -16
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/index.d.ts +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/list-item-arrow.js +1 -1
- package/dist/components/list-item-button.js +1 -1
- package/dist/components/list-item-checkbox-left.js +1 -1
- package/dist/components/list-item-checkbox.js +1 -1
- package/dist/components/list-item_old.js +1 -1
- package/dist/components/select-skeleton.d.ts +4 -0
- package/dist/components/select-skeleton.js +1 -1
- package/dist/components/select.d.ts +23 -3
- package/dist/components/select.js +1 -1
- package/dist/preferences.js +1 -1
- package/dist/use-autocomplete-options-Bu6wJH2i.d.ts +13 -0
- package/package.json +5 -5
- package/dist/chunk-23LALKB6.js +0 -1
- package/dist/chunk-GJSFXPZK.js +0 -1
- package/dist/chunk-L2QZT5LQ.js +0 -1
- package/dist/chunk-XYBXEU3T.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$9}from'./chunk-QX4D2CU2.js';import {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {b}from'./chunk-ZYFA5BA3.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$8}from'./chunk-MOFC3UHC.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-FYB3QRNL.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import In from'react-phone-number-input/locale/en.json';import vn from'react-phone-number-input/locale/es.json';import Tn from'react-phone-number-input/locale/pt.json';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {AutoFocusPlugin}from'@lexical/react/LexicalAutoFocusPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HeadingNode,$isHeadingNode,$createHeadingNode}from'@lexical/rich-text';import {ListNode,ListItemNode,$isListNode,REMOVE_LIST_COMMAND,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {$generateHtmlFromNodes,$generateNodesFromDOM}from'@lexical/html';import {$getSelection,$isRangeSelection,$isElementNode,SELECTION_CHANGE_COMMAND,CAN_UNDO_COMMAND,CAN_REDO_COMMAND,UNDO_COMMAND,REDO_COMMAND,OUTDENT_CONTENT_COMMAND,INDENT_CONTENT_COMMAND,FORMAT_ELEMENT_COMMAND,$createParagraphNode,FORMAT_TEXT_COMMAND,$getRoot,$insertNodes}from'lexical';import {$setBlocksType}from'@lexical/selection';import {$findMatchingParent,mergeRegister}from'@lexical/utils';import {AlignJustifyIcon,AlignRightIcon,AlignCenterIcon,AlignLeftIcon,UnderlineIcon,ItalicIcon,BoldIcon,UndoIcon,RedoIcon,ListIcon,ListOrderedIcon,IndentDecreaseIcon,IndentIncreaseIcon}from'lucide-react';import yl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import sl from'libphonenumber-js/mobile/examples';var ko=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),Ke=ko;var wo=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,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?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=wo;var _o=336,Kl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=_o,K=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),Q=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,j=window.innerHeight-D.bottom>Z,we=D.top>Z;M(j?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),a$9(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return Q(),C.current.addEventListener("mousedown",Q),C.current.addEventListener("input",Le),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{C.current?.removeEventListener("mousedown",Q),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:K,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Bo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Bo;var li=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var fi=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:ne,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Yo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Yo;var en=150,tn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-en,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pr-12 pl-3",n&&"cursor-not-allowed"),style:{maxWidth:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=tn;var rn=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=rn;var cn=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,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:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Qt=cn;var un=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),jt=un;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,K]=useState(t??[]),Q=useCallback(W=>{K(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{K([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),j=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),a$9(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return j(),b.current.addEventListener("mousedown",j),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",j,true),window.addEventListener("resize",j),()=>{b.current?.removeEventListener("mousedown",j),b.current?.removeEventListener("input",j),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",j,true),window.removeEventListener("resize",j);}},[j,Z,D,we]),useEffect(()=>{P&&(K(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(K(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(jt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:Q,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Qt,{handleSelect:Q,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Rs=e=>jsx($t,{children:jsx(Yt,{...e})});var yn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(yn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:In,es:vn,pt:Tn},Pn=st.en,En=Jt.en,Nn={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},An={clearIdLabel:Pn,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>Nn[e]??An,Mn=(e,t)=>(Jt[t]??En)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:Mn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let K=lo(A,$);E.current=K,R(K);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ma=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Ra=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,className:"mr-4 self-center",disabled:r}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={paragraph:"m-0",ltr:"text-left",rtl:"text-right",heading:{h1:"mb-2 text-2xl leading-[130%] font-semibold text-neutral-900",h2:"mb-2 text-xl leading-[130%] font-semibold text-neutral-900",h3:"mb-2 text-lg leading-[130%] font-semibold text-neutral-900",h4:"mb-2 text-base leading-[130%] font-semibold text-neutral-900",h5:"mb-2 text-sm leading-[130%] font-semibold text-neutral-900",h6:"mb-2 text-xs leading-[130%] font-semibold text-neutral-900"},list:{ul:"my-2 list-disc pl-5",ol:"my-2 list-decimal pl-5",listitem:"my-1",nested:{listitem:"my-1"}},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"rounded bg-neutral-100 px-1 py-0.5 font-mono text-xs"},code:"rounded bg-neutral-100 p-2 font-mono text-xs",quote:"border-l-2 border-neutral-300 pl-3 italic text-neutral-700",link:"text-primary-700 underline hover:text-primary-800"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Sn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Bn={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},zn=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>zn()?new DOMParser().parseFromString(e,"text/html"):null,Vn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},Un=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Sn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},$n=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},Wn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},qn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Gn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=Wn(a,i),R=qn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Kn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Gn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Qn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Bn[r];l&&n.classList.add(l);}},ge=e=>Vn(e).replace(/>\s+</g,"><").replace(/ /g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return Un(n),$n(n),Kn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Qn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},or=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,or(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Sr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Br={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},zr={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={bold:jsx(BoldIcon,{className:"size-4"}),italic:jsx(ItalicIcon,{className:"size-4"}),underline:jsx(UnderlineIcon,{className:"size-4"}),strikethrough:jsx("span",{className:"text-xs font-semibold",children:"S"}),code:jsx("span",{className:"font-mono text-xs",children:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Vr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},Ur=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},$r=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("inline-flex size-8 items-center justify-center rounded-md border border-transparent text-neutral-700 transition-colors","focus-visible:ring-primary-800 hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-40",n&&"border-neutral-300 bg-neutral-200 text-neutral-900"),children:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Vr(e),[e]),f=useMemo(()=>Ur(e),[e]),C=useMemo(()=>$r(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,K=>$isListNode(K));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Sr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("h-8 rounded-md border border-neutral-300 bg-white px-2 text-xs font-medium text-neutral-800","focus-visible:ring-primary-800 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none"),children:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:zr[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Br[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},rl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("group flex w-full flex-col overflow-hidden rounded-lg border bg-white transition-colors","focus-within:ring-primary-800 focus-within:ring-2 focus-within:ring-offset-0",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("relative w-full px-4 py-3 text-sm leading-[142%] text-neutral-900 outline-none","[&_h1]:mt-2 [&_h1]:mb-2 [&_h2]:mt-2 [&_h2]:mb-2 [&_h3]:mt-2 [&_h3]:mb-2","[&_li]:my-1 [&_ol]:my-2 [&_ul]:my-2","[&_a]:text-primary-700 [&_a]:underline",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?null:jsx("div",{className:"pointer-events-none absolute top-3 left-4 text-sm text-neutral-500",children:r}),ErrorBoundary:LexicalErrorBoundary}),jsx(HistoryPlugin,{}),jsx(ListPlugin,{}),jsx(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});rl.displayName="RichTextEditor";var Lo={en:In,es:vn,pt:Tn},ul={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},dl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},fl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>ul[e]??dl,vo=e=>Lo[e]??fl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,sl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Ll=({Icon:e,callingCode:t,country:o,countryName:n,callingCodeClassName:r})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(e,{"aria-hidden":true,country:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Ll,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Rl=yl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Rl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var vl=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=vl;var su=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Kl as a,su as b,li as c,fi as d,Rs as e,ao as f,ma as g,Ra as h,ct as i,pt as j,ge as k,ht as l,bt as m,rl as n,Ao as o};
|
|
1
|
+
import {a as a$9}from'./chunk-QX4D2CU2.js';import {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {b}from'./chunk-ZYFA5BA3.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-FYB3QRNL.js';import {a as a$8}from'./chunk-MOFC3UHC.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import In from'react-phone-number-input/locale/en.json';import vn from'react-phone-number-input/locale/es.json';import Tn from'react-phone-number-input/locale/pt.json';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {AutoFocusPlugin}from'@lexical/react/LexicalAutoFocusPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HeadingNode,$isHeadingNode,$createHeadingNode}from'@lexical/rich-text';import {ListNode,ListItemNode,$isListNode,REMOVE_LIST_COMMAND,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {$generateHtmlFromNodes,$generateNodesFromDOM}from'@lexical/html';import {$getSelection,$isRangeSelection,$isElementNode,SELECTION_CHANGE_COMMAND,CAN_UNDO_COMMAND,CAN_REDO_COMMAND,UNDO_COMMAND,REDO_COMMAND,OUTDENT_CONTENT_COMMAND,INDENT_CONTENT_COMMAND,FORMAT_ELEMENT_COMMAND,$createParagraphNode,FORMAT_TEXT_COMMAND,$getRoot,$insertNodes}from'lexical';import {$setBlocksType}from'@lexical/selection';import {$findMatchingParent,mergeRegister}from'@lexical/utils';import {AlignJustifyIcon,AlignRightIcon,AlignCenterIcon,AlignLeftIcon,UnderlineIcon,ItalicIcon,BoldIcon,UndoIcon,RedoIcon,ListIcon,ListOrderedIcon,IndentDecreaseIcon,IndentIncreaseIcon}from'lucide-react';import yl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import sl from'libphonenumber-js/mobile/examples';var ko=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),Ke=ko;var wo=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,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?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=wo;var _o=336,Kl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=_o,K=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),Q=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,j=window.innerHeight-D.bottom>Z,we=D.top>Z;M(j?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),a$9(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return Q(),C.current.addEventListener("mousedown",Q),C.current.addEventListener("input",Le),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{C.current?.removeEventListener("mousedown",Q),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:K,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Bo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Bo;var li=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var fi=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:ne,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Yo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Yo;var en=150,tn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-en,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pr-12 pl-3",n&&"cursor-not-allowed"),style:{maxWidth:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=tn;var rn=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=rn;var cn=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,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:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Qt=cn;var un=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),jt=un;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,K]=useState(t??[]),Q=useCallback(W=>{K(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{K([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),j=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),a$9(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return j(),b.current.addEventListener("mousedown",j),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",j,true),window.addEventListener("resize",j),()=>{b.current?.removeEventListener("mousedown",j),b.current?.removeEventListener("input",j),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",j,true),window.removeEventListener("resize",j);}},[j,Z,D,we]),useEffect(()=>{P&&(K(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(K(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(jt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:Q,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Qt,{handleSelect:Q,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Rs=e=>jsx($t,{children:jsx(Yt,{...e})});var yn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(yn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:In,es:vn,pt:Tn},Pn=st.en,En=Jt.en,Nn={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},An={clearIdLabel:Pn,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>Nn[e]??An,Mn=(e,t)=>(Jt[t]??En)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:Mn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let K=lo(A,$);E.current=K,R(K);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ma=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Ra=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,className:"mr-4 self-center",disabled:r}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={paragraph:"m-0",ltr:"text-left",rtl:"text-right",heading:{h1:"mb-2 text-2xl leading-[130%] font-semibold text-neutral-900",h2:"mb-2 text-xl leading-[130%] font-semibold text-neutral-900",h3:"mb-2 text-lg leading-[130%] font-semibold text-neutral-900",h4:"mb-2 text-base leading-[130%] font-semibold text-neutral-900",h5:"mb-2 text-sm leading-[130%] font-semibold text-neutral-900",h6:"mb-2 text-xs leading-[130%] font-semibold text-neutral-900"},list:{ul:"my-2 list-disc pl-5",ol:"my-2 list-decimal pl-5",listitem:"my-1",nested:{listitem:"my-1"}},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"rounded bg-neutral-100 px-1 py-0.5 font-mono text-xs"},code:"rounded bg-neutral-100 p-2 font-mono text-xs",quote:"border-l-2 border-neutral-300 pl-3 italic text-neutral-700",link:"text-primary-700 underline hover:text-primary-800"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Sn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Bn={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},zn=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>zn()?new DOMParser().parseFromString(e,"text/html"):null,Vn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},Un=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Sn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},$n=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},Wn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},qn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Gn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=Wn(a,i),R=qn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Kn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Gn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Qn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Bn[r];l&&n.classList.add(l);}},ge=e=>Vn(e).replace(/>\s+</g,"><").replace(/ /g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return Un(n),$n(n),Kn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Qn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},or=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,or(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Sr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Br={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},zr={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={bold:jsx(BoldIcon,{className:"size-4"}),italic:jsx(ItalicIcon,{className:"size-4"}),underline:jsx(UnderlineIcon,{className:"size-4"}),strikethrough:jsx("span",{className:"text-xs font-semibold",children:"S"}),code:jsx("span",{className:"font-mono text-xs",children:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Vr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},Ur=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},$r=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("inline-flex size-8 items-center justify-center rounded-md border border-transparent text-neutral-700 transition-colors","focus-visible:ring-primary-800 hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-40",n&&"border-neutral-300 bg-neutral-200 text-neutral-900"),children:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Vr(e),[e]),f=useMemo(()=>Ur(e),[e]),C=useMemo(()=>$r(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,K=>$isListNode(K));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Sr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("h-8 rounded-md border border-neutral-300 bg-white px-2 text-xs font-medium text-neutral-800","focus-visible:ring-primary-800 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none"),children:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:zr[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Br[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},rl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("group flex w-full flex-col overflow-hidden rounded-lg border bg-white transition-colors","focus-within:ring-primary-800 focus-within:ring-2 focus-within:ring-offset-0",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("relative w-full px-4 py-3 text-sm leading-[142%] text-neutral-900 outline-none","[&_h1]:mt-2 [&_h1]:mb-2 [&_h2]:mt-2 [&_h2]:mb-2 [&_h3]:mt-2 [&_h3]:mb-2","[&_li]:my-1 [&_ol]:my-2 [&_ul]:my-2","[&_a]:text-primary-700 [&_a]:underline",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?null:jsx("div",{className:"pointer-events-none absolute top-3 left-4 text-sm text-neutral-500",children:r}),ErrorBoundary:LexicalErrorBoundary}),jsx(HistoryPlugin,{}),jsx(ListPlugin,{}),jsx(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});rl.displayName="RichTextEditor";var Lo={en:In,es:vn,pt:Tn},ul={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},dl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},fl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>ul[e]??dl,vo=e=>Lo[e]??fl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,sl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Ll=({Icon:e,callingCode:t,country:o,countryName:n,callingCodeClassName:r})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(e,{"aria-hidden":true,country:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Ll,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Rl=yl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Rl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var vl=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=vl;var su=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Kl as a,su as b,li as c,fi as d,Rs as e,ao as f,ma as g,Ra as h,ct as i,pt as j,ge as k,ht as l,bt as m,rl as n,Ao as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$5}from'./chunk-RBXMHWJQ.js';import {b,e,a as a$3}from'./chunk-OLJ5WJMI.js';import {a as a$1}from'./chunk-MOFC3UHC.js';import {c,b as b$1,d,e as e$1,a as a$4}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {useAsyncList}from'@ark-ui/react/collection';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useRef,useState,useMemo,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var He=a$5,ge="lg",be=({clearable:i,placeholder:u,size:m,state:S})=>{let d=useSelectContext().value.length>0;return jsx(e$1,{as:Select.Control,size:m,state:S,trailingClassName:"pointer-events-none",clearAdornment:i&&d?jsx(a$4,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:s=>s.stopPropagation()}):void 0,indicator:jsx(Select.Indicator,{className:"group/chevron-host flex shrink-0 items-center justify-center",children:jsx(a$3,{})}),children:s=>jsx(Select.Trigger,{className:a$2(s,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:u})})})};function he(i,u){let{className:m,label:S,labelProps:h,required:d$1,error:s,isItemDisabled:v,value:l,helperText:T,placeholder:X,emptyState:Y,onSelect:x,onOpenChange:y,defaultValue:C,options:O,load:r,clearable:$=true,disabled:R,id:ee,invalid:te,readOnly:I,size:oe=ge,...ne}=i,le=Object.hasOwn(i,"defaultValue"),w=Object.hasOwn(i,"value"),P=typeof l=="object"&&l!==null?l.value:l,z=useRef(null),E=useRef(null),[re,ae]=useState(false),o=useAsyncList({load:async({cursor:e,signal:a})=>{if(!r)return {items:[]};let c=e??1,p=await r({page:c,pageSize:b,signal:a});return {items:p.options,cursor:p.hasMore?c+1:void 0}}}),L=useMemo(()=>{let e=r?o.items:O;return typeof l!="object"||l===null||e.some(a=>a.value===l.value)?e:[l,...e]},[o.items,r,O,l]),f=useMemo(()=>createListCollection({items:L,isItemDisabled:v,itemToValue:e=>String(e.value)}),[L,v]),ie=useCallback(e=>{let a=e.items.at(0)??null;x?.(a);},[x]),se=useCallback(e=>{ae(e.open),y?.(e),e.open&&r&&o.empty&&!o.loading&&o.reload();},[o.empty,o.loading,o.reload,r,y]),V=!!r&&re&&o.hasMore&&!o.loading&&!o.error;if(useEffect(()=>{let e=E.current,a=z.current;if(!e||!a||!V)return;let c=new IntersectionObserver(p=>{p[0]?.isIntersecting&&o.loadMore();},{root:a,rootMargin:"0px 0px 64px 0px"});return c.observe(e),()=>c.disconnect()},[V,o.loadMore]),le&&w)throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");let A=!!(s||te),g=c({error:A,disabled:R,readOnly:I});return jsxs(Select.Root,{ref:u,"data-disabled":g==="disabled"?"":void 0,"data-error":d(g)||void 0,disabled:R,id:ee,invalid:A,readOnly:I,required:d$1,collection:f,className:a$2(b$1,m),positioning:{placement:"bottom-end",getAnchorRect:e=>e instanceof HTMLElement?e.parentElement?.getBoundingClientRect()??null:null},onValueChange:ie,onOpenChange:se,value:w?P!=null?[String(P)]:[]:void 0,defaultValue:C!=null?[String(C)]:void 0,...ne,children:[jsx(c$1,{...h,as:Select.Label,label:S,required:d$1}),jsx(be,{clearable:$,placeholder:X,size:oe,state:g}),T&&jsx(a,{children:T}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsxs(Select.Content,{ref:z,"aria-busy":o.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg outline-none",children:[f.items.map(e=>jsx(Select.Item,{item:e,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:e.label})},e.value)),o.loading&&jsx(e,{}),!o.loading&&f.items.length===0&&jsx(a$1,{size:"sm",variant:"empty",...Y}),r&&jsx("div",{ref:E,className:"h-px","aria-hidden":"true"})]})})}),jsx(Select.HiddenSelect,{required:false})]})}var Q=forwardRef(he);Q.displayName="Select";var qe=Q;export{He as a,ge as b,qe as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-RBXMHWJQ.js';import {a as a$5}from'./chunk-TN46TEUP.js';import {c,a as a$2,d,e as e$1}from'./chunk-OLJ5WJMI.js';import {c as c$1,e,a as a$3,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useState,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ce=a,X="lg",Y=P=>{let{label:B,labelProps:F,value:n,onValueChange:u,placeholder:R,error:m,required:d$2,disabled:c$3,readOnly:b$1,options:H,load:r,helperText:k,size:q=X,emptyState:D,className:M}=P,[g,x]=useState(null),j=useMemo(()=>n?[n]:[],[n]),t=c({options:H,load:r,selectedOptions:j}),f=t.optionByValue,h=g??n?.label??"",i=c$1({error:!!m,disabled:c$3,readOnly:b$1}),G=useCallback(o=>{if(o.reason==="input-change"){x(o.inputValue),t.search(o.inputValue);return}x(null);},[t.search]),Q=useCallback(o=>{t.handleOpenChange(o,true);},[t.handleOpenChange]),J=useCallback(o=>{let C=o.value[0];u(C===void 0?null:f.get(C)??null);},[u,f]);return jsxs(Combobox.Root,{collection:t.collection,value:n?[String(n.value)]:[],inputValue:h,onInputValueChange:G,onOpenChange:Q,onValueChange:J,inputBehavior:"autocomplete",openOnClick:true,invalid:!!m,disabled:c$3,readOnly:b$1,"data-disabled":i==="disabled"?"":void 0,"data-error":d$1(i)||void 0,className:a$1(b,M),children:[jsx(c$2,{...F,as:Combobox.Label,label:B,required:d$2}),jsx(e,{as:Combobox.Control,size:q,state:i,clearAdornment:h.length>0||n?jsx(a$3,{as:Combobox.ClearTrigger,hidden:false}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$2,{})}),children:o=>jsx(Combobox.Input,{className:a$1(o,"text-left disabled:cursor-not-allowed"),placeholder:R,"aria-required":d$2||void 0})}),jsx(a$4,{children:k}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:t.contentRef,"aria-busy":t.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[t.collection.items.map(o=>jsx(Combobox.Item,{item:o,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:o.label}),o.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$5,{size:"sm",...o.badgeExpandable})})]}),o.description&&jsx("p",{className:"text-xs leading-[130%]",children:o.description})]})})},String(o.value))),!t.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(d,{query:r?t.serverQuery:g??"",emptyState:D})})]}),t.loading&&jsx(e$1,{}),r&&jsx("div",{ref:t.sentinelRef,className:"h-px"})]})})})]})};Y.displayName="Autocomplete";export{ce as a,X as b,Y as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-WAUY2MS6.js';import {c,a as a$1,d as d$1,e as e$1}from'./chunk-OLJ5WJMI.js';import {c as c$1,e,a as a$2,b,d as d$2}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {k}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var U=B=>{let{label:E,labelProps:q,value:p,onValueChange:h,placeholder:H,error:x,required:C,disabled:r,readOnly:d$3,options:R,load:c$3,helperText:D,emptyState:F,optionDescriptionLines:f=1,clearable:z=true,growable:u=true,className:G}=B,l=c({options:R,load:c$3,selectedOptions:p}),m=l.optionByValue,v=useMemo(()=>p.map(t=>m.get(String(t.value))??t),[m,p]),b$1=c$1({error:!!x,disabled:r,readOnly:d$3}),W=useCallback(t=>{l.search(t.inputValue);},[l.search]),j=useCallback(t=>{l.handleOpenChange(t);},[l.handleOpenChange]),Q=useCallback(t=>{h(t.value.flatMap(n=>m.get(n)??[]));},[h,m]);return jsxs(Combobox.Root,{collection:l.collection,value:p.map(t=>String(t.value)),onInputValueChange:W,onOpenChange:j,onValueChange:Q,multiple:true,inputBehavior:"none",openOnClick:true,invalid:!!x,disabled:r,readOnly:d$3,"data-disabled":b$1==="disabled"?"":void 0,"data-error":d$2(b$1)||void 0,className:a(b,G),children:[jsx(c$2,{...q,as:Combobox.Label,label:E,required:C}),jsx(Combobox.Context,{children:t=>jsx(e,{as:Combobox.Control,className:a(u&&"h-auto min-h-(--height-input) items-start",!u&&"overflow-hidden",r&&"cursor-not-allowed"),state:b$1,trailingClassName:u?"self-start py-2":void 0,clearAdornment:z&&p.length>0?jsx(a$2,{as:Combobox.ClearTrigger,onClick:n=>n.stopPropagation()}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$1,{})}),children:n=>jsxs("div",{className:a("flex min-w-0 flex-1 items-center gap-1 py-2",u?"flex-wrap":"h-full overflow-hidden"),children:[v.map(i=>jsx(d,{color:"neutral",variant:"fill",size:"md",className:a("max-w-full shrink-0 [&>button]:shrink-0",r&&"bg-neutral-50 text-neutral-600 ring-neutral-600 hover:bg-neutral-50"),disabled:r,hasCloseIcon:!d$3&&!r,onClose:()=>{t.clearValue(String(i.value));},children:jsx("span",{className:"truncate",children:i.label})},String(i.value))),jsx(Combobox.Input,{className:a(n,"h-auto px-0 py-0 disabled:cursor-not-allowed"),"aria-required":C||void 0,placeholder:v.length===0?H:""})]})})}),jsx(a$3,{children:D}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:l.contentRef,"aria-busy":l.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[l.collection.items.map(t=>jsx(Combobox.Item,{item:t,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:n,disabled:i})=>jsxs("div",{className:a("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",t.description&&"py-3",i?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:t.label}),t.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:f?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:f,WebkitBoxOrient:"vertical"}:void 0,children:t.description})]}),jsx("div",{className:a("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",n?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",i&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(t.value))),!l.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(Combobox.Context,{children:t=>jsx(d$1,{query:c$3?l.serverQuery:t.inputValue,emptyState:F})})})]}),l.loading&&jsx(e$1,{}),c$3&&jsx("div",{ref:l.sentinelRef,className:"h-px"})]})})})]})};U.displayName="AutocompleteMultiple";export{U as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-MOFC3UHC.js';import {g}from'./chunk-QMPBFFFC.js';import {c}from'./chunk-C7TLKKPT.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx,jsxs}from'react/jsx-runtime';import {useListCollection}from'@ark-ui/react/combobox';import {useAsyncList}from'@ark-ui/react/collection';import {useFilter,useLocaleContext}from'@ark-ui/react/locale';import {useMemo,useRef,useEffect,useCallback}from'react';var k=({className:t})=>jsx(g,{"aria-hidden":true,className:a("size-4.5 text-neutral-900 transition-transform will-change-transform","group-data-disabled/control:text-neutral-600","group-data-readonly/control:text-neutral-600","group-data-[state=open]/chevron-host:rotate-180",t)});var V=300,F=10,P=t=>t?.startsWith("es")?{loading:"Cargando...",noData:"A\xFAn no hay informaci\xF3n"}:t?.startsWith("pt")?{loading:"Carregando...",noData:"Nenhuma informa\xE7\xE3o dispon\xEDvel ainda"}:{loading:"Loading...",noData:"No information available yet"},te=t=>{let s=!!t.load,D=useMemo(()=>({sensitivity:"base"}),[]),{contains:S}=useFilter(D),p=useRef(null),h=useRef(null),b=useRef(""),a=useRef(void 0),l=useRef(false),r=useAsyncList({load:async e=>{if(!t.load)return {items:[]};let o=e.cursor??1,n=await t.load({query:e.filterText,page:o,pageSize:F,signal:e.signal});return {items:n.options,cursor:n.hasMore?o+1:void 0}},onSuccess:()=>{l.current&&(l.current=false,p.current?.scrollTo({top:0}));}}),c=useRef(r);c.current=r;let m=useMemo(()=>{let e=t.options??r.items;if(!t.selectedOptions.length)return e;let o=new Set(e.map(g=>g.value)),n=t.selectedOptions.filter(g=>!o.has(g.value));return n.length?[...n,...e]:e},[r.items,t.options,t.selectedOptions]),d=s?r.items:m,I=useMemo(()=>new Map(m.map(e=>[String(e.value),e])),[m]),{collection:w,filter:u,set:T}=useListCollection({initialItems:d,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,o,n)=>S(e,o)||!!n.description&&S(n.description,o)}),A=r.hasMore&&!r.loading&&!r.error;useEffect(()=>{T(d),u(b.current);},[d,u,T]),useEffect(()=>()=>clearTimeout(a.current),[]),useEffect(()=>{let e=h.current;if(!e||!A)return;let o=new IntersectionObserver(n=>{n[0]?.isIntersecting&&c.current.loadMore();},{root:p.current,rootMargin:"0px 0px 64px 0px"});return o.observe(e),()=>o.disconnect()},[A]);let f=useCallback(e=>{if(!s){b.current=e,u(e);return}clearTimeout(a.current),a.current=setTimeout(()=>{let o=c.current;o.filterText===e&&!o.empty||(l.current=true,o.setFilterText(e));},V);},[u,s]),z=useCallback((e,o=false)=>{if(!e.open||e.reason==="input-change")return;if(!s){o&&f("");return}let n=c.current;if(o&&n.filterText){clearTimeout(a.current),l.current=true,n.setFilterText("");return}n.empty&&!n.loading&&n.reload();},[s,f]);return {collection:w,optionByValue:I,serverQuery:r.filterText,loading:r.loading,contentRef:p,sentinelRef:h,search:f,handleOpenChange:z}},oe=t=>{let s=useLocaleContext();return t.query.trim()?jsx(a$1,{size:"sm",variant:"not-found",...t.emptyState}):jsx(a$1,{size:"sm",...t.emptyState,variant:"empty",title:P(s.locale).noData,description:""})},ne=()=>{let t=useLocaleContext();return jsxs("div",{role:"status",className:"font-inter flex items-center justify-center gap-3 px-3 py-4 text-sm font-medium text-neutral-900",children:[jsx(c,{size:"md"}),P(t.locale).loading]})};export{k as a,F as b,te as c,oe as d,ne as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-734IEMNP.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var s={md:"h-(--height-input-md)",lg:"h-(--height-input)"},p=({size:i=b,className:r})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",r),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(s[i],"w-full rounded-lg")})]});export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-FGCLFX33.js';import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var i={md:"h-(--height-input-md)",lg:"h-(--height-input)"},n=({size:m=b,className:p})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",p),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(i[m],"w-full rounded-lg")})]});export{n as a};
|
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
import { L as LabelOptions } from '../label-9gkh212G.js';
|
|
4
4
|
import { EmptyStateOverrides } from './empty-state.js';
|
|
5
|
+
import { A as AutocompleteLoad } from '../use-autocomplete-options-Bu6wJH2i.js';
|
|
5
6
|
import 'tailwind-variants';
|
|
6
7
|
import './button.js';
|
|
7
8
|
import 'lucide-react';
|
|
@@ -13,17 +14,6 @@ type AutocompleteMultipleOption<T extends string | number = string> = {
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
description?: string;
|
|
15
16
|
};
|
|
16
|
-
type AutocompleteLoadParams = {
|
|
17
|
-
query: string;
|
|
18
|
-
page: number;
|
|
19
|
-
pageSize: number;
|
|
20
|
-
signal: AbortSignal | undefined;
|
|
21
|
-
};
|
|
22
|
-
type AutocompleteLoadResult<O> = {
|
|
23
|
-
options: O[];
|
|
24
|
-
hasMore: boolean;
|
|
25
|
-
};
|
|
26
|
-
type AutocompleteLoad<O> = (params: AutocompleteLoadParams) => Promise<AutocompleteLoadResult<O>>;
|
|
27
17
|
type AutocompleteMultipleBaseProps<T extends string | number = string> = {
|
|
28
18
|
label: string;
|
|
29
19
|
labelProps?: LabelOptions;
|
|
@@ -54,4 +44,4 @@ declare const AutocompleteMultiple: {
|
|
|
54
44
|
displayName: string;
|
|
55
45
|
};
|
|
56
46
|
|
|
57
|
-
export {
|
|
47
|
+
export { AutocompleteMultiple, type AutocompleteMultipleBaseProps, type AutocompleteMultipleOption, type AutocompleteMultipleProps, type AutocompleteMultipleSource };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as AutocompleteMultiple}from'../chunk-
|
|
1
|
+
export{a as AutocompleteMultiple}from'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { AutocompleteSize } from './autocomplete.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import '@ark-ui/react/combobox';
|
|
5
4
|
import '../input-field-size-ZaYx46-q.js';
|
|
6
5
|
import '../label-9gkh212G.js';
|
|
7
6
|
import 'tailwind-variants';
|
|
@@ -10,6 +9,7 @@ import 'lucide-react';
|
|
|
10
9
|
import './empty-state.js';
|
|
11
10
|
import './button.js';
|
|
12
11
|
import './badge-number.js';
|
|
12
|
+
import '../use-autocomplete-options-Bu6wJH2i.js';
|
|
13
13
|
|
|
14
14
|
type AutocompleteSkeletonProps = {
|
|
15
15
|
size?: AutocompleteSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as AutocompleteSkeleton}from'../chunk-
|
|
1
|
+
export{a as AutocompleteSkeleton}from'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-KTD2GEB6.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { UseComboboxProps } from '@ark-ui/react/combobox';
|
|
3
2
|
import { HTMLAttributes } from 'react';
|
|
4
3
|
import { I as InputFieldSize } from '../input-field-size-ZaYx46-q.js';
|
|
5
4
|
import { L as LabelOptions } from '../label-9gkh212G.js';
|
|
6
5
|
import { BadgeExpandableProps } from './badge-expandable.js';
|
|
7
6
|
import { EmptyStateOverrides } from './empty-state.js';
|
|
7
|
+
import { A as AutocompleteLoad } from '../use-autocomplete-options-Bu6wJH2i.js';
|
|
8
|
+
export { a as AutocompleteLoadParams, b as AutocompleteLoadResult } from '../use-autocomplete-options-Bu6wJH2i.js';
|
|
8
9
|
import 'tailwind-variants';
|
|
9
10
|
import 'lucide-react';
|
|
10
11
|
import './button.js';
|
|
@@ -19,31 +20,32 @@ type AutocompleteOption<T extends string | number = string> = {
|
|
|
19
20
|
value: T;
|
|
20
21
|
badgeExpandable?: Omit<BadgeExpandableProps, "size">;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
type AutocompleteValue<T extends string | number = string> = T | AutocompleteOption<T>;
|
|
24
|
-
type AutocompleteProps<T extends string | number = string> = Omit<UseComboboxProps<AutocompleteOption<T>>, "collection" | "onInputValueChange" | "defaultValue" | "onSelect" | "multiple" | "value"> & {
|
|
23
|
+
type AutocompleteBaseProps<T extends string | number = string> = {
|
|
25
24
|
label: string;
|
|
26
25
|
labelProps?: LabelOptions;
|
|
26
|
+
value: AutocompleteOption<T> | null;
|
|
27
|
+
onValueChange: (option: AutocompleteOption<T> | null) => void;
|
|
28
|
+
placeholder?: string;
|
|
27
29
|
required?: boolean;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
readOnly?: boolean;
|
|
28
32
|
error?: boolean;
|
|
29
|
-
options: AutocompleteOption<T>[];
|
|
30
|
-
onInputValueChange?: (value: string) => void;
|
|
31
|
-
onSelect?: (value: AutocompleteOption<T> | null) => void;
|
|
32
|
-
defaultValue?: T;
|
|
33
33
|
helperText?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Raw value or full option. Pass the option when the selection may not be in
|
|
36
|
-
* `options` (server-side search) so its label still resolves. Keep it
|
|
37
|
-
* referentially stable (RHF field values are).
|
|
38
|
-
*/
|
|
39
|
-
value?: AutocompleteValue<T>;
|
|
40
34
|
size?: AutocompleteSize;
|
|
41
|
-
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
42
35
|
emptyState?: EmptyStateOverrides;
|
|
36
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
37
|
+
};
|
|
38
|
+
type AutocompleteSource<T extends string | number = string> = {
|
|
39
|
+
options: AutocompleteOption<T>[];
|
|
40
|
+
load?: never;
|
|
41
|
+
} | {
|
|
42
|
+
load: AutocompleteLoad<AutocompleteOption<T>>;
|
|
43
|
+
options?: never;
|
|
43
44
|
};
|
|
45
|
+
type AutocompleteProps<T extends string | number = string> = AutocompleteBaseProps<T> & AutocompleteSource<T>;
|
|
44
46
|
declare const Autocomplete: {
|
|
45
47
|
<T extends string | number = string>(props: AutocompleteProps<T>): react_jsx_runtime.JSX.Element;
|
|
46
48
|
displayName: string;
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
export { Autocomplete, type AutocompleteOption, type AutocompleteProps, type AutocompleteSize, AutocompleteSizeDefault, AutocompleteSizes, type
|
|
51
|
+
export { Autocomplete, type AutocompleteBaseProps, AutocompleteLoad, type AutocompleteOption, type AutocompleteProps, type AutocompleteSize, AutocompleteSizeDefault, AutocompleteSizes, type AutocompleteSource };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as Autocomplete,b as AutocompleteSizeDefault,a as AutocompleteSizes}from'../chunk-
|
|
1
|
+
export{c as Autocomplete,b as AutocompleteSizeDefault,a as AutocompleteSizes}from'../chunk-FGCLFX33.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -60,10 +60,10 @@ export { DatePickerPopover, DatePickerPopoverContentProps, DatePickerPopoverRoot
|
|
|
60
60
|
export { TimePicker, TimePickerProps } from './time-picker.js';
|
|
61
61
|
export { CardForm, CardFormBody, CardFormFooter, CardFormHeader, CardFormProps } from './card-form.js';
|
|
62
62
|
export { TextField, TextFieldProps } from './text-field.js';
|
|
63
|
-
export { Autocomplete, AutocompleteOption, AutocompleteProps, AutocompleteSize, AutocompleteSizeDefault, AutocompleteSizes,
|
|
63
|
+
export { Autocomplete, AutocompleteBaseProps, AutocompleteOption, AutocompleteProps, AutocompleteSize, AutocompleteSizeDefault, AutocompleteSizes, AutocompleteSource } from './autocomplete.js';
|
|
64
64
|
export { AutocompleteSkeleton, AutocompleteSkeletonProps } from './autocomplete-skeleton.js';
|
|
65
65
|
export { ListItemCheckboxLeft, ListItemCheckboxLeftProps } from './list-item-checkbox-left.js';
|
|
66
|
-
export { Select, SelectOption, SelectProps, SelectSize, SelectSizeDefault, SelectSizes, SelectValue } from './select.js';
|
|
66
|
+
export { Select, SelectLoad, SelectLoadParams, SelectLoadResult, SelectOption, SelectProps, SelectSize, SelectSizeDefault, SelectSizes, SelectValue } from './select.js';
|
|
67
67
|
export { SelectSkeleton, SelectSkeletonProps } from './select-skeleton.js';
|
|
68
68
|
export { ChipExpandable, ChipExpandableProps, ChipExpandableTypeType, ChipExpandableTypes, ChipExpandableVariantType, ChipExpandableVariants } from './chip-expandable.js';
|
|
69
69
|
export { Carousel, Carousel as CarouselComponent, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselViewport } from './carousel.js';
|
|
@@ -87,7 +87,7 @@ export { ButtonMenu, ButtonMenuOption, ButtonMenuProps, ButtonMenuSize, ButtonMe
|
|
|
87
87
|
import * as react_phone_number_input from 'react-phone-number-input';
|
|
88
88
|
import { Props, Value } from 'react-phone-number-input';
|
|
89
89
|
export { PhoneInputSkeleton, PhoneInputSkeletonProps } from './phone-input-skeleton.js';
|
|
90
|
-
export {
|
|
90
|
+
export { AutocompleteMultiple, AutocompleteMultipleBaseProps, AutocompleteMultipleOption, AutocompleteMultipleProps, AutocompleteMultipleSource } from './autocomplete-multiple.js';
|
|
91
91
|
export { EmptyState, EmptyStateAction, EmptyStateActions, EmptyStateOverrides, EmptyStateProps } from './empty-state.js';
|
|
92
92
|
export { AutocompleteMultipleSkeleton, AutocompleteMultipleSkeletonProps } from './autocomplete-multiple-skeleton.js';
|
|
93
93
|
export { Chip, ChipDefaults, ChipProps, ChipSizes, ChipTones, ChipVariants } from './chip.js';
|
|
@@ -101,6 +101,7 @@ export { NoteCard, NoteCardActionButtonProps, NoteCardAttachmentsBadgeProps, Not
|
|
|
101
101
|
export { AttachmentCard, AttachmentCardActionButtonProps, AttachmentCardAuthorProps, AttachmentCardBodyFileProps, AttachmentCardDateProps, AttachmentCardReferenceAddButtonProps, AttachmentCardReferenceBadgeProps, AttachmentCardReferenceProps } from './attachment-card.js';
|
|
102
102
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
103
103
|
export { AccordionPrimitive };
|
|
104
|
+
export { A as AutocompleteLoad, a as AutocompleteLoadParams, b as AutocompleteLoadResult } from '../use-autocomplete-options-Bu6wJH2i.js';
|
|
104
105
|
export { CarouselControlProps, CarouselIndicatorGroupProps, CarouselIndicatorProps, CarouselItemGroupProps, CarouselItemProps, CarouselNextTriggerProps, CarouselPrevTriggerProps, CarouselRootProps } from '@ark-ui/react/carousel';
|
|
105
106
|
export { OnChangeFn, RowSelectionState } from '@tanstack/react-table';
|
|
106
107
|
import 'tailwind-variants';
|
|
@@ -129,7 +130,6 @@ import '@ark-ui/react/collapsible';
|
|
|
129
130
|
import '@ark-ui/react/date-picker';
|
|
130
131
|
import '@ark-ui/react/select';
|
|
131
132
|
import '@ark-ui/react/field';
|
|
132
|
-
import '@ark-ui/react/combobox';
|
|
133
133
|
import '@ark-ui/react/signature-pad';
|
|
134
134
|
import './step-item.js';
|
|
135
135
|
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as AutocompleteMultiple_old,a as Autocomplete_old,f as IdField,c as ListItemArrow,g as ListItemButton,d as ListItemCheckbox,h as ListItemCheckboxLeft,b as ListItem_old,o as PhoneInput,n as RichTextEditor,m as convertHtmlToQuillCompatible,j as defaultToolbarConfig,i as lexicalTheme,k as normalizeHtmlForComparison,l as normalizeQuillHtmlForLexical}from'../chunk-
|
|
1
|
+
export{e as AutocompleteMultiple_old,a as Autocomplete_old,f as IdField,c as ListItemArrow,g as ListItemButton,d as ListItemCheckbox,h as ListItemCheckboxLeft,b as ListItem_old,o as PhoneInput,n as RichTextEditor,m as convertHtmlToQuillCompatible,j as defaultToolbarConfig,i as lexicalTheme,k as normalizeHtmlForComparison,l as normalizeQuillHtmlForLexical}from'../chunk-5KOFK3Q6.js';export{a as Textarea}from'../chunk-T3ITXF7W.js';export{a as TextareaSizes_old,b as Textarea_old}from'../chunk-SIA2GA6D.js';export{a as TimePicker}from'../chunk-IYOPH2ON.js';export{a as ToastTypes,c as Toaster,b as toast}from'../chunk-4HMXOGWD.js';export{e as TrackerItem,c as TrackerItemExpandableContent,d as TrackerItemFooter,b as TrackerItemHeader,a as useTrackerItem}from'../chunk-VIL6Q52L.js';export{c as getSelectedCount,b as getSelectedIds,a as syncSelectionDataMap,d as useRowSelectionWithData}from'../chunk-ABJHG7HB.js';export{b as SnackbarProvider,a as snackbar}from'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';export{a as Tabs,d as TabsContent,b as TabsList,c as TabsTrigger}from'../chunk-DBZ37DYH.js';export{a as TextField}from'../chunk-M46RFBDO.js';export{a as ScrollArea,b as ScrollBar}from'../chunk-5T72Q62I.js';export{a as SelectSkeleton}from'../chunk-OOX7ZNVZ.js';export{a as Select_old}from'../chunk-G7NJYNJA.js';export{c as Sidebar,e as SidebarBody,f as SidebarFooter,d as SidebarHeader,b as SidebarProvider,a as useSidebar}from'../chunk-NZLSLBBQ.js';export{a as SignaturePad}from'../chunk-Q4Z47CXE.js';export{a as NumberFieldSkeleton}from'../chunk-P5FV5ZGY.js';export{a as PassiveTabs}from'../chunk-POX4ARAQ.js';export{a as PhoneInputSkeleton}from'../chunk-FURFUBTJ.js';export{c as PopoverContent_old,b as PopoverTrigger_old,a as Popover_old}from'../chunk-XNBXUXHQ.js';export{b as Rating,a as RatingSizes}from'../chunk-XVDM35UV.js';export{e as MultiSelectChips,d as MultiSelectChipsDefaults,a as MultiSelectChipsOrientations,c as MultiSelectChipsSizes,b as MultiSelectChipsTones}from'../chunk-K35H5VYN.js';export{a as NoteCard}from'../chunk-AIRQLXLO.js';export{c as Dropzone,a as DropzoneAcceptedFileTypes,b as DropzoneSizes}from'../chunk-UBTRI4EA.js';export{a as ERROR_SCREEN_VARIANTS,b as ErrorScreen}from'../chunk-QSHMX35F.js';export{a as DataTable}from'../chunk-PM7QTMJU.js';export{b as Table,d as TableBody,e as TableBodyRow,i as TableCell,a as TableContainer,h as TableHead,c as TableHeader,g as TableHeaderRow,f as TableNoResults,j as TablePagination}from'../chunk-3OGZGSJ2.js';export{a as Popover,c as PopoverContent,b as PopoverTrigger}from'../chunk-UYRGKELU.js';export{a as DatePickerPopover}from'../chunk-YLRL7MNJ.js';export{a as DatePicker}from'../chunk-M5GLIXO2.js';export{b as DatePicker_old}from'../chunk-QX4D2CU2.js';export{a as TextField_old}from'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';export{a as Dialog,i as DialogActionButton,f as DialogBody,j as DialogCloseButton,c as DialogContent,h as DialogDescription,k as DialogExtraButton,e as DialogFooter,d as DialogHeader,g as DialogTitle,b as DialogTrigger}from'../chunk-JBG5YAQX.js';export{a as DrawerBar}from'../chunk-7ZPFUDVQ.js';export{b as SearchBar,a as SearchBarSizeOptions}from'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';export{c as ChipStatusComplementary,b as ChipStatusComplementarySizes,a as ChipStatusComplementaryVariants}from'../chunk-AUMOOT6L.js';export{a as ChipStatusTable}from'../chunk-Y73ZUBRE.js';export{c as ChoiceChips,a as ChoiceChipsOrientations,b as disableUnselected}from'../chunk-WPF6FUFA.js';export{e as Chip,d as ChipDefaults,c as ChipSizes,b as ChipTones,a as ChipVariants}from'../chunk-GHNJWQTI.js';export{c as ID_COUNTRY_CODES,b as ISO_COUNTRY_CODES,f as IdCountryEnum,d as IsoCountryEnum,a as PHONE_COUNTRY_CODES,e as PhoneCountryEnum,i as isIdCountryCode,g as isIsoCountryCode,h as isPhoneCountryCode}from'../chunk-XRFPQJ5P.js';export{a as CountryFlag}from'../chunk-B5KKVXLE.js';export{d as CardExpandable,b as CardExpandableContent,c as CardExpandableFixedContent,a as CardExpandableHeader}from'../chunk-VB5Q6KYT.js';export{a as CardForm,c as CardFormBody,d as CardFormFooter,b as CardFormHeader}from'../chunk-XMFUZYZU.js';export{j as Carousel,j as CarouselComponent,b as CarouselControl,f as CarouselIndicator,e as CarouselIndicatorGroup,h as CarouselItem,g as CarouselItemGroup,d as CarouselNextTrigger,c as CarouselPrevTrigger,a as CarouselRoot,i as CarouselViewport}from'../chunk-DHFR2KLQ.js';export{d as ChipContext,c as ChipContextColors,b as ChipContextSizes,a as ChipContextVariants}from'../chunk-JA7GAJ6P.js';export{c as ChipExpandable,b as ChipExpandableTypes,a as ChipExpandableVariants}from'../chunk-JYNJHAGL.js';export{c as ChipFormComplementary,a as ChipFormComplementaryVariants,b as ChipFormComplementaryVariantsClassNames}from'../chunk-QONM4Q4J.js';export{d as ChipForm,c as ChipFormSizes,b as ChipFormTypes,a as ChipFormVariants}from'../chunk-3HZUH4JJ.js';export{d as ButtonActive,a as ButtonActiveSizes,c as ButtonActiveTones,b as ButtonActiveVariants}from'../chunk-EOB3AQZ2.js';export{d as ButtonMenu,a as ButtonMenuSizes,c as ButtonMenuTones,b as ButtonMenuWeights}from'../chunk-YCNBKZGC.js';export{a as Menu}from'../chunk-BSBPGWCQ.js';export{b as ListItem,a as useListItemDisabled}from'../chunk-ZYFA5BA3.js';export{a as NumberField}from'../chunk-JGFWDCSB.js';export{d as Calendar,a as CalendarProvider,c as parseDate,b as useCalendar}from'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';export{a as Calendar_old}from'../chunk-H2ANC6ZE.js';export{a as BadgeCategorySkeleton}from'../chunk-RQQJYDAY.js';export{a as BadgeExpandableSkeleton}from'../chunk-DL3P7FK4.js';export{a as BadgeStatusSkeleton}from'../chunk-PIMSGQMD.js';export{a as BadgeStatus}from'../chunk-UIZFLYFP.js';export{a as AttachmentCard}from'../chunk-673LITHP.js';export{a as AutocompleteMultipleSkeleton}from'../chunk-N6BWYHOE.js';export{a as AutocompleteMultiple}from'../chunk-GOQXRKKT.js';export{d as ChipInput,b as ChipInputColors,a as ChipInputSizes,c as ChipInputVariants}from'../chunk-WAUY2MS6.js';export{a as AutocompleteSkeleton}from'../chunk-TVAUTXNN.js';export{c as Autocomplete,b as AutocompleteSizeDefault,a as AutocompleteSizes}from'../chunk-FGCLFX33.js';export{a as AvatarSkeleton}from'../chunk-OKBI6IIW.js';export{a as Skeleton}from'../chunk-KTD2GEB6.js';export{c as Avatar,a as AvatarSizes,b as avatarStyles}from'../chunk-QQM4FVO7.js';export{c as BadgeAlert,a as BadgeAlertSizes,b as BadgeAlertStatuses}from'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';export{c as Select,b as SelectSizeDefault,a as SelectSizes}from'../chunk-734IEMNP.js';export{a as Drawer,g as DrawerBody,h as DrawerCloseTrigger,d as DrawerContent,f as DrawerFooter,e as DrawerHeader,c as DrawerSizes,b as DrawerTrigger}from'../chunk-XIJ2XBQF.js';export{c as RadioGroup,d as RadioGroupItem,a as RadioGroupOrientation,b as radioStyles}from'../chunk-4CAN7PGG.js';export{d as CardBasic,b as CardBasicBody,c as CardBasicFooter,a as CardBasicHeader}from'../chunk-CVYZS7KS.js';export{d as Switch,a as SwitchSizes,b as SwitchTypes,c as SwitchVariants}from'../chunk-7JM2X4UD.js';export{c as Checkbox,a as CheckboxCheckedStates,b as checkboxStyles}from'../chunk-FYB3QRNL.js';export{d as BadgeCategory,a as BadgeCategoryColors,c as BadgeCategorySizes,b as BadgeCategoryVariants}from'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';export{a as BadgeExpandable}from'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';export{a as EmptyState}from'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';export{f as FormLabel,e as FormLabelSizes,d as FormLabelVariants,c as Label,b as LabelSizes,a as LabelVariants}from'../chunk-QZUQ6AZK.js';export{a as Tooltip}from'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';export{b as AccordionForm,e as AccordionFormContent,c as AccordionFormItem,a as AccordionFormSizes,d as AccordionFormTrigger}from'../chunk-OUDUDDZO.js';export{c as Accordion,g as AccordionContent,d as AccordionItem,a as AccordionPrimitive,b as AccordionSizes,f as AccordionTrigger,e as AccordionTriggerEmpty}from'../chunk-JV7WH6MZ.js';export{d as ChipStatus,b as ChipStatusSizes,c as ChipStatusTypes,a as ChipStatusVariants}from'../chunk-MP4CHZ2K.js';export{a as Badge}from'../chunk-R6NIURLZ.js';export{a as AlertDialog,f as AlertDialogActionButton,m as AlertDialogBody,g as AlertDialogCloseButton,e as AlertDialogContent,l as AlertDialogDescription,h as AlertDialogExtraButton,j as AlertDialogFooter,i as AlertDialogHeader,d as AlertDialogOverlay,c as AlertDialogPortal,k as AlertDialogTitle,b as AlertDialogTrigger}from'../chunk-4N7H55OU.js';export{a as Divider,b as Separator}from'../chunk-AWRP67K4.js';export{c as AlertMessage,b as AlertMessageSizes,a as AlertMessageVariants}from'../chunk-L5SK3BA5.js';export{e as IconButton,d as IconButtonShapes,a as IconButtonSizes,c as IconButtonTones,b as IconButtonVariants}from'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';export{e as Button,a as ButtonSizes,c as ButtonTones,b as ButtonVariants,d as buttonStyles}from'../chunk-Y3ZZYSKX.js';export{c as Spinner,a as SpinnerSizes,b as SpinnerTones}from'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';export{a as BadgeNumber}from'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as ListItemArrow}from'../chunk-
|
|
1
|
+
export{c as ListItemArrow}from'../chunk-5KOFK3Q6.js';import'../chunk-T3ITXF7W.js';import'../chunk-SIA2GA6D.js';import'../chunk-IYOPH2ON.js';import'../chunk-4HMXOGWD.js';import'../chunk-VIL6Q52L.js';import'../chunk-ABJHG7HB.js';import'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';import'../chunk-DBZ37DYH.js';import'../chunk-M46RFBDO.js';import'../chunk-5T72Q62I.js';import'../chunk-OOX7ZNVZ.js';import'../chunk-G7NJYNJA.js';import'../chunk-NZLSLBBQ.js';import'../chunk-Q4Z47CXE.js';import'../chunk-P5FV5ZGY.js';import'../chunk-POX4ARAQ.js';import'../chunk-FURFUBTJ.js';import'../chunk-XNBXUXHQ.js';import'../chunk-XVDM35UV.js';import'../chunk-K35H5VYN.js';import'../chunk-AIRQLXLO.js';import'../chunk-UBTRI4EA.js';import'../chunk-QSHMX35F.js';import'../chunk-PM7QTMJU.js';import'../chunk-3OGZGSJ2.js';import'../chunk-UYRGKELU.js';import'../chunk-YLRL7MNJ.js';import'../chunk-M5GLIXO2.js';import'../chunk-QX4D2CU2.js';import'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';import'../chunk-JBG5YAQX.js';import'../chunk-7ZPFUDVQ.js';import'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';import'../chunk-AUMOOT6L.js';import'../chunk-Y73ZUBRE.js';import'../chunk-WPF6FUFA.js';import'../chunk-GHNJWQTI.js';import'../chunk-XRFPQJ5P.js';import'../chunk-B5KKVXLE.js';import'../chunk-VB5Q6KYT.js';import'../chunk-XMFUZYZU.js';import'../chunk-DHFR2KLQ.js';import'../chunk-JA7GAJ6P.js';import'../chunk-JYNJHAGL.js';import'../chunk-QONM4Q4J.js';import'../chunk-3HZUH4JJ.js';import'../chunk-EOB3AQZ2.js';import'../chunk-YCNBKZGC.js';import'../chunk-BSBPGWCQ.js';import'../chunk-ZYFA5BA3.js';import'../chunk-JGFWDCSB.js';import'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';import'../chunk-H2ANC6ZE.js';import'../chunk-RQQJYDAY.js';import'../chunk-DL3P7FK4.js';import'../chunk-PIMSGQMD.js';import'../chunk-UIZFLYFP.js';import'../chunk-673LITHP.js';import'../chunk-N6BWYHOE.js';import'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-OKBI6IIW.js';import'../chunk-KTD2GEB6.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';import'../chunk-734IEMNP.js';import'../chunk-XIJ2XBQF.js';import'../chunk-4CAN7PGG.js';import'../chunk-CVYZS7KS.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';import'../chunk-OUDUDDZO.js';import'../chunk-JV7WH6MZ.js';import'../chunk-MP4CHZ2K.js';import'../chunk-R6NIURLZ.js';import'../chunk-4N7H55OU.js';import'../chunk-AWRP67K4.js';import'../chunk-L5SK3BA5.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as ListItemButton}from'../chunk-
|
|
1
|
+
export{g as ListItemButton}from'../chunk-5KOFK3Q6.js';import'../chunk-T3ITXF7W.js';import'../chunk-SIA2GA6D.js';import'../chunk-IYOPH2ON.js';import'../chunk-4HMXOGWD.js';import'../chunk-VIL6Q52L.js';import'../chunk-ABJHG7HB.js';import'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';import'../chunk-DBZ37DYH.js';import'../chunk-M46RFBDO.js';import'../chunk-5T72Q62I.js';import'../chunk-OOX7ZNVZ.js';import'../chunk-G7NJYNJA.js';import'../chunk-NZLSLBBQ.js';import'../chunk-Q4Z47CXE.js';import'../chunk-P5FV5ZGY.js';import'../chunk-POX4ARAQ.js';import'../chunk-FURFUBTJ.js';import'../chunk-XNBXUXHQ.js';import'../chunk-XVDM35UV.js';import'../chunk-K35H5VYN.js';import'../chunk-AIRQLXLO.js';import'../chunk-UBTRI4EA.js';import'../chunk-QSHMX35F.js';import'../chunk-PM7QTMJU.js';import'../chunk-3OGZGSJ2.js';import'../chunk-UYRGKELU.js';import'../chunk-YLRL7MNJ.js';import'../chunk-M5GLIXO2.js';import'../chunk-QX4D2CU2.js';import'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';import'../chunk-JBG5YAQX.js';import'../chunk-7ZPFUDVQ.js';import'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';import'../chunk-AUMOOT6L.js';import'../chunk-Y73ZUBRE.js';import'../chunk-WPF6FUFA.js';import'../chunk-GHNJWQTI.js';import'../chunk-XRFPQJ5P.js';import'../chunk-B5KKVXLE.js';import'../chunk-VB5Q6KYT.js';import'../chunk-XMFUZYZU.js';import'../chunk-DHFR2KLQ.js';import'../chunk-JA7GAJ6P.js';import'../chunk-JYNJHAGL.js';import'../chunk-QONM4Q4J.js';import'../chunk-3HZUH4JJ.js';import'../chunk-EOB3AQZ2.js';import'../chunk-YCNBKZGC.js';import'../chunk-BSBPGWCQ.js';import'../chunk-ZYFA5BA3.js';import'../chunk-JGFWDCSB.js';import'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';import'../chunk-H2ANC6ZE.js';import'../chunk-RQQJYDAY.js';import'../chunk-DL3P7FK4.js';import'../chunk-PIMSGQMD.js';import'../chunk-UIZFLYFP.js';import'../chunk-673LITHP.js';import'../chunk-N6BWYHOE.js';import'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-OKBI6IIW.js';import'../chunk-KTD2GEB6.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';import'../chunk-734IEMNP.js';import'../chunk-XIJ2XBQF.js';import'../chunk-4CAN7PGG.js';import'../chunk-CVYZS7KS.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';import'../chunk-OUDUDDZO.js';import'../chunk-JV7WH6MZ.js';import'../chunk-MP4CHZ2K.js';import'../chunk-R6NIURLZ.js';import'../chunk-4N7H55OU.js';import'../chunk-AWRP67K4.js';import'../chunk-L5SK3BA5.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{h as ListItemCheckboxLeft}from'../chunk-
|
|
1
|
+
export{h as ListItemCheckboxLeft}from'../chunk-5KOFK3Q6.js';import'../chunk-T3ITXF7W.js';import'../chunk-SIA2GA6D.js';import'../chunk-IYOPH2ON.js';import'../chunk-4HMXOGWD.js';import'../chunk-VIL6Q52L.js';import'../chunk-ABJHG7HB.js';import'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';import'../chunk-DBZ37DYH.js';import'../chunk-M46RFBDO.js';import'../chunk-5T72Q62I.js';import'../chunk-OOX7ZNVZ.js';import'../chunk-G7NJYNJA.js';import'../chunk-NZLSLBBQ.js';import'../chunk-Q4Z47CXE.js';import'../chunk-P5FV5ZGY.js';import'../chunk-POX4ARAQ.js';import'../chunk-FURFUBTJ.js';import'../chunk-XNBXUXHQ.js';import'../chunk-XVDM35UV.js';import'../chunk-K35H5VYN.js';import'../chunk-AIRQLXLO.js';import'../chunk-UBTRI4EA.js';import'../chunk-QSHMX35F.js';import'../chunk-PM7QTMJU.js';import'../chunk-3OGZGSJ2.js';import'../chunk-UYRGKELU.js';import'../chunk-YLRL7MNJ.js';import'../chunk-M5GLIXO2.js';import'../chunk-QX4D2CU2.js';import'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';import'../chunk-JBG5YAQX.js';import'../chunk-7ZPFUDVQ.js';import'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';import'../chunk-AUMOOT6L.js';import'../chunk-Y73ZUBRE.js';import'../chunk-WPF6FUFA.js';import'../chunk-GHNJWQTI.js';import'../chunk-XRFPQJ5P.js';import'../chunk-B5KKVXLE.js';import'../chunk-VB5Q6KYT.js';import'../chunk-XMFUZYZU.js';import'../chunk-DHFR2KLQ.js';import'../chunk-JA7GAJ6P.js';import'../chunk-JYNJHAGL.js';import'../chunk-QONM4Q4J.js';import'../chunk-3HZUH4JJ.js';import'../chunk-EOB3AQZ2.js';import'../chunk-YCNBKZGC.js';import'../chunk-BSBPGWCQ.js';import'../chunk-ZYFA5BA3.js';import'../chunk-JGFWDCSB.js';import'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';import'../chunk-H2ANC6ZE.js';import'../chunk-RQQJYDAY.js';import'../chunk-DL3P7FK4.js';import'../chunk-PIMSGQMD.js';import'../chunk-UIZFLYFP.js';import'../chunk-673LITHP.js';import'../chunk-N6BWYHOE.js';import'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-OKBI6IIW.js';import'../chunk-KTD2GEB6.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';import'../chunk-734IEMNP.js';import'../chunk-XIJ2XBQF.js';import'../chunk-4CAN7PGG.js';import'../chunk-CVYZS7KS.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';import'../chunk-OUDUDDZO.js';import'../chunk-JV7WH6MZ.js';import'../chunk-MP4CHZ2K.js';import'../chunk-R6NIURLZ.js';import'../chunk-4N7H55OU.js';import'../chunk-AWRP67K4.js';import'../chunk-L5SK3BA5.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as ListItemCheckbox}from'../chunk-
|
|
1
|
+
export{d as ListItemCheckbox}from'../chunk-5KOFK3Q6.js';import'../chunk-T3ITXF7W.js';import'../chunk-SIA2GA6D.js';import'../chunk-IYOPH2ON.js';import'../chunk-4HMXOGWD.js';import'../chunk-VIL6Q52L.js';import'../chunk-ABJHG7HB.js';import'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';import'../chunk-DBZ37DYH.js';import'../chunk-M46RFBDO.js';import'../chunk-5T72Q62I.js';import'../chunk-OOX7ZNVZ.js';import'../chunk-G7NJYNJA.js';import'../chunk-NZLSLBBQ.js';import'../chunk-Q4Z47CXE.js';import'../chunk-P5FV5ZGY.js';import'../chunk-POX4ARAQ.js';import'../chunk-FURFUBTJ.js';import'../chunk-XNBXUXHQ.js';import'../chunk-XVDM35UV.js';import'../chunk-K35H5VYN.js';import'../chunk-AIRQLXLO.js';import'../chunk-UBTRI4EA.js';import'../chunk-QSHMX35F.js';import'../chunk-PM7QTMJU.js';import'../chunk-3OGZGSJ2.js';import'../chunk-UYRGKELU.js';import'../chunk-YLRL7MNJ.js';import'../chunk-M5GLIXO2.js';import'../chunk-QX4D2CU2.js';import'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';import'../chunk-JBG5YAQX.js';import'../chunk-7ZPFUDVQ.js';import'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';import'../chunk-AUMOOT6L.js';import'../chunk-Y73ZUBRE.js';import'../chunk-WPF6FUFA.js';import'../chunk-GHNJWQTI.js';import'../chunk-XRFPQJ5P.js';import'../chunk-B5KKVXLE.js';import'../chunk-VB5Q6KYT.js';import'../chunk-XMFUZYZU.js';import'../chunk-DHFR2KLQ.js';import'../chunk-JA7GAJ6P.js';import'../chunk-JYNJHAGL.js';import'../chunk-QONM4Q4J.js';import'../chunk-3HZUH4JJ.js';import'../chunk-EOB3AQZ2.js';import'../chunk-YCNBKZGC.js';import'../chunk-BSBPGWCQ.js';import'../chunk-ZYFA5BA3.js';import'../chunk-JGFWDCSB.js';import'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';import'../chunk-H2ANC6ZE.js';import'../chunk-RQQJYDAY.js';import'../chunk-DL3P7FK4.js';import'../chunk-PIMSGQMD.js';import'../chunk-UIZFLYFP.js';import'../chunk-673LITHP.js';import'../chunk-N6BWYHOE.js';import'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-OKBI6IIW.js';import'../chunk-KTD2GEB6.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';import'../chunk-734IEMNP.js';import'../chunk-XIJ2XBQF.js';import'../chunk-4CAN7PGG.js';import'../chunk-CVYZS7KS.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';import'../chunk-OUDUDDZO.js';import'../chunk-JV7WH6MZ.js';import'../chunk-MP4CHZ2K.js';import'../chunk-R6NIURLZ.js';import'../chunk-4N7H55OU.js';import'../chunk-AWRP67K4.js';import'../chunk-L5SK3BA5.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as ListItem_old}from'../chunk-
|
|
1
|
+
export{b as ListItem_old}from'../chunk-5KOFK3Q6.js';import'../chunk-T3ITXF7W.js';import'../chunk-SIA2GA6D.js';import'../chunk-IYOPH2ON.js';import'../chunk-4HMXOGWD.js';import'../chunk-VIL6Q52L.js';import'../chunk-ABJHG7HB.js';import'../chunk-Q6MYROEY.js';import'../chunk-U6RH2BZO.js';import'../chunk-DBZ37DYH.js';import'../chunk-M46RFBDO.js';import'../chunk-5T72Q62I.js';import'../chunk-OOX7ZNVZ.js';import'../chunk-G7NJYNJA.js';import'../chunk-NZLSLBBQ.js';import'../chunk-Q4Z47CXE.js';import'../chunk-P5FV5ZGY.js';import'../chunk-POX4ARAQ.js';import'../chunk-FURFUBTJ.js';import'../chunk-XNBXUXHQ.js';import'../chunk-XVDM35UV.js';import'../chunk-K35H5VYN.js';import'../chunk-AIRQLXLO.js';import'../chunk-UBTRI4EA.js';import'../chunk-QSHMX35F.js';import'../chunk-PM7QTMJU.js';import'../chunk-3OGZGSJ2.js';import'../chunk-UYRGKELU.js';import'../chunk-YLRL7MNJ.js';import'../chunk-M5GLIXO2.js';import'../chunk-QX4D2CU2.js';import'../chunk-ORDWXBDZ.js';import'../chunk-T2Q6B32U.js';import'../chunk-JBG5YAQX.js';import'../chunk-7ZPFUDVQ.js';import'../chunk-XN6VHPJL.js';import'../chunk-W4C2Z52Z.js';import'../chunk-AUMOOT6L.js';import'../chunk-Y73ZUBRE.js';import'../chunk-WPF6FUFA.js';import'../chunk-GHNJWQTI.js';import'../chunk-XRFPQJ5P.js';import'../chunk-B5KKVXLE.js';import'../chunk-VB5Q6KYT.js';import'../chunk-XMFUZYZU.js';import'../chunk-DHFR2KLQ.js';import'../chunk-JA7GAJ6P.js';import'../chunk-JYNJHAGL.js';import'../chunk-QONM4Q4J.js';import'../chunk-3HZUH4JJ.js';import'../chunk-EOB3AQZ2.js';import'../chunk-YCNBKZGC.js';import'../chunk-BSBPGWCQ.js';import'../chunk-ZYFA5BA3.js';import'../chunk-JGFWDCSB.js';import'../chunk-FEPJ6ZVX.js';import'../chunk-S5L3GKMK.js';import'../chunk-H2ANC6ZE.js';import'../chunk-RQQJYDAY.js';import'../chunk-DL3P7FK4.js';import'../chunk-PIMSGQMD.js';import'../chunk-UIZFLYFP.js';import'../chunk-673LITHP.js';import'../chunk-N6BWYHOE.js';import'../chunk-GOQXRKKT.js';import'../chunk-WAUY2MS6.js';import'../chunk-TVAUTXNN.js';import'../chunk-FGCLFX33.js';import'../chunk-OKBI6IIW.js';import'../chunk-KTD2GEB6.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-VBHBIUWS.js';import'../chunk-NYURVOJI.js';import'../chunk-734IEMNP.js';import'../chunk-XIJ2XBQF.js';import'../chunk-4CAN7PGG.js';import'../chunk-CVYZS7KS.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-IEGZ6BLC.js';import'../chunk-GUPUXUDN.js';import'../chunk-OUDUDDZO.js';import'../chunk-JV7WH6MZ.js';import'../chunk-MP4CHZ2K.js';import'../chunk-R6NIURLZ.js';import'../chunk-4N7H55OU.js';import'../chunk-AWRP67K4.js';import'../chunk-L5SK3BA5.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -5,6 +5,10 @@ import '../input-field-size-ZaYx46-q.js';
|
|
|
5
5
|
import '../label-9gkh212G.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'tailwind-variants';
|
|
8
|
+
import './empty-state.js';
|
|
9
|
+
import './button.js';
|
|
10
|
+
import 'lucide-react';
|
|
11
|
+
import './badge-number.js';
|
|
8
12
|
|
|
9
13
|
type SelectSkeletonProps = {
|
|
10
14
|
size?: SelectSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SelectSkeleton}from'../chunk-
|
|
1
|
+
export{a as SelectSkeleton}from'../chunk-OOX7ZNVZ.js';import'../chunk-KTD2GEB6.js';import'../chunk-734IEMNP.js';import'../chunk-RBXMHWJQ.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
|
@@ -2,8 +2,12 @@ import { SelectRootProps } from '@ark-ui/react/select';
|
|
|
2
2
|
import { RefAttributes, ReactElement } from 'react';
|
|
3
3
|
import { I as InputFieldSize } from '../input-field-size-ZaYx46-q.js';
|
|
4
4
|
import { L as LabelOptions } from '../label-9gkh212G.js';
|
|
5
|
+
import { EmptyStateOverrides } from './empty-state.js';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
6
7
|
import 'tailwind-variants';
|
|
8
|
+
import './button.js';
|
|
9
|
+
import 'lucide-react';
|
|
10
|
+
import './badge-number.js';
|
|
7
11
|
|
|
8
12
|
declare const SelectSizes: readonly ["md", "lg"];
|
|
9
13
|
type SelectSize = InputFieldSize;
|
|
@@ -14,6 +18,16 @@ type SelectOption<T extends string | number = string> = {
|
|
|
14
18
|
};
|
|
15
19
|
/** Accepted `value`: a raw value, a full option, or `null` (see the `value` prop). */
|
|
16
20
|
type SelectValue<T extends string | number = string> = T | SelectOption<T> | null;
|
|
21
|
+
type SelectLoadParams = {
|
|
22
|
+
page: number;
|
|
23
|
+
pageSize: number;
|
|
24
|
+
signal: AbortSignal | undefined;
|
|
25
|
+
};
|
|
26
|
+
type SelectLoadResult<T extends string | number = string> = {
|
|
27
|
+
options: SelectOption<T>[];
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
};
|
|
30
|
+
type SelectLoad<T extends string | number = string> = (params: SelectLoadParams) => Promise<SelectLoadResult<T>>;
|
|
17
31
|
type SelectProps<T extends string | number = string> = {
|
|
18
32
|
label: string;
|
|
19
33
|
labelProps?: LabelOptions;
|
|
@@ -28,6 +42,7 @@ type SelectProps<T extends string | number = string> = {
|
|
|
28
42
|
isItemDisabled?: (item: SelectOption<T>) => boolean;
|
|
29
43
|
helperText?: string;
|
|
30
44
|
placeholder?: string;
|
|
45
|
+
emptyState?: EmptyStateOverrides;
|
|
31
46
|
/**
|
|
32
47
|
* Raw value or full option — pass the option so its label resolves even when
|
|
33
48
|
* it's not in `options`. Pair with `onSelect` (returns the full option) to
|
|
@@ -35,10 +50,15 @@ type SelectProps<T extends string | number = string> = {
|
|
|
35
50
|
*/
|
|
36
51
|
value?: SelectValue<T>;
|
|
37
52
|
defaultValue?: T | null;
|
|
38
|
-
options: SelectOption<T>[];
|
|
39
53
|
clearable?: boolean;
|
|
40
54
|
size?: SelectSize;
|
|
41
|
-
} & Omit<SelectRootProps<SelectOption<T>>, "collection" | "onValueChange" | "onSelect" | "value" | "defaultValue"
|
|
55
|
+
} & Omit<SelectRootProps<SelectOption<T>>, "collection" | "onValueChange" | "onSelect" | "value" | "defaultValue"> & ({
|
|
56
|
+
options: SelectOption<T>[];
|
|
57
|
+
load?: never;
|
|
58
|
+
} | {
|
|
59
|
+
load: SelectLoad<T>;
|
|
60
|
+
options?: never;
|
|
61
|
+
});
|
|
42
62
|
declare const Select: <T extends string | number = string>(props: SelectProps<T> & RefAttributes<HTMLDivElement>) => ReactElement;
|
|
43
63
|
|
|
44
|
-
export { Select, type SelectOption, type SelectProps, type SelectSize, SelectSizeDefault, SelectSizes, type SelectValue };
|
|
64
|
+
export { Select, type SelectLoad, type SelectLoadParams, type SelectLoadResult, type SelectOption, type SelectProps, type SelectSize, SelectSizeDefault, SelectSizes, type SelectValue };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as Select,b as SelectSizeDefault,a as SelectSizes}from'../chunk-
|
|
1
|
+
export{c as Select,b as SelectSizeDefault,a as SelectSizes}from'../chunk-734IEMNP.js';import'../chunk-RBXMHWJQ.js';import'../chunk-OLJ5WJMI.js';import'../chunk-MOFC3UHC.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-Y3ZZYSKX.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-WXHE4RLE.js';import'../chunk-OBZIYJO7.js';
|
package/dist/preferences.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-GJSFXPZK.js';import {a as a$2,d as d$1,e,g,f}from'./chunk-XIJ2XBQF.js';import {c as c$3}from'./chunk-4CAN7PGG.js';import {d as d$2,a as a$3,b as b$1,c as c$2}from'./chunk-CVYZS7KS.js';import'./chunk-7JM2X4UD.js';import'./chunk-FYB3QRNL.js';import'./chunk-YFDUDY6Y.js';import'./chunk-RBXMHWJQ.js';import'./chunk-TN46TEUP.js';import'./chunk-XYBXEU3T.js';import'./chunk-MQL3NZ6S.js';import'./chunk-VIMWKUML.js';import'./chunk-QZUQ6AZK.js';import'./chunk-MW7DL42Z.js';import {a as a$1}from'./chunk-VQRVOLEN.js';import {d}from'./chunk-IEGZ6BLC.js';export{e as PreferencesProvider,d as usePreferences}from'./chunk-IEGZ6BLC.js';import {a,b,d as d$3}from'./chunk-GUPUXUDN.js';export{b as FORMAT_REGIONS,d as NAVIGATION_LAYOUTS,c as THEME_IDS,a as UI_LANGUAGES,f as isFormatRegion,h as isNavigationLayout,g as isThemeId,e as isUiLanguage,i as isUiPreferences}from'./chunk-GUPUXUDN.js';import {c}from'./chunk-L5SK3BA5.js';import'./chunk-PI7DECIN.js';import'./chunk-QMPBFFFC.js';import'./chunk-ICF6RQIW.js';import'./chunk-HZYZAFW3.js';import {e as e$1}from'./chunk-Y3ZZYSKX.js';import'./chunk-C7TLKKPT.js';import'./chunk-CQI4KDR4.js';import'./chunk-WXHE4RLE.js';import {a as a$4}from'./chunk-OBZIYJO7.js';import {RadioGroupItem,RadioGroupItemControl,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {LanguagesIcon,PaletteIcon,LayoutDashboardIcon,CheckIcon}from'lucide-react';import {useState,useMemo,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var ce={en:{title:"Preferences",regionalSettings:"Language and region",language:"Language",formatRegion:"Country",appearance:"Appearance",navigationLayout:"Navigation",timeZone:"Time zone",formats:"Formats",themes:{blue:"Blue",green:"Green",indigo:"Indigo",purple:"Purple",red:"Red",black:"Black",sodtrack:"Sodtrack"},cancel:"Cancel",save:"Save",saveError:"Preferences could not be saved. Please try again."},es:{title:"Preferencias",regionalSettings:"Idioma y regi\xF3n",language:"Idioma",formatRegion:"Pa\xEDs",appearance:"Apariencia",navigationLayout:"Navegaci\xF3n",timeZone:"Huso horario",formats:"Formatos",themes:{blue:"Azul",green:"Verde",indigo:"\xCDndigo",purple:"Morado",red:"Rojo",black:"Negro",sodtrack:"Sodtrack"},cancel:"Cancelar",save:"Guardar",saveError:"No se pudieron guardar las preferencias. Int\xE9ntalo de nuevo."},pt:{title:"Prefer\xEAncias",regionalSettings:"Idioma e regi\xE3o",language:"Idioma",formatRegion:"Pa\xEDs",appearance:"Apar\xEAncia",navigationLayout:"Navega\xE7\xE3o",timeZone:"Fuso hor\xE1rio",formats:"Formatos",themes:{blue:"Azul",green:"Verde",indigo:"\xCDndigo",purple:"Roxo",red:"Vermelho",black:"Preto",sodtrack:"Sodtrack"},cancel:"Cancelar",save:"Salvar",saveError:"N\xE3o foi poss\xEDvel salvar as prefer\xEAncias. Tente novamente."}},Z=i=>ce[i];var Y=["sodtrack","black","red","green","blue","indigo","purple"],ve=(i,a)=>i.language===a.language&&i.formatRegion===a.formatRegion&&i.themeId===a.themeId&&i.navigationLayout===a.navigationLayout,P=(i,a,t)=>{if(!(a!==void 0&&t.includes(a)))throw new Error(`PreferencesDrawer received an unsupported ${i} value.`)},W=(i,a)=>i.charAt(0).toLocaleUpperCase(a)+i.slice(1),ye=({label:i,value:a,options:t,disabled:m,onChange:l})=>jsx(c$3,{value:a,disabled:m,onValueChange:o=>{let r=t.find(u=>u.value===o);r&&l(r.value);},"aria-label":i,innerClassName:"gap-4",children:t.map(o=>jsxs(RadioGroupItem,{value:o.value,"aria-label":o.label,title:o.label,className:"group/item rounded-full",children:[jsx(RadioGroupItemControl,{"data-theme":o.value,className:a$4("bg-primary-500 relative flex size-8 cursor-pointer items-center justify-center rounded-full border-2 border-neutral-50 ring-neutral-500 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-60","data-[state=checked]:ring-primary-500 data-[state=checked]:ring-2"),children:jsx(CheckIcon,{className:"size-3.5 text-neutral-50 opacity-0 group-data-[state=checked]/item:opacity-100",strokeWidth:3,"aria-hidden":"true"})}),jsx(RadioGroupItemHiddenInput,{})]},o.value))}),he=({layout:i})=>i==="vertical"?jsxs("div",{className:"flex h-full w-full flex-col",children:[jsx("div",{className:"flex shrink-0 gap-0.5 bg-neutral-100 px-1 py-0.5",children:Array.from({length:3},(a,t)=>t).map(a=>jsx("div",{className:"size-1 rounded-full bg-neutral-300"},a))}),jsxs("div",{className:"flex min-h-0 flex-1 items-stretch",children:[jsxs("div",{className:"bg-primary-300 w-1/5 self-stretch p-1",children:[jsx("div",{className:"bg-primary-100 h-1.5 w-full rounded-[0.0625rem]"}),jsx("div",{className:"bg-transparent-neutral-50-60 my-1 h-px w-full"}),jsx("div",{className:"flex flex-col gap-0.75",children:Array.from({length:7},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 h-1 w-full rounded-[0.0625rem]"},a))})]}),jsxs("div",{className:"flex w-4/5 flex-col gap-1 p-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:"h-3 w-1/2 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"mr-0.75 ml-auto h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"})]}),jsx("div",{className:"h-2.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-full rounded-[0.0625rem] bg-neutral-200"})]})]})]}):jsxs("div",{className:"flex h-full w-full flex-col",children:[jsx("div",{className:"flex shrink-0 gap-0.5 bg-neutral-100 px-1 py-0.5",children:Array.from({length:3},(a,t)=>t).map(a=>jsx("div",{className:"size-1 rounded-full bg-neutral-300"},a))}),jsxs("div",{className:"bg-primary-300 px-1.5 py-1",children:[jsxs("div",{className:"flex justify-between",children:[jsx("div",{className:"bg-primary-100 h-1.5 w-14/100 rounded-[0.0625rem]"}),jsx("div",{className:"bg-primary-100 size-1.5 rounded-full"})]}),jsx("div",{className:"bg-transparent-neutral-50-60 my-1 h-px w-full"}),jsxs("div",{className:"flex justify-between",children:[jsx("div",{className:"flex w-full gap-1",children:Array.from({length:7},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 h-1 w-9/100 rounded-[0.0625rem]"},a))}),jsx("div",{className:"flex gap-1",children:Array.from({length:2},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 size-1 rounded-[0.0625rem]"},a))})]})]}),jsxs("div",{className:"flex h-full flex-col gap-1 p-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:"h-3 w-1/2 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"mr-0.75 ml-auto h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"})]}),jsx("div",{className:"h-2.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-full rounded-[0.0625rem] bg-neutral-200"})]})]}),be=({value:i,options:a,disabled:t,onChange:m})=>jsx(c$3,{value:i,disabled:t,orientation:"horizontal",onValueChange:l=>{let o=a.find(r=>r===l);o&&m(o);},innerClassName:"grid w-full grid-cols-2 gap-3",children:a.map(l=>jsxs(RadioGroupItem,{value:l,className:"group/item min-w-0 rounded-lg outline-none",children:[jsx(RadioGroupItemControl,{className:a$4("relative h-27 w-full cursor-pointer overflow-hidden rounded-md outline-none","after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-400 after:content-['']","data-[state=checked]:after:border-primary-700 data-[state=checked]:after:border-3","data-disabled:cursor-not-allowed data-disabled:opacity-60"),children:jsx(he,{layout:l})}),jsx(RadioGroupItemHiddenInput,{})]},l))}),Ne=({open:i,onDismiss:a$4})=>{let{preferences:t,savePreferences:m}=d(),l=t.language,o=Z(l),[r,u]=useState(t),[d$4,T]=useState(false),[K,g$1]=useState(false),E=!ve(r,t),B=t.navigationLayout!==void 0,Q=useMemo(()=>{let n=new Intl.DisplayNames(l,{type:"language"});return a.map(c=>{let R=n.of(c)??c;return {value:c,label:W(R,l)}})},[l]),G=useMemo(()=>{let n=new Intl.DisplayNames(l,{type:"region"});return b.map(c=>{let R=n.of(c)??c;return {value:c,label:W(R,l)}})},[l]),X=Y.map(n=>({value:n,label:o.themes[n]}));P("language",r.language,a),P("formatRegion",r.formatRegion,b),P("themeId",r.themeId,Y),B&&P("navigationLayout",r.navigationLayout,d$3);let ee=G.find(n=>n.value===r.formatRegion)?.label??r.formatRegion,w=useMemo(()=>a$1({language:r.language,formatRegion:r.formatRegion}),[r.formatRegion,r.language]);useEffect(()=>{i||(u(t),g$1(false));},[i,t]);let p=n=>{u(n),g$1(false);},I=useCallback(()=>{d$4||(u(t),g$1(false),a$4());},[d$4,a$4,t]),ae=useCallback(n=>{n||I();},[I]),re=async()=>{if(!(!E||d$4)){T(true),g$1(false);try{await m(r),a$4();}catch{g$1(true);}finally{T(false);}}};return jsx(a$2,{open:i,onOpenChange:ae,children:jsxs(d$1,{size:"sm",className:"w-full max-w-[calc(100vw-1rem)] sm:max-w-117.5","aria-label":o.title,children:[jsx(e,{title:o.title}),jsxs(g,{className:"flex flex-col gap-3",children:[K&&jsx(c,{title:o.saveError,variant:"danger",hasCloseButton:false}),jsxs(d$2,{children:[jsx(a$3,{title:o.regionalSettings,leading:{type:"icon",Icon:LanguagesIcon}}),jsxs(b$1,{className:"gap-4.5",children:[jsx(c$1,{label:o.language,options:[...Q],value:r.language,clearable:false,disabled:d$4,onSelect:n=>{n&&p({...r,language:n.value});}}),jsx(c$1,{label:o.formatRegion,options:[...G],value:r.formatRegion,clearable:false,disabled:d$4,onSelect:n=>{n&&p({...r,formatRegion:n.value});}})]}),jsx(c$2,{children:jsxs("p",{className:"text-xs leading-[133%]",children:[o.timeZone," (",w.utcOffset,") |"," ",o.formats," ",ee,":"," ",w.datePattern,","," ",w.timePattern]})})]}),jsxs(d$2,{children:[jsx(a$3,{title:o.appearance,leading:{type:"icon",Icon:PaletteIcon}}),jsx(b$1,{children:jsx(ye,{label:o.appearance,value:r.themeId,options:X,disabled:d$4,onChange:n=>p({...r,themeId:n})})})]}),B&&r.navigationLayout&&jsxs(d$2,{children:[jsx(a$3,{title:o.navigationLayout,leading:{type:"icon",Icon:LayoutDashboardIcon}}),jsx(b$1,{children:jsx(be,{value:r.navigationLayout,options:d$3,disabled:d$4,onChange:n=>p({...r,navigationLayout:n})})})]})]}),jsxs(f,{children:[jsx(e$1,{type:"button",variant:"secondary",size:"lg",disabled:d$4,onClick:I,children:o.cancel}),jsx(e$1,{size:"lg",loading:d$4,disabled:!E||d$4,onClick:re,children:o.save})]})]})})};export{Ne as PreferencesDrawer};
|
|
1
|
+
import {c as c$1}from'./chunk-734IEMNP.js';import {a as a$2,d as d$1,e,g,f}from'./chunk-XIJ2XBQF.js';import {c as c$3}from'./chunk-4CAN7PGG.js';import {d as d$2,a as a$3,b as b$1,c as c$2}from'./chunk-CVYZS7KS.js';import'./chunk-7JM2X4UD.js';import'./chunk-FYB3QRNL.js';import'./chunk-YFDUDY6Y.js';import'./chunk-RBXMHWJQ.js';import'./chunk-TN46TEUP.js';import'./chunk-OLJ5WJMI.js';import'./chunk-MOFC3UHC.js';import'./chunk-MQL3NZ6S.js';import'./chunk-VIMWKUML.js';import'./chunk-QZUQ6AZK.js';import'./chunk-MW7DL42Z.js';import {a as a$1}from'./chunk-VQRVOLEN.js';import {d}from'./chunk-IEGZ6BLC.js';export{e as PreferencesProvider,d as usePreferences}from'./chunk-IEGZ6BLC.js';import {a,b,d as d$3}from'./chunk-GUPUXUDN.js';export{b as FORMAT_REGIONS,d as NAVIGATION_LAYOUTS,c as THEME_IDS,a as UI_LANGUAGES,f as isFormatRegion,h as isNavigationLayout,g as isThemeId,e as isUiLanguage,i as isUiPreferences}from'./chunk-GUPUXUDN.js';import {c}from'./chunk-L5SK3BA5.js';import'./chunk-PI7DECIN.js';import'./chunk-QMPBFFFC.js';import'./chunk-ICF6RQIW.js';import'./chunk-HZYZAFW3.js';import {e as e$1}from'./chunk-Y3ZZYSKX.js';import'./chunk-C7TLKKPT.js';import'./chunk-CQI4KDR4.js';import'./chunk-WXHE4RLE.js';import {a as a$4}from'./chunk-OBZIYJO7.js';import {RadioGroupItem,RadioGroupItemControl,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {LanguagesIcon,PaletteIcon,LayoutDashboardIcon,CheckIcon}from'lucide-react';import {useState,useMemo,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var ce={en:{title:"Preferences",regionalSettings:"Language and region",language:"Language",formatRegion:"Country",appearance:"Appearance",navigationLayout:"Navigation",timeZone:"Time zone",formats:"Formats",themes:{blue:"Blue",green:"Green",indigo:"Indigo",purple:"Purple",red:"Red",black:"Black",sodtrack:"Sodtrack"},cancel:"Cancel",save:"Save",saveError:"Preferences could not be saved. Please try again."},es:{title:"Preferencias",regionalSettings:"Idioma y regi\xF3n",language:"Idioma",formatRegion:"Pa\xEDs",appearance:"Apariencia",navigationLayout:"Navegaci\xF3n",timeZone:"Huso horario",formats:"Formatos",themes:{blue:"Azul",green:"Verde",indigo:"\xCDndigo",purple:"Morado",red:"Rojo",black:"Negro",sodtrack:"Sodtrack"},cancel:"Cancelar",save:"Guardar",saveError:"No se pudieron guardar las preferencias. Int\xE9ntalo de nuevo."},pt:{title:"Prefer\xEAncias",regionalSettings:"Idioma e regi\xE3o",language:"Idioma",formatRegion:"Pa\xEDs",appearance:"Apar\xEAncia",navigationLayout:"Navega\xE7\xE3o",timeZone:"Fuso hor\xE1rio",formats:"Formatos",themes:{blue:"Azul",green:"Verde",indigo:"\xCDndigo",purple:"Roxo",red:"Vermelho",black:"Preto",sodtrack:"Sodtrack"},cancel:"Cancelar",save:"Salvar",saveError:"N\xE3o foi poss\xEDvel salvar as prefer\xEAncias. Tente novamente."}},Z=i=>ce[i];var Y=["sodtrack","black","red","green","blue","indigo","purple"],ve=(i,a)=>i.language===a.language&&i.formatRegion===a.formatRegion&&i.themeId===a.themeId&&i.navigationLayout===a.navigationLayout,P=(i,a,t)=>{if(!(a!==void 0&&t.includes(a)))throw new Error(`PreferencesDrawer received an unsupported ${i} value.`)},W=(i,a)=>i.charAt(0).toLocaleUpperCase(a)+i.slice(1),ye=({label:i,value:a,options:t,disabled:m,onChange:l})=>jsx(c$3,{value:a,disabled:m,onValueChange:o=>{let r=t.find(u=>u.value===o);r&&l(r.value);},"aria-label":i,innerClassName:"gap-4",children:t.map(o=>jsxs(RadioGroupItem,{value:o.value,"aria-label":o.label,title:o.label,className:"group/item rounded-full",children:[jsx(RadioGroupItemControl,{"data-theme":o.value,className:a$4("bg-primary-500 relative flex size-8 cursor-pointer items-center justify-center rounded-full border-2 border-neutral-50 ring-neutral-500 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-60","data-[state=checked]:ring-primary-500 data-[state=checked]:ring-2"),children:jsx(CheckIcon,{className:"size-3.5 text-neutral-50 opacity-0 group-data-[state=checked]/item:opacity-100",strokeWidth:3,"aria-hidden":"true"})}),jsx(RadioGroupItemHiddenInput,{})]},o.value))}),he=({layout:i})=>i==="vertical"?jsxs("div",{className:"flex h-full w-full flex-col",children:[jsx("div",{className:"flex shrink-0 gap-0.5 bg-neutral-100 px-1 py-0.5",children:Array.from({length:3},(a,t)=>t).map(a=>jsx("div",{className:"size-1 rounded-full bg-neutral-300"},a))}),jsxs("div",{className:"flex min-h-0 flex-1 items-stretch",children:[jsxs("div",{className:"bg-primary-300 w-1/5 self-stretch p-1",children:[jsx("div",{className:"bg-primary-100 h-1.5 w-full rounded-[0.0625rem]"}),jsx("div",{className:"bg-transparent-neutral-50-60 my-1 h-px w-full"}),jsx("div",{className:"flex flex-col gap-0.75",children:Array.from({length:7},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 h-1 w-full rounded-[0.0625rem]"},a))})]}),jsxs("div",{className:"flex w-4/5 flex-col gap-1 p-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:"h-3 w-1/2 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"mr-0.75 ml-auto h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"})]}),jsx("div",{className:"h-2.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-full rounded-[0.0625rem] bg-neutral-200"})]})]})]}):jsxs("div",{className:"flex h-full w-full flex-col",children:[jsx("div",{className:"flex shrink-0 gap-0.5 bg-neutral-100 px-1 py-0.5",children:Array.from({length:3},(a,t)=>t).map(a=>jsx("div",{className:"size-1 rounded-full bg-neutral-300"},a))}),jsxs("div",{className:"bg-primary-300 px-1.5 py-1",children:[jsxs("div",{className:"flex justify-between",children:[jsx("div",{className:"bg-primary-100 h-1.5 w-14/100 rounded-[0.0625rem]"}),jsx("div",{className:"bg-primary-100 size-1.5 rounded-full"})]}),jsx("div",{className:"bg-transparent-neutral-50-60 my-1 h-px w-full"}),jsxs("div",{className:"flex justify-between",children:[jsx("div",{className:"flex w-full gap-1",children:Array.from({length:7},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 h-1 w-9/100 rounded-[0.0625rem]"},a))}),jsx("div",{className:"flex gap-1",children:Array.from({length:2},(a,t)=>t).map(a=>jsx("div",{className:"bg-primary-400 size-1 rounded-[0.0625rem]"},a))})]})]}),jsxs("div",{className:"flex h-full flex-col gap-1 p-1",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:"h-3 w-1/2 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"mr-0.75 ml-auto h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-2.25 w-4.5 rounded-[0.0625rem] bg-neutral-200"})]}),jsx("div",{className:"h-2.5 rounded-[0.0625rem] bg-neutral-200"}),jsx("div",{className:"h-full rounded-[0.0625rem] bg-neutral-200"})]})]}),be=({value:i,options:a,disabled:t,onChange:m})=>jsx(c$3,{value:i,disabled:t,orientation:"horizontal",onValueChange:l=>{let o=a.find(r=>r===l);o&&m(o);},innerClassName:"grid w-full grid-cols-2 gap-3",children:a.map(l=>jsxs(RadioGroupItem,{value:l,className:"group/item min-w-0 rounded-lg outline-none",children:[jsx(RadioGroupItemControl,{className:a$4("relative h-27 w-full cursor-pointer overflow-hidden rounded-md outline-none","after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-400 after:content-['']","data-[state=checked]:after:border-primary-700 data-[state=checked]:after:border-3","data-disabled:cursor-not-allowed data-disabled:opacity-60"),children:jsx(he,{layout:l})}),jsx(RadioGroupItemHiddenInput,{})]},l))}),Ne=({open:i,onDismiss:a$4})=>{let{preferences:t,savePreferences:m}=d(),l=t.language,o=Z(l),[r,u]=useState(t),[d$4,T]=useState(false),[K,g$1]=useState(false),E=!ve(r,t),B=t.navigationLayout!==void 0,Q=useMemo(()=>{let n=new Intl.DisplayNames(l,{type:"language"});return a.map(c=>{let R=n.of(c)??c;return {value:c,label:W(R,l)}})},[l]),G=useMemo(()=>{let n=new Intl.DisplayNames(l,{type:"region"});return b.map(c=>{let R=n.of(c)??c;return {value:c,label:W(R,l)}})},[l]),X=Y.map(n=>({value:n,label:o.themes[n]}));P("language",r.language,a),P("formatRegion",r.formatRegion,b),P("themeId",r.themeId,Y),B&&P("navigationLayout",r.navigationLayout,d$3);let ee=G.find(n=>n.value===r.formatRegion)?.label??r.formatRegion,w=useMemo(()=>a$1({language:r.language,formatRegion:r.formatRegion}),[r.formatRegion,r.language]);useEffect(()=>{i||(u(t),g$1(false));},[i,t]);let p=n=>{u(n),g$1(false);},I=useCallback(()=>{d$4||(u(t),g$1(false),a$4());},[d$4,a$4,t]),ae=useCallback(n=>{n||I();},[I]),re=async()=>{if(!(!E||d$4)){T(true),g$1(false);try{await m(r),a$4();}catch{g$1(true);}finally{T(false);}}};return jsx(a$2,{open:i,onOpenChange:ae,children:jsxs(d$1,{size:"sm",className:"w-full max-w-[calc(100vw-1rem)] sm:max-w-117.5","aria-label":o.title,children:[jsx(e,{title:o.title}),jsxs(g,{className:"flex flex-col gap-3",children:[K&&jsx(c,{title:o.saveError,variant:"danger",hasCloseButton:false}),jsxs(d$2,{children:[jsx(a$3,{title:o.regionalSettings,leading:{type:"icon",Icon:LanguagesIcon}}),jsxs(b$1,{className:"gap-4.5",children:[jsx(c$1,{label:o.language,options:[...Q],value:r.language,clearable:false,disabled:d$4,onSelect:n=>{n&&p({...r,language:n.value});}}),jsx(c$1,{label:o.formatRegion,options:[...G],value:r.formatRegion,clearable:false,disabled:d$4,onSelect:n=>{n&&p({...r,formatRegion:n.value});}})]}),jsx(c$2,{children:jsxs("p",{className:"text-xs leading-[133%]",children:[o.timeZone," (",w.utcOffset,") |"," ",o.formats," ",ee,":"," ",w.datePattern,","," ",w.timePattern]})})]}),jsxs(d$2,{children:[jsx(a$3,{title:o.appearance,leading:{type:"icon",Icon:PaletteIcon}}),jsx(b$1,{children:jsx(ye,{label:o.appearance,value:r.themeId,options:X,disabled:d$4,onChange:n=>p({...r,themeId:n})})})]}),B&&r.navigationLayout&&jsxs(d$2,{children:[jsx(a$3,{title:o.navigationLayout,leading:{type:"icon",Icon:LayoutDashboardIcon}}),jsx(b$1,{children:jsx(be,{value:r.navigationLayout,options:d$3,disabled:d$4,onChange:n=>p({...r,navigationLayout:n})})})]})]}),jsxs(f,{children:[jsx(e$1,{type:"button",variant:"secondary",size:"lg",disabled:d$4,onClick:I,children:o.cancel}),jsx(e$1,{size:"lg",loading:d$4,disabled:!E||d$4,onClick:re,children:o.save})]})]})})};export{Ne as PreferencesDrawer};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type AutocompleteLoadParams = {
|
|
2
|
+
query: string;
|
|
3
|
+
page: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
signal: AbortSignal | undefined;
|
|
6
|
+
};
|
|
7
|
+
type AutocompleteLoadResult<O> = {
|
|
8
|
+
options: O[];
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
};
|
|
11
|
+
type AutocompleteLoad<O> = (params: AutocompleteLoadParams) => Promise<AutocompleteLoadResult<O>>;
|
|
12
|
+
|
|
13
|
+
export type { AutocompleteLoad as A, AutocompleteLoadParams as a, AutocompleteLoadResult as b };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sodtrack-web-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.118.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "UI components for Sodtrack Web",
|
|
6
6
|
"exports": {
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"node": "22.22.1"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@ark-ui/react": "5.39.
|
|
54
|
+
"@ark-ui/react": "5.39.2",
|
|
55
55
|
"@date-fns/utc": "2.1.1",
|
|
56
|
-
"@fontsource-variable/inter": "5.
|
|
57
|
-
"@fontsource-variable/plus-jakarta-sans": "5.
|
|
56
|
+
"@fontsource-variable/inter": "5.3.0",
|
|
57
|
+
"@fontsource-variable/plus-jakarta-sans": "5.3.0",
|
|
58
58
|
"@lexical/html": "0.40.0",
|
|
59
59
|
"@lexical/list": "0.40.0",
|
|
60
60
|
"@lexical/react": "0.40.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@radix-ui/react-visually-hidden": "1.2.4",
|
|
72
72
|
"@tanstack/react-table": "8.21.3",
|
|
73
73
|
"clsx": "2.1.1",
|
|
74
|
-
"date-fns": "4.
|
|
74
|
+
"date-fns": "4.4.0",
|
|
75
75
|
"lexical": "0.40.0",
|
|
76
76
|
"libphonenumber-js": "1.12.41",
|
|
77
77
|
"lucide-react": "1.7.0",
|
package/dist/chunk-23LALKB6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-MOFC3UHC.js';import {a}from'./chunk-RBXMHWJQ.js';import {a as a$5}from'./chunk-TN46TEUP.js';import {a as a$2}from'./chunk-XYBXEU3T.js';import {c,e,a as a$3,b,d}from'./chunk-MQL3NZ6S.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {useListCollection,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useRef,useEffect,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';function ne(){let l=useComboboxContext(),a=useRef(l);a.current=l;let m=l.value.join("|"),i=l.inputValue.length>0,u=l.collection.size;return useEffect(()=>{if(!m||i||!u)return;let s=a.current.collection.stringify(a.current.value[0]);s&&a.current.setInputValue(s);},[m,i,u]),null}var Ie=a,le="lg",re=l=>{let{label:a,labelProps:m,error:i,required:u,invalid:s,disabled:y,readOnly:V,options:p,onInputValueChange:g,onValueChange:I,onSelect:A,defaultValue:S,helperText:K,value:n,size:J=le,className:Q,emptyState:W,...X}=l,O=typeof n=="object"&&n!==null?n.value:n,x=useMemo(()=>typeof n!="object"||n===null||p.some(e=>e.value===n.value)?p:[n,...p],[p,n]),c$2=useRef(null),d$1=useRef(""),Y=useMemo(()=>({sensitivity:"base"}),[]),{contains:z}=useFilter(Y),{collection:N,filter:r,set:w}=useListCollection({initialItems:x,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,b,E)=>z(e,b)||!!E.description&&z(E.description,b)});useEffect(()=>{w(x),r(d$1.current);},[r,x,w]);let Z=useCallback(e=>{I?.(e),A?.(e.items[0]??null);},[A,I]),_=useCallback(e=>{if(e.reason==="input-change"){d$1.current=e.inputValue,r(e.inputValue),g?.(e.inputValue??"");return}d$1.current="",r(""),e.reason==="clear-trigger"&&g?.("");},[r,g]);useEffect(()=>{c$2.current&&c$2.current.value===""&&(d$1.current="",r(""));},[r,c$2.current?.value]);let C=c({error:!!(i||s),disabled:y,readOnly:V});return jsxs(Combobox.Root,{collection:N,defaultValue:S!=null?[String(S)]:void 0,onInputValueChange:_,value:Object.hasOwn(l,"value")?O!=null?[String(O)]:[]:void 0,onValueChange:Z,inputBehavior:"autocomplete",openOnClick:true,invalid:!!(i||s),disabled:y,readOnly:V,...X,"data-disabled":C==="disabled"?"":void 0,"data-error":d(C)||void 0,className:a$1(b,Q),children:[jsx(c$1,{...m,as:Combobox.Label,label:a,required:u}),jsx(ne,{}),jsx(Combobox.Context,{children:e$1=>jsx(e,{as:Combobox.Control,size:J,state:C,clearAdornment:e$1.inputValue.length>0||e$1.value.length>0?jsx(a$3,{as:Combobox.ClearTrigger,hidden:false}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$2,{})}),children:b=>jsx(Combobox.Input,{ref:c$2,className:a$1(b,"text-left disabled:cursor-not-allowed"),"aria-required":u||void 0})})}),jsx(a$4,{children:K}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg",children:jsxs(Combobox.ItemGroup,{children:[N.items.map(e=>jsx(Combobox.Item,{item:e,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:e.label}),e.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$5,{size:"sm",...e.badgeExpandable})})]}),e.description&&jsx("p",{className:"text-xs leading-[130%]",children:e.description})]})})},e.value)),jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(a$6,{size:"sm",variant:"not-found",...W})})]})})})})]})};re.displayName="Autocomplete";export{Ie as a,le as b,re as c};
|
package/dist/chunk-GJSFXPZK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-RBXMHWJQ.js';import {a as a$2}from'./chunk-XYBXEU3T.js';import {c,b,d,e,a as a$3}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var be=a$4,Y="lg",Z=({clearable:r,placeholder:s,size:c,state:u})=>{let i=useSelectContext().value.length>0;return jsx(e,{as:Select.Control,size:c,state:u,trailingClassName:"pointer-events-none",clearAdornment:r&&i?jsx(a$3,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:n=>n.stopPropagation()}):void 0,indicator:jsx(Select.Indicator,{className:"group/chevron-host flex shrink-0 items-center justify-center",children:jsx(a$2,{})}),children:n=>jsx(Select.Trigger,{className:a$1(n,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:s})})})};function _(r,s){let{className:c$2,label:u,labelProps:m,required:i,error:n,isItemDisabled:S,value:o,helperText:f,placeholder:D,onSelect:b$1,defaultValue:g,options:a$2,clearable:L=true,disabled:h,id:q,invalid:H,readOnly:T,size:j=Y,...M}=r,B=Object.hasOwn(r,"defaultValue"),v=Object.hasOwn(r,"value"),C=typeof o=="object"&&o!==null?o.value:o,x=useMemo(()=>typeof o!="object"||o===null||a$2.some(t=>t.value===o.value)?a$2:[o,...a$2],[a$2,o]),y=useMemo(()=>createListCollection({items:x,isItemDisabled:S,itemToValue:t=>String(t.value)}),[x,S]),U=useCallback(t=>{let W=t.items.at(0)??null;b$1?.(W);},[b$1]);if(B&&v)throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");let I=!!(n||H),d$1=c({error:I,disabled:h,readOnly:T});return jsxs(Select.Root,{ref:s,"data-disabled":d$1==="disabled"?"":void 0,"data-error":d(d$1)||void 0,disabled:h,id:q,invalid:I,readOnly:T,required:i,collection:y,className:a$1(b,c$2),positioning:{placement:"bottom-end",getAnchorRect:t=>t instanceof HTMLElement?t.parentElement?.getBoundingClientRect()??null:null},onValueChange:U,value:v?C!=null?[String(C)]:[]:void 0,defaultValue:g!=null?[String(g)]:void 0,...M,children:[jsx(c$1,{...m,as:Select.Label,label:u,required:i}),jsx(Z,{clearable:L,placeholder:D,size:j,state:d$1}),f&&jsx(a,{children:f}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsx(Select.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg outline-none",children:y.items.map(t=>jsx(Select.Item,{item:t,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:t.label})},t.value))})})}),jsx(Select.HiddenSelect,{required:false})]})}var E=forwardRef(_);E.displayName="Select";var ge=E;export{be as a,Y as b,ge as c};
|
package/dist/chunk-L2QZT5LQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {d}from'./chunk-WAUY2MS6.js';import {a as a$4}from'./chunk-MOFC3UHC.js';import {a as a$1}from'./chunk-XYBXEU3T.js';import {c,e,a as a$2,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {k}from'./chunk-QMPBFFFC.js';import {c as c$2}from'./chunk-C7TLKKPT.js';import {a}from'./chunk-OBZIYJO7.js';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useAsyncList}from'@ark-ui/react/collection';import {useFilter,useLocaleContext}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useRef,useEffect,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var fe=300,xe=10,he=c=>c?.startsWith("es")?{loading:"Cargando...",noData:"A\xFAn no hay informaci\xF3n"}:c?.startsWith("pt")?{loading:"Carregando...",noData:"Nenhuma informa\xE7\xE3o dispon\xEDvel ainda"}:{loading:"Loading...",noData:"No information available yet"},Ce=c$3=>{let{label:ee,labelProps:te,value:s,onValueChange:w,placeholder:oe,error:I,required:E,disabled:p,readOnly:h,options:R,load:a$5,helperText:ne,emptyState:V,optionDescriptionLines:P=1,clearable:re=true,growable:d$2=true,className:le}=c$3,ae=useMemo(()=>({sensitivity:"base"}),[]),{contains:k$1}=useFilter(ae),ie=useLocaleContext(),D=he(ie.locale),C=useRef(null),q=useRef(null),z=useRef(""),v=useRef(void 0),y=useRef(false),l=useAsyncList({load:async e=>{if(!a$5)return {items:[]};let t=e.cursor??1,n=await a$5({query:e.filterText,page:t,pageSize:xe,signal:e.signal});return {items:n.options,cursor:n.hasMore?t+1:void 0}},onSuccess:()=>{y.current&&(y.current=false,C.current?.scrollTo({top:0}));}}),g=useRef(l);g.current=l;let T=useMemo(()=>{let e=R??l.items;if(!s.length)return e;let t=new Set(e.map(A=>A.value)),n=s.filter(A=>!t.has(A.value));return n.length?[...n,...e]:e},[l.items,R,s]),M=a$5?l.items:T,b$1=useMemo(()=>new Map(T.map(e=>[String(e.value),e])),[T]),B=useMemo(()=>s.map(e=>b$1.get(String(e.value))??e),[b$1,s]),{collection:H,filter:f,set:F}=useListCollection({initialItems:M,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,t,n)=>k$1(e,t)||!!n.description&&k$1(n.description,t)}),_=l.hasMore&&!l.loading&&!l.error,O=c({error:!!I,disabled:p,readOnly:h});useEffect(()=>{F(M),f(z.current);},[M,f,F]),useEffect(()=>()=>clearTimeout(v.current),[]),useEffect(()=>{let e=q.current;if(!e||!_)return;let t=new IntersectionObserver(n=>{n[0]?.isIntersecting&&g.current.loadMore();},{root:C.current,rootMargin:"0px 0px 64px 0px"});return t.observe(e),()=>t.disconnect()},[_]);let se=useCallback(e=>{a$5?(clearTimeout(v.current),v.current=setTimeout(()=>{let t=g.current;t.filterText===e.inputValue&&!t.empty||(y.current=true,t.setFilterText(e.inputValue));},fe)):(z.current=e.inputValue,f(e.inputValue));},[f,a$5]),ue=useCallback(e=>{let t=g.current;e.open&&a$5&&e.reason!=="input-change"&&t.empty&&!t.loading&&t.reload();},[a$5]),pe=useCallback(e=>{w(e.value.flatMap(t=>b$1.get(t)??[]));},[w,b$1]);return jsxs(Combobox.Root,{collection:H,value:s.map(e=>String(e.value)),onInputValueChange:se,onOpenChange:ue,onValueChange:pe,multiple:true,inputBehavior:"none",openOnClick:true,invalid:!!I,disabled:p,readOnly:h,"data-disabled":O==="disabled"?"":void 0,"data-error":d$1(O)||void 0,className:a(b,le),children:[jsx(c$1,{...te,as:Combobox.Label,label:ee,required:E}),jsx(Combobox.Context,{children:e$1=>jsx(e,{as:Combobox.Control,className:a(d$2&&"h-auto min-h-(--height-input) items-start",!d$2&&"overflow-hidden",p&&"cursor-not-allowed"),state:O,trailingClassName:d$2?"self-start py-2":void 0,clearAdornment:re&&s.length>0?jsx(a$2,{as:Combobox.ClearTrigger,onClick:t=>t.stopPropagation()}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$1,{})}),children:t=>jsxs("div",{className:a("flex min-w-0 flex-1 items-center gap-1 py-2",d$2?"flex-wrap":"h-full overflow-hidden"),children:[B.map(n=>jsx(d,{color:"neutral",variant:"fill",size:"md",className:a("max-w-full shrink-0 [&>button]:shrink-0",p&&"bg-neutral-50 text-neutral-600 ring-neutral-600 hover:bg-neutral-50"),disabled:p,hasCloseIcon:!h&&!p,onClose:()=>{e$1.clearValue(String(n.value));},children:jsx("span",{className:"truncate",children:n.label})},String(n.value))),jsx(Combobox.Input,{className:a(t,"h-auto px-0 py-0 disabled:cursor-not-allowed"),"aria-required":E||void 0,placeholder:B.length===0?oe:""})]})})}),jsx(a$3,{children:ne}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:C,"aria-busy":l.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[H.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:t,disabled:n})=>jsxs("div",{className:a("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",n?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:P?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:P,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",t?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",n&&(t?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:t&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))),!l.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(Combobox.Context,{children:e=>(a$5?l.filterText:e.inputValue).trim()?jsx(a$4,{size:"sm",variant:"not-found",...V}):jsx(a$4,{size:"sm",...V,variant:"empty",title:D.noData,description:""})})})]}),l.loading&&jsxs("div",{role:"status",className:"font-inter flex items-center justify-center gap-3 px-3 py-4 text-sm font-medium text-neutral-900",children:[jsx(c$2,{size:"md"}),D.loading]}),a$5&&jsx("div",{ref:q,className:"h-px"})]})})})]})};Ce.displayName="AutocompleteMultiple";export{Ce as a};
|
package/dist/chunk-XYBXEU3T.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {g}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx}from'react/jsx-runtime';var p=({className:r})=>jsx(g,{"aria-hidden":true,className:a("size-4.5 text-neutral-900 transition-transform will-change-transform","group-data-disabled/control:text-neutral-600","group-data-readonly/control:text-neutral-600","group-data-[state=open]/chevron-host:rotate-180",r)});export{p as a};
|