@brightlocal/ui-components 2.0.1 → 2.1.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -374,6 +374,7 @@
374
374
  "ComboboxContent",
375
375
  "ComboboxInput",
376
376
  "ComboboxList",
377
+ "ComboboxVirtualList",
377
378
  "ComboboxEmpty",
378
379
  "ComboboxGroup",
379
380
  "ComboboxItem",
package/dist/combobox.cjs CHANGED
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),U=require("react"),q=require("@brightlocal/icons"),$=require("class-variance-authority"),z=require("cmdk"),y=require("@brightlocal/ui-components/lib/utils"),T=require("@brightlocal/ui-components/popover"),k=require("@brightlocal/ui-components/command");function V(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const t=V(U),E=t.createContext(null);function R(){const e=t.useContext(E);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function H({value:e,onValueChange:o,open:a,onOpenChange:r,shouldFilter:u=!0,disabled:d=!1,itemToStringValue:s,children:C}){const[m,v]=t.useState(""),[x,h]=t.useState(!1),[g,i]=t.useState(()=>new Map),w=e!==void 0,f=a!==void 0,c=w?e:m,b=f?a:x,p=t.useCallback(l=>{f||h(l),r?.(l)},[f,r]),j=t.useCallback(l=>{w||v(l),o?.(l)},[w,o]),N=t.useCallback((l,L)=>{i(I=>{if(I.get(l)===L)return I;const O=new Map(I);return O.set(l,L),O})},[]),S=t.useMemo(()=>({open:b,setOpen:p,value:c,onValueChange:j,shouldFilter:u,disabled:d,itemLabels:g,registerItem:N,itemToStringValue:s}),[b,p,c,j,u,d,g,N,s]);return n.jsx(E.Provider,{value:S,children:n.jsx(T.Popover,{open:b,onOpenChange:p,children:C})})}const B=$.cva(["relative flex w-full items-center justify-between gap-2","px-4 py-2 h-9","border border-input rounded-md outline-none","bg-neutral-50 shadow-xs","dark:bg-white/5 dark:border-white/15","text-sm font-normal font-sans text-foreground","data-[placeholder=true]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","transition-[background-color,border-color,box-shadow] duration-200 ease-out","[&_svg]:pointer-events-none [&_svg]:shrink-0"]),F=t.forwardRef(({className:e,dataHook:o,error:a,trackingEl:r,trackingLabel:u,children:d,...s},C)=>{const{open:m,disabled:v,value:x}=R(),h=t.useId(),g=!x,i=a||s["aria-invalid"]===!0||s["aria-invalid"]==="true";return n.jsx(T.PopoverTrigger,{asChild:!0,children:n.jsxs("button",{ref:C,"aria-controls":m?h:void 0,"aria-expanded":m,"aria-haspopup":"listbox","aria-invalid":i?"true":void 0,className:y.cn(B(),i&&"border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",e),"data-hook":o,"data-placeholder":g,"data-slot":"combobox-trigger","data-state":m?"open":"closed","data-tracking-el":r||"combobox-trigger","data-tracking-label":u,disabled:v||s.disabled,role:"combobox",type:"button",...s,children:[d,n.jsx(q.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});F.displayName="ComboboxTrigger";function J({placeholder:e,className:o}){const{value:a,itemLabels:r}=R(),u=a?r.get(a)||a:e;return n.jsx("span",{className:y.cn("text-foreground overflow-hidden text-sm leading-normal font-medium text-ellipsis whitespace-nowrap",o),"data-slot":"combobox-value",children:u})}function K({dataHook:e,className:o,children:a,align:r="start",side:u="bottom",sideOffset:d,avoidCollisions:s,hideList:C=!1}){const{open:m,shouldFilter:v,itemToStringValue:x}=R(),[h,g]=t.useState(null),i=t.useRef(null),w=t.useCallback(c=>{if(i.current?.(),i.current=null,!c)return;let b=!1;const p=l=>{b||(l==="top"||l==="bottom")&&(b=!0,j.disconnect(),g(l))},j=new MutationObserver(()=>{p(c.getAttribute("data-side"))});j.observe(c,{attributes:!0,attributeFilter:["data-side"]});let N=0,S=0;N=requestAnimationFrame(()=>{S=requestAnimationFrame(()=>{p(c.getAttribute("data-side"))})}),i.current=()=>{b=!0,j.disconnect(),cancelAnimationFrame(N),cancelAnimationFrame(S)}},[]);t.useEffect(()=>{if(!m){i.current?.(),i.current=null;const c=setTimeout(()=>g(null),150);return()=>clearTimeout(c)}},[m]);const f=t.useMemo(()=>{if(x)return(c,b,p)=>z.defaultFilter(x(c),b,p)},[x]);return n.jsx(T.PopoverContent,{ref:w,align:r,"aria-label":"Options",avoidCollisions:s,className:y.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",o),"data-slot":"combobox-popover",side:h??u,sideOffset:d,children:n.jsx(k.Command,{className:y.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",C&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:f,shouldFilter:v,children:a})})}const M=t.forwardRef((e,o)=>n.jsx(k.CommandInput,{ref:o,"data-slot":"combobox-input",...e}));M.displayName="ComboboxInput";const P=t.forwardRef(({className:e,...o},a)=>n.jsx(k.CommandList,{ref:a,className:y.cn("min-h-0 flex-1",e),"data-slot":"combobox-list",...o}));P.displayName="ComboboxList";const A=t.forwardRef((e,o)=>n.jsx(k.CommandEmpty,{ref:o,"data-slot":"combobox-empty",...e}));A.displayName="ComboboxEmpty";const _=t.forwardRef((e,o)=>n.jsx(k.CommandGroup,{ref:o,"data-slot":"combobox-group",...e}));_.displayName="ComboboxGroup";function Q(e,o,a){if(!o||!o.trim())return e;const r=new RegExp(`(${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),u=e.split(r);return n.jsx("span",{children:u.map((d,s)=>s%2===1?n.jsx("span",{className:a,children:d},s):n.jsx(t.Fragment,{children:d},s))})}const G=t.forwardRef(({value:e,label:o,dataHook:a,children:r,className:u,highlight:d,highlightClassName:s,keywords:C,...m},v)=>{const{value:x,onValueChange:h,setOpen:g,registerItem:i}=R(),w=x===e,f=t.useMemo(()=>o||(typeof r=="string"?r:typeof r=="number"?String(r):e),[o,r,e]),c=t.useRef(i);t.useEffect(()=>{c.current=i},[i]),t.useEffect(()=>{c.current(e,f)},[e,f]);const b=()=>{h(e===x?"":e),g(!1)},p=()=>d&&typeof r=="string"?Q(r,d,s||"text-sm leading-normal font-semibold"):r;return n.jsxs(k.CommandItem,{ref:v,className:y.cn("justify-between",u),"data-slot":"combobox-item",dataHook:a,keywords:C?[f,...C]:[f],value:e,onSelect:b,...m,children:[p(),w&&n.jsx(q.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});G.displayName="ComboboxItem";const D=t.forwardRef((e,o)=>n.jsx(k.CommandSeparator,{ref:o,"data-slot":"combobox-separator",...e}));D.displayName="ComboboxSeparator";function W({className:e,children:o}){return n.jsx("div",{"aria-disabled":"true","aria-selected":"false",className:y.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"option",children:o||n.jsxs(n.Fragment,{children:[n.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),"Loading..."]})})}exports.Combobox=H;exports.ComboboxContent=K;exports.ComboboxEmpty=A;exports.ComboboxGroup=_;exports.ComboboxInput=M;exports.ComboboxItem=G;exports.ComboboxList=P;exports.ComboboxLoading=W;exports.ComboboxSeparator=D;exports.ComboboxTrigger=F;exports.ComboboxValue=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),ee=require("react"),z=require("@brightlocal/icons"),te=require("@tanstack/react-virtual"),oe=require("class-variance-authority"),G=require("cmdk"),F=require("@brightlocal/ui-components/lib/utils"),U=require("@brightlocal/ui-components/lib/use-dev-warning"),W=require("@brightlocal/ui-components/popover"),T=require("@brightlocal/ui-components/command");function re(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const e=re(ee),V=e.createContext(null),H=e.createContext(null);function q(){const t=e.useContext(V);if(!t)throw new Error("Combobox components must be used within a <Combobox>");return t}function ne({value:t,onValueChange:o,open:r,onOpenChange:s,shouldFilter:l=!0,disabled:m=!1,itemToStringValue:d,children:C}){const[w,k]=e.useState(""),[j,I]=e.useState(!1),[S,R]=e.useState(()=>new Map),[y,x]=e.useState(""),[N,f]=e.useState(void 0),b=t!==void 0,p=r!==void 0,v=b?t:w,i=p?r:j,h=e.useCallback(n=>{n||x(""),p||I(n),s?.(n)},[p,s]),g=e.useCallback(n=>{b||k(n),o?.(n)},[b,o]),D=e.useRef(new Map),P=e.useRef(!1),L=e.useRef(!0);e.useEffect(()=>()=>{L.current=!1},[]);const M=e.useCallback(()=>{P.current||(P.current=!0,queueMicrotask(()=>{P.current=!1,L.current&&R(new Map(D.current))}))},[]),A=e.useCallback((n,u)=>{D.current.get(n)!==u&&(D.current.set(n,u),M())},[M]),O=e.useRef(v);e.useLayoutEffect(()=>{O.current=v},[v]);const $=e.useCallback(n=>{n!==O.current&&D.current.has(n)&&(D.current.delete(n),M())},[M]),_=e.useMemo(()=>d?(n,u,E)=>G.defaultFilter(d(n),u,E):G.defaultFilter,[d]),c=e.useMemo(()=>({open:i,setOpen:h,value:v,onValueChange:g,shouldFilter:l,disabled:m,itemLabels:S,registerItem:A,unregisterItem:$,itemToStringValue:d,filterFn:_,searchValue:y,setSearchValue:x,activeDescendantId:N,setActiveDescendantId:f}),[i,h,v,g,l,m,S,A,$,d,_,y,N,f]);return a.jsx(V.Provider,{value:c,children:a.jsx(W.Popover,{open:i,onOpenChange:h,children:C})})}const se=oe.cva(["relative flex w-full items-center justify-between gap-2","px-4 py-2 h-9","border border-input rounded-md outline-none","bg-neutral-50 shadow-xs","dark:bg-white/5 dark:border-white/15","text-sm font-normal font-sans text-foreground","data-[placeholder=true]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","transition-[background-color,border-color,box-shadow] duration-200 ease-out","[&_svg]:pointer-events-none [&_svg]:shrink-0"]),K=e.forwardRef(({className:t,dataHook:o,error:r,trackingEl:s,trackingLabel:l,children:m,...d},C)=>{const{open:w,disabled:k,value:j}=q(),I=e.useId(),S=!j,R=r||d["aria-invalid"]===!0||d["aria-invalid"]==="true";return a.jsx(W.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{ref:C,"aria-controls":w?I:void 0,"aria-expanded":w,"aria-haspopup":"listbox","aria-invalid":R?"true":void 0,className:F.cn(se(),R&&"border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",t),"data-hook":o,"data-placeholder":S,"data-slot":"combobox-trigger","data-state":w?"open":"closed","data-tracking-el":s||"combobox-trigger","data-tracking-label":l,disabled:k||d.disabled,role:"combobox",type:"button",...d,children:[m,a.jsx(z.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});K.displayName="ComboboxTrigger";function ae({placeholder:t,className:o}){const{value:r,itemLabels:s}=q(),l=r?s.get(r)||r:t;return a.jsx("span",{className:F.cn("text-foreground overflow-hidden text-sm leading-normal font-medium text-ellipsis whitespace-nowrap",o),"data-slot":"combobox-value",children:l})}function ie({dataHook:t,className:o,children:r,align:s="start",side:l="bottom",sideOffset:m,avoidCollisions:d,hideList:C=!1}){const{open:w,shouldFilter:k,filterFn:j,itemToStringValue:I}=q(),[S,R]=e.useState(null),y=e.useRef(null),x=e.useCallback(f=>{if(y.current?.(),y.current=null,!f)return;let b=!1;const p=g=>{b||(g==="top"||g==="bottom")&&(b=!0,v.disconnect(),R(g))},v=new MutationObserver(()=>{p(f.getAttribute("data-side"))});v.observe(f,{attributes:!0,attributeFilter:["data-side"]});let i=0,h=0;i=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>{p(f.getAttribute("data-side"))})}),y.current=()=>{b=!0,v.disconnect(),cancelAnimationFrame(i),cancelAnimationFrame(h)}},[]);e.useEffect(()=>{if(!w){y.current?.(),y.current=null;const f=setTimeout(()=>R(null),150);return()=>clearTimeout(f)}},[w]);const N=I?j:void 0;return a.jsx(W.PopoverContent,{ref:x,align:s,"aria-label":"Options",avoidCollisions:d,className:F.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",o),collisionPadding:4,"data-slot":"combobox-popover",side:S??l,sideOffset:m,children:a.jsx(T.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",C&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:t||"combobox-command",filter:N,shouldFilter:k,children:r})})}const Y=e.forwardRef(({debounceMs:t,onValueChange:o,...r},s)=>{const{setSearchValue:l,shouldFilter:m,activeDescendantId:d}=q(),C=e.useRef(void 0);U.useDevWarning(()=>!!(t&&t>0&&m),`debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
2
+ Debounce is designed for async/server-driven search where the consumer controls the items list.
3
+ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,[t,m]),U.useDevWarning(()=>!!(t&&t>0&&r.value!==void 0),"debounceMs is set on <ComboboxInput> together with a controlled `value` prop.\nThe debounced onValueChange callback cannot update the controlled value synchronously, so the input will appear to lag behind typing.\nRemove `value` to let the input manage its own display, or remove debounceMs if you need a controlled input.",[t,r.value]),e.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const w=e.useCallback(k=>{l(k),t&&t>0?(clearTimeout(C.current),C.current=setTimeout(()=>{o?.(k)},t)):o?.(k)},[t,o,l]);return a.jsx(T.CommandInput,{ref:s,"aria-activedescendant":d,"data-slot":"combobox-input",onValueChange:w,...r})});Y.displayName="ComboboxInput";const B=e.forwardRef(({className:t,...o},r)=>a.jsx(T.CommandList,{ref:r,className:F.cn("min-h-0 flex-1",t),"data-slot":"combobox-list",...o}));B.displayName="ComboboxList";function ce({items:t,getItemValue:o,getItemLabel:r,estimateSize:s=36,overscan:l=5,children:m,renderEmpty:d,className:C,dataHook:w},k){const j=e.useRef(null),{value:I,onValueChange:S,setOpen:R,shouldFilter:y,searchValue:x,filterFn:N,setActiveDescendantId:f}=q(),[b,p]=e.useState(0),v=e.useId();e.useImperativeHandle(k,()=>j.current,[]);const i=e.useMemo(()=>{if(!y||!x.trim())return t;const c=[];for(const n of t){const u=r?G.defaultFilter(r(n),x):N(o(n),x);u>0&&c.push({item:n,score:u})}return c.sort((n,u)=>u.score-n.score),c.map(n=>n.item)},[t,y,x,o,r,N]),h=te.useVirtualizer({count:i.length,getScrollElement:()=>j.current,estimateSize:()=>s,overscan:l}),g=b>=0&&b<i.length?o(i[b]):null;e.useEffect(()=>{p(0)},[x,i.length]);const D=e.useRef(!1);e.useEffect(()=>{if(D.current||!I)return;const c=i.findIndex(n=>o(n)===I);c>=0&&(p(c),h.scrollToIndex(c,{align:"center"}),D.current=!0)},[I,i,o,h]);const P=e.useRef(!1);e.useEffect(()=>{P.current&&b>=0&&b<i.length&&h.scrollToIndex(b,{align:"auto"}),P.current=!1},[b,i.length,h]),e.useEffect(()=>{const c=j.current?.closest('[data-slot="combobox-command"]');if(!c)return;const n=u=>{switch(u.key){case"ArrowDown":u.preventDefault(),u.stopPropagation(),P.current=!0,p(E=>E<i.length-1?E+1:E);break;case"ArrowUp":u.preventDefault(),u.stopPropagation(),P.current=!0,p(E=>E>0?E-1:E);break;case"Enter":if(u.preventDefault(),u.stopPropagation(),b>=0&&b<i.length){const E=o(i[b]);S(E===I?"":E),R(!1)}break;case"Home":u.preventDefault(),u.stopPropagation(),P.current=!0,p(0);break;case"End":u.preventDefault(),u.stopPropagation(),P.current=!0,p(i.length-1);break}};return c.addEventListener("keydown",n,{capture:!0}),()=>c.removeEventListener("keydown",n,{capture:!0})},[i,b,I,S,R,o]);const L=e.useMemo(()=>{const c=new Map;return i.forEach((n,u)=>{c.set(o(n),u)}),c},[i,o]),M=e.useCallback(c=>{const n=L.get(c);n!==void 0&&p(n)},[L]),A=e.useCallback(c=>(L.get(c)??0)+1,[L]),O=i.length,$=e.useMemo(()=>({activeValue:g,onItemPointerMove:M,idPrefix:v,filteredCount:O,getItemPosition:A}),[g,M,v,O,A]),_=g!=null?`${v}item-${g}`:void 0;return e.useEffect(()=>(f(_),()=>f(void 0)),[_,f]),i.length===0?a.jsx("div",{ref:j,className:F.cn("max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",C),"data-hook":w,"data-slot":"combobox-virtual-list",role:"listbox",children:d}):a.jsx(H.Provider,{value:$,children:a.jsx("div",{ref:j,className:F.cn("max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",C),"data-hook":w,"data-slot":"combobox-virtual-list",role:"listbox",children:a.jsx("div",{className:"relative w-full",style:{height:`${h.getTotalSize()}px`},children:h.getVirtualItems().map(c=>a.jsx("div",{ref:h.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":c.index,style:{transform:`translateY(${c.start}px)`},children:m(i[c.index],c.index)},c.key))})})})}const ue=e.forwardRef(ce),J=e.forwardRef((t,o)=>a.jsx(T.CommandEmpty,{ref:o,"data-slot":"combobox-empty",...t}));J.displayName="ComboboxEmpty";const Q=e.forwardRef(({children:t,...o},r)=>{const s=e.useRef(null);return U.useDevWarning(()=>s.current?s.current.querySelectorAll('[data-slot="combobox-item"]').length>=100:!1,`ComboboxGroup contains 100+ items. Use <ComboboxVirtualList> for large datasets to avoid DOM bloat and slow renders.
4
+ Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,[t]),a.jsx(T.CommandGroup,{ref:l=>{s.current=l,typeof r=="function"?r(l):r&&(r.current=l)},"data-slot":"combobox-group",...o,children:t})});Q.displayName="ComboboxGroup";function le(t,o,r){if(!o||!o.trim())return t;const s=new RegExp(`(${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),l=t.split(s);return a.jsx("span",{children:l.map((m,d)=>d%2===1?a.jsx("span",{className:r,children:m},d):a.jsx(e.Fragment,{children:m},d))})}const X=e.forwardRef(({value:t,label:o,dataHook:r,children:s,className:l,highlight:m,highlightClassName:d,keywords:C,...w},k)=>{const{value:j,onValueChange:I,setOpen:S,registerItem:R,unregisterItem:y}=q(),x=e.useContext(H),N=j===t,f=e.useMemo(()=>o||(typeof s=="string"?s:typeof s=="number"?String(s):t),[o,s,t]),b=e.useRef(R),p=e.useRef(y);e.useEffect(()=>{b.current=R,p.current=y},[R,y]),e.useEffect(()=>(b.current(t,f),()=>p.current(t)),[t,f]);const v=()=>{I(t===j?"":t),S(!1)},i=()=>m&&typeof s=="string"?le(s,m,d||"text-sm leading-normal font-semibold"):s;if(x){const h=x.activeValue===t,g=!!w.disabled;return a.jsxs("div",{ref:k,"aria-disabled":g||void 0,"aria-posinset":x.getItemPosition(t),"aria-selected":N,"aria-setsize":x.filteredCount,className:F.cn("data-[highlighted=true]:bg-accent data-[highlighted=true]:text-accent-foreground relative flex cursor-default items-center justify-between gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none","[&_svg]:pointer-events-none [&_svg]:shrink-0",g&&"pointer-events-none opacity-50",l),"data-highlighted":h||void 0,"data-hook":r,"data-slot":"combobox-item",id:`${x.idPrefix}item-${t}`,role:"option",tabIndex:-1,onClick:g?void 0:v,onKeyDown:g?void 0:D=>{(D.key==="Enter"||D.key===" ")&&v()},onPointerMove:g?void 0:()=>x.onItemPointerMove(t),children:[i(),N&&a.jsx(z.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return a.jsxs(T.CommandItem,{ref:k,className:F.cn("justify-between",l),"data-slot":"combobox-item",dataHook:r,keywords:C?[f,...C]:[f],value:t,onSelect:v,...w,children:[i(),N&&a.jsx(z.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});X.displayName="ComboboxItem";const Z=e.forwardRef((t,o)=>a.jsx(T.CommandSeparator,{ref:o,"data-slot":"combobox-separator",...t}));Z.displayName="ComboboxSeparator";function de({className:t,children:o}){return a.jsx("div",{"aria-live":"polite",className:F.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",t),"data-slot":"combobox-loading",role:"status",children:o||a.jsxs(a.Fragment,{children:[a.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),"Loading..."]})})}exports.Combobox=ne;exports.ComboboxContent=ie;exports.ComboboxEmpty=J;exports.ComboboxGroup=Q;exports.ComboboxInput=Y;exports.ComboboxItem=X;exports.ComboboxList=B;exports.ComboboxLoading=de;exports.ComboboxSeparator=Z;exports.ComboboxTrigger=K;exports.ComboboxValue=ae;exports.ComboboxVirtualList=ue;
@@ -1,5 +1,39 @@
1
1
  import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from './command';
2
2
  import * as React from "react";
3
+ /**
4
+ * Composable combobox supporting three usage modes:
5
+ *
6
+ * **1. Client-filtered (default)** — small/medium datasets with instant search.
7
+ * ```tsx
8
+ * <Combobox>
9
+ * <ComboboxInput />
10
+ * <ComboboxList>
11
+ * <ComboboxGroup><ComboboxItem value="a">A</ComboboxItem></ComboboxGroup>
12
+ * </ComboboxList>
13
+ * </Combobox>
14
+ * ```
15
+ *
16
+ * **2. Async / server-driven** — results fetched from an API.
17
+ * ```tsx
18
+ * <Combobox shouldFilter={false}>
19
+ * <ComboboxInput debounceMs={300} onValueChange={fetchResults} />
20
+ * <ComboboxList>
21
+ * {results.map(r => <ComboboxItem key={r.id} value={r.id}>{r.name}</ComboboxItem>)}
22
+ * </ComboboxList>
23
+ * </Combobox>
24
+ * ```
25
+ *
26
+ * **3. Virtualised large list** — 100+ items rendered efficiently.
27
+ * Client-side filtering is on by default (`shouldFilter` omitted).
28
+ * ```tsx
29
+ * <Combobox>
30
+ * <ComboboxInput />
31
+ * <ComboboxVirtualList items={items} getItemValue={i => i.id} estimateSize={36}>
32
+ * {(item) => <ComboboxItem value={item.id}>{item.name}</ComboboxItem>}
33
+ * </ComboboxVirtualList>
34
+ * </Combobox>
35
+ * ```
36
+ */
3
37
  export interface ComboboxProps {
4
38
  /** Controlled selected value */
5
39
  value?: string;
@@ -9,7 +43,12 @@ export interface ComboboxProps {
9
43
  open?: boolean;
10
44
  /** Callback when open state changes */
11
45
  onOpenChange?: (open: boolean) => void;
12
- /** Whether to use cmdk's built-in filtering. Set to false for async search. */
46
+ /**
47
+ * Whether to use built-in client-side filtering. Defaults to `true`.
48
+ * Both `ComboboxList` (cmdk) and `ComboboxVirtualList` respect this flag.
49
+ * Set to `false` only for async/server-driven search where the consumer
50
+ * controls the items list.
51
+ */
13
52
  shouldFilter?: boolean;
14
53
  /** Disabled state */
15
54
  disabled?: boolean;
@@ -73,10 +112,43 @@ export interface ComboboxInputProps extends React.ComponentProps<typeof CommandI
73
112
  value?: string;
74
113
  /** Called when input value changes. Use to trigger async search requests. */
75
114
  onValueChange?: (value: string) => void;
115
+ /**
116
+ * Debounce delay in milliseconds for the `onValueChange` callback.
117
+ * The input display updates immediately; only the callback is debounced.
118
+ * Useful for async search to avoid firing API calls on every keystroke.
119
+ * @example 300
120
+ */
121
+ debounceMs?: number;
76
122
  }
77
123
  declare const ComboboxInput: React.ForwardRefExoticComponent<Omit<ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
78
124
  export type ComboboxListProps = React.ComponentProps<typeof CommandList>;
79
125
  declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
126
+ export interface ComboboxVirtualListProps<T> {
127
+ /** Array of items to virtualise */
128
+ items: T[];
129
+ /** Extract the string value for each item (used for selection and keyboard navigation) */
130
+ getItemValue: (item: T) => string;
131
+ /**
132
+ * Extract a display label for filtering. Defaults to `getItemValue`.
133
+ * Only used when `shouldFilter` is true on the parent Combobox.
134
+ */
135
+ getItemLabel?: (item: T) => string;
136
+ /** Estimated item height in pixels. @default 36 */
137
+ estimateSize?: number;
138
+ /** Number of items to render above and below the visible area. @default 5 */
139
+ overscan?: number;
140
+ /** Render function for each item */
141
+ children: (item: T, index: number) => React.ReactNode;
142
+ /** Content to render when no items match the filter */
143
+ renderEmpty?: React.ReactNode;
144
+ /** Custom className for the scrollable container */
145
+ className?: string;
146
+ /** Data hook for automated testing */
147
+ dataHook?: string;
148
+ }
149
+ declare const ComboboxVirtualList: <T>(props: ComboboxVirtualListProps<T> & {
150
+ ref?: React.Ref<HTMLDivElement>;
151
+ }) => React.ReactElement | null;
80
152
  export type ComboboxEmptyProps = React.ComponentProps<typeof CommandEmpty>;
81
153
  declare const ComboboxEmpty: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
82
154
  export type ComboboxGroupProps = React.ComponentProps<typeof CommandGroup>;
@@ -105,5 +177,5 @@ export interface ComboboxLoadingProps {
105
177
  children?: React.ReactNode;
106
178
  }
107
179
  declare function ComboboxLoading({ className, children }: ComboboxLoadingProps): import("react/jsx-runtime").JSX.Element;
108
- export { Combobox, ComboboxTrigger, ComboboxValue, ComboboxContent, ComboboxInput, ComboboxList, ComboboxEmpty, ComboboxGroup, ComboboxItem, ComboboxSeparator, ComboboxLoading, };
180
+ export { Combobox, ComboboxTrigger, ComboboxValue, ComboboxContent, ComboboxInput, ComboboxList, ComboboxVirtualList, ComboboxEmpty, ComboboxGroup, ComboboxItem, ComboboxSeparator, ComboboxLoading, };
109
181
  //# sourceMappingURL=combobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAkC5C,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kHAAkH;IAClH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,eAAe;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,QAAQ,CAAC,EAChB,KA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