@brightlocal/ui-components 2.23.0 → 2.24.1

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 (90) hide show
  1. package/AI_USAGE.md +1 -1
  2. package/README.md +3 -2
  3. package/component-meta.json +116 -25
  4. package/deprecations.json +22 -0
  5. package/dist/alert.cjs +1 -1
  6. package/dist/alert.d.ts.map +1 -1
  7. package/dist/alert.js +6 -9
  8. package/dist/blocks/sidebar.cjs +1 -1
  9. package/dist/blocks/sidebar.d.ts.map +1 -1
  10. package/dist/blocks/sidebar.js +151 -156
  11. package/dist/brand-illustration-motif.cjs +1 -0
  12. package/dist/brand-illustration-motif.d.ts +55 -0
  13. package/dist/brand-illustration-motif.d.ts.map +1 -0
  14. package/dist/brand-illustration-motif.js +67 -0
  15. package/dist/chart.cjs +7 -7
  16. package/dist/chart.d.ts +287 -2
  17. package/dist/chart.d.ts.map +1 -1
  18. package/dist/chart.js +408 -152
  19. package/dist/combobox.cjs +3 -3
  20. package/dist/combobox.d.ts +14 -1
  21. package/dist/combobox.d.ts.map +1 -1
  22. package/dist/combobox.js +387 -376
  23. package/dist/data-table.cjs +1 -0
  24. package/dist/{blocks/data-table.d.ts → data-table.d.ts} +159 -4
  25. package/dist/data-table.d.ts.map +1 -0
  26. package/dist/data-table.js +721 -0
  27. package/dist/field.cjs +1 -1
  28. package/dist/field.d.ts +16 -1
  29. package/dist/field.d.ts.map +1 -1
  30. package/dist/field.js +23 -7
  31. package/dist/global-layout.cjs +1 -1
  32. package/dist/global-layout.d.ts +32 -2
  33. package/dist/global-layout.d.ts.map +1 -1
  34. package/dist/global-layout.js +179 -109
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +526 -511
  39. package/dist/label.cjs +1 -1
  40. package/dist/label.d.ts +9 -0
  41. package/dist/label.d.ts.map +1 -1
  42. package/dist/label.js +26 -22
  43. package/dist/lib/spring-settle.cjs +1 -0
  44. package/dist/lib/spring-settle.d.ts +20 -0
  45. package/dist/lib/spring-settle.d.ts.map +1 -0
  46. package/dist/lib/spring-settle.js +4 -0
  47. package/dist/link.cjs +1 -1
  48. package/dist/link.d.ts +3 -2
  49. package/dist/link.d.ts.map +1 -1
  50. package/dist/link.js +22 -11
  51. package/dist/loading.cjs +1 -1
  52. package/dist/loading.d.ts +2 -1
  53. package/dist/loading.d.ts.map +1 -1
  54. package/dist/loading.js +106 -85
  55. package/dist/select.cjs +2 -2
  56. package/dist/select.d.ts +16 -1
  57. package/dist/select.d.ts.map +1 -1
  58. package/dist/select.js +112 -79
  59. package/dist/table.cjs +1 -1
  60. package/dist/table.d.ts +29 -0
  61. package/dist/table.d.ts.map +1 -1
  62. package/dist/table.js +2 -2
  63. package/dist/text-reveal-motion.cjs +1 -1
  64. package/dist/text-reveal-motion.d.ts.map +1 -1
  65. package/dist/text-reveal-motion.js +236 -219
  66. package/dist/typography.cjs +1 -1
  67. package/dist/typography.d.ts +20 -4
  68. package/dist/typography.d.ts.map +1 -1
  69. package/dist/typography.js +263 -228
  70. package/package.json +2 -14
  71. package/src/blocks/sidebar.tsx +11 -23
  72. package/src/components/alert.tsx +1 -4
  73. package/src/components/brand-illustration-motif.tsx +143 -0
  74. package/src/components/chart.tsx +632 -1
  75. package/src/components/combobox.tsx +47 -0
  76. package/src/{blocks → components}/data-table.tsx +270 -16
  77. package/src/components/field.tsx +31 -0
  78. package/src/components/global-layout.tsx +144 -5
  79. package/src/components/label.tsx +13 -1
  80. package/src/components/link.tsx +13 -1
  81. package/src/components/loading.tsx +71 -38
  82. package/src/components/select.tsx +82 -2
  83. package/src/components/table.tsx +31 -2
  84. package/src/components/text-reveal-motion.tsx +90 -64
  85. package/src/components/typography.tsx +74 -18
  86. package/src/index.ts +2 -1
  87. package/src/lib/spring-settle.ts +19 -0
  88. package/dist/blocks/data-table.cjs +0 -1
  89. package/dist/blocks/data-table.d.ts.map +0 -1
  90. package/dist/blocks/data-table.js +0 -654
package/dist/combobox.cjs CHANGED
@@ -1,4 +1,4 @@
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[p,v]=t.useState(""),[E,x]=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:p,S=w?n:E,D=t.useCallback(g=>{g||C(""),w||x(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:p,disabled:v,value:E}=z(),x=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":p?x:void 0,"aria-expanded":p,"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":p?"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(),p=t.useMemo(()=>o?ee(o,l,u):null,[o,l,u]);U.useDevWarning(()=>!!o&&o.length>0&&!p,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,p]);const v=t.useMemo(()=>!o||!p?null:new Map(o.map(x=>[p.getValue(x),p.getLabel(x)])),[o,p]),E=a?v?.get(a)||m.get(a)||n?.(a)||a:e;return i.jsx("span",{className:F.cn("overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:E})}function pe({dataHook:e,className:r,children:n,align:o="start",side:l="bottom",sideOffset:u,avoidCollisions:a,hideList:m=!1,ariaLabel:p}){const{open:v,shouldFilter:E,filterFn:x,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?x:void 0;return i.jsx(Y.PopoverContent,{ref:j,align:o,"aria-label":p??"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).
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),ie=require("react"),Y=require("@brightlocal/icons"),ce=require("@tanstack/react-virtual"),ue=require("class-variance-authority"),B=require("cmdk"),T=require("@brightlocal/ui-components/lib/utils"),H=require("@brightlocal/ui-components/lib/use-dev-warning"),J=require("@brightlocal/ui-components/popover"),$=require("@brightlocal/ui-components/command");function le(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=le(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,onClose:i,shouldFilter:f=!0,disabled:u=!1,itemToStringValue:d,children:m}){const[v,S]=t.useState(""),[x,b]=t.useState(!1),[E,j]=t.useState(()=>new Map),[C,L]=t.useState(""),[V,w]=t.useState(void 0),y=e!==void 0,D=n!==void 0,R=y?e:v,k=D?n:x,M=t.useCallback(g=>{g||L(""),D||b(g),o?.(g)},[D,o]),p=t.useCallback(g=>{y||S(g),r?.(g)},[y,r]),I=t.useRef(i);t.useEffect(()=>{I.current=i},[i]);const F=t.useRef(k);t.useEffect(()=>{F.current&&!k&&I.current?.(),F.current=k},[k]),t.useEffect(()=>()=>{F.current&&I.current?.()},[]);const l=t.useRef(new Map),P=t.useRef(!1),A=t.useRef(!0);t.useEffect(()=>()=>{A.current=!1},[]);const O=t.useCallback(()=>{P.current||(P.current=!0,queueMicrotask(()=>{P.current=!1,A.current&&j(new Map(l.current))}))},[]),q=t.useCallback((g,s)=>{l.current.get(g)!==s&&(l.current.set(g,s),O())},[O]),_=t.useCallback(g=>{for(const[s,c]of g)l.current.set(s,c);j(new Map(l.current))},[]),W=t.useRef(R);t.useLayoutEffect(()=>{W.current=R},[R]);const G=t.useCallback(g=>{g!==W.current&&l.current.has(g)&&(l.current.delete(g),O())},[O]),U=t.useMemo(()=>d?(g,s,c)=>B.defaultFilter(d(g),s,c):B.defaultFilter,[d]),K=t.useMemo(()=>({open:k,setOpen:M,value:R,onValueChange:p,shouldFilter:f,disabled:u,itemLabels:E,registerItem:q,registerItemsSync:_,unregisterItem:G,itemToStringValue:d,filterFn:U,searchValue:C,setSearchValue:L,activeDescendantId:V,setActiveDescendantId:w}),[k,M,R,p,f,u,E,q,_,G,d,U,C,V,w]);return a.jsx(Q.Provider,{value:K,children:a.jsx(J.Popover,{open:k,onOpenChange:M,children:m})})}const fe=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:i,children:f,...u},d)=>{const{open:m,disabled:v,value:S}=z(),x=t.useId(),b=!S,E=n||u["aria-invalid"]===!0||u["aria-invalid"]==="true";return a.jsx(J.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{ref:d,"aria-controls":m?x:void 0,"aria-expanded":m,"aria-haspopup":"listbox","aria-invalid":E?"true":void 0,className:T.cn(fe(),E&&"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":b,"data-slot":"combobox-trigger","data-state":m?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":i,disabled:v||u.disabled,role:"combobox",type:"button",...u,children:[f,a.jsx(Y.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function be(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(!be(o))return null;const i=d=>d.value,f="label"in o&&typeof o.label=="string";return{getValue:i,getLabel:n??(f?d=>String(d.label):i),hasDistinctLabel:f||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:i,getItemLabel:f}){const{value:u,itemLabels:d}=z(),m=t.useMemo(()=>o?ee(o,i,f):null,[o,i,f]);H.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 v=t.useMemo(()=>!o||!m?null:new Map(o.map(x=>[m.getValue(x),m.getLabel(x)])),[o,m]),S=u?v?.get(u)||d.get(u)||n?.(u)||u:e;return a.jsx("span",{className:T.cn("overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:S})}function pe({dataHook:e,className:r,children:n,align:o="start",side:i="bottom",sideOffset:f,avoidCollisions:u,hideList:d=!1,ariaLabel:m}){const{open:v,shouldFilter:S,filterFn:x,itemToStringValue:b}=z(),[E,j]=t.useState(null),C=t.useRef(null),L=t.useCallback(w=>{if(C.current?.(),C.current=null,!w)return;let y=!1;const D=p=>{y||(p==="top"||p==="bottom")&&(y=!0,R.disconnect(),j(p))},R=new MutationObserver(()=>{D(w.getAttribute("data-side"))});R.observe(w,{attributes:!0,attributeFilter:["data-side"]});let k=0,M=0;k=requestAnimationFrame(()=>{M=requestAnimationFrame(()=>{D(w.getAttribute("data-side"))})}),C.current=()=>{y=!0,R.disconnect(),cancelAnimationFrame(k),cancelAnimationFrame(M)}},[]);t.useEffect(()=>{if(!v){C.current?.(),C.current=null;const w=setTimeout(()=>j(null),150);return()=>clearTimeout(w)}},[v]);const V=b?x:void 0;return a.jsx(J.PopoverContent,{ref:L,align:o,"aria-label":m??"Options",avoidCollisions:u,className:T.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:E??i,sideOffset:f,children:a.jsx($.Command,{className:T.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",d&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:V,shouldFilter:S,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:i,shouldFilter:f,activeDescendantId:u}=z(),d=t.useRef(void 0);H.useDevWarning(()=>!!(e&&e>0&&f),`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,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 p=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:p,...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 xe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:l=36,overscan:u=5,children:a,renderEmpty:m,className:p,dataHook:v},E){const x=t.useMemo(()=>ee(e,r,n),[e,r,n]),d=t.useMemo(()=>x?.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.")}),[x]),R=t.useMemo(()=>x?.getLabel??d,[x,d]);U.useDevWarning(()=>!x&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[x,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=x?.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,x?.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",p),"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",p),"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(xe),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:p,...v},E)=>{const{value:x,onValueChange:d,setOpen:R,registerItem:I,unregisterItem:C}=z(),j=t.useContext(X),N=x===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===x?"":e),R(!1),p?.(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=pe;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,f]),H.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(()=>()=>{d.current&&clearTimeout(d.current)},[]);const m=t.useCallback(v=>{i(v),e&&e>0?(clearTimeout(d.current),d.current=setTimeout(()=>{r?.(v)},e)):r?.(v)},[e,r,i]);return a.jsx($.CommandInput,{ref:o,"aria-activedescendant":u,"data-slot":"combobox-input",onValueChange:m,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>a.jsx($.CommandList,{ref:n,className:T.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function xe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:i=36,overscan:f=5,children:u,renderEmpty:d,className:m,dataHook:v},S){const x=t.useMemo(()=>ee(e,r,n),[e,r,n]),b=t.useMemo(()=>x?.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.")}),[x]),E=t.useMemo(()=>x?.getLabel??b,[x,b]);H.useDevWarning(()=>!x&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[x,e.length]);const j=t.useRef(null),{value:C,onValueChange:L,setOpen:V,shouldFilter:w,searchValue:y,filterFn:D,setActiveDescendantId:R,registerItemsSync:k,unregisterItem:M}=z(),[p,I]=t.useState(0),F=t.useId();t.useImperativeHandle(S,()=>j.current,[]),t.useLayoutEffect(()=>{const s=e.map(c=>[b(c),E(c)]);return k(s),()=>{for(const c of e)M(b(c))}},[e,b,E,k,M]);const l=t.useMemo(()=>{if(!w||!y.trim())return e;const s=[];for(const c of e){let h=x?.hasDistinctLabel?B.defaultFilter(E(c),y):D(b(c),y);if(o)for(const N of o(c))h=Math.max(h,B.defaultFilter(N,y));h>0&&s.push({item:c,score:h})}return s.sort((c,h)=>h.score-c.score),s.map(c=>c.item)},[e,w,y,b,E,o,D,x?.hasDistinctLabel]),P=ce.useVirtualizer({count:l.length,getScrollElement:()=>j.current,estimateSize:()=>i,overscan:f}),A=p>=0&&p<l.length?b(l[p]):null;t.useEffect(()=>{I(0)},[y,l.length]);const O=t.useRef(!1);t.useEffect(()=>{if(O.current||!C)return;const s=l.findIndex(c=>b(c)===C);s>=0&&(I(s),P.scrollToIndex(s,{align:"center"}),O.current=!0)},[C,l,b,P]);const q=t.useRef(!1);t.useEffect(()=>{q.current&&p>=0&&p<l.length&&P.scrollToIndex(p,{align:"auto"}),q.current=!1},[p,l.length,P]),t.useEffect(()=>{const s=j.current?.closest('[data-slot="combobox-command"]');if(!s)return;const c=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),q.current=!0,I(N=>N<l.length-1?N+1:N);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),q.current=!0,I(N=>N>0?N-1:N);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),p>=0&&p<l.length){const N=b(l[p]);L(N===C?"":N),V(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),q.current=!0,I(0);break;case"End":h.preventDefault(),h.stopPropagation(),q.current=!0,I(l.length-1);break}};return s.addEventListener("keydown",c,{capture:!0}),()=>s.removeEventListener("keydown",c,{capture:!0})},[l,p,C,L,V,b]);const _=t.useMemo(()=>{const s=new Map;return l.forEach((c,h)=>{s.set(b(c),h)}),s},[l,b]),W=t.useCallback(s=>{const c=_.get(s);c!==void 0&&I(c)},[_]),G=t.useCallback(s=>(_.get(s)??0)+1,[_]),U=l.length,K=t.useMemo(()=>({activeValue:A,onItemPointerMove:W,idPrefix:F,filteredCount:U,getItemPosition:G}),[A,W,F,U,G]),g=A!=null?`${F}item-${A}`:void 0;return t.useEffect(()=>(R(g),()=>R(void 0)),[g,R]),l.length===0?a.jsx("div",{ref:j,className:T.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:d}):a.jsx(X.Provider,{value:K,children:a.jsx("div",{ref:j,className:T.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:a.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(s=>a.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:u(l[s.index],s.index,y)},s.key))})})})}const ge=t.forwardRef(xe),re=t.forwardRef((e,r)=>a.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 H.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]),a.jsx($.CommandGroup,{ref:i=>{o.current=i,typeof n=="function"?n(i):n&&(n.current=i)},"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"),i=e.split(o);return a.jsx("span",{children:i.map((f,u)=>u%2===1?a.jsx("span",{className:n,children:f},u):a.jsx(t.Fragment,{children:f},u))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:i,highlight:f,highlightClassName:u,keywords:d,onSelect:m,...v},S)=>{const{value:x,onValueChange:b,setOpen:E,registerItem:j,unregisterItem:C}=z(),L=t.useContext(X),V=x===e,w=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),y=t.useRef(j),D=t.useRef(C);t.useEffect(()=>{y.current=j,D.current=C},[j,C]);const R=!!L;t.useEffect(()=>{if(!R)return y.current(e,w),()=>D.current(e)},[e,w,R]);const k=()=>{b(e===x?"":e),E(!1),m?.(e)},M=()=>f&&typeof o=="string"?he(o,f,u||"text-sm leading-normal font-semibold"):o;if(L){const p=L.activeValue===e,I=!!v.disabled;return a.jsxs("div",{ref:S,"aria-disabled":I||void 0,"aria-posinset":L.getItemPosition(e),"aria-selected":V,"aria-setsize":L.filteredCount,className:T.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",i),"data-highlighted":p||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${L.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:I?void 0:k,onKeyDown:I?void 0:F=>{(F.key==="Enter"||F.key===" ")&&k()},onPointerMove:I?void 0:()=>L.onItemPointerMove(e),children:[M(),V&&a.jsx(Y.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return a.jsxs($.CommandItem,{ref:S,className:T.cn("justify-between",i),"data-slot":"combobox-item",dataHook:n,keywords:d?[w,...d]:[w],value:e,onSelect:k,...v,children:[M(),V&&a.jsx(Y.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});se.displayName="ComboboxItem";const ae=t.forwardRef((e,r)=>a.jsx($.CommandSeparator,{ref:r,"data-slot":"combobox-separator",...e}));ae.displayName="ComboboxSeparator";function ve({className:e,children:r,loadingText:n}){return a.jsx("div",{"aria-live":"polite",className:T.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:r||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]"}),n??"Loading..."]})})}exports.Combobox=de;exports.ComboboxContent=pe;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;
@@ -43,6 +43,19 @@ export interface ComboboxProps {
43
43
  open?: boolean;
44
44
  /** Callback when open state changes */
45
45
  onOpenChange?: (open: boolean) => void;
46
+ /**
47
+ * Close-commit callback — fired once each time the popover actually
48
+ * closes, and guaranteed to fire **after** any pending `onValueChange` has
49
+ * been delivered. Designed for blur-based form validation — in React Hook
50
+ * Form's onBlur mode, pass `field.onBlur` here so validation runs against
51
+ * the committed value when the dropdown closes, keeping `onOpenChange`
52
+ * free for product logic.
53
+ *
54
+ * Fires only on resolved closes: a controlled consumer that vetoes a close
55
+ * request gets no callback, while a programmatic controlled close does
56
+ * fire it. Unmounting while open counts as a close.
57
+ */
58
+ onClose?: () => void;
46
59
  /**
47
60
  * Whether to use built-in client-side filtering. Defaults to `true`.
48
61
  * Both `ComboboxList` (cmdk) and `ComboboxVirtualList` respect this flag.
@@ -57,7 +70,7 @@ export interface ComboboxProps {
57
70
  /** Children */
58
71
  children: React.ReactNode;
59
72
  }
60
- declare function Combobox({ value: controlledValue, onValueChange: controlledOnValueChange, open: controlledOpen, onOpenChange: controlledOnOpenChange, shouldFilter, disabled, itemToStringValue, children, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
73
+ declare function Combobox({ value: controlledValue, onValueChange: controlledOnValueChange, open: controlledOpen, onOpenChange: controlledOnOpenChange, onClose, shouldFilter, disabled, itemToStringValue, children, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
61
74
  export interface ComboboxTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
62
75
  /** Data hook for automated testing (REQUIRED) */
63
76
  dataHook: string;
@@ -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,CAAC;AA0E5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,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;;;;;OAKG;IACH,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,QA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