@brightlocal/ui-components 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/component-meta.json +312 -16
  2. package/dist/blocks/sidebar.cjs +1 -1
  3. package/dist/blocks/sidebar.d.ts +203 -4
  4. package/dist/blocks/sidebar.d.ts.map +1 -1
  5. package/dist/blocks/sidebar.js +667 -393
  6. package/dist/combobox.cjs +3 -3
  7. package/dist/combobox.d.ts +8 -0
  8. package/dist/combobox.d.ts.map +1 -1
  9. package/dist/combobox.js +227 -226
  10. package/dist/dropdown-menu.cjs +1 -1
  11. package/dist/dropdown-menu.js +1 -1
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.js +296 -288
  14. package/dist/list.cjs +1 -1
  15. package/dist/list.d.ts +25 -4
  16. package/dist/list.d.ts.map +1 -1
  17. package/dist/list.js +71 -53
  18. package/dist/popover.cjs +1 -1
  19. package/dist/popover.js +7 -7
  20. package/dist/rating.cjs +1 -1
  21. package/dist/rating.js +13 -13
  22. package/dist/select.cjs +2 -2
  23. package/dist/select.d.ts +10 -2
  24. package/dist/select.d.ts.map +1 -1
  25. package/dist/select.js +36 -30
  26. package/dist/table.cjs +1 -1
  27. package/dist/table.d.ts +14 -0
  28. package/dist/table.d.ts.map +1 -1
  29. package/dist/table.js +57 -39
  30. package/dist/tabs.cjs +1 -1
  31. package/dist/tabs.d.ts +25 -9
  32. package/dist/tabs.d.ts.map +1 -1
  33. package/dist/tabs.js +128 -113
  34. package/package.json +1 -1
  35. package/src/blocks/sidebar.tsx +596 -9
  36. package/src/components/combobox.tsx +10 -0
  37. package/src/components/dropdown-menu.tsx +1 -1
  38. package/src/components/list.tsx +45 -2
  39. package/src/components/popover.tsx +1 -1
  40. package/src/components/rating.tsx +1 -1
  41. package/src/components/select.tsx +24 -2
  42. package/src/components/table.tsx +39 -2
  43. package/src/components/tabs.tsx +195 -146
package/dist/combobox.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ie=require("react"),K=require("@brightlocal/icons"),le=require("@tanstack/react-virtual"),ue=require("class-variance-authority"),B=require("cmdk"),F=require("@brightlocal/ui-components/lib/utils"),U=require("@brightlocal/ui-components/lib/use-dev-warning"),Y=require("@brightlocal/ui-components/popover"),_=require("@brightlocal/ui-components/command");function ce(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=ce(ie),Q=t.createContext(null),X=t.createContext(null);function z(){const e=t.useContext(Q);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function de({value:e,onValueChange:r,open:n,onOpenChange:o,shouldFilter:u=!0,disabled:c=!1,itemToStringValue:a,children:p}){const[m,C]=t.useState(""),[S,v]=t.useState(!1),[d,w]=t.useState(()=>new Map),[I,x]=t.useState(""),[N,D]=t.useState(void 0),k=e!==void 0,y=n!==void 0,R=k?e:m,j=y?n:S,E=t.useCallback(g=>{g||x(""),y||v(g),o?.(g)},[y,o]),V=t.useCallback(g=>{k||C(g),r?.(g)},[k,r]),i=t.useRef(new Map),L=t.useRef(!1),$=t.useRef(!0);t.useEffect(()=>()=>{$.current=!1},[]);const b=t.useCallback(()=>{L.current||(L.current=!0,queueMicrotask(()=>{L.current=!1,$.current&&w(new Map(i.current))}))},[]),P=t.useCallback((g,q)=>{i.current.get(g)!==q&&(i.current.set(g,q),b())},[b]),A=t.useCallback(g=>{for(const[q,G]of g)i.current.set(q,G);w(new Map(i.current))},[]),W=t.useRef(R);t.useLayoutEffect(()=>{W.current=R},[R]);const T=t.useCallback(g=>{g!==W.current&&i.current.has(g)&&(i.current.delete(g),b())},[b]),O=t.useMemo(()=>a?(g,q,G)=>B.defaultFilter(a(g),q,G):B.defaultFilter,[a]),H=t.useMemo(()=>({open:j,setOpen:E,value:R,onValueChange:V,shouldFilter:u,disabled:c,itemLabels:d,registerItem:P,registerItemsSync:A,unregisterItem:T,itemToStringValue:a,filterFn:O,searchValue:I,setSearchValue:x,activeDescendantId:N,setActiveDescendantId:D}),[j,E,R,V,u,c,d,P,A,T,a,O,I,N,D]);return l.jsx(Q.Provider,{value:H,children:l.jsx(Y.Popover,{open:j,onOpenChange:E,children:p})})}const be=ue.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-base 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"]),Z=t.forwardRef(({className:e,dataHook:r,error:n,trackingEl:o,trackingLabel:u,children:c,...a},p)=>{const{open:m,disabled:C,value:S}=z(),v=t.useId(),d=!S,w=n||a["aria-invalid"]===!0||a["aria-invalid"]==="true";return l.jsx(Y.PopoverTrigger,{asChild:!0,children:l.jsxs("button",{ref:p,"aria-controls":m?v:void 0,"aria-expanded":m,"aria-haspopup":"listbox","aria-invalid":w?"true":void 0,className:F.cn(be(),w&&"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",e),"data-hook":r,"data-placeholder":d,"data-slot":"combobox-trigger","data-state":m?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":u,disabled:C||a.disabled,role:"combobox",type:"button",...a,children:[c,l.jsx(K.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function fe(e){return e!=null&&typeof e=="object"&&"value"in e&&typeof e.value=="string"}function ee(e,r,n){if(r)return{getValue:r,getLabel:n??r,hasDistinctLabel:!!n};const o=e[0];if(!fe(o))return null;const u=p=>p.value,c="label"in o&&typeof o.label=="string";return{getValue:u,getLabel:n??(c?p=>String(p.label):u),hasDistinctLabel:c||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:u,getItemLabel:c}){const{value:a,itemLabels:p}=z(),m=t.useMemo(()=>o?ee(o,u,c):null,[o,u,c]);U.useDevWarning(()=>!!o&&o.length>0&&!m,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,m]);const C=t.useMemo(()=>!o||!m?null:new Map(o.map(v=>[m.getValue(v),m.getLabel(v)])),[o,m]),S=a?C?.get(a)||p.get(a)||n?.(a)||a:e;return l.jsx("span",{className:F.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:S})}function xe({dataHook:e,className:r,children:n,align:o="start",side:u="bottom",sideOffset:c,avoidCollisions:a,hideList:p=!1,ariaLabel:m}){const{open:C,shouldFilter:S,filterFn:v,itemToStringValue:d}=z(),[w,I]=t.useState(null),x=t.useRef(null),N=t.useCallback(k=>{if(x.current?.(),x.current=null,!k)return;let y=!1;const R=i=>{y||(i==="top"||i==="bottom")&&(y=!0,j.disconnect(),I(i))},j=new MutationObserver(()=>{R(k.getAttribute("data-side"))});j.observe(k,{attributes:!0,attributeFilter:["data-side"]});let E=0,V=0;E=requestAnimationFrame(()=>{V=requestAnimationFrame(()=>{R(k.getAttribute("data-side"))})}),x.current=()=>{y=!0,j.disconnect(),cancelAnimationFrame(E),cancelAnimationFrame(V)}},[]);t.useEffect(()=>{if(!C){x.current?.(),x.current=null;const k=setTimeout(()=>I(null),150);return()=>clearTimeout(k)}},[C]);const D=d?v:void 0;return l.jsx(Y.PopoverContent,{ref:N,align:o,"aria-label":m??"Options",avoidCollisions:a,className:F.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",r),collisionPadding:4,"data-slot":"combobox-popover",side:w??u,sideOffset:c,children:l.jsx(_.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",p&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:D,shouldFilter:S,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:u,shouldFilter:c,activeDescendantId:a}=z(),p=t.useRef(void 0);U.useDevWarning(()=>!!(e&&e>0&&c),`debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),ie=require("react"),K=require("@brightlocal/icons"),le=require("@tanstack/react-virtual"),ce=require("class-variance-authority"),B=require("cmdk"),F=require("@brightlocal/ui-components/lib/utils"),U=require("@brightlocal/ui-components/lib/use-dev-warning"),Y=require("@brightlocal/ui-components/popover"),$=require("@brightlocal/ui-components/command");function ue(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=ue(ie),Q=t.createContext(null),X=t.createContext(null);function z(){const e=t.useContext(Q);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function de({value:e,onValueChange:r,open:n,onOpenChange:o,shouldFilter:l=!0,disabled:u=!1,itemToStringValue:a,children:m}){const[x,v]=t.useState(""),[E,p]=t.useState(!1),[d,R]=t.useState(()=>new Map),[I,C]=t.useState(""),[j,N]=t.useState(void 0),y=e!==void 0,w=n!==void 0,L=y?e:x,S=w?n:E,D=t.useCallback(g=>{g||C(""),w||p(g),o?.(g)},[w,o]),V=t.useCallback(g=>{y||v(g),r?.(g)},[y,r]),c=t.useRef(new Map),k=t.useRef(!1),T=t.useRef(!0);t.useEffect(()=>()=>{T.current=!1},[]);const b=t.useCallback(()=>{k.current||(k.current=!0,queueMicrotask(()=>{k.current=!1,T.current&&R(new Map(c.current))}))},[]),P=t.useCallback((g,A)=>{c.current.get(g)!==A&&(c.current.set(g,A),b())},[b]),O=t.useCallback(g=>{for(const[A,G]of g)c.current.set(A,G);R(new Map(c.current))},[]),W=t.useRef(L);t.useLayoutEffect(()=>{W.current=L},[L]);const q=t.useCallback(g=>{g!==W.current&&c.current.has(g)&&(c.current.delete(g),b())},[b]),_=t.useMemo(()=>a?(g,A,G)=>B.defaultFilter(a(g),A,G):B.defaultFilter,[a]),H=t.useMemo(()=>({open:S,setOpen:D,value:L,onValueChange:V,shouldFilter:l,disabled:u,itemLabels:d,registerItem:P,registerItemsSync:O,unregisterItem:q,itemToStringValue:a,filterFn:_,searchValue:I,setSearchValue:C,activeDescendantId:j,setActiveDescendantId:N}),[S,D,L,V,l,u,d,P,O,q,a,_,I,j,N]);return i.jsx(Q.Provider,{value:H,children:i.jsx(Y.Popover,{open:S,onOpenChange:D,children:m})})}const be=ce.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-base 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"]),Z=t.forwardRef(({className:e,dataHook:r,error:n,trackingEl:o,trackingLabel:l,children:u,...a},m)=>{const{open:x,disabled:v,value:E}=z(),p=t.useId(),d=!E,R=n||a["aria-invalid"]===!0||a["aria-invalid"]==="true";return i.jsx(Y.PopoverTrigger,{asChild:!0,children:i.jsxs("button",{ref:m,"aria-controls":x?p:void 0,"aria-expanded":x,"aria-haspopup":"listbox","aria-invalid":R?"true":void 0,className:F.cn(be(),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",e),"data-hook":r,"data-placeholder":d,"data-slot":"combobox-trigger","data-state":x?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":l,disabled:v||a.disabled,role:"combobox",type:"button",...a,children:[u,i.jsx(K.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function fe(e){return e!=null&&typeof e=="object"&&"value"in e&&typeof e.value=="string"}function ee(e,r,n){if(r)return{getValue:r,getLabel:n??r,hasDistinctLabel:!!n};const o=e[0];if(!fe(o))return null;const l=m=>m.value,u="label"in o&&typeof o.label=="string";return{getValue:l,getLabel:n??(u?m=>String(m.label):l),hasDistinctLabel:u||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:l,getItemLabel:u}){const{value:a,itemLabels:m}=z(),x=t.useMemo(()=>o?ee(o,l,u):null,[o,l,u]);U.useDevWarning(()=>!!o&&o.length>0&&!x,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,x]);const v=t.useMemo(()=>!o||!x?null:new Map(o.map(p=>[x.getValue(p),x.getLabel(p)])),[o,x]),E=a?v?.get(a)||m.get(a)||n?.(a)||a:e;return i.jsx("span",{className:F.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:E})}function xe({dataHook:e,className:r,children:n,align:o="start",side:l="bottom",sideOffset:u,avoidCollisions:a,hideList:m=!1,ariaLabel:x}){const{open:v,shouldFilter:E,filterFn:p,itemToStringValue:d}=z(),[R,I]=t.useState(null),C=t.useRef(null),j=t.useCallback(y=>{if(C.current?.(),C.current=null,!y)return;let w=!1;const L=c=>{w||(c==="top"||c==="bottom")&&(w=!0,S.disconnect(),I(c))},S=new MutationObserver(()=>{L(y.getAttribute("data-side"))});S.observe(y,{attributes:!0,attributeFilter:["data-side"]});let D=0,V=0;D=requestAnimationFrame(()=>{V=requestAnimationFrame(()=>{L(y.getAttribute("data-side"))})}),C.current=()=>{w=!0,S.disconnect(),cancelAnimationFrame(D),cancelAnimationFrame(V)}},[]);t.useEffect(()=>{if(!v){C.current?.(),C.current=null;const y=setTimeout(()=>I(null),150);return()=>clearTimeout(y)}},[v]);const N=d?p:void 0;return i.jsx(Y.PopoverContent,{ref:j,align:o,"aria-label":x??"Options",avoidCollisions:a,className:F.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",r),collisionPadding:4,"data-slot":"combobox-popover",side:R??l,sideOffset:u,children:i.jsx($.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",m&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:N,shouldFilter:E,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:l,shouldFilter:u,activeDescendantId:a}=z(),m=t.useRef(void 0);U.useDevWarning(()=>!!(e&&e>0&&u),`debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
2
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.`,[e,c]),U.useDevWarning(()=>!!(e&&e>0&&n.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.",[e,n.value]),t.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=t.useCallback(C=>{u(C),e&&e>0?(clearTimeout(p.current),p.current=setTimeout(()=>{r?.(C)},e)):r?.(C)},[e,r,u]);return l.jsx(_.CommandInput,{ref:o,"aria-activedescendant":a,"data-slot":"combobox-input",onValueChange:m,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>l.jsx(_.CommandList,{ref:n,className:F.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function pe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:u=36,overscan:c=5,children:a,renderEmpty:p,className:m,dataHook:C},S){const v=t.useMemo(()=>ee(e,r,n),[e,r,n]),d=t.useMemo(()=>v?.getValue??(s=>{if(typeof s=="string"||typeof s=="number")return String(s);throw new Error("[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property.")}),[v]),w=t.useMemo(()=>v?.getLabel??d,[v,d]);U.useDevWarning(()=>!v&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[v,e.length]);const I=t.useRef(null),{value:x,onValueChange:N,setOpen:D,shouldFilter:k,searchValue:y,filterFn:R,setActiveDescendantId:j,registerItemsSync:E,unregisterItem:V}=z(),[i,L]=t.useState(0),$=t.useId();t.useImperativeHandle(S,()=>I.current,[]),t.useLayoutEffect(()=>{const s=e.map(f=>[d(f),w(f)]);return E(s),()=>{for(const f of e)V(d(f))}},[e,d,w,E,V]);const b=t.useMemo(()=>{if(!k||!y.trim())return e;const s=[];for(const f of e){let h=v?.hasDistinctLabel?B.defaultFilter(w(f),y):R(d(f),y);if(o)for(const M of o(f))h=Math.max(h,B.defaultFilter(M,y));h>0&&s.push({item:f,score:h})}return s.sort((f,h)=>h.score-f.score),s.map(f=>f.item)},[e,k,y,d,w,o,R,v?.hasDistinctLabel]),P=le.useVirtualizer({count:b.length,getScrollElement:()=>I.current,estimateSize:()=>u,overscan:c}),A=i>=0&&i<b.length?d(b[i]):null;t.useEffect(()=>{L(0)},[y,b.length]);const W=t.useRef(!1);t.useEffect(()=>{if(W.current||!x)return;const s=b.findIndex(f=>d(f)===x);s>=0&&(L(s),P.scrollToIndex(s,{align:"center"}),W.current=!0)},[x,b,d,P]);const T=t.useRef(!1);t.useEffect(()=>{T.current&&i>=0&&i<b.length&&P.scrollToIndex(i,{align:"auto"}),T.current=!1},[i,b.length,P]),t.useEffect(()=>{const s=I.current?.closest('[data-slot="combobox-command"]');if(!s)return;const f=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),T.current=!0,L(M=>M<b.length-1?M+1:M);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),T.current=!0,L(M=>M>0?M-1:M);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),i>=0&&i<b.length){const M=d(b[i]);N(M===x?"":M),D(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),T.current=!0,L(0);break;case"End":h.preventDefault(),h.stopPropagation(),T.current=!0,L(b.length-1);break}};return s.addEventListener("keydown",f,{capture:!0}),()=>s.removeEventListener("keydown",f,{capture:!0})},[b,i,x,N,D,d]);const O=t.useMemo(()=>{const s=new Map;return b.forEach((f,h)=>{s.set(d(f),h)}),s},[b,d]),H=t.useCallback(s=>{const f=O.get(s);f!==void 0&&L(f)},[O]),g=t.useCallback(s=>(O.get(s)??0)+1,[O]),q=b.length,G=t.useMemo(()=>({activeValue:A,onItemPointerMove:H,idPrefix:$,filteredCount:q,getItemPosition:g}),[A,H,$,q,g]),J=A!=null?`${$}item-${A}`:void 0;return t.useEffect(()=>(j(J),()=>j(void 0)),[J,j]),b.length===0?l.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:p}):l.jsx(X.Provider,{value:G,children:l.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:l.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(s=>l.jsx("div",{ref:P.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":s.index,style:{transform:`translateY(${s.start}px)`},children:a(b[s.index],s.index,y)},s.key))})})})}const ge=t.forwardRef(pe),re=t.forwardRef((e,r)=>l.jsx(_.CommandEmpty,{ref:r,"data-slot":"combobox-empty",...e}));re.displayName="ComboboxEmpty";const ne=t.forwardRef(({children:e,...r},n)=>{const o=t.useRef(null);return U.useDevWarning(()=>o.current?o.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"`,[e]),l.jsx(_.CommandGroup,{ref:u=>{o.current=u,typeof n=="function"?n(u):n&&(n.current=u)},"data-slot":"combobox-group",...r,children:e})});ne.displayName="ComboboxGroup";function he(e,r,n){if(!r||!r.trim())return e;const o=new RegExp(`(${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),u=e.split(o);return l.jsx("span",{children:u.map((c,a)=>a%2===1?l.jsx("span",{className:n,children:c},a):l.jsx(t.Fragment,{children:c},a))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:u,highlight:c,highlightClassName:a,keywords:p,...m},C)=>{const{value:S,onValueChange:v,setOpen:d,registerItem:w,unregisterItem:I}=z(),x=t.useContext(X),N=S===e,D=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),k=t.useRef(w),y=t.useRef(I);t.useEffect(()=>{k.current=w,y.current=I},[w,I]);const R=!!x;t.useEffect(()=>{if(!R)return k.current(e,D),()=>y.current(e)},[e,D,R]);const j=()=>{v(e===S?"":e),d(!1)},E=()=>c&&typeof o=="string"?he(o,c,a||"text-sm leading-normal font-semibold"):o;if(x){const V=x.activeValue===e,i=!!m.disabled;return l.jsxs("div",{ref:C,"aria-disabled":i||void 0,"aria-posinset":x.getItemPosition(e),"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",i&&"pointer-events-none opacity-50",u),"data-highlighted":V||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${x.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:i?void 0:j,onKeyDown:i?void 0:L=>{(L.key==="Enter"||L.key===" ")&&j()},onPointerMove:i?void 0:()=>x.onItemPointerMove(e),children:[E(),N&&l.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return l.jsxs(_.CommandItem,{ref:C,className:F.cn("justify-between",u),"data-slot":"combobox-item",dataHook:n,keywords:p?[D,...p]:[D],value:e,onSelect:j,...m,children:[E(),N&&l.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});se.displayName="ComboboxItem";const ae=t.forwardRef((e,r)=>l.jsx(_.CommandSeparator,{ref:r,"data-slot":"combobox-separator",...e}));ae.displayName="ComboboxSeparator";function ve({className:e,children:r,loadingText:n}){return l.jsx("div",{"aria-live":"polite",className:F.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:r||l.jsxs(l.Fragment,{children:[l.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),n??"Loading..."]})})}exports.Combobox=de;exports.ComboboxContent=xe;exports.ComboboxEmpty=re;exports.ComboboxGroup=ne;exports.ComboboxInput=te;exports.ComboboxItem=se;exports.ComboboxList=oe;exports.ComboboxLoading=ve;exports.ComboboxSeparator=ae;exports.ComboboxTrigger=Z;exports.ComboboxValue=me;exports.ComboboxVirtualList=ge;
3
+ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,[e,u]),U.useDevWarning(()=>!!(e&&e>0&&n.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.",[e,n.value]),t.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const x=t.useCallback(v=>{l(v),e&&e>0?(clearTimeout(m.current),m.current=setTimeout(()=>{r?.(v)},e)):r?.(v)},[e,r,l]);return i.jsx($.CommandInput,{ref:o,"aria-activedescendant":a,"data-slot":"combobox-input",onValueChange:x,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>i.jsx($.CommandList,{ref:n,className:F.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function pe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:l=36,overscan:u=5,children:a,renderEmpty:m,className:x,dataHook:v},E){const p=t.useMemo(()=>ee(e,r,n),[e,r,n]),d=t.useMemo(()=>p?.getValue??(s=>{if(typeof s=="string"||typeof s=="number")return String(s);throw new Error("[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property.")}),[p]),R=t.useMemo(()=>p?.getLabel??d,[p,d]);U.useDevWarning(()=>!p&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[p,e.length]);const I=t.useRef(null),{value:C,onValueChange:j,setOpen:N,shouldFilter:y,searchValue:w,filterFn:L,setActiveDescendantId:S,registerItemsSync:D,unregisterItem:V}=z(),[c,k]=t.useState(0),T=t.useId();t.useImperativeHandle(E,()=>I.current,[]),t.useLayoutEffect(()=>{const s=e.map(f=>[d(f),R(f)]);return D(s),()=>{for(const f of e)V(d(f))}},[e,d,R,D,V]);const b=t.useMemo(()=>{if(!y||!w.trim())return e;const s=[];for(const f of e){let h=p?.hasDistinctLabel?B.defaultFilter(R(f),w):L(d(f),w);if(o)for(const M of o(f))h=Math.max(h,B.defaultFilter(M,w));h>0&&s.push({item:f,score:h})}return s.sort((f,h)=>h.score-f.score),s.map(f=>f.item)},[e,y,w,d,R,o,L,p?.hasDistinctLabel]),P=le.useVirtualizer({count:b.length,getScrollElement:()=>I.current,estimateSize:()=>l,overscan:u}),O=c>=0&&c<b.length?d(b[c]):null;t.useEffect(()=>{k(0)},[w,b.length]);const W=t.useRef(!1);t.useEffect(()=>{if(W.current||!C)return;const s=b.findIndex(f=>d(f)===C);s>=0&&(k(s),P.scrollToIndex(s,{align:"center"}),W.current=!0)},[C,b,d,P]);const q=t.useRef(!1);t.useEffect(()=>{q.current&&c>=0&&c<b.length&&P.scrollToIndex(c,{align:"auto"}),q.current=!1},[c,b.length,P]),t.useEffect(()=>{const s=I.current?.closest('[data-slot="combobox-command"]');if(!s)return;const f=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),q.current=!0,k(M=>M<b.length-1?M+1:M);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),q.current=!0,k(M=>M>0?M-1:M);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),c>=0&&c<b.length){const M=d(b[c]);j(M===C?"":M),N(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),q.current=!0,k(0);break;case"End":h.preventDefault(),h.stopPropagation(),q.current=!0,k(b.length-1);break}};return s.addEventListener("keydown",f,{capture:!0}),()=>s.removeEventListener("keydown",f,{capture:!0})},[b,c,C,j,N,d]);const _=t.useMemo(()=>{const s=new Map;return b.forEach((f,h)=>{s.set(d(f),h)}),s},[b,d]),H=t.useCallback(s=>{const f=_.get(s);f!==void 0&&k(f)},[_]),g=t.useCallback(s=>(_.get(s)??0)+1,[_]),A=b.length,G=t.useMemo(()=>({activeValue:O,onItemPointerMove:H,idPrefix:T,filteredCount:A,getItemPosition:g}),[O,H,T,A,g]),J=O!=null?`${T}item-${O}`:void 0;return t.useEffect(()=>(S(J),()=>S(void 0)),[J,S]),b.length===0?i.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",x),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:m}):i.jsx(X.Provider,{value:G,children:i.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",x),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:i.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(s=>i.jsx("div",{ref:P.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":s.index,style:{transform:`translateY(${s.start}px)`},children:a(b[s.index],s.index,w)},s.key))})})})}const ge=t.forwardRef(pe),re=t.forwardRef((e,r)=>i.jsx($.CommandEmpty,{ref:r,"data-slot":"combobox-empty",...e}));re.displayName="ComboboxEmpty";const ne=t.forwardRef(({children:e,...r},n)=>{const o=t.useRef(null);return U.useDevWarning(()=>o.current?o.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"`,[e]),i.jsx($.CommandGroup,{ref:l=>{o.current=l,typeof n=="function"?n(l):n&&(n.current=l)},"data-slot":"combobox-group",...r,children:e})});ne.displayName="ComboboxGroup";function he(e,r,n){if(!r||!r.trim())return e;const o=new RegExp(`(${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),l=e.split(o);return i.jsx("span",{children:l.map((u,a)=>a%2===1?i.jsx("span",{className:n,children:u},a):i.jsx(t.Fragment,{children:u},a))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:l,highlight:u,highlightClassName:a,keywords:m,onSelect:x,...v},E)=>{const{value:p,onValueChange:d,setOpen:R,registerItem:I,unregisterItem:C}=z(),j=t.useContext(X),N=p===e,y=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),w=t.useRef(I),L=t.useRef(C);t.useEffect(()=>{w.current=I,L.current=C},[I,C]);const S=!!j;t.useEffect(()=>{if(!S)return w.current(e,y),()=>L.current(e)},[e,y,S]);const D=()=>{d(e===p?"":e),R(!1),x?.(e)},V=()=>u&&typeof o=="string"?he(o,u,a||"text-sm leading-normal font-semibold"):o;if(j){const c=j.activeValue===e,k=!!v.disabled;return i.jsxs("div",{ref:E,"aria-disabled":k||void 0,"aria-posinset":j.getItemPosition(e),"aria-selected":N,"aria-setsize":j.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",k&&"pointer-events-none opacity-50",l),"data-highlighted":c||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${j.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:k?void 0:D,onKeyDown:k?void 0:T=>{(T.key==="Enter"||T.key===" ")&&D()},onPointerMove:k?void 0:()=>j.onItemPointerMove(e),children:[V(),N&&i.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return i.jsxs($.CommandItem,{ref:E,className:F.cn("justify-between",l),"data-slot":"combobox-item",dataHook:n,keywords:m?[y,...m]:[y],value:e,onSelect:D,...v,children:[V(),N&&i.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});se.displayName="ComboboxItem";const ae=t.forwardRef((e,r)=>i.jsx($.CommandSeparator,{ref:r,"data-slot":"combobox-separator",...e}));ae.displayName="ComboboxSeparator";function ve({className:e,children:r,loadingText:n}){return i.jsx("div",{"aria-live":"polite",className:F.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:r||i.jsxs(i.Fragment,{children:[i.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),n??"Loading..."]})})}exports.Combobox=de;exports.ComboboxContent=xe;exports.ComboboxEmpty=re;exports.ComboboxGroup=ne;exports.ComboboxInput=te;exports.ComboboxItem=se;exports.ComboboxList=oe;exports.ComboboxLoading=ve;exports.ComboboxSeparator=ae;exports.ComboboxTrigger=Z;exports.ComboboxValue=me;exports.ComboboxVirtualList=ge;
@@ -213,6 +213,14 @@ export interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Comm
213
213
  highlightClassName?: string;
214
214
  /** Additional keywords to match against when filtering. The item label is always included automatically. */
215
215
  keywords?: string[];
216
+ /**
217
+ * Callback fired when the item is activated (clicked or chosen via keyboard).
218
+ * Fires on every activation, including when the item is being deselected
219
+ * (toggled off). Always receives the item's own value, not the resulting
220
+ * combobox value — use `Combobox`'s `onValueChange` for selection state.
221
+ * @param value - The value of the activated item
222
+ */
223
+ onSelect?: (value: string) => void;
216
224
  }
217
225
  declare const ComboboxItem: React.ForwardRefExoticComponent<Omit<ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
218
226
  export type ComboboxSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,oCAAoC,CAA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