@brightlocal/ui-components 2.8.0 → 2.9.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 (46) hide show
  1. package/component-meta.json +1 -1
  2. package/dist/alert.cjs +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/blocks/sidebar.cjs +1 -1
  5. package/dist/blocks/sidebar.d.ts +39 -21
  6. package/dist/blocks/sidebar.d.ts.map +1 -1
  7. package/dist/blocks/sidebar.js +379 -425
  8. package/dist/callout.cjs +1 -1
  9. package/dist/callout.js +1 -1
  10. package/dist/card.cjs +1 -1
  11. package/dist/card.js +11 -11
  12. package/dist/combobox.cjs +3 -3
  13. package/dist/combobox.d.ts +24 -3
  14. package/dist/combobox.d.ts.map +1 -1
  15. package/dist/combobox.js +327 -302
  16. package/dist/global-layout.cjs +1 -1
  17. package/dist/global-layout.d.ts +3 -7
  18. package/dist/global-layout.d.ts.map +1 -1
  19. package/dist/global-layout.js +85 -81
  20. package/dist/hooks/use-breakpoint.cjs +1 -0
  21. package/dist/hooks/use-breakpoint.d.ts +15 -0
  22. package/dist/hooks/use-breakpoint.d.ts.map +1 -0
  23. package/dist/hooks/use-breakpoint.js +30 -0
  24. package/dist/hooks/use-mobile.d.ts +13 -3
  25. package/dist/hooks/use-mobile.d.ts.map +1 -1
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +124 -121
  30. package/dist/scroll-area.cjs +1 -1
  31. package/dist/scroll-area.d.ts +5 -0
  32. package/dist/scroll-area.d.ts.map +1 -1
  33. package/dist/scroll-area.js +34 -25
  34. package/package.json +1 -1
  35. package/src/blocks/sidebar.tsx +134 -148
  36. package/src/components/alert.tsx +1 -1
  37. package/src/components/callout.tsx +1 -1
  38. package/src/components/card.tsx +1 -1
  39. package/src/components/combobox.tsx +72 -11
  40. package/src/components/global-layout.tsx +46 -45
  41. package/src/components/scroll-area.tsx +15 -1
  42. package/src/hooks/use-breakpoint.ts +58 -0
  43. package/src/hooks/use-mobile.ts +20 -40
  44. package/src/index.ts +1 -0
  45. package/dist/hooks/use-mobile.cjs +0 -1
  46. package/dist/hooks/use-mobile.js +0 -26
package/dist/callout.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),y=require("react"),C=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils");function v(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=v(y),s=C.cva("relative rounded-2xl p-12 shadow-lg",{variants:{variant:{primary:"bg-primary text-primary-foreground",purple:"bg-violet-300 text-violet-950",blue:"bg-sky-300 text-sky-950",green:"bg-green-200 text-green-950"}},defaultVariants:{variant:"primary"}}),h={primary:"text-primary-foreground/80",purple:"text-violet-800",blue:"text-sky-900",green:"text-green-900"},j={primary:"bg-primary",purple:"bg-violet-300",blue:"bg-sky-300",green:"bg-green-200"},k={bottom:"left-1/2 -bottom-2 -translate-x-1/2",top:"left-1/2 -top-2 -translate-x-1/2",left:"top-1/2 -left-2 -translate-y-1/2",right:"top-1/2 -right-2 -translate-y-1/2"},c=l.createContext({variant:"primary"}),u=l.forwardRef(({className:e,variant:t="primary",pointer:a="bottom",children:o,dataHook:i,trackingEl:g,trackingLabel:m,...f},x)=>{const b=l.useMemo(()=>({variant:t}),[t]);return r.jsx(c.Provider,{value:b,children:r.jsxs("div",{ref:x,className:n.cn(s({variant:t}),e),"data-hook":i,"data-slot":"callout","data-tracking-el":g||`callout-${t}`,"data-tracking-label":m,...f,children:[r.jsx("div",{className:"flex flex-col gap-8",children:o}),a!=="none"&&r.jsx("span",{"aria-hidden":"true",className:n.cn("pointer-events-none absolute size-4 rotate-45",k[a],j[t]),"data-slot":"callout-pointer"})]})})});u.displayName="Callout";const d=l.forwardRef(({className:e,dataHook:t,...a},o)=>r.jsx("div",{ref:o,className:n.cn("heading-lg font-semibold",e),"data-hook":t,"data-slot":"callout-heading",...a}));d.displayName="CalloutHeading";const p=l.forwardRef(({className:e,dataHook:t,...a},o)=>{const{variant:i}=l.useContext(c);return r.jsx("div",{ref:o,className:n.cn("text-xs font-medium",h[i],e),"data-hook":t,"data-slot":"callout-citation",...a})});p.displayName="CalloutCitation";exports.Callout=u;exports.CalloutCitation=p;exports.CalloutHeading=d;exports.calloutVariants=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),C=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils");function v(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=v(b),s=C.cva("relative rounded-2xl p-12 shadow-lg",{variants:{variant:{primary:"bg-primary text-primary-foreground",purple:"bg-violet-300 text-violet-950",blue:"bg-sky-300 text-sky-950",green:"bg-green-200 text-green-950"}},defaultVariants:{variant:"primary"}}),j={primary:"text-primary-foreground/80",purple:"text-violet-800",blue:"text-sky-900",green:"text-green-900"},h={primary:"bg-primary",purple:"bg-violet-300",blue:"bg-sky-300",green:"bg-green-200"},k={bottom:"left-1/2 -bottom-2 -translate-x-1/2",top:"left-1/2 -top-2 -translate-x-1/2",left:"top-1/2 -left-2 -translate-y-1/2",right:"top-1/2 -right-2 -translate-y-1/2"},c=l.createContext({variant:"primary"}),u=l.forwardRef(({className:e,variant:t="primary",pointer:a="bottom",children:o,dataHook:i,trackingEl:g,trackingLabel:m,...f},x)=>{const y=l.useMemo(()=>({variant:t}),[t]);return r.jsx(c.Provider,{value:y,children:r.jsxs("div",{ref:x,className:n.cn(s({variant:t}),e),"data-hook":i,"data-slot":"callout","data-tracking-el":g||`callout-${t}`,"data-tracking-label":m,...f,children:[r.jsx("div",{className:"flex flex-col gap-8",children:o}),a!=="none"&&r.jsx("span",{"aria-hidden":"true",className:n.cn("pointer-events-none absolute size-4 rotate-45",k[a],h[t]),"data-slot":"callout-pointer"})]})})});u.displayName="Callout";const d=l.forwardRef(({className:e,dataHook:t,...a},o)=>r.jsx("div",{ref:o,className:n.cn("font-display text-4xl font-semibold",e),"data-hook":t,"data-slot":"callout-heading",...a}));d.displayName="CalloutHeading";const p=l.forwardRef(({className:e,dataHook:t,...a},o)=>{const{variant:i}=l.useContext(c);return r.jsx("div",{ref:o,className:n.cn("text-xs font-medium",j[i],e),"data-hook":t,"data-slot":"callout-citation",...a})});p.displayName="CalloutCitation";exports.Callout=u;exports.CalloutCitation=p;exports.CalloutHeading=d;exports.calloutVariants=s;
package/dist/callout.js CHANGED
@@ -78,7 +78,7 @@ const h = e.forwardRef(
78
78
  "div",
79
79
  {
80
80
  ref: r,
81
- className: n("heading-lg font-semibold", o),
81
+ className: n("font-display text-4xl font-semibold", o),
82
82
  "data-hook": t,
83
83
  "data-slot": "callout-heading",
84
84
  ...a
package/dist/card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),w=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const a=R(h),c=a.createContext({flush:!1}),O=w.cva(["flex","flex-col","gap-8","rounded-xl","py-section-md","transition-colors","w-full"],{variants:{variant:{filled:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]}},defaultVariants:{variant:"filled"}}),i=a.forwardRef(({className:t,variant:e="filled",dataHook:r,trackingEl:o,trackingLabel:x,maxWidth:n="400px",children:g,style:b,...y},j)=>{const v=e==="transparent-flush",N=n!==void 0?{maxWidth:typeof n=="number"?`${n}px`:n}:void 0;return s.jsx(c.Provider,{value:{flush:v},children:s.jsx("div",{ref:j,className:d.cn(O({variant:e}),t),"data-hook":r,"data-slot":"card","data-tracking-el":o||`card-${e}`,"data-tracking-label":x,style:{...N,...b},...y,children:g})})});i.displayName="Card";const l=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",!o&&"px-section-md",t),"data-slot":"card-header",...e})});l.displayName="CardHeader";const f=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("heading-sm",t),"data-slot":"card-title",...e}));f.displayName="CardTitle";const u=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...e}));u.displayName="CardDescription";const p=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...e}));p.displayName="CardAction";const m=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn(!o&&"px-section-md",t),"data-slot":"card-content",...e})});m.displayName="CardContent";const C=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("flex items-center",!o&&"px-section-md",t),"data-slot":"card-footer",...e})});C.displayName="CardFooter";exports.Card=i;exports.CardAction=p;exports.CardContent=m;exports.CardDescription=u;exports.CardFooter=C;exports.CardHeader=l;exports.CardTitle=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),w=require("react"),h=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const a=R(w),c=a.createContext({flush:!1}),O=h.cva(["flex","flex-col","gap-8","rounded-xl","py-section-md","transition-colors","w-full"],{variants:{variant:{filled:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]}},defaultVariants:{variant:"filled"}}),l=a.forwardRef(({className:t,variant:e="filled",dataHook:r,trackingEl:o,trackingLabel:C,maxWidth:n="400px",children:g,style:b,...y},j)=>{const v=e==="transparent-flush",N=n!==void 0?{maxWidth:typeof n=="number"?`${n}px`:n}:void 0;return s.jsx(c.Provider,{value:{flush:v},children:s.jsx("div",{ref:j,className:d.cn(O({variant:e}),t),"data-hook":r,"data-slot":"card","data-tracking-el":o||`card-${e}`,"data-tracking-label":C,style:{...N,...b},...y,children:g})})});l.displayName="Card";const i=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",!o&&"px-section-md",t),"data-slot":"card-header",...e})});i.displayName="CardHeader";const f=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("font-display text-2xl font-medium",t),"data-slot":"card-title",...e}));f.displayName="CardTitle";const u=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...e}));u.displayName="CardDescription";const p=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...e}));p.displayName="CardAction";const m=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn(!o&&"px-section-md",t),"data-slot":"card-content",...e})});m.displayName="CardContent";const x=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("flex items-center",!o&&"px-section-md",t),"data-slot":"card-footer",...e})});x.displayName="CardFooter";exports.Card=l;exports.CardAction=p;exports.CardContent=m;exports.CardDescription=u;exports.CardFooter=x;exports.CardHeader=i;exports.CardTitle=f;
package/dist/card.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import * as e from "react";
3
- import { cva as x } from "class-variance-authority";
3
+ import { cva as C } from "class-variance-authority";
4
4
  import { cn as s } from "@brightlocal/ui-components/lib/utils";
5
- const l = e.createContext({ flush: !1 }), g = x(
5
+ const l = e.createContext({ flush: !1 }), g = C(
6
6
  [
7
7
  "flex",
8
8
  "flex-col",
@@ -47,7 +47,7 @@ const l = e.createContext({ flush: !1 }), g = x(
47
47
  style: f,
48
48
  ...m
49
49
  }, p) => {
50
- const u = a === "transparent-flush", C = n !== void 0 ? {
50
+ const u = a === "transparent-flush", x = n !== void 0 ? {
51
51
  maxWidth: typeof n == "number" ? `${n}px` : n
52
52
  } : void 0;
53
53
  return /* @__PURE__ */ o(l.Provider, { value: { flush: u }, children: /* @__PURE__ */ o(
@@ -59,7 +59,7 @@ const l = e.createContext({ flush: !1 }), g = x(
59
59
  "data-slot": "card",
60
60
  "data-tracking-el": d || `card-${a}`,
61
61
  "data-tracking-label": c,
62
- style: { ...C, ...f },
62
+ style: { ...x, ...f },
63
63
  ...m,
64
64
  children: i
65
65
  }
@@ -91,14 +91,14 @@ const v = e.forwardRef(
91
91
  "div",
92
92
  {
93
93
  ref: t,
94
- className: s("heading-sm", r),
94
+ className: s("font-display text-2xl font-medium", r),
95
95
  "data-slot": "card-title",
96
96
  ...a
97
97
  }
98
98
  )
99
99
  );
100
100
  v.displayName = "CardTitle";
101
- const h = e.forwardRef(
101
+ const y = e.forwardRef(
102
102
  ({ className: r, ...a }, t) => /* @__PURE__ */ o(
103
103
  "div",
104
104
  {
@@ -112,7 +112,7 @@ const h = e.forwardRef(
112
112
  }
113
113
  )
114
114
  );
115
- h.displayName = "CardDescription";
115
+ y.displayName = "CardDescription";
116
116
  const w = e.forwardRef(
117
117
  ({ className: r, ...a }, t) => /* @__PURE__ */ o(
118
118
  "div",
@@ -128,7 +128,7 @@ const w = e.forwardRef(
128
128
  )
129
129
  );
130
130
  w.displayName = "CardAction";
131
- const y = e.forwardRef(
131
+ const h = e.forwardRef(
132
132
  ({ className: r, ...a }, t) => {
133
133
  const { flush: d } = e.useContext(l);
134
134
  return /* @__PURE__ */ o(
@@ -142,7 +142,7 @@ const y = e.forwardRef(
142
142
  );
143
143
  }
144
144
  );
145
- y.displayName = "CardContent";
145
+ h.displayName = "CardContent";
146
146
  const R = e.forwardRef(
147
147
  ({ className: r, ...a }, t) => {
148
148
  const { flush: d } = e.useContext(l);
@@ -165,8 +165,8 @@ R.displayName = "CardFooter";
165
165
  export {
166
166
  N as Card,
167
167
  w as CardAction,
168
- y as CardContent,
169
- h as CardDescription,
168
+ h as CardContent,
169
+ y as CardDescription,
170
170
  R as CardFooter,
171
171
  b as CardHeader,
172
172
  v as CardTitle
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"),re=require("react"),H=require("@brightlocal/icons"),ne=require("@tanstack/react-virtual"),se=require("class-variance-authority"),W=require("cmdk"),L=require("@brightlocal/ui-components/lib/utils"),Y=require("@brightlocal/ui-components/lib/use-dev-warning"),B=require("@brightlocal/ui-components/popover"),_=require("@brightlocal/ui-components/command");function ae(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const t=ae(re),J=t.createContext(null),K=t.createContext(null);function $(){const e=t.useContext(J);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function ie({value:e,onValueChange:o,open:r,onOpenChange:n,shouldFilter:u=!0,disabled:b=!1,itemToStringValue:l,children:g}){const[v,C]=t.useState(""),[F,I]=t.useState(!1),[j,R]=t.useState(()=>new Map),[w,y]=t.useState(""),[h,m]=t.useState(void 0),E=e!==void 0,D=r!==void 0,k=E?e:v,d=D?r:F,x=t.useCallback(p=>{p||y(""),D||I(p),n?.(p)},[D,n]),N=t.useCallback(p=>{E||C(p),o?.(p)},[E,o]),s=t.useRef(new Map),S=t.useRef(!1),T=t.useRef(!0);t.useEffect(()=>()=>{T.current=!1},[]);const q=t.useCallback(()=>{S.current||(S.current=!0,queueMicrotask(()=>{S.current=!1,T.current&&R(new Map(s.current))}))},[]),M=t.useCallback((p,O)=>{s.current.get(p)!==O&&(s.current.set(p,O),q())},[q]),A=t.useRef(k);t.useLayoutEffect(()=>{A.current=k},[k]);const z=t.useCallback(p=>{p!==A.current&&s.current.has(p)&&(s.current.delete(p),q())},[q]),G=t.useMemo(()=>l?(p,O,i)=>W.defaultFilter(l(p),O,i):W.defaultFilter,[l]),U=t.useMemo(()=>({open:d,setOpen:x,value:k,onValueChange:N,shouldFilter:u,disabled:b,itemLabels:j,registerItem:M,unregisterItem:z,itemToStringValue:l,filterFn:G,searchValue:w,setSearchValue:y,activeDescendantId:h,setActiveDescendantId:m}),[d,x,k,N,u,b,j,M,z,l,G,w,h,m]);return a.jsx(J.Provider,{value:U,children:a.jsx(B.Popover,{open:d,onOpenChange:x,children:g})})}const ce=se.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"]),Q=t.forwardRef(({className:e,dataHook:o,error:r,trackingEl:n,trackingLabel:u,children:b,...l},g)=>{const{open:v,disabled:C,value:F}=$(),I=t.useId(),j=!F,R=r||l["aria-invalid"]===!0||l["aria-invalid"]==="true";return a.jsx(B.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{ref:g,"aria-controls":v?I:void 0,"aria-expanded":v,"aria-haspopup":"listbox","aria-invalid":R?"true":void 0,className:L.cn(ce(),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":o,"data-placeholder":j,"data-slot":"combobox-trigger","data-state":v?"open":"closed","data-tracking-el":n||"combobox-trigger","data-tracking-label":u,disabled:C||l.disabled,role:"combobox",type:"button",...l,children:[b,a.jsx(H.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Q.displayName="ComboboxTrigger";function ue({placeholder:e,className:o,displayValue:r}){const{value:n,itemLabels:u}=$(),b=n?u.get(n)||r?.(n)||n:e;return a.jsx("span",{className:L.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",o),"data-slot":"combobox-value",children:b})}function le({dataHook:e,className:o,children:r,align:n="start",side:u="bottom",sideOffset:b,avoidCollisions:l,hideList:g=!1}){const{open:v,shouldFilter:C,filterFn:F,itemToStringValue:I}=$(),[j,R]=t.useState(null),w=t.useRef(null),y=t.useCallback(m=>{if(w.current?.(),w.current=null,!m)return;let E=!1;const D=N=>{E||(N==="top"||N==="bottom")&&(E=!0,k.disconnect(),R(N))},k=new MutationObserver(()=>{D(m.getAttribute("data-side"))});k.observe(m,{attributes:!0,attributeFilter:["data-side"]});let d=0,x=0;d=requestAnimationFrame(()=>{x=requestAnimationFrame(()=>{D(m.getAttribute("data-side"))})}),w.current=()=>{E=!0,k.disconnect(),cancelAnimationFrame(d),cancelAnimationFrame(x)}},[]);t.useEffect(()=>{if(!v){w.current?.(),w.current=null;const m=setTimeout(()=>R(null),150);return()=>clearTimeout(m)}},[v]);const h=I?F:void 0;return a.jsx(B.PopoverContent,{ref:y,align:n,"aria-label":"Options",avoidCollisions:l,className:L.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",o),collisionPadding:4,"data-slot":"combobox-popover",side:j??u,sideOffset:b,children:a.jsx(_.Command,{className:L.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",g&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:h,shouldFilter:C,children:r})})}const V=t.forwardRef(({debounceMs:e,onValueChange:o,...r},n)=>{const{setSearchValue:u,shouldFilter:b,activeDescendantId:l}=$(),g=t.useRef(void 0);Y.useDevWarning(()=>!!(e&&e>0&&b),`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"),re=require("react"),Y=require("@brightlocal/icons"),ne=require("@tanstack/react-virtual"),se=require("class-variance-authority"),U=require("cmdk"),M=require("@brightlocal/ui-components/lib/utils"),W=require("@brightlocal/ui-components/lib/use-dev-warning"),B=require("@brightlocal/ui-components/popover"),O=require("@brightlocal/ui-components/command");function ae(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const e=ae(re),J=e.createContext(null),K=e.createContext(null);function _(){const t=e.useContext(J);if(!t)throw new Error("Combobox components must be used within a <Combobox>");return t}function ie({value:t,onValueChange:o,open:n,onOpenChange:r,shouldFilter:u=!0,disabled:f=!1,itemToStringValue:c,children:p}){const[x,v]=e.useState(""),[P,C]=e.useState(!1),[S,y]=e.useState(()=>new Map),[k,j]=e.useState(""),[w,h]=e.useState(void 0),E=t!==void 0,I=n!==void 0,R=E?t:x,b=I?n:P,g=e.useCallback(m=>{m||j(""),I||C(m),r?.(m)},[I,r]),N=e.useCallback(m=>{E||v(m),o?.(m)},[E,o]),a=e.useRef(new Map),D=e.useRef(!1),T=e.useRef(!0);e.useEffect(()=>()=>{T.current=!1},[]);const q=e.useCallback(()=>{D.current||(D.current=!0,queueMicrotask(()=>{D.current=!1,T.current&&y(new Map(a.current))}))},[]),L=e.useCallback((m,s)=>{a.current.get(m)!==s&&(a.current.set(m,s),q())},[q]),A=e.useCallback(m=>{for(const[s,d]of m)a.current.set(s,d);y(new Map(a.current))},[]),$=e.useRef(R);e.useLayoutEffect(()=>{$.current=R},[R]);const z=e.useCallback(m=>{m!==$.current&&a.current.has(m)&&(a.current.delete(m),q())},[q]),G=e.useMemo(()=>c?(m,s,d)=>U.defaultFilter(c(m),s,d):U.defaultFilter,[c]),H=e.useMemo(()=>({open:b,setOpen:g,value:R,onValueChange:N,shouldFilter:u,disabled:f,itemLabels:S,registerItem:L,registerItemsSync:A,unregisterItem:z,itemToStringValue:c,filterFn:G,searchValue:k,setSearchValue:j,activeDescendantId:w,setActiveDescendantId:h}),[b,g,R,N,u,f,S,L,A,z,c,G,k,w,h]);return i.jsx(J.Provider,{value:H,children:i.jsx(B.Popover,{open:b,onOpenChange:g,children:p})})}const ce=se.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"]),Q=e.forwardRef(({className:t,dataHook:o,error:n,trackingEl:r,trackingLabel:u,children:f,...c},p)=>{const{open:x,disabled:v,value:P}=_(),C=e.useId(),S=!P,y=n||c["aria-invalid"]===!0||c["aria-invalid"]==="true";return i.jsx(B.PopoverTrigger,{asChild:!0,children:i.jsxs("button",{ref:p,"aria-controls":x?C:void 0,"aria-expanded":x,"aria-haspopup":"listbox","aria-invalid":y?"true":void 0,className:M.cn(ce(),y&&"border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",t),"data-hook":o,"data-placeholder":S,"data-slot":"combobox-trigger","data-state":x?"open":"closed","data-tracking-el":r||"combobox-trigger","data-tracking-label":u,disabled:v||c.disabled,role:"combobox",type:"button",...c,children:[f,i.jsx(Y.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Q.displayName="ComboboxTrigger";function ue({placeholder:t,className:o,displayValue:n,items:r,getItemValue:u,getItemLabel:f}){const{value:c,itemLabels:p}=_();W.useDevWarning(()=>!!r&&!u,"ComboboxValue: `items` was provided without `getItemValue`. Pass `getItemValue` (and optionally `getItemLabel`) to enable item-based label resolution.",[r,u]);const x=e.useMemo(()=>{if(!r||!u)return null;const P=f??u;return new Map(r.map(C=>[u(C),P(C)]))},[r,u,f]),v=c?x?.get(c)||p.get(c)||n?.(c)||c:t;return i.jsx("span",{className:M.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",o),"data-slot":"combobox-value",children:v})}function le({dataHook:t,className:o,children:n,align:r="start",side:u="bottom",sideOffset:f,avoidCollisions:c,hideList:p=!1}){const{open:x,shouldFilter:v,filterFn:P,itemToStringValue:C}=_(),[S,y]=e.useState(null),k=e.useRef(null),j=e.useCallback(h=>{if(k.current?.(),k.current=null,!h)return;let E=!1;const I=N=>{E||(N==="top"||N==="bottom")&&(E=!0,R.disconnect(),y(N))},R=new MutationObserver(()=>{I(h.getAttribute("data-side"))});R.observe(h,{attributes:!0,attributeFilter:["data-side"]});let b=0,g=0;b=requestAnimationFrame(()=>{g=requestAnimationFrame(()=>{I(h.getAttribute("data-side"))})}),k.current=()=>{E=!0,R.disconnect(),cancelAnimationFrame(b),cancelAnimationFrame(g)}},[]);e.useEffect(()=>{if(!x){k.current?.(),k.current=null;const h=setTimeout(()=>y(null),150);return()=>clearTimeout(h)}},[x]);const w=C?P:void 0;return i.jsx(B.PopoverContent,{ref:j,align:r,"aria-label":"Options",avoidCollisions:c,className:M.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",o),collisionPadding:4,"data-slot":"combobox-popover",side:S??u,sideOffset:f,children:i.jsx(O.Command,{className:M.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:t||"combobox-command",filter:w,shouldFilter:v,children:n})})}const X=e.forwardRef(({debounceMs:t,onValueChange:o,...n},r)=>{const{setSearchValue:u,shouldFilter:f,activeDescendantId:c}=_(),p=e.useRef(void 0);W.useDevWarning(()=>!!(t&&t>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,b]),Y.useDevWarning(()=>!!(e&&e>0&&r.value!==void 0),"debounceMs is set on <ComboboxInput> together with a controlled `value` prop.\nThe debounced onValueChange callback cannot update the controlled value synchronously, so the input will appear to lag behind typing.\nRemove `value` to let the input manage its own display, or remove debounceMs if you need a controlled input.",[e,r.value]),t.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const v=t.useCallback(C=>{u(C),e&&e>0?(clearTimeout(g.current),g.current=setTimeout(()=>{o?.(C)},e)):o?.(C)},[e,o,u]);return a.jsx(_.CommandInput,{ref:n,"aria-activedescendant":l,"data-slot":"combobox-input",onValueChange:v,...r})});V.displayName="ComboboxInput";const X=t.forwardRef(({className:e,...o},r)=>a.jsx(_.CommandList,{ref:r,className:L.cn("min-h-0 flex-1",e),"data-slot":"combobox-list",...o}));X.displayName="ComboboxList";function de({items:e,getItemValue:o,getItemLabel:r,getItemKeywords:n,estimateSize:u=36,overscan:b=5,children:l,renderEmpty:g,className:v,dataHook:C},F){const I=t.useRef(null),{value:j,onValueChange:R,setOpen:w,shouldFilter:y,searchValue:h,filterFn:m,setActiveDescendantId:E,registerItem:D,unregisterItem:k}=$(),[d,x]=t.useState(0),N=t.useId();t.useImperativeHandle(F,()=>I.current,[]),t.useEffect(()=>{const i=r??o;for(const c of e)D(o(c),i(c));return()=>{for(const c of e)k(o(c))}},[e,o,r,D,k]);const s=t.useMemo(()=>{if(!y||!h.trim())return e;const i=[];for(const c of e){let f=r?W.defaultFilter(r(c),h):m(o(c),h);if(n)for(const P of n(c))f=Math.max(f,W.defaultFilter(P,h));f>0&&i.push({item:c,score:f})}return i.sort((c,f)=>f.score-c.score),i.map(c=>c.item)},[e,y,h,o,r,n,m]),S=ne.useVirtualizer({count:s.length,getScrollElement:()=>I.current,estimateSize:()=>u,overscan:b}),T=d>=0&&d<s.length?o(s[d]):null;t.useEffect(()=>{x(0)},[h,s.length]);const q=t.useRef(!1);t.useEffect(()=>{if(q.current||!j)return;const i=s.findIndex(c=>o(c)===j);i>=0&&(x(i),S.scrollToIndex(i,{align:"center"}),q.current=!0)},[j,s,o,S]);const M=t.useRef(!1);t.useEffect(()=>{M.current&&d>=0&&d<s.length&&S.scrollToIndex(d,{align:"auto"}),M.current=!1},[d,s.length,S]),t.useEffect(()=>{const i=I.current?.closest('[data-slot="combobox-command"]');if(!i)return;const c=f=>{switch(f.key){case"ArrowDown":f.preventDefault(),f.stopPropagation(),M.current=!0,x(P=>P<s.length-1?P+1:P);break;case"ArrowUp":f.preventDefault(),f.stopPropagation(),M.current=!0,x(P=>P>0?P-1:P);break;case"Enter":if(f.preventDefault(),f.stopPropagation(),d>=0&&d<s.length){const P=o(s[d]);R(P===j?"":P),w(!1)}break;case"Home":f.preventDefault(),f.stopPropagation(),M.current=!0,x(0);break;case"End":f.preventDefault(),f.stopPropagation(),M.current=!0,x(s.length-1);break}};return i.addEventListener("keydown",c,{capture:!0}),()=>i.removeEventListener("keydown",c,{capture:!0})},[s,d,j,R,w,o]);const A=t.useMemo(()=>{const i=new Map;return s.forEach((c,f)=>{i.set(o(c),f)}),i},[s,o]),z=t.useCallback(i=>{const c=A.get(i);c!==void 0&&x(c)},[A]),G=t.useCallback(i=>(A.get(i)??0)+1,[A]),U=s.length,p=t.useMemo(()=>({activeValue:T,onItemPointerMove:z,idPrefix:N,filteredCount:U,getItemPosition:G}),[T,z,N,U,G]),O=T!=null?`${N}item-${T}`:void 0;return t.useEffect(()=>(E(O),()=>E(void 0)),[O,E]),s.length===0?a.jsx("div",{ref:I,className:L.cn("max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",v),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:g}):a.jsx(K.Provider,{value:p,children:a.jsx("div",{ref:I,className:L.cn("max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",v),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:a.jsx("div",{className:"relative w-full",style:{height:`${S.getTotalSize()}px`},children:S.getVirtualItems().map(i=>a.jsx("div",{ref:S.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":i.index,style:{transform:`translateY(${i.start}px)`},children:l(s[i.index],i.index,h)},i.key))})})})}const fe=t.forwardRef(de),Z=t.forwardRef((e,o)=>a.jsx(_.CommandEmpty,{ref:o,"data-slot":"combobox-empty",...e}));Z.displayName="ComboboxEmpty";const ee=t.forwardRef(({children:e,...o},r)=>{const n=t.useRef(null);return Y.useDevWarning(()=>n.current?n.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:u=>{n.current=u,typeof r=="function"?r(u):r&&(r.current=u)},"data-slot":"combobox-group",...o,children:e})});ee.displayName="ComboboxGroup";function be(e,o,r){if(!o||!o.trim())return e;const n=new RegExp(`(${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),u=e.split(n);return a.jsx("span",{children:u.map((b,l)=>l%2===1?a.jsx("span",{className:r,children:b},l):a.jsx(t.Fragment,{children:b},l))})}const te=t.forwardRef(({value:e,label:o,dataHook:r,children:n,className:u,highlight:b,highlightClassName:l,keywords:g,...v},C)=>{const{value:F,onValueChange:I,setOpen:j,registerItem:R,unregisterItem:w}=$(),y=t.useContext(K),h=F===e,m=t.useMemo(()=>o||(typeof n=="string"?n:typeof n=="number"?String(n):e),[o,n,e]),E=t.useRef(R),D=t.useRef(w);t.useEffect(()=>{E.current=R,D.current=w},[R,w]);const k=!!y;t.useEffect(()=>{if(!k)return E.current(e,m),()=>D.current(e)},[e,m,k]);const d=()=>{I(e===F?"":e),j(!1)},x=()=>b&&typeof n=="string"?be(n,b,l||"text-sm leading-normal font-semibold"):n;if(y){const N=y.activeValue===e,s=!!v.disabled;return a.jsxs("div",{ref:C,"aria-disabled":s||void 0,"aria-posinset":y.getItemPosition(e),"aria-selected":h,"aria-setsize":y.filteredCount,className:L.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",s&&"pointer-events-none opacity-50",u),"data-highlighted":N||void 0,"data-hook":r,"data-slot":"combobox-item",id:`${y.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:s?void 0:d,onKeyDown:s?void 0:S=>{(S.key==="Enter"||S.key===" ")&&d()},onPointerMove:s?void 0:()=>y.onItemPointerMove(e),children:[x(),h&&a.jsx(H.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return a.jsxs(_.CommandItem,{ref:C,className:L.cn("justify-between",u),"data-slot":"combobox-item",dataHook:r,keywords:g?[m,...g]:[m],value:e,onSelect:d,...v,children:[x(),h&&a.jsx(H.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});te.displayName="ComboboxItem";const oe=t.forwardRef((e,o)=>a.jsx(_.CommandSeparator,{ref:o,"data-slot":"combobox-separator",...e}));oe.displayName="ComboboxSeparator";function me({className:e,children:o}){return a.jsx("div",{"aria-live":"polite",className:L.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:o||a.jsxs(a.Fragment,{children:[a.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),"Loading..."]})})}exports.Combobox=ie;exports.ComboboxContent=le;exports.ComboboxEmpty=Z;exports.ComboboxGroup=ee;exports.ComboboxInput=V;exports.ComboboxItem=te;exports.ComboboxList=X;exports.ComboboxLoading=me;exports.ComboboxSeparator=oe;exports.ComboboxTrigger=Q;exports.ComboboxValue=ue;exports.ComboboxVirtualList=fe;
3
+ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,[t,f]),W.useDevWarning(()=>!!(t&&t>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.",[t,n.value]),e.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const x=e.useCallback(v=>{u(v),t&&t>0?(clearTimeout(p.current),p.current=setTimeout(()=>{o?.(v)},t)):o?.(v)},[t,o,u]);return i.jsx(O.CommandInput,{ref:r,"aria-activedescendant":c,"data-slot":"combobox-input",onValueChange:x,...n})});X.displayName="ComboboxInput";const Z=e.forwardRef(({className:t,...o},n)=>i.jsx(O.CommandList,{ref:n,className:M.cn("min-h-0 flex-1",t),"data-slot":"combobox-list",...o}));Z.displayName="ComboboxList";function de({items:t,getItemValue:o,getItemLabel:n,getItemKeywords:r,estimateSize:u=36,overscan:f=5,children:c,renderEmpty:p,className:x,dataHook:v},P){const C=e.useRef(null),{value:S,onValueChange:y,setOpen:k,shouldFilter:j,searchValue:w,filterFn:h,setActiveDescendantId:E,registerItemsSync:I,unregisterItem:R}=_(),[b,g]=e.useState(0),N=e.useId();e.useImperativeHandle(P,()=>C.current,[]),e.useLayoutEffect(()=>{const s=n??o,d=t.map(l=>[o(l),s(l)]);return I(d),()=>{for(const l of t)R(o(l))}},[t,o,n,I,R]);const a=e.useMemo(()=>{if(!j||!w.trim())return t;const s=[];for(const d of t){let l=n?U.defaultFilter(n(d),w):h(o(d),w);if(r)for(const F of r(d))l=Math.max(l,U.defaultFilter(F,w));l>0&&s.push({item:d,score:l})}return s.sort((d,l)=>l.score-d.score),s.map(d=>d.item)},[t,j,w,o,n,r,h]),D=ne.useVirtualizer({count:a.length,getScrollElement:()=>C.current,estimateSize:()=>u,overscan:f}),T=b>=0&&b<a.length?o(a[b]):null;e.useEffect(()=>{g(0)},[w,a.length]);const q=e.useRef(!1);e.useEffect(()=>{if(q.current||!S)return;const s=a.findIndex(d=>o(d)===S);s>=0&&(g(s),D.scrollToIndex(s,{align:"center"}),q.current=!0)},[S,a,o,D]);const L=e.useRef(!1);e.useEffect(()=>{L.current&&b>=0&&b<a.length&&D.scrollToIndex(b,{align:"auto"}),L.current=!1},[b,a.length,D]),e.useEffect(()=>{const s=C.current?.closest('[data-slot="combobox-command"]');if(!s)return;const d=l=>{switch(l.key){case"ArrowDown":l.preventDefault(),l.stopPropagation(),L.current=!0,g(F=>F<a.length-1?F+1:F);break;case"ArrowUp":l.preventDefault(),l.stopPropagation(),L.current=!0,g(F=>F>0?F-1:F);break;case"Enter":if(l.preventDefault(),l.stopPropagation(),b>=0&&b<a.length){const F=o(a[b]);y(F===S?"":F),k(!1)}break;case"Home":l.preventDefault(),l.stopPropagation(),L.current=!0,g(0);break;case"End":l.preventDefault(),l.stopPropagation(),L.current=!0,g(a.length-1);break}};return s.addEventListener("keydown",d,{capture:!0}),()=>s.removeEventListener("keydown",d,{capture:!0})},[a,b,S,y,k,o]);const A=e.useMemo(()=>{const s=new Map;return a.forEach((d,l)=>{s.set(o(d),l)}),s},[a,o]),$=e.useCallback(s=>{const d=A.get(s);d!==void 0&&g(d)},[A]),z=e.useCallback(s=>(A.get(s)??0)+1,[A]),G=a.length,H=e.useMemo(()=>({activeValue:T,onItemPointerMove:$,idPrefix:N,filteredCount:G,getItemPosition:z}),[T,$,N,G,z]),m=T!=null?`${N}item-${T}`:void 0;return e.useEffect(()=>(E(m),()=>E(void 0)),[m,E]),a.length===0?i.jsx("div",{ref:C,className:M.cn("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:p}):i.jsx(K.Provider,{value:H,children:i.jsx("div",{ref:C,className:M.cn("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:`${D.getTotalSize()}px`},children:D.getVirtualItems().map(s=>i.jsx("div",{ref:D.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":s.index,style:{transform:`translateY(${s.start}px)`},children:c(a[s.index],s.index,w)},s.key))})})})}const be=e.forwardRef(de),V=e.forwardRef((t,o)=>i.jsx(O.CommandEmpty,{ref:o,"data-slot":"combobox-empty",...t}));V.displayName="ComboboxEmpty";const ee=e.forwardRef(({children:t,...o},n)=>{const r=e.useRef(null);return W.useDevWarning(()=>r.current?r.current.querySelectorAll('[data-slot="combobox-item"]').length>=100:!1,`ComboboxGroup contains 100+ items. Use <ComboboxVirtualList> for large datasets to avoid DOM bloat and slow renders.
4
+ Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,[t]),i.jsx(O.CommandGroup,{ref:u=>{r.current=u,typeof n=="function"?n(u):n&&(n.current=u)},"data-slot":"combobox-group",...o,children:t})});ee.displayName="ComboboxGroup";function fe(t,o,n){if(!o||!o.trim())return t;const r=new RegExp(`(${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),u=t.split(r);return i.jsx("span",{children:u.map((f,c)=>c%2===1?i.jsx("span",{className:n,children:f},c):i.jsx(e.Fragment,{children:f},c))})}const te=e.forwardRef(({value:t,label:o,dataHook:n,children:r,className:u,highlight:f,highlightClassName:c,keywords:p,...x},v)=>{const{value:P,onValueChange:C,setOpen:S,registerItem:y,unregisterItem:k}=_(),j=e.useContext(K),w=P===t,h=e.useMemo(()=>o||(typeof r=="string"?r:typeof r=="number"?String(r):t),[o,r,t]),E=e.useRef(y),I=e.useRef(k);e.useEffect(()=>{E.current=y,I.current=k},[y,k]);const R=!!j;e.useEffect(()=>{if(!R)return E.current(t,h),()=>I.current(t)},[t,h,R]);const b=()=>{C(t===P?"":t),S(!1)},g=()=>f&&typeof r=="string"?fe(r,f,c||"text-sm leading-normal font-semibold"):r;if(j){const N=j.activeValue===t,a=!!x.disabled;return i.jsxs("div",{ref:v,"aria-disabled":a||void 0,"aria-posinset":j.getItemPosition(t),"aria-selected":w,"aria-setsize":j.filteredCount,className:M.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",a&&"pointer-events-none opacity-50",u),"data-highlighted":N||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${j.idPrefix}item-${t}`,role:"option",tabIndex:-1,onClick:a?void 0:b,onKeyDown:a?void 0:D=>{(D.key==="Enter"||D.key===" ")&&b()},onPointerMove:a?void 0:()=>j.onItemPointerMove(t),children:[g(),w&&i.jsx(Y.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return i.jsxs(O.CommandItem,{ref:v,className:M.cn("justify-between",u),"data-slot":"combobox-item",dataHook:n,keywords:p?[h,...p]:[h],value:t,onSelect:b,...x,children:[g(),w&&i.jsx(Y.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});te.displayName="ComboboxItem";const oe=e.forwardRef((t,o)=>i.jsx(O.CommandSeparator,{ref:o,"data-slot":"combobox-separator",...t}));oe.displayName="ComboboxSeparator";function me({className:t,children:o}){return i.jsx("div",{"aria-live":"polite",className:M.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",t),"data-slot":"combobox-loading",role:"status",children:o||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]"}),"Loading..."]})})}exports.Combobox=ie;exports.ComboboxContent=le;exports.ComboboxEmpty=V;exports.ComboboxGroup=ee;exports.ComboboxInput=X;exports.ComboboxItem=te;exports.ComboboxList=Z;exports.ComboboxLoading=me;exports.ComboboxSeparator=oe;exports.ComboboxTrigger=Q;exports.ComboboxValue=ue;exports.ComboboxVirtualList=be;
@@ -73,7 +73,7 @@ export interface ComboboxTriggerProps extends React.ButtonHTMLAttributes<HTMLBut
73
73
  trackingLabel?: string;
74
74
  }
75
75
  declare const ComboboxTrigger: React.ForwardRefExoticComponent<ComboboxTriggerProps & React.RefAttributes<HTMLButtonElement>>;
76
- export interface ComboboxValueProps {
76
+ export interface ComboboxValueProps<T = unknown> {
77
77
  /** Placeholder text when no value is selected */
78
78
  placeholder?: string;
79
79
  /** Custom className */
@@ -92,8 +92,29 @@ export interface ComboboxValueProps {
92
92
  * ```
93
93
  */
94
94
  displayValue?: (value: string) => string | undefined;
95
+ /**
96
+ * Items array for auto-resolving display labels. When provided alongside
97
+ * `getItemValue` (and optionally `getItemLabel`), ComboboxValue builds an
98
+ * internal lookup map — eliminating the need for a manual `displayValue`
99
+ * callback. Typically the same array passed to `ComboboxVirtualList`.
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * <ComboboxValue
104
+ * placeholder="Select country..."
105
+ * items={countries}
106
+ * getItemValue={(c) => c.code}
107
+ * getItemLabel={(c) => c.name}
108
+ * />
109
+ * ```
110
+ */
111
+ items?: readonly T[];
112
+ /** Extract the value string from an item. Required when `items` is provided. */
113
+ getItemValue?: (item: T) => string;
114
+ /** Extract the display label from an item. Falls back to `getItemValue` when not provided. */
115
+ getItemLabel?: (item: T) => string;
95
116
  }
96
- declare function ComboboxValue({ placeholder, className, displayValue, }: ComboboxValueProps): import("react/jsx-runtime").JSX.Element;
117
+ declare function ComboboxValue<T>({ placeholder, className, displayValue, items, getItemValue, getItemLabel, }: ComboboxValueProps<T>): import("react/jsx-runtime").JSX.Element;
97
118
  export interface ComboboxContentProps {
98
119
  /** Data hook for automated testing */
99
120
  dataHook?: string;
@@ -139,7 +160,7 @@ export type ComboboxListProps = React.ComponentProps<typeof CommandList>;
139
160
  declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
140
161
  export interface ComboboxVirtualListProps<T> {
141
162
  /** Array of items to virtualise. Memoize with useMemo to avoid re-registering labels on every render. */
142
- items: T[];
163
+ items: readonly T[];
143
164
  /** Extract the string value for each item (used for selection and keyboard navigation) */
144
165
  getItemValue: (item: T) => string;
145
166
  /**
@@ -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;AAwE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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,YAAmB,EACnB,QAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,EAAE,aAAa,2CAiJf;AAuCD,MAAM,WAAW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