@brightlocal/ui-components 2.12.0 → 2.14.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 (48) hide show
  1. package/component-meta.json +316 -19
  2. package/dist/blocks/sidebar.cjs +1 -1
  3. package/dist/blocks/sidebar.d.ts +203 -4
  4. package/dist/blocks/sidebar.d.ts.map +1 -1
  5. package/dist/blocks/sidebar.js +667 -393
  6. package/dist/card.cjs +1 -1
  7. package/dist/card.d.ts +5 -1
  8. package/dist/card.d.ts.map +1 -1
  9. package/dist/card.js +48 -31
  10. package/dist/combobox.cjs +3 -3
  11. package/dist/combobox.d.ts +8 -0
  12. package/dist/combobox.d.ts.map +1 -1
  13. package/dist/combobox.js +227 -226
  14. package/dist/dropdown-menu.cjs +1 -1
  15. package/dist/dropdown-menu.js +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.js +450 -441
  18. package/dist/list.cjs +1 -1
  19. package/dist/list.d.ts +25 -4
  20. package/dist/list.d.ts.map +1 -1
  21. package/dist/list.js +71 -53
  22. package/dist/popover.cjs +1 -1
  23. package/dist/popover.js +7 -7
  24. package/dist/rating.cjs +1 -1
  25. package/dist/rating.js +13 -13
  26. package/dist/select.cjs +2 -2
  27. package/dist/select.d.ts +10 -2
  28. package/dist/select.d.ts.map +1 -1
  29. package/dist/select.js +36 -30
  30. package/dist/table.cjs +1 -1
  31. package/dist/table.d.ts +14 -0
  32. package/dist/table.d.ts.map +1 -1
  33. package/dist/table.js +57 -39
  34. package/dist/tabs.cjs +1 -1
  35. package/dist/tabs.d.ts +25 -9
  36. package/dist/tabs.d.ts.map +1 -1
  37. package/dist/tabs.js +128 -113
  38. package/package.json +2 -2
  39. package/src/blocks/sidebar.tsx +596 -9
  40. package/src/components/card.tsx +23 -0
  41. package/src/components/combobox.tsx +10 -0
  42. package/src/components/dropdown-menu.tsx +1 -1
  43. package/src/components/list.tsx +45 -2
  44. package/src/components/popover.tsx +1 -1
  45. package/src/components/rating.tsx +1 -1
  46. package/src/components/select.tsx +24 -2
  47. package/src/components/table.tsx +39 -2
  48. package/src/components/tabs.tsx +195 -146
package/dist/card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),R=require("react"),O=require("class-variance-authority"),s=require("@brightlocal/ui-components/lib/utils");function D(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const r=D(R),i=r.createContext({flush:!1,density:"default"});function l(t,e){return!t&&(e==="condensed"?"px-3":"px-section-md")}const P=O.cva(["flex","flex-col","rounded-xl","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"]},density:{default:["gap-8","py-section-md"],condensed:["gap-3","py-3"]}},defaultVariants:{variant:"filled",density:"default"}}),f=r.forwardRef(({className:t,variant:e="filled",density:a="default",dataHook:d,trackingEl:n,trackingLabel:y,maxWidth:c="400px",children:b,style:j,...v},N)=>{const w=e==="transparent-flush",h=c!==void 0?{maxWidth:typeof c=="number"?`${c}px`:c}:void 0;return o.jsx(i.Provider,{value:{flush:w,density:a},children:o.jsx("div",{ref:N,className:s.cn(P({variant:e,density:a}),t),"data-density":a,"data-hook":d,"data-slot":"card","data-tracking-el":n||`card-${e}`,"data-tracking-label":y,style:{...h,...j},...v,children:b})})});f.displayName="Card";const u=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.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]",l(d,n),t),"data-slot":"card-header",...e})});u.displayName="CardHeader";const p=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("font-display text-2xl font-medium",t),"data-slot":"card-title",...e}));p.displayName="CardTitle";const m=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...e}));m.displayName="CardDescription";const C=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...e}));C.displayName="CardAction";const x=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.cn(l(d,n),t),"data-slot":"card-content",...e})});x.displayName="CardContent";const g=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.cn("flex items-center",l(d,n),t),"data-slot":"card-footer",...e})});g.displayName="CardFooter";exports.Card=f;exports.CardAction=C;exports.CardContent=x;exports.CardDescription=m;exports.CardFooter=g;exports.CardHeader=u;exports.CardTitle=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),O=require("react"),D=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils");function M(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,d.get?d:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const r=M(O),c=r.createContext({flush:!1,density:"default"});function l(e,t){return!e&&(t==="condensed"?"px-3":"px-section-md")}const P=D.cva(["flex","flex-col","rounded-xl","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"]},density:{default:["gap-8","py-section-md"],condensed:["gap-3","py-3"]}},defaultVariants:{variant:"filled",density:"default"}}),u=r.forwardRef(({className:e,variant:t="filled",density:a="default",dataHook:d,trackingEl:s,trackingLabel:f,maxWidth:i="400px",children:v,style:N,...j},h)=>{const w=t==="transparent-flush",R=i!==void 0?{maxWidth:typeof i=="number"?`${i}px`:i}:void 0;return o.jsx(c.Provider,{value:{flush:w,density:a},children:o.jsx("div",{ref:h,className:n.cn(P({variant:t,density:a}),e),"data-density":a,"data-hook":d,"data-slot":"card","data-tracking-el":s||`card-${t}`,"data-tracking-label":f,style:{...R,...N},...j,children:v})})});u.displayName="Card";const p=r.forwardRef(({className:e,...t},a)=>{const{flush:d,density:s}=r.useContext(c);return o.jsx("div",{ref:a,className:n.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]",l(d,s),e),"data-slot":"card-header",...t})});p.displayName="CardHeader";const m=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("font-display text-2xl font-medium",e),"data-slot":"card-title",...t}));m.displayName="CardTitle";const C=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("text-muted-foreground text-sm leading-normal font-normal",e),"data-slot":"card-description",...t}));C.displayName="CardDescription";const x=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),"data-slot":"card-action",...t}));x.displayName="CardAction";const y=r.forwardRef(({className:e,children:t,...a},d)=>{const{flush:s,density:f}=r.useContext(c);return o.jsx("div",{ref:d,className:n.cn(l(s,f),e),"data-slot":"card-media",...a,children:o.jsx("div",{className:"overflow-hidden rounded-md","data-slot":"card-media-clip",children:t})})});y.displayName="CardMedia";const g=r.forwardRef(({className:e,...t},a)=>{const{flush:d,density:s}=r.useContext(c);return o.jsx("div",{ref:a,className:n.cn(l(d,s),e),"data-slot":"card-content",...t})});g.displayName="CardContent";const b=r.forwardRef(({className:e,...t},a)=>{const{flush:d,density:s}=r.useContext(c);return o.jsx("div",{ref:a,className:n.cn("flex items-center",l(d,s),e),"data-slot":"card-footer",...t})});b.displayName="CardFooter";exports.Card=u;exports.CardAction=x;exports.CardContent=g;exports.CardDescription=C;exports.CardFooter=b;exports.CardHeader=p;exports.CardMedia=y;exports.CardTitle=m;
package/dist/card.d.ts CHANGED
@@ -73,6 +73,10 @@ declare const CardDescription: React.ForwardRefExoticComponent<Omit<CardSubCompo
73
73
  * Action area within the Card header for buttons or controls.
74
74
  */
75
75
  declare const CardAction: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
+ /**
77
+ * Media container for images, videos, or other visual content within the Card.
78
+ */
79
+ declare const CardMedia: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
80
  /**
77
81
  * Main content area of the Card.
78
82
  */
@@ -81,6 +85,6 @@ declare const CardContent: React.ForwardRefExoticComponent<Omit<CardSubComponent
81
85
  * Footer section of the Card for actions or metadata.
82
86
  */
83
87
  declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
84
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
88
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardMedia, CardContent, };
85
89
  export type { CardProps, CardSubComponentProps, CardVariant, CardDensity };
86
90
  //# sourceMappingURL=card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,KAAK,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAE7E;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,WAA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AAU,EACV,eAAe,EACf,SAAS,EACT,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
package/dist/card.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import * as e from "react";
3
- import { cva as y } from "class-variance-authority";
3
+ import { cva as g } from "class-variance-authority";
4
4
  import { cn as n } from "@brightlocal/ui-components/lib/utils";
5
- const i = e.createContext({ flush: !1, density: "default" });
5
+ const l = e.createContext({ flush: !1, density: "default" });
6
6
  function c(t, a) {
7
7
  return !t && (a === "condensed" ? "px-3" : "px-section-md");
8
8
  }
9
- const b = y(
9
+ const N = g(
10
10
  ["flex", "flex-col", "rounded-xl", "transition-colors", "w-full"],
11
11
  {
12
12
  variants: {
@@ -36,7 +36,7 @@ const b = y(
36
36
  density: "default"
37
37
  }
38
38
  }
39
- ), N = e.forwardRef(
39
+ ), v = e.forwardRef(
40
40
  ({
41
41
  className: t,
42
42
  variant: a = "filled",
@@ -44,35 +44,35 @@ const b = y(
44
44
  dataHook: o,
45
45
  trackingEl: s,
46
46
  trackingLabel: f,
47
- maxWidth: l = "400px",
47
+ maxWidth: i = "400px",
48
48
  children: u,
49
49
  style: m,
50
50
  ...p
51
- }, x) => {
52
- const C = a === "transparent-flush", g = l !== void 0 ? {
53
- maxWidth: typeof l == "number" ? `${l}px` : l
51
+ }, C) => {
52
+ const x = a === "transparent-flush", y = i !== void 0 ? {
53
+ maxWidth: typeof i == "number" ? `${i}px` : i
54
54
  } : void 0;
55
- return /* @__PURE__ */ d(i.Provider, { value: { flush: C, density: r }, children: /* @__PURE__ */ d(
55
+ return /* @__PURE__ */ d(l.Provider, { value: { flush: x, density: r }, children: /* @__PURE__ */ d(
56
56
  "div",
57
57
  {
58
- ref: x,
59
- className: n(b({ variant: a, density: r }), t),
58
+ ref: C,
59
+ className: n(N({ variant: a, density: r }), t),
60
60
  "data-density": r,
61
61
  "data-hook": o,
62
62
  "data-slot": "card",
63
63
  "data-tracking-el": s || `card-${a}`,
64
64
  "data-tracking-label": f,
65
- style: { ...g, ...m },
65
+ style: { ...y, ...m },
66
66
  ...p,
67
67
  children: u
68
68
  }
69
69
  ) });
70
70
  }
71
71
  );
72
- N.displayName = "Card";
73
- const v = e.forwardRef(
72
+ v.displayName = "Card";
73
+ const b = e.forwardRef(
74
74
  ({ className: t, ...a }, r) => {
75
- const { flush: o, density: s } = e.useContext(i);
75
+ const { flush: o, density: s } = e.useContext(l);
76
76
  return /* @__PURE__ */ d(
77
77
  "div",
78
78
  {
@@ -88,8 +88,8 @@ const v = e.forwardRef(
88
88
  );
89
89
  }
90
90
  );
91
- v.displayName = "CardHeader";
92
- const w = e.forwardRef(
91
+ b.displayName = "CardHeader";
92
+ const h = e.forwardRef(
93
93
  ({ className: t, ...a }, r) => /* @__PURE__ */ d(
94
94
  "div",
95
95
  {
@@ -100,8 +100,8 @@ const w = e.forwardRef(
100
100
  }
101
101
  )
102
102
  );
103
- w.displayName = "CardTitle";
104
- const h = e.forwardRef(
103
+ h.displayName = "CardTitle";
104
+ const w = e.forwardRef(
105
105
  ({ className: t, ...a }, r) => /* @__PURE__ */ d(
106
106
  "div",
107
107
  {
@@ -115,7 +115,7 @@ const h = e.forwardRef(
115
115
  }
116
116
  )
117
117
  );
118
- h.displayName = "CardDescription";
118
+ w.displayName = "CardDescription";
119
119
  const R = e.forwardRef(
120
120
  ({ className: t, ...a }, r) => /* @__PURE__ */ d(
121
121
  "div",
@@ -132,8 +132,24 @@ const R = e.forwardRef(
132
132
  );
133
133
  R.displayName = "CardAction";
134
134
  const k = e.forwardRef(
135
+ ({ className: t, children: a, ...r }, o) => {
136
+ const { flush: s, density: f } = e.useContext(l);
137
+ return /* @__PURE__ */ d(
138
+ "div",
139
+ {
140
+ ref: o,
141
+ className: n(c(s, f), t),
142
+ "data-slot": "card-media",
143
+ ...r,
144
+ children: /* @__PURE__ */ d("div", { className: "overflow-hidden rounded-md", "data-slot": "card-media-clip", children: a })
145
+ }
146
+ );
147
+ }
148
+ );
149
+ k.displayName = "CardMedia";
150
+ const j = e.forwardRef(
135
151
  ({ className: t, ...a }, r) => {
136
- const { flush: o, density: s } = e.useContext(i);
152
+ const { flush: o, density: s } = e.useContext(l);
137
153
  return /* @__PURE__ */ d(
138
154
  "div",
139
155
  {
@@ -145,10 +161,10 @@ const k = e.forwardRef(
145
161
  );
146
162
  }
147
163
  );
148
- k.displayName = "CardContent";
149
- const j = e.forwardRef(
164
+ j.displayName = "CardContent";
165
+ const A = e.forwardRef(
150
166
  ({ className: t, ...a }, r) => {
151
- const { flush: o, density: s } = e.useContext(i);
167
+ const { flush: o, density: s } = e.useContext(l);
152
168
  return /* @__PURE__ */ d(
153
169
  "div",
154
170
  {
@@ -164,13 +180,14 @@ const j = e.forwardRef(
164
180
  );
165
181
  }
166
182
  );
167
- j.displayName = "CardFooter";
183
+ A.displayName = "CardFooter";
168
184
  export {
169
- N as Card,
185
+ v as Card,
170
186
  R as CardAction,
171
- k as CardContent,
172
- h as CardDescription,
173
- j as CardFooter,
174
- v as CardHeader,
175
- w as CardTitle
187
+ j as CardContent,
188
+ w as CardDescription,
189
+ A as CardFooter,
190
+ b as CardHeader,
191
+ k as CardMedia,
192
+ h as CardTitle
176
193
  };
package/dist/combobox.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ie=require("react"),K=require("@brightlocal/icons"),le=require("@tanstack/react-virtual"),ue=require("class-variance-authority"),B=require("cmdk"),F=require("@brightlocal/ui-components/lib/utils"),U=require("@brightlocal/ui-components/lib/use-dev-warning"),Y=require("@brightlocal/ui-components/popover"),_=require("@brightlocal/ui-components/command");function ce(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=ce(ie),Q=t.createContext(null),X=t.createContext(null);function z(){const e=t.useContext(Q);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function de({value:e,onValueChange:r,open:n,onOpenChange:o,shouldFilter:u=!0,disabled:c=!1,itemToStringValue:a,children:p}){const[m,C]=t.useState(""),[S,v]=t.useState(!1),[d,w]=t.useState(()=>new Map),[I,x]=t.useState(""),[N,D]=t.useState(void 0),k=e!==void 0,y=n!==void 0,R=k?e:m,j=y?n:S,E=t.useCallback(g=>{g||x(""),y||v(g),o?.(g)},[y,o]),V=t.useCallback(g=>{k||C(g),r?.(g)},[k,r]),i=t.useRef(new Map),L=t.useRef(!1),$=t.useRef(!0);t.useEffect(()=>()=>{$.current=!1},[]);const b=t.useCallback(()=>{L.current||(L.current=!0,queueMicrotask(()=>{L.current=!1,$.current&&w(new Map(i.current))}))},[]),P=t.useCallback((g,q)=>{i.current.get(g)!==q&&(i.current.set(g,q),b())},[b]),A=t.useCallback(g=>{for(const[q,G]of g)i.current.set(q,G);w(new Map(i.current))},[]),W=t.useRef(R);t.useLayoutEffect(()=>{W.current=R},[R]);const T=t.useCallback(g=>{g!==W.current&&i.current.has(g)&&(i.current.delete(g),b())},[b]),O=t.useMemo(()=>a?(g,q,G)=>B.defaultFilter(a(g),q,G):B.defaultFilter,[a]),H=t.useMemo(()=>({open:j,setOpen:E,value:R,onValueChange:V,shouldFilter:u,disabled:c,itemLabels:d,registerItem:P,registerItemsSync:A,unregisterItem:T,itemToStringValue:a,filterFn:O,searchValue:I,setSearchValue:x,activeDescendantId:N,setActiveDescendantId:D}),[j,E,R,V,u,c,d,P,A,T,a,O,I,N,D]);return l.jsx(Q.Provider,{value:H,children:l.jsx(Y.Popover,{open:j,onOpenChange:E,children:p})})}const be=ue.cva(["relative flex w-full items-center justify-between gap-2","px-4 py-2 h-9","border border-input rounded-md outline-none","bg-neutral-50 shadow-xs","dark:bg-white/5 dark:border-white/15","text-base font-normal font-sans text-foreground","data-[placeholder=true]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","transition-[background-color,border-color,box-shadow] duration-200 ease-out","[&_svg]:pointer-events-none [&_svg]:shrink-0"]),Z=t.forwardRef(({className:e,dataHook:r,error:n,trackingEl:o,trackingLabel:u,children:c,...a},p)=>{const{open:m,disabled:C,value:S}=z(),v=t.useId(),d=!S,w=n||a["aria-invalid"]===!0||a["aria-invalid"]==="true";return l.jsx(Y.PopoverTrigger,{asChild:!0,children:l.jsxs("button",{ref:p,"aria-controls":m?v:void 0,"aria-expanded":m,"aria-haspopup":"listbox","aria-invalid":w?"true":void 0,className:F.cn(be(),w&&"border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",e),"data-hook":r,"data-placeholder":d,"data-slot":"combobox-trigger","data-state":m?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":u,disabled:C||a.disabled,role:"combobox",type:"button",...a,children:[c,l.jsx(K.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function fe(e){return e!=null&&typeof e=="object"&&"value"in e&&typeof e.value=="string"}function ee(e,r,n){if(r)return{getValue:r,getLabel:n??r,hasDistinctLabel:!!n};const o=e[0];if(!fe(o))return null;const u=p=>p.value,c="label"in o&&typeof o.label=="string";return{getValue:u,getLabel:n??(c?p=>String(p.label):u),hasDistinctLabel:c||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:u,getItemLabel:c}){const{value:a,itemLabels:p}=z(),m=t.useMemo(()=>o?ee(o,u,c):null,[o,u,c]);U.useDevWarning(()=>!!o&&o.length>0&&!m,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,m]);const C=t.useMemo(()=>!o||!m?null:new Map(o.map(v=>[m.getValue(v),m.getLabel(v)])),[o,m]),S=a?C?.get(a)||p.get(a)||n?.(a)||a:e;return l.jsx("span",{className:F.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:S})}function xe({dataHook:e,className:r,children:n,align:o="start",side:u="bottom",sideOffset:c,avoidCollisions:a,hideList:p=!1,ariaLabel:m}){const{open:C,shouldFilter:S,filterFn:v,itemToStringValue:d}=z(),[w,I]=t.useState(null),x=t.useRef(null),N=t.useCallback(k=>{if(x.current?.(),x.current=null,!k)return;let y=!1;const R=i=>{y||(i==="top"||i==="bottom")&&(y=!0,j.disconnect(),I(i))},j=new MutationObserver(()=>{R(k.getAttribute("data-side"))});j.observe(k,{attributes:!0,attributeFilter:["data-side"]});let E=0,V=0;E=requestAnimationFrame(()=>{V=requestAnimationFrame(()=>{R(k.getAttribute("data-side"))})}),x.current=()=>{y=!0,j.disconnect(),cancelAnimationFrame(E),cancelAnimationFrame(V)}},[]);t.useEffect(()=>{if(!C){x.current?.(),x.current=null;const k=setTimeout(()=>I(null),150);return()=>clearTimeout(k)}},[C]);const D=d?v:void 0;return l.jsx(Y.PopoverContent,{ref:N,align:o,"aria-label":m??"Options",avoidCollisions:a,className:F.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",r),collisionPadding:4,"data-slot":"combobox-popover",side:w??u,sideOffset:c,children:l.jsx(_.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",p&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:D,shouldFilter:S,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:u,shouldFilter:c,activeDescendantId:a}=z(),p=t.useRef(void 0);U.useDevWarning(()=>!!(e&&e>0&&c),`debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),ie=require("react"),K=require("@brightlocal/icons"),le=require("@tanstack/react-virtual"),ce=require("class-variance-authority"),B=require("cmdk"),F=require("@brightlocal/ui-components/lib/utils"),U=require("@brightlocal/ui-components/lib/use-dev-warning"),Y=require("@brightlocal/ui-components/popover"),$=require("@brightlocal/ui-components/command");function ue(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=ue(ie),Q=t.createContext(null),X=t.createContext(null);function z(){const e=t.useContext(Q);if(!e)throw new Error("Combobox components must be used within a <Combobox>");return e}function de({value:e,onValueChange:r,open:n,onOpenChange:o,shouldFilter:l=!0,disabled:u=!1,itemToStringValue:a,children:m}){const[x,v]=t.useState(""),[E,p]=t.useState(!1),[d,R]=t.useState(()=>new Map),[I,C]=t.useState(""),[j,N]=t.useState(void 0),y=e!==void 0,w=n!==void 0,L=y?e:x,S=w?n:E,D=t.useCallback(g=>{g||C(""),w||p(g),o?.(g)},[w,o]),V=t.useCallback(g=>{y||v(g),r?.(g)},[y,r]),c=t.useRef(new Map),k=t.useRef(!1),T=t.useRef(!0);t.useEffect(()=>()=>{T.current=!1},[]);const b=t.useCallback(()=>{k.current||(k.current=!0,queueMicrotask(()=>{k.current=!1,T.current&&R(new Map(c.current))}))},[]),P=t.useCallback((g,A)=>{c.current.get(g)!==A&&(c.current.set(g,A),b())},[b]),O=t.useCallback(g=>{for(const[A,G]of g)c.current.set(A,G);R(new Map(c.current))},[]),W=t.useRef(L);t.useLayoutEffect(()=>{W.current=L},[L]);const q=t.useCallback(g=>{g!==W.current&&c.current.has(g)&&(c.current.delete(g),b())},[b]),_=t.useMemo(()=>a?(g,A,G)=>B.defaultFilter(a(g),A,G):B.defaultFilter,[a]),H=t.useMemo(()=>({open:S,setOpen:D,value:L,onValueChange:V,shouldFilter:l,disabled:u,itemLabels:d,registerItem:P,registerItemsSync:O,unregisterItem:q,itemToStringValue:a,filterFn:_,searchValue:I,setSearchValue:C,activeDescendantId:j,setActiveDescendantId:N}),[S,D,L,V,l,u,d,P,O,q,a,_,I,j,N]);return i.jsx(Q.Provider,{value:H,children:i.jsx(Y.Popover,{open:S,onOpenChange:D,children:m})})}const be=ce.cva(["relative flex w-full items-center justify-between gap-2","px-4 py-2 h-9","border border-input rounded-md outline-none","bg-neutral-50 shadow-xs","dark:bg-white/5 dark:border-white/15","text-base font-normal font-sans text-foreground","data-[placeholder=true]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","transition-[background-color,border-color,box-shadow] duration-200 ease-out","[&_svg]:pointer-events-none [&_svg]:shrink-0"]),Z=t.forwardRef(({className:e,dataHook:r,error:n,trackingEl:o,trackingLabel:l,children:u,...a},m)=>{const{open:x,disabled:v,value:E}=z(),p=t.useId(),d=!E,R=n||a["aria-invalid"]===!0||a["aria-invalid"]==="true";return i.jsx(Y.PopoverTrigger,{asChild:!0,children:i.jsxs("button",{ref:m,"aria-controls":x?p:void 0,"aria-expanded":x,"aria-haspopup":"listbox","aria-invalid":R?"true":void 0,className:F.cn(be(),R&&"border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",e),"data-hook":r,"data-placeholder":d,"data-slot":"combobox-trigger","data-state":x?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":l,disabled:v||a.disabled,role:"combobox",type:"button",...a,children:[u,i.jsx(K.ChevronsUpDown,{"aria-hidden":"true",className:"text-muted-foreground ml-auto shrink-0"})]})})});Z.displayName="ComboboxTrigger";function fe(e){return e!=null&&typeof e=="object"&&"value"in e&&typeof e.value=="string"}function ee(e,r,n){if(r)return{getValue:r,getLabel:n??r,hasDistinctLabel:!!n};const o=e[0];if(!fe(o))return null;const l=m=>m.value,u="label"in o&&typeof o.label=="string";return{getValue:l,getLabel:n??(u?m=>String(m.label):l),hasDistinctLabel:u||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:l,getItemLabel:u}){const{value:a,itemLabels:m}=z(),x=t.useMemo(()=>o?ee(o,l,u):null,[o,l,u]);U.useDevWarning(()=>!!o&&o.length>0&&!x,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,x]);const v=t.useMemo(()=>!o||!x?null:new Map(o.map(p=>[x.getValue(p),x.getLabel(p)])),[o,x]),E=a?v?.get(a)||m.get(a)||n?.(a)||a:e;return i.jsx("span",{className:F.cn("text-foreground overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",r),"data-slot":"combobox-value",children:E})}function xe({dataHook:e,className:r,children:n,align:o="start",side:l="bottom",sideOffset:u,avoidCollisions:a,hideList:m=!1,ariaLabel:x}){const{open:v,shouldFilter:E,filterFn:p,itemToStringValue:d}=z(),[R,I]=t.useState(null),C=t.useRef(null),j=t.useCallback(y=>{if(C.current?.(),C.current=null,!y)return;let w=!1;const L=c=>{w||(c==="top"||c==="bottom")&&(w=!0,S.disconnect(),I(c))},S=new MutationObserver(()=>{L(y.getAttribute("data-side"))});S.observe(y,{attributes:!0,attributeFilter:["data-side"]});let D=0,V=0;D=requestAnimationFrame(()=>{V=requestAnimationFrame(()=>{L(y.getAttribute("data-side"))})}),C.current=()=>{w=!0,S.disconnect(),cancelAnimationFrame(D),cancelAnimationFrame(V)}},[]);t.useEffect(()=>{if(!v){C.current?.(),C.current=null;const y=setTimeout(()=>I(null),150);return()=>clearTimeout(y)}},[v]);const N=d?p:void 0;return i.jsx(Y.PopoverContent,{ref:j,align:o,"aria-label":x??"Options",avoidCollisions:a,className:F.cn("flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",r),collisionPadding:4,"data-slot":"combobox-popover",side:R??l,sideOffset:u,children:i.jsx($.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",m&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:N,shouldFilter:E,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:l,shouldFilter:u,activeDescendantId:a}=z(),m=t.useRef(void 0);U.useDevWarning(()=>!!(e&&e>0&&u),`debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
2
2
  Debounce is designed for async/server-driven search where the consumer controls the items list.
3
- Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,[e,c]),U.useDevWarning(()=>!!(e&&e>0&&n.value!==void 0),"debounceMs is set on <ComboboxInput> together with a controlled `value` prop.\nThe debounced onValueChange callback cannot update the controlled value synchronously, so the input will appear to lag behind typing.\nRemove `value` to let the input manage its own display, or remove debounceMs if you need a controlled input.",[e,n.value]),t.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=t.useCallback(C=>{u(C),e&&e>0?(clearTimeout(p.current),p.current=setTimeout(()=>{r?.(C)},e)):r?.(C)},[e,r,u]);return l.jsx(_.CommandInput,{ref:o,"aria-activedescendant":a,"data-slot":"combobox-input",onValueChange:m,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>l.jsx(_.CommandList,{ref:n,className:F.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function pe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:u=36,overscan:c=5,children:a,renderEmpty:p,className:m,dataHook:C},S){const v=t.useMemo(()=>ee(e,r,n),[e,r,n]),d=t.useMemo(()=>v?.getValue??(s=>{if(typeof s=="string"||typeof s=="number")return String(s);throw new Error("[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property.")}),[v]),w=t.useMemo(()=>v?.getLabel??d,[v,d]);U.useDevWarning(()=>!v&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[v,e.length]);const I=t.useRef(null),{value:x,onValueChange:N,setOpen:D,shouldFilter:k,searchValue:y,filterFn:R,setActiveDescendantId:j,registerItemsSync:E,unregisterItem:V}=z(),[i,L]=t.useState(0),$=t.useId();t.useImperativeHandle(S,()=>I.current,[]),t.useLayoutEffect(()=>{const s=e.map(f=>[d(f),w(f)]);return E(s),()=>{for(const f of e)V(d(f))}},[e,d,w,E,V]);const b=t.useMemo(()=>{if(!k||!y.trim())return e;const s=[];for(const f of e){let h=v?.hasDistinctLabel?B.defaultFilter(w(f),y):R(d(f),y);if(o)for(const M of o(f))h=Math.max(h,B.defaultFilter(M,y));h>0&&s.push({item:f,score:h})}return s.sort((f,h)=>h.score-f.score),s.map(f=>f.item)},[e,k,y,d,w,o,R,v?.hasDistinctLabel]),P=le.useVirtualizer({count:b.length,getScrollElement:()=>I.current,estimateSize:()=>u,overscan:c}),A=i>=0&&i<b.length?d(b[i]):null;t.useEffect(()=>{L(0)},[y,b.length]);const W=t.useRef(!1);t.useEffect(()=>{if(W.current||!x)return;const s=b.findIndex(f=>d(f)===x);s>=0&&(L(s),P.scrollToIndex(s,{align:"center"}),W.current=!0)},[x,b,d,P]);const T=t.useRef(!1);t.useEffect(()=>{T.current&&i>=0&&i<b.length&&P.scrollToIndex(i,{align:"auto"}),T.current=!1},[i,b.length,P]),t.useEffect(()=>{const s=I.current?.closest('[data-slot="combobox-command"]');if(!s)return;const f=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),T.current=!0,L(M=>M<b.length-1?M+1:M);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),T.current=!0,L(M=>M>0?M-1:M);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),i>=0&&i<b.length){const M=d(b[i]);N(M===x?"":M),D(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),T.current=!0,L(0);break;case"End":h.preventDefault(),h.stopPropagation(),T.current=!0,L(b.length-1);break}};return s.addEventListener("keydown",f,{capture:!0}),()=>s.removeEventListener("keydown",f,{capture:!0})},[b,i,x,N,D,d]);const O=t.useMemo(()=>{const s=new Map;return b.forEach((f,h)=>{s.set(d(f),h)}),s},[b,d]),H=t.useCallback(s=>{const f=O.get(s);f!==void 0&&L(f)},[O]),g=t.useCallback(s=>(O.get(s)??0)+1,[O]),q=b.length,G=t.useMemo(()=>({activeValue:A,onItemPointerMove:H,idPrefix:$,filteredCount:q,getItemPosition:g}),[A,H,$,q,g]),J=A!=null?`${$}item-${A}`:void 0;return t.useEffect(()=>(j(J),()=>j(void 0)),[J,j]),b.length===0?l.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:p}):l.jsx(X.Provider,{value:G,children:l.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",m),"data-hook":C,"data-slot":"combobox-virtual-list",role:"listbox",children:l.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(s=>l.jsx("div",{ref:P.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":s.index,style:{transform:`translateY(${s.start}px)`},children:a(b[s.index],s.index,y)},s.key))})})})}const ge=t.forwardRef(pe),re=t.forwardRef((e,r)=>l.jsx(_.CommandEmpty,{ref:r,"data-slot":"combobox-empty",...e}));re.displayName="ComboboxEmpty";const ne=t.forwardRef(({children:e,...r},n)=>{const o=t.useRef(null);return U.useDevWarning(()=>o.current?o.current.querySelectorAll('[data-slot="combobox-item"]').length>=100:!1,`ComboboxGroup contains 100+ items. Use <ComboboxVirtualList> for large datasets to avoid DOM bloat and slow renders.
4
- Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,[e]),l.jsx(_.CommandGroup,{ref:u=>{o.current=u,typeof n=="function"?n(u):n&&(n.current=u)},"data-slot":"combobox-group",...r,children:e})});ne.displayName="ComboboxGroup";function he(e,r,n){if(!r||!r.trim())return e;const o=new RegExp(`(${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),u=e.split(o);return l.jsx("span",{children:u.map((c,a)=>a%2===1?l.jsx("span",{className:n,children:c},a):l.jsx(t.Fragment,{children:c},a))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:u,highlight:c,highlightClassName:a,keywords:p,...m},C)=>{const{value:S,onValueChange:v,setOpen:d,registerItem:w,unregisterItem:I}=z(),x=t.useContext(X),N=S===e,D=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),k=t.useRef(w),y=t.useRef(I);t.useEffect(()=>{k.current=w,y.current=I},[w,I]);const R=!!x;t.useEffect(()=>{if(!R)return k.current(e,D),()=>y.current(e)},[e,D,R]);const j=()=>{v(e===S?"":e),d(!1)},E=()=>c&&typeof o=="string"?he(o,c,a||"text-sm leading-normal font-semibold"):o;if(x){const V=x.activeValue===e,i=!!m.disabled;return l.jsxs("div",{ref:C,"aria-disabled":i||void 0,"aria-posinset":x.getItemPosition(e),"aria-selected":N,"aria-setsize":x.filteredCount,className:F.cn("data-[highlighted=true]:bg-accent data-[highlighted=true]:text-accent-foreground relative flex cursor-default items-center justify-between gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none","[&_svg]:pointer-events-none [&_svg]:shrink-0",i&&"pointer-events-none opacity-50",u),"data-highlighted":V||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${x.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:i?void 0:j,onKeyDown:i?void 0:L=>{(L.key==="Enter"||L.key===" ")&&j()},onPointerMove:i?void 0:()=>x.onItemPointerMove(e),children:[E(),N&&l.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return l.jsxs(_.CommandItem,{ref:C,className:F.cn("justify-between",u),"data-slot":"combobox-item",dataHook:n,keywords:p?[D,...p]:[D],value:e,onSelect:j,...m,children:[E(),N&&l.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});se.displayName="ComboboxItem";const ae=t.forwardRef((e,r)=>l.jsx(_.CommandSeparator,{ref:r,"data-slot":"combobox-separator",...e}));ae.displayName="ComboboxSeparator";function ve({className:e,children:r,loadingText:n}){return l.jsx("div",{"aria-live":"polite",className:F.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:r||l.jsxs(l.Fragment,{children:[l.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),n??"Loading..."]})})}exports.Combobox=de;exports.ComboboxContent=xe;exports.ComboboxEmpty=re;exports.ComboboxGroup=ne;exports.ComboboxInput=te;exports.ComboboxItem=se;exports.ComboboxList=oe;exports.ComboboxLoading=ve;exports.ComboboxSeparator=ae;exports.ComboboxTrigger=Z;exports.ComboboxValue=me;exports.ComboboxVirtualList=ge;
3
+ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,[e,u]),U.useDevWarning(()=>!!(e&&e>0&&n.value!==void 0),"debounceMs is set on <ComboboxInput> together with a controlled `value` prop.\nThe debounced onValueChange callback cannot update the controlled value synchronously, so the input will appear to lag behind typing.\nRemove `value` to let the input manage its own display, or remove debounceMs if you need a controlled input.",[e,n.value]),t.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const x=t.useCallback(v=>{l(v),e&&e>0?(clearTimeout(m.current),m.current=setTimeout(()=>{r?.(v)},e)):r?.(v)},[e,r,l]);return i.jsx($.CommandInput,{ref:o,"aria-activedescendant":a,"data-slot":"combobox-input",onValueChange:x,...n})});te.displayName="ComboboxInput";const oe=t.forwardRef(({className:e,...r},n)=>i.jsx($.CommandList,{ref:n,className:F.cn("scrollbar min-h-0 flex-1",e),"data-slot":"combobox-list",...r}));oe.displayName="ComboboxList";function pe({items:e,getItemValue:r,getItemLabel:n,getItemKeywords:o,estimateSize:l=36,overscan:u=5,children:a,renderEmpty:m,className:x,dataHook:v},E){const p=t.useMemo(()=>ee(e,r,n),[e,r,n]),d=t.useMemo(()=>p?.getValue??(s=>{if(typeof s=="string"||typeof s=="number")return String(s);throw new Error("[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property.")}),[p]),R=t.useMemo(()=>p?.getLabel??d,[p,d]);U.useDevWarning(()=>!p&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[p,e.length]);const I=t.useRef(null),{value:C,onValueChange:j,setOpen:N,shouldFilter:y,searchValue:w,filterFn:L,setActiveDescendantId:S,registerItemsSync:D,unregisterItem:V}=z(),[c,k]=t.useState(0),T=t.useId();t.useImperativeHandle(E,()=>I.current,[]),t.useLayoutEffect(()=>{const s=e.map(f=>[d(f),R(f)]);return D(s),()=>{for(const f of e)V(d(f))}},[e,d,R,D,V]);const b=t.useMemo(()=>{if(!y||!w.trim())return e;const s=[];for(const f of e){let h=p?.hasDistinctLabel?B.defaultFilter(R(f),w):L(d(f),w);if(o)for(const M of o(f))h=Math.max(h,B.defaultFilter(M,w));h>0&&s.push({item:f,score:h})}return s.sort((f,h)=>h.score-f.score),s.map(f=>f.item)},[e,y,w,d,R,o,L,p?.hasDistinctLabel]),P=le.useVirtualizer({count:b.length,getScrollElement:()=>I.current,estimateSize:()=>l,overscan:u}),O=c>=0&&c<b.length?d(b[c]):null;t.useEffect(()=>{k(0)},[w,b.length]);const W=t.useRef(!1);t.useEffect(()=>{if(W.current||!C)return;const s=b.findIndex(f=>d(f)===C);s>=0&&(k(s),P.scrollToIndex(s,{align:"center"}),W.current=!0)},[C,b,d,P]);const q=t.useRef(!1);t.useEffect(()=>{q.current&&c>=0&&c<b.length&&P.scrollToIndex(c,{align:"auto"}),q.current=!1},[c,b.length,P]),t.useEffect(()=>{const s=I.current?.closest('[data-slot="combobox-command"]');if(!s)return;const f=h=>{switch(h.key){case"ArrowDown":h.preventDefault(),h.stopPropagation(),q.current=!0,k(M=>M<b.length-1?M+1:M);break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),q.current=!0,k(M=>M>0?M-1:M);break;case"Enter":if(h.preventDefault(),h.stopPropagation(),c>=0&&c<b.length){const M=d(b[c]);j(M===C?"":M),N(!1)}break;case"Home":h.preventDefault(),h.stopPropagation(),q.current=!0,k(0);break;case"End":h.preventDefault(),h.stopPropagation(),q.current=!0,k(b.length-1);break}};return s.addEventListener("keydown",f,{capture:!0}),()=>s.removeEventListener("keydown",f,{capture:!0})},[b,c,C,j,N,d]);const _=t.useMemo(()=>{const s=new Map;return b.forEach((f,h)=>{s.set(d(f),h)}),s},[b,d]),H=t.useCallback(s=>{const f=_.get(s);f!==void 0&&k(f)},[_]),g=t.useCallback(s=>(_.get(s)??0)+1,[_]),A=b.length,G=t.useMemo(()=>({activeValue:O,onItemPointerMove:H,idPrefix:T,filteredCount:A,getItemPosition:g}),[O,H,T,A,g]),J=O!=null?`${T}item-${O}`:void 0;return t.useEffect(()=>(S(J),()=>S(void 0)),[J,S]),b.length===0?i.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",x),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:m}):i.jsx(X.Provider,{value:G,children:i.jsx("div",{ref:I,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",x),"data-hook":v,"data-slot":"combobox-virtual-list",role:"listbox",children:i.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(s=>i.jsx("div",{ref:P.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":s.index,style:{transform:`translateY(${s.start}px)`},children:a(b[s.index],s.index,w)},s.key))})})})}const ge=t.forwardRef(pe),re=t.forwardRef((e,r)=>i.jsx($.CommandEmpty,{ref:r,"data-slot":"combobox-empty",...e}));re.displayName="ComboboxEmpty";const ne=t.forwardRef(({children:e,...r},n)=>{const o=t.useRef(null);return U.useDevWarning(()=>o.current?o.current.querySelectorAll('[data-slot="combobox-item"]').length>=100:!1,`ComboboxGroup contains 100+ items. Use <ComboboxVirtualList> for large datasets to avoid DOM bloat and slow renders.
4
+ Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,[e]),i.jsx($.CommandGroup,{ref:l=>{o.current=l,typeof n=="function"?n(l):n&&(n.current=l)},"data-slot":"combobox-group",...r,children:e})});ne.displayName="ComboboxGroup";function he(e,r,n){if(!r||!r.trim())return e;const o=new RegExp(`(${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),l=e.split(o);return i.jsx("span",{children:l.map((u,a)=>a%2===1?i.jsx("span",{className:n,children:u},a):i.jsx(t.Fragment,{children:u},a))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:l,highlight:u,highlightClassName:a,keywords:m,onSelect:x,...v},E)=>{const{value:p,onValueChange:d,setOpen:R,registerItem:I,unregisterItem:C}=z(),j=t.useContext(X),N=p===e,y=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),w=t.useRef(I),L=t.useRef(C);t.useEffect(()=>{w.current=I,L.current=C},[I,C]);const S=!!j;t.useEffect(()=>{if(!S)return w.current(e,y),()=>L.current(e)},[e,y,S]);const D=()=>{d(e===p?"":e),R(!1),x?.(e)},V=()=>u&&typeof o=="string"?he(o,u,a||"text-sm leading-normal font-semibold"):o;if(j){const c=j.activeValue===e,k=!!v.disabled;return i.jsxs("div",{ref:E,"aria-disabled":k||void 0,"aria-posinset":j.getItemPosition(e),"aria-selected":N,"aria-setsize":j.filteredCount,className:F.cn("data-[highlighted=true]:bg-accent data-[highlighted=true]:text-accent-foreground relative flex cursor-default items-center justify-between gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none","[&_svg]:pointer-events-none [&_svg]:shrink-0",k&&"pointer-events-none opacity-50",l),"data-highlighted":c||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${j.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:k?void 0:D,onKeyDown:k?void 0:T=>{(T.key==="Enter"||T.key===" ")&&D()},onPointerMove:k?void 0:()=>j.onItemPointerMove(e),children:[V(),N&&i.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return i.jsxs($.CommandItem,{ref:E,className:F.cn("justify-between",l),"data-slot":"combobox-item",dataHook:n,keywords:m?[y,...m]:[y],value:e,onSelect:D,...v,children:[V(),N&&i.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})});se.displayName="ComboboxItem";const ae=t.forwardRef((e,r)=>i.jsx($.CommandSeparator,{ref:r,"data-slot":"combobox-separator",...e}));ae.displayName="ComboboxSeparator";function ve({className:e,children:r,loadingText:n}){return i.jsx("div",{"aria-live":"polite",className:F.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",e),"data-slot":"combobox-loading",role:"status",children:r||i.jsxs(i.Fragment,{children:[i.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"}),n??"Loading..."]})})}exports.Combobox=de;exports.ComboboxContent=xe;exports.ComboboxEmpty=re;exports.ComboboxGroup=ne;exports.ComboboxInput=te;exports.ComboboxItem=se;exports.ComboboxList=oe;exports.ComboboxLoading=ve;exports.ComboboxSeparator=ae;exports.ComboboxTrigger=Z;exports.ComboboxValue=me;exports.ComboboxVirtualList=ge;
@@ -213,6 +213,14 @@ export interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Comm
213
213
  highlightClassName?: string;
214
214
  /** Additional keywords to match against when filtering. The item label is always included automatically. */
215
215
  keywords?: string[];
216
+ /**
217
+ * Callback fired when the item is activated (clicked or chosen via keyboard).
218
+ * Fires on every activation, including when the item is being deselected
219
+ * (toggled off). Always receives the item's own value, not the resulting
220
+ * combobox value — use `Combobox`'s `onValueChange` for selection state.
221
+ * @param value - The value of the activated item
222
+ */
223
+ onSelect?: (value: string) => void;
216
224
  }
217
225
  declare const ComboboxItem: React.ForwardRefExoticComponent<Omit<ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
218
226
  export type ComboboxSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,oCAAoC,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;I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