@brightlocal/ui-components 2.25.0 → 2.27.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 (98) hide show
  1. package/README.md +4 -2
  2. package/component-meta.json +3809 -182
  3. package/dist/alert.cjs +1 -1
  4. package/dist/alert.d.ts +23 -9
  5. package/dist/alert.d.ts.map +1 -1
  6. package/dist/alert.js +95 -87
  7. package/dist/blocks/progress-screen.cjs +1 -0
  8. package/dist/blocks/progress-screen.d.ts +109 -0
  9. package/dist/blocks/progress-screen.d.ts.map +1 -0
  10. package/dist/blocks/progress-screen.js +339 -0
  11. package/dist/blocks/sidebar.cjs +1 -1
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +155 -153
  14. package/dist/brand-illustration-motif.d.ts +1 -1
  15. package/dist/breadcrumb.cjs +1 -1
  16. package/dist/breadcrumb.d.ts.map +1 -1
  17. package/dist/breadcrumb.js +44 -40
  18. package/dist/button.cjs +1 -1
  19. package/dist/button.d.ts.map +1 -1
  20. package/dist/button.js +28 -28
  21. package/dist/chip.cjs +1 -1
  22. package/dist/chip.d.ts +1 -1
  23. package/dist/chip.d.ts.map +1 -1
  24. package/dist/chip.js +42 -41
  25. package/dist/combobox.cjs +3 -3
  26. package/dist/combobox.d.ts +4 -2
  27. package/dist/combobox.d.ts.map +1 -1
  28. package/dist/combobox.js +161 -161
  29. package/dist/data-table.cjs +1 -1
  30. package/dist/data-table.d.ts +155 -4
  31. package/dist/data-table.d.ts.map +1 -1
  32. package/dist/data-table.js +462 -309
  33. package/dist/global-layout.cjs +1 -1
  34. package/dist/global-layout.d.ts +31 -5
  35. package/dist/global-layout.d.ts.map +1 -1
  36. package/dist/global-layout.js +276 -194
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.ts +3 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +462 -451
  41. package/dist/lib/motion.cjs +1 -1
  42. package/dist/lib/motion.js +10 -8
  43. package/dist/link.cjs +1 -1
  44. package/dist/link.d.ts +5 -2
  45. package/dist/link.d.ts.map +1 -1
  46. package/dist/link.js +97 -91
  47. package/dist/list.cjs +1 -1
  48. package/dist/list.js +65 -63
  49. package/dist/progress.cjs +1 -1
  50. package/dist/progress.d.ts +61 -3
  51. package/dist/progress.d.ts.map +1 -1
  52. package/dist/progress.js +142 -65
  53. package/dist/route-progress.cjs +1 -0
  54. package/dist/route-progress.d.ts +103 -0
  55. package/dist/route-progress.d.ts.map +1 -0
  56. package/dist/route-progress.js +106 -0
  57. package/dist/sheet.cjs +1 -1
  58. package/dist/sheet.d.ts +35 -2
  59. package/dist/sheet.d.ts.map +1 -1
  60. package/dist/sheet.js +102 -65
  61. package/dist/sonner.cjs +1 -1
  62. package/dist/sonner.d.ts.map +1 -1
  63. package/dist/sonner.js +11 -15
  64. package/dist/spinner.cjs +1 -0
  65. package/dist/spinner.d.ts +57 -0
  66. package/dist/spinner.d.ts.map +1 -0
  67. package/dist/spinner.js +35 -0
  68. package/dist/stepper.cjs +1 -1
  69. package/dist/stepper.d.ts.map +1 -1
  70. package/dist/stepper.js +26 -25
  71. package/dist/table.cjs +1 -1
  72. package/dist/table.d.ts +1 -1
  73. package/dist/table.d.ts.map +1 -1
  74. package/dist/table.js +6 -2
  75. package/package.json +15 -6
  76. package/src/blocks/progress-screen.tsx +481 -0
  77. package/src/blocks/sidebar.tsx +22 -15
  78. package/src/components/alert.tsx +68 -33
  79. package/src/components/breadcrumb.tsx +9 -4
  80. package/src/components/button.tsx +2 -5
  81. package/src/components/chip.tsx +4 -3
  82. package/src/components/combobox.tsx +15 -8
  83. package/src/components/data-table.tsx +358 -16
  84. package/src/components/global-layout.tsx +228 -62
  85. package/src/components/link.tsx +88 -63
  86. package/src/components/list.tsx +5 -5
  87. package/src/components/progress.tsx +217 -30
  88. package/src/components/route-progress.tsx +354 -0
  89. package/src/components/sheet.tsx +87 -5
  90. package/src/components/sonner.tsx +3 -12
  91. package/src/components/spinner.tsx +94 -0
  92. package/src/components/stepper.tsx +3 -4
  93. package/src/components/table.tsx +6 -2
  94. package/src/index.ts +3 -0
  95. package/dist/browser-entry.d.ts +0 -19
  96. package/dist/browser-entry.d.ts.map +0 -1
  97. package/src/browser-entry.ts +0 -99
  98. package/src/browser-tokens.css +0 -1
package/dist/combobox.cjs CHANGED
@@ -1,4 +1,4 @@
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-fast 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).
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"),le=require("class-variance-authority"),B=require("cmdk"),q=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"),ue=require("@brightlocal/ui-components/spinner");function de(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=de(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 fe({value:e,onValueChange:r,open:n,onOpenChange:o,onClose:i,shouldFilter:f=!0,disabled:l=!1,itemToStringValue:d,children:m}){const[v,E]=t.useState(""),[x,b]=t.useState(!1),[S,R]=t.useState(()=>new Map),[C,L]=t.useState(""),[V,w]=t.useState(void 0),y=e!==void 0,D=n!==void 0,j=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||E(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 u=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&&R(new Map(u.current))}))},[]),T=t.useCallback((g,s)=>{u.current.get(g)!==s&&(u.current.set(g,s),O())},[O]),_=t.useCallback(g=>{for(const[s,c]of g)u.current.set(s,c);R(new Map(u.current))},[]),W=t.useRef(j);t.useLayoutEffect(()=>{W.current=j},[j]);const G=t.useCallback(g=>{g!==W.current&&u.current.has(g)&&(u.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:j,onValueChange:p,shouldFilter:f,disabled:l,itemLabels:S,registerItem:T,registerItemsSync:_,unregisterItem:G,itemToStringValue:d,filterFn:U,searchValue:C,setSearchValue:L,activeDescendantId:V,setActiveDescendantId:w}),[k,M,j,p,f,l,S,T,_,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 be=le.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-fast ease-out","[&_svg]:pointer-events-none [&_svg]:shrink-0"]),Z=t.forwardRef(({className:e,dataHook:r,error:n,trackingEl:o,trackingLabel:i,children:f,...l},d)=>{const{open:m,disabled:v,value:E}=z(),x=t.useId(),b=!E,S=n||l["aria-invalid"]===!0||l["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":S?"true":void 0,className:q.cn(be(),S&&"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||l.disabled,role:"combobox",type:"button",...l,children:[f,a.jsx(Y.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function me(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(!me(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 pe({placeholder:e,className:r,displayValue:n,items:o,getItemValue:i,getItemLabel:f}){const{value:l,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]),E=l?v?.get(l)||d.get(l)||n?.(l)||l:e;return a.jsx("span",{className:q.cn("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:i="bottom",sideOffset:f,avoidCollisions:l,hideList:d=!1,ariaLabel:m}){const{open:v,shouldFilter:E,filterFn:x,itemToStringValue:b}=z(),[S,R]=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,j.disconnect(),R(p))},j=new MutationObserver(()=>{D(w.getAttribute("data-side"))});j.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,j.disconnect(),cancelAnimationFrame(k),cancelAnimationFrame(M)}},[]);t.useEffect(()=>{if(!v){C.current?.(),C.current=null;const w=setTimeout(()=>R(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:l,className:q.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:S??i,sideOffset:f,children:a.jsx($.Command,{className:q.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:E,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:i,shouldFilter:f,activeDescendantId:l}=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,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;
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":l,"data-slot":"combobox-input",onValueChange:m,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>a.jsx($.CommandList,{ref:n,className:q.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function ge({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:i=36,overscan:f=5,children:l,renderEmpty:d,className:m,dataHook:v},E){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]),S=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 R=t.useRef(null),{value:C,onValueChange:L,setOpen:V,shouldFilter:w,searchValue:y,filterFn:D,setActiveDescendantId:j,registerItemsSync:k,unregisterItem:M}=z(),[p,I]=t.useState(0),F=t.useId();t.useImperativeHandle(E,()=>R.current,[]),t.useLayoutEffect(()=>{const s=e.map(c=>[b(c),S(c)]);return k(s),()=>{for(const c of e)M(b(c))}},[e,b,S,k,M]);const u=t.useMemo(()=>{if(!w||!y.trim())return e;const s=[];for(const c of e){let h=x?.hasDistinctLabel?B.defaultFilter(S(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,S,o,D,x?.hasDistinctLabel]),P=ce.useVirtualizer({count:u.length,getScrollElement:()=>R.current,estimateSize:()=>i,overscan:f}),A=p>=0&&p<u.length?b(u[p]):null;t.useEffect(()=>{I(0)},[y,u.length]);const O=t.useRef(!1);t.useEffect(()=>{if(O.current||!C)return;const s=u.findIndex(c=>b(c)===C);s>=0&&(I(s),P.scrollToIndex(s,{align:"center"}),O.current=!0)},[C,u,b,P]);const T=t.useRef(!1);t.useEffect(()=>{T.current&&p>=0&&p<u.length&&P.scrollToIndex(p,{align:"auto"}),T.current=!1},[p,u.length,P]),t.useEffect(()=>{const s=R.current?.closest('[data-slot="combobox-command"]');if(!s)return;const c=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),T.current=!0,I(N=>N<u.length-1?N+1:N);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),T.current=!0,I(N=>N>0?N-1:N);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),p>=0&&p<u.length){const N=b(u[p]);L(N===C?"":N),V(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),T.current=!0,I(0);break;case"End":h.preventDefault(),h.stopPropagation(),T.current=!0,I(u.length-1);break}};return s.addEventListener("keydown",c,{capture:!0}),()=>s.removeEventListener("keydown",c,{capture:!0})},[u,p,C,L,V,b]);const _=t.useMemo(()=>{const s=new Map;return u.forEach((c,h)=>{s.set(b(c),h)}),s},[u,b]),W=t.useCallback(s=>{const c=_.get(s);c!==void 0&&I(c)},[_]),G=t.useCallback(s=>(_.get(s)??0)+1,[_]),U=u.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(()=>(j(g),()=>j(void 0)),[g,j]),u.length===0?a.jsx("div",{ref:R,className:q.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:R,className:q.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:l(u[s.index],s.index,y)},s.key))})})})}const he=t.forwardRef(ge),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 ve(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,l)=>l%2===1?a.jsx("span",{className:n,children:f},l):a.jsx(t.Fragment,{children:f},l))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:i,highlight:f,highlightClassName:l,keywords:d,onSelect:m,...v},E)=>{const{value:x,onValueChange:b,setOpen:S,registerItem:R,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(R),D=t.useRef(C);t.useEffect(()=>{y.current=R,D.current=C},[R,C]);const j=!!L;t.useEffect(()=>{if(!j)return y.current(e,w),()=>D.current(e)},[e,w,j]);const k=()=>{b(e===x?"":e),S(!1),m?.(e)},M=()=>f&&typeof o=="string"?ve(o,f,l||"text-sm leading-normal font-semibold"):o;if(L){const p=L.activeValue===e,I=!!v.disabled;return a.jsxs("div",{ref:E,"aria-disabled":I||void 0,"aria-posinset":L.getItemPosition(e),"aria-selected":V,"aria-setsize":L.filteredCount,className:q.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:E,className:q.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 Ce({className:e,children:r,loadingText:n}){return a.jsx("div",{"aria-live":"polite",className:q.cn("text-muted-foreground relative flex items-center justify-center gap-2 py-6 text-sm","animate-entrance-fade entrance-delay-1",e),"data-slot":"combobox-loading",role:"status",children:r||a.jsxs(a.Fragment,{children:[a.jsx(ue.Spinner,{size:"md"}),a.jsx("span",{className:"sr-only",children:n??"Loading suggestions"})]})})}exports.Combobox=fe;exports.ComboboxContent=xe;exports.ComboboxEmpty=re;exports.ComboboxGroup=ne;exports.ComboboxInput=te;exports.ComboboxItem=se;exports.ComboboxList=oe;exports.ComboboxLoading=Ce;exports.ComboboxSeparator=ae;exports.ComboboxTrigger=Z;exports.ComboboxValue=pe;exports.ComboboxVirtualList=he;
@@ -244,8 +244,10 @@ export interface ComboboxLoadingProps {
244
244
  /** Children - custom loading content */
245
245
  children?: React.ReactNode;
246
246
  /**
247
- * Loading text displayed next to the spinner.
248
- * @default "Loading..."
247
+ * Loading announcement for assistive technologies (visually hidden).
248
+ * The default loading state is a spinner only — the surrounding combobox
249
+ * makes the context unambiguous, so visible text would be noise.
250
+ * @default "Loading suggestions"
249
251
  */
250
252
  loadingText?: string;
251
253
  }
@@ -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;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;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,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,QAAQ,CAAC,EAChB,KAAK,EAAE,eAAe,EACtB,aAAa,EAAE,uBAAuB,EACtC,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,OAAO,EACP,YAAmB,EACnB,QAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,EAAE,aAAa,2CA8Lf;AAuCD,MAAM,WAAW,oBAAqB,SAAQ,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