@brightlocal/ui-components 2.23.0 → 2.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/AI_USAGE.md +1 -1
  2. package/README.md +3 -2
  3. package/component-meta.json +116 -25
  4. package/deprecations.json +22 -0
  5. package/dist/alert.cjs +1 -1
  6. package/dist/alert.d.ts.map +1 -1
  7. package/dist/alert.js +6 -9
  8. package/dist/blocks/sidebar.cjs +1 -1
  9. package/dist/blocks/sidebar.d.ts.map +1 -1
  10. package/dist/blocks/sidebar.js +151 -156
  11. package/dist/brand-illustration-motif.cjs +1 -0
  12. package/dist/brand-illustration-motif.d.ts +55 -0
  13. package/dist/brand-illustration-motif.d.ts.map +1 -0
  14. package/dist/brand-illustration-motif.js +67 -0
  15. package/dist/chart.cjs +7 -7
  16. package/dist/chart.d.ts +287 -2
  17. package/dist/chart.d.ts.map +1 -1
  18. package/dist/chart.js +408 -152
  19. package/dist/combobox.cjs +3 -3
  20. package/dist/combobox.d.ts +14 -1
  21. package/dist/combobox.d.ts.map +1 -1
  22. package/dist/combobox.js +387 -376
  23. package/dist/data-table.cjs +1 -0
  24. package/dist/{blocks/data-table.d.ts → data-table.d.ts} +159 -4
  25. package/dist/data-table.d.ts.map +1 -0
  26. package/dist/data-table.js +721 -0
  27. package/dist/field.cjs +1 -1
  28. package/dist/field.d.ts +16 -1
  29. package/dist/field.d.ts.map +1 -1
  30. package/dist/field.js +23 -7
  31. package/dist/global-layout.cjs +1 -1
  32. package/dist/global-layout.d.ts +32 -2
  33. package/dist/global-layout.d.ts.map +1 -1
  34. package/dist/global-layout.js +179 -109
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +526 -511
  39. package/dist/label.cjs +1 -1
  40. package/dist/label.d.ts +9 -0
  41. package/dist/label.d.ts.map +1 -1
  42. package/dist/label.js +26 -22
  43. package/dist/lib/spring-settle.cjs +1 -0
  44. package/dist/lib/spring-settle.d.ts +20 -0
  45. package/dist/lib/spring-settle.d.ts.map +1 -0
  46. package/dist/lib/spring-settle.js +4 -0
  47. package/dist/link.cjs +1 -1
  48. package/dist/link.d.ts +3 -2
  49. package/dist/link.d.ts.map +1 -1
  50. package/dist/link.js +22 -11
  51. package/dist/loading.cjs +1 -1
  52. package/dist/loading.d.ts +2 -1
  53. package/dist/loading.d.ts.map +1 -1
  54. package/dist/loading.js +106 -85
  55. package/dist/select.cjs +2 -2
  56. package/dist/select.d.ts +16 -1
  57. package/dist/select.d.ts.map +1 -1
  58. package/dist/select.js +112 -79
  59. package/dist/table.cjs +1 -1
  60. package/dist/table.d.ts +29 -0
  61. package/dist/table.d.ts.map +1 -1
  62. package/dist/table.js +2 -2
  63. package/dist/text-reveal-motion.cjs +1 -1
  64. package/dist/text-reveal-motion.d.ts.map +1 -1
  65. package/dist/text-reveal-motion.js +236 -219
  66. package/dist/typography.cjs +1 -1
  67. package/dist/typography.d.ts +20 -4
  68. package/dist/typography.d.ts.map +1 -1
  69. package/dist/typography.js +263 -228
  70. package/package.json +2 -14
  71. package/src/blocks/sidebar.tsx +11 -23
  72. package/src/components/alert.tsx +1 -4
  73. package/src/components/brand-illustration-motif.tsx +143 -0
  74. package/src/components/chart.tsx +632 -1
  75. package/src/components/combobox.tsx +47 -0
  76. package/src/{blocks → components}/data-table.tsx +270 -16
  77. package/src/components/field.tsx +31 -0
  78. package/src/components/global-layout.tsx +144 -5
  79. package/src/components/label.tsx +13 -1
  80. package/src/components/link.tsx +13 -1
  81. package/src/components/loading.tsx +71 -38
  82. package/src/components/select.tsx +82 -2
  83. package/src/components/table.tsx +31 -2
  84. package/src/components/text-reveal-motion.tsx +90 -64
  85. package/src/components/typography.tsx +74 -18
  86. package/src/index.ts +2 -1
  87. package/src/lib/spring-settle.ts +19 -0
  88. package/dist/blocks/data-table.cjs +0 -1
  89. package/dist/blocks/data-table.d.ts.map +0 -1
  90. package/dist/blocks/data-table.js +0 -654
package/dist/combobox.js CHANGED
@@ -1,112 +1,123 @@
1
- import { jsx as u, jsxs as B, Fragment as Z } from "react/jsx-runtime";
2
- import * as t from "react";
1
+ import { jsx as d, jsxs as B, Fragment as Z } from "react/jsx-runtime";
2
+ import * as e from "react";
3
3
  import { Check as Y, ChevronsUpDown as ee } from "@brightlocal/icons";
4
4
  import { useVirtualizer as te } from "@tanstack/react-virtual";
5
5
  import { cva as oe } from "class-variance-authority";
6
6
  import { defaultFilter as K } from "cmdk";
7
- import { cn as A } from "@brightlocal/ui-components/lib/utils";
8
- import { useDevWarning as G } from "@brightlocal/ui-components/lib/use-dev-warning";
7
+ import { cn as T } from "@brightlocal/ui-components/lib/utils";
8
+ import { useDevWarning as H } from "@brightlocal/ui-components/lib/use-dev-warning";
9
9
  import { Popover as re, PopoverContent as ne, PopoverTrigger as ae } from "@brightlocal/ui-components/popover";
10
10
  import { Command as se, CommandEmpty as ie, CommandGroup as le, CommandInput as ue, CommandItem as ce, CommandList as de, CommandSeparator as fe } from "@brightlocal/ui-components/command";
11
- const J = t.createContext(null), Q = t.createContext(null);
11
+ const J = e.createContext(null), Q = e.createContext(null);
12
12
  function _() {
13
- const e = t.useContext(J);
14
- if (!e)
13
+ const t = e.useContext(J);
14
+ if (!t)
15
15
  throw new Error("Combobox components must be used within a <Combobox>");
16
- return e;
16
+ return t;
17
17
  }
18
18
  function Fe({
19
- value: e,
19
+ value: t,
20
20
  onValueChange: r,
21
- open: n,
21
+ open: a,
22
22
  onOpenChange: o,
23
- shouldFilter: i = !0,
24
- disabled: c = !1,
25
- itemToStringValue: s,
23
+ onClose: s,
24
+ shouldFilter: f = !0,
25
+ disabled: l = !1,
26
+ itemToStringValue: c,
26
27
  children: m
27
28
  }) {
28
- const [p, v] = t.useState(""), [M, x] = t.useState(!1), [d, L] = t.useState(
29
+ const [v, D] = e.useState(""), [x, b] = e.useState(!1), [S, E] = e.useState(
29
30
  () => /* @__PURE__ */ new Map()
30
- ), [I, C] = t.useState(""), [R, P] = t.useState(void 0), w = e !== void 0, y = n !== void 0, E = w ? e : p, S = y ? n : M, D = t.useCallback(
31
+ ), [C, L] = e.useState(""), [V, y] = e.useState(void 0), w = t !== void 0, M = a !== void 0, R = w ? t : v, k = M ? a : x, N = e.useCallback(
31
32
  (h) => {
32
- h || C(""), y || x(h), o?.(h);
33
+ h || L(""), M || b(h), o?.(h);
33
34
  },
34
- [y, o]
35
- ), V = t.useCallback(
35
+ [M, o]
36
+ ), p = e.useCallback(
36
37
  (h) => {
37
- w || v(h), r?.(h);
38
+ w || D(h), r?.(h);
38
39
  },
39
40
  [w, r]
40
- ), l = t.useRef(/* @__PURE__ */ new Map()), k = t.useRef(!1), T = t.useRef(!0);
41
- t.useEffect(() => () => {
42
- T.current = !1;
41
+ ), I = e.useRef(s);
42
+ e.useEffect(() => {
43
+ I.current = s;
44
+ }, [s]);
45
+ const A = e.useRef(k);
46
+ e.useEffect(() => {
47
+ A.current && !k && I.current?.(), A.current = k;
48
+ }, [k]), e.useEffect(() => () => {
49
+ A.current && I.current?.();
43
50
  }, []);
44
- const f = t.useCallback(() => {
45
- k.current || (k.current = !0, queueMicrotask(() => {
46
- k.current = !1, T.current && L(new Map(l.current));
51
+ const u = e.useRef(/* @__PURE__ */ new Map()), F = e.useRef(!1), O = e.useRef(!0);
52
+ e.useEffect(() => () => {
53
+ O.current = !1;
54
+ }, []);
55
+ const j = e.useCallback(() => {
56
+ F.current || (F.current = !0, queueMicrotask(() => {
57
+ F.current = !1, O.current && E(new Map(u.current));
47
58
  }));
48
- }, []), F = t.useCallback(
49
- (h, j) => {
50
- l.current.get(h) !== j && (l.current.set(h, j), f());
59
+ }, []), $ = e.useCallback(
60
+ (h, n) => {
61
+ u.current.get(h) !== n && (u.current.set(h, n), j());
51
62
  },
52
- [f]
53
- ), O = t.useCallback(
63
+ [j]
64
+ ), z = e.useCallback(
54
65
  (h) => {
55
- for (const [j, U] of h)
56
- l.current.set(j, U);
57
- L(new Map(l.current));
66
+ for (const [n, i] of h)
67
+ u.current.set(n, i);
68
+ E(new Map(u.current));
58
69
  },
59
70
  []
60
- ), q = t.useRef(E);
61
- t.useLayoutEffect(() => {
62
- q.current = E;
63
- }, [E]);
64
- const $ = t.useCallback(
71
+ ), q = e.useRef(R);
72
+ e.useLayoutEffect(() => {
73
+ q.current = R;
74
+ }, [R]);
75
+ const U = e.useCallback(
65
76
  (h) => {
66
- h !== q.current && l.current.has(h) && (l.current.delete(h), f());
77
+ h !== q.current && u.current.has(h) && (u.current.delete(h), j());
67
78
  },
68
- [f]
69
- ), z = t.useMemo(
70
- () => s ? (h, j, U) => K(s(h), j, U) : K,
71
- [s]
72
- ), H = t.useMemo(
79
+ [j]
80
+ ), G = e.useMemo(
81
+ () => c ? (h, n, i) => K(c(h), n, i) : K,
82
+ [c]
83
+ ), W = e.useMemo(
73
84
  () => ({
74
- open: S,
75
- setOpen: D,
76
- value: E,
77
- onValueChange: V,
78
- shouldFilter: i,
79
- disabled: c,
80
- itemLabels: d,
81
- registerItem: F,
82
- registerItemsSync: O,
83
- unregisterItem: $,
84
- itemToStringValue: s,
85
- filterFn: z,
86
- searchValue: I,
87
- setSearchValue: C,
88
- activeDescendantId: R,
89
- setActiveDescendantId: P
85
+ open: k,
86
+ setOpen: N,
87
+ value: R,
88
+ onValueChange: p,
89
+ shouldFilter: f,
90
+ disabled: l,
91
+ itemLabels: S,
92
+ registerItem: $,
93
+ registerItemsSync: z,
94
+ unregisterItem: U,
95
+ itemToStringValue: c,
96
+ filterFn: G,
97
+ searchValue: C,
98
+ setSearchValue: L,
99
+ activeDescendantId: V,
100
+ setActiveDescendantId: y
90
101
  }),
91
102
  [
103
+ k,
104
+ N,
105
+ R,
106
+ p,
107
+ f,
108
+ l,
92
109
  S,
93
- D,
94
- E,
95
- V,
96
- i,
97
- c,
98
- d,
99
- F,
100
- O,
101
110
  $,
102
- s,
103
111
  z,
104
- I,
105
- R,
106
- P
112
+ U,
113
+ c,
114
+ G,
115
+ C,
116
+ V,
117
+ y
107
118
  ]
108
119
  );
109
- return /* @__PURE__ */ u(J.Provider, { value: H, children: /* @__PURE__ */ u(re, { open: S, onOpenChange: D, children: m }) });
120
+ return /* @__PURE__ */ d(J.Provider, { value: W, children: /* @__PURE__ */ d(re, { open: k, onOpenChange: N, children: m }) });
110
121
  }
111
122
  const be = oe([
112
123
  // Base layout
@@ -131,43 +142,43 @@ const be = oe([
131
142
  "transition-[background-color,border-color,box-shadow] duration-200 ease-out",
132
143
  // Icon styles
133
144
  "[&_svg]:pointer-events-none [&_svg]:shrink-0"
134
- ]), me = t.forwardRef(
145
+ ]), me = e.forwardRef(
135
146
  ({
136
- className: e,
147
+ className: t,
137
148
  dataHook: r,
138
- error: n,
149
+ error: a,
139
150
  trackingEl: o,
140
- trackingLabel: i,
141
- children: c,
142
- ...s
143
- }, m) => {
144
- const { open: p, disabled: v, value: M } = _(), x = t.useId(), d = !M, L = n || s["aria-invalid"] === !0 || s["aria-invalid"] === "true";
145
- return /* @__PURE__ */ u(ae, { asChild: !0, children: /* @__PURE__ */ B(
151
+ trackingLabel: s,
152
+ children: f,
153
+ ...l
154
+ }, c) => {
155
+ const { open: m, disabled: v, value: D } = _(), x = e.useId(), b = !D, S = a || l["aria-invalid"] === !0 || l["aria-invalid"] === "true";
156
+ return /* @__PURE__ */ d(ae, { asChild: !0, children: /* @__PURE__ */ B(
146
157
  "button",
147
158
  {
148
- ref: m,
149
- "aria-controls": p ? x : void 0,
150
- "aria-expanded": p,
159
+ ref: c,
160
+ "aria-controls": m ? x : void 0,
161
+ "aria-expanded": m,
151
162
  "aria-haspopup": "listbox",
152
- "aria-invalid": L ? "true" : void 0,
153
- className: A(
163
+ "aria-invalid": S ? "true" : void 0,
164
+ className: T(
154
165
  be(),
155
- L && "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",
156
- e
166
+ S && "border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive",
167
+ t
157
168
  ),
158
169
  "data-hook": r,
159
- "data-placeholder": d,
170
+ "data-placeholder": b,
160
171
  "data-slot": "combobox-trigger",
161
- "data-state": p ? "open" : "closed",
172
+ "data-state": m ? "open" : "closed",
162
173
  "data-tracking-el": o || "combobox-trigger",
163
- "data-tracking-label": i,
164
- disabled: v || s.disabled,
174
+ "data-tracking-label": s,
175
+ disabled: v || l.disabled,
165
176
  role: "combobox",
166
177
  type: "button",
167
- ...s,
178
+ ...l,
168
179
  children: [
169
- c,
170
- /* @__PURE__ */ u(
180
+ f,
181
+ /* @__PURE__ */ d(
171
182
  ee,
172
183
  {
173
184
  "aria-hidden": "true",
@@ -180,469 +191,469 @@ const be = oe([
180
191
  }
181
192
  );
182
193
  me.displayName = "ComboboxTrigger";
183
- function pe(e) {
184
- return e != null && typeof e == "object" && "value" in e && typeof e.value == "string";
194
+ function pe(t) {
195
+ return t != null && typeof t == "object" && "value" in t && typeof t.value == "string";
185
196
  }
186
- function X(e, r, n) {
197
+ function X(t, r, a) {
187
198
  if (r)
188
199
  return {
189
200
  getValue: r,
190
- getLabel: n ?? r,
191
- hasDistinctLabel: !!n
201
+ getLabel: a ?? r,
202
+ hasDistinctLabel: !!a
192
203
  };
193
- const o = e[0];
204
+ const o = t[0];
194
205
  if (!pe(o)) return null;
195
- const i = (m) => m.value, c = "label" in o && typeof o.label == "string";
206
+ const s = (c) => c.value, f = "label" in o && typeof o.label == "string";
196
207
  return {
197
- getValue: i,
198
- getLabel: n ?? (c ? (m) => String(m.label) : i),
199
- hasDistinctLabel: c || !!n
208
+ getValue: s,
209
+ getLabel: a ?? (f ? (c) => String(c.label) : s),
210
+ hasDistinctLabel: f || !!a
200
211
  };
201
212
  }
202
213
  function Ae({
203
- placeholder: e,
214
+ placeholder: t,
204
215
  className: r,
205
- displayValue: n,
216
+ displayValue: a,
206
217
  items: o,
207
- getItemValue: i,
208
- getItemLabel: c
218
+ getItemValue: s,
219
+ getItemLabel: f
209
220
  }) {
210
- const { value: s, itemLabels: m } = _(), p = t.useMemo(
211
- () => o ? X(o, i, c) : null,
212
- [o, i, c]
221
+ const { value: l, itemLabels: c } = _(), m = e.useMemo(
222
+ () => o ? X(o, s, f) : null,
223
+ [o, s, f]
213
224
  );
214
- G(
215
- () => !!o && o.length > 0 && !p,
225
+ H(
226
+ () => !!o && o.length > 0 && !m,
216
227
  "ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",
217
- [o, p]
228
+ [o, m]
218
229
  );
219
- const v = t.useMemo(() => !o || !p ? null : new Map(
220
- o.map((x) => [p.getValue(x), p.getLabel(x)])
221
- ), [o, p]), M = s ? v?.get(s) || m.get(s) || n?.(s) || s : e;
222
- return /* @__PURE__ */ u(
230
+ const v = e.useMemo(() => !o || !m ? null : new Map(
231
+ o.map((x) => [m.getValue(x), m.getLabel(x)])
232
+ ), [o, m]), D = l ? v?.get(l) || c.get(l) || a?.(l) || l : t;
233
+ return /* @__PURE__ */ d(
223
234
  "span",
224
235
  {
225
- className: A(
236
+ className: T(
226
237
  "overflow-hidden text-base leading-normal font-medium text-ellipsis whitespace-nowrap",
227
238
  r
228
239
  ),
229
240
  "data-slot": "combobox-value",
230
- children: M
241
+ children: D
231
242
  }
232
243
  );
233
244
  }
234
245
  function Te({
235
- dataHook: e,
246
+ dataHook: t,
236
247
  className: r,
237
- children: n,
248
+ children: a,
238
249
  align: o = "start",
239
- side: i = "bottom",
240
- sideOffset: c,
241
- avoidCollisions: s,
242
- hideList: m = !1,
243
- ariaLabel: p
250
+ side: s = "bottom",
251
+ sideOffset: f,
252
+ avoidCollisions: l,
253
+ hideList: c = !1,
254
+ ariaLabel: m
244
255
  }) {
245
- const { open: v, shouldFilter: M, filterFn: x, itemToStringValue: d } = _(), [L, I] = t.useState(
256
+ const { open: v, shouldFilter: D, filterFn: x, itemToStringValue: b } = _(), [S, E] = e.useState(
246
257
  null
247
- ), C = t.useRef(null), R = t.useCallback((w) => {
248
- if (C.current?.(), C.current = null, !w) return;
249
- let y = !1;
250
- const E = (l) => {
251
- y || (l === "top" || l === "bottom") && (y = !0, S.disconnect(), I(l));
252
- }, S = new MutationObserver(() => {
253
- E(w.getAttribute("data-side"));
258
+ ), C = e.useRef(null), L = e.useCallback((y) => {
259
+ if (C.current?.(), C.current = null, !y) return;
260
+ let w = !1;
261
+ const M = (p) => {
262
+ w || (p === "top" || p === "bottom") && (w = !0, R.disconnect(), E(p));
263
+ }, R = new MutationObserver(() => {
264
+ M(y.getAttribute("data-side"));
254
265
  });
255
- S.observe(w, {
266
+ R.observe(y, {
256
267
  attributes: !0,
257
268
  attributeFilter: ["data-side"]
258
269
  });
259
- let D = 0, V = 0;
260
- D = requestAnimationFrame(() => {
261
- V = requestAnimationFrame(() => {
262
- E(w.getAttribute("data-side"));
270
+ let k = 0, N = 0;
271
+ k = requestAnimationFrame(() => {
272
+ N = requestAnimationFrame(() => {
273
+ M(y.getAttribute("data-side"));
263
274
  });
264
275
  }), C.current = () => {
265
- y = !0, S.disconnect(), cancelAnimationFrame(D), cancelAnimationFrame(V);
276
+ w = !0, R.disconnect(), cancelAnimationFrame(k), cancelAnimationFrame(N);
266
277
  };
267
278
  }, []);
268
- t.useEffect(() => {
279
+ e.useEffect(() => {
269
280
  if (!v) {
270
281
  C.current?.(), C.current = null;
271
- const w = setTimeout(() => I(null), 150);
272
- return () => clearTimeout(w);
282
+ const y = setTimeout(() => E(null), 150);
283
+ return () => clearTimeout(y);
273
284
  }
274
285
  }, [v]);
275
- const P = d ? x : void 0;
276
- return /* @__PURE__ */ u(
286
+ const V = b ? x : void 0;
287
+ return /* @__PURE__ */ d(
277
288
  ne,
278
289
  {
279
- ref: R,
290
+ ref: L,
280
291
  align: o,
281
- "aria-label": p ?? "Options",
282
- avoidCollisions: s,
283
- className: A(
292
+ "aria-label": m ?? "Options",
293
+ avoidCollisions: l,
294
+ className: T(
284
295
  "flex max-h-[var(--radix-popover-content-available-height)] w-[var(--radix-popover-trigger-width)] flex-col overflow-hidden p-0",
285
296
  r
286
297
  ),
287
298
  collisionPadding: 4,
288
299
  "data-slot": "combobox-popover",
289
- side: L ?? i,
290
- sideOffset: c,
291
- children: /* @__PURE__ */ u(
300
+ side: S ?? s,
301
+ sideOffset: f,
302
+ children: /* @__PURE__ */ d(
292
303
  se,
293
304
  {
294
- className: A(
305
+ className: T(
295
306
  "min-h-0 flex-1 border-0 shadow-none",
296
307
  "[&_[data-slot='command-input-wrapper']]:shrink-0",
297
- m && "[&_[data-slot='command-input-wrapper']]:border-b-0"
308
+ c && "[&_[data-slot='command-input-wrapper']]:border-b-0"
298
309
  ),
299
310
  "data-slot": "combobox-command",
300
- dataHook: e || "combobox-command",
301
- filter: P,
302
- shouldFilter: M,
303
- children: n
311
+ dataHook: t || "combobox-command",
312
+ filter: V,
313
+ shouldFilter: D,
314
+ children: a
304
315
  }
305
316
  )
306
317
  }
307
318
  );
308
319
  }
309
- const xe = t.forwardRef(({ debounceMs: e, onValueChange: r, ...n }, o) => {
310
- const { setSearchValue: i, shouldFilter: c, activeDescendantId: s } = _(), m = t.useRef(
320
+ const xe = e.forwardRef(({ debounceMs: t, onValueChange: r, ...a }, o) => {
321
+ const { setSearchValue: s, shouldFilter: f, activeDescendantId: l } = _(), c = e.useRef(
311
322
  void 0
312
323
  );
313
- G(
314
- () => !!(e && e > 0 && c),
324
+ H(
325
+ () => !!(t && t > 0 && f),
315
326
  `debounceMs is set on <ComboboxInput> but shouldFilter is true (default).
316
327
  Debounce is designed for async/server-driven search where the consumer controls the items list.
317
328
  Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs for client-side filtering.`,
318
- [e, c]
319
- ), G(
320
- () => !!(e && e > 0 && n.value !== void 0),
329
+ [t, f]
330
+ ), H(
331
+ () => !!(t && t > 0 && a.value !== void 0),
321
332
  "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.",
322
- [e, n.value]
323
- ), t.useEffect(() => () => {
324
- m.current && clearTimeout(m.current);
333
+ [t, a.value]
334
+ ), e.useEffect(() => () => {
335
+ c.current && clearTimeout(c.current);
325
336
  }, []);
326
- const p = t.useCallback(
337
+ const m = e.useCallback(
327
338
  (v) => {
328
- i(v), e && e > 0 ? (clearTimeout(m.current), m.current = setTimeout(() => {
339
+ s(v), t && t > 0 ? (clearTimeout(c.current), c.current = setTimeout(() => {
329
340
  r?.(v);
330
- }, e)) : r?.(v);
341
+ }, t)) : r?.(v);
331
342
  },
332
- [e, r, i]
343
+ [t, r, s]
333
344
  );
334
- return /* @__PURE__ */ u(
345
+ return /* @__PURE__ */ d(
335
346
  ue,
336
347
  {
337
348
  ref: o,
338
- "aria-activedescendant": s,
349
+ "aria-activedescendant": l,
339
350
  "data-slot": "combobox-input",
340
- onValueChange: p,
341
- ...n
351
+ onValueChange: m,
352
+ ...a
342
353
  }
343
354
  );
344
355
  });
345
356
  xe.displayName = "ComboboxInput";
346
- const he = t.forwardRef(({ className: e, ...r }, n) => /* @__PURE__ */ u(
357
+ const he = e.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ d(
347
358
  de,
348
359
  {
349
- ref: n,
350
- className: A("scrollbar min-h-0 flex-1", e),
360
+ ref: a,
361
+ className: T("scrollbar min-h-0 flex-1", t),
351
362
  "data-slot": "combobox-list",
352
363
  ...r
353
364
  }
354
365
  ));
355
366
  he.displayName = "ComboboxList";
356
367
  function ge({
357
- items: e,
368
+ items: t,
358
369
  getItemValue: r,
359
- getItemLabel: n,
370
+ getItemLabel: a,
360
371
  getItemKeywords: o,
361
- estimateSize: i = 36,
362
- overscan: c = 5,
363
- children: s,
364
- renderEmpty: m,
365
- className: p,
372
+ estimateSize: s = 36,
373
+ overscan: f = 5,
374
+ children: l,
375
+ renderEmpty: c,
376
+ className: m,
366
377
  dataHook: v
367
- }, M) {
368
- const x = t.useMemo(
369
- () => X(e, r, n),
370
- [e, r, n]
371
- ), d = t.useMemo(
372
- () => x?.getValue ?? ((a) => {
373
- if (typeof a == "string" || typeof a == "number")
374
- return String(a);
378
+ }, D) {
379
+ const x = e.useMemo(
380
+ () => X(t, r, a),
381
+ [t, r, a]
382
+ ), b = e.useMemo(
383
+ () => x?.getValue ?? ((n) => {
384
+ if (typeof n == "string" || typeof n == "number")
385
+ return String(n);
375
386
  throw new Error(
376
387
  "[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property."
377
388
  );
378
389
  }),
379
390
  [x]
380
- ), L = t.useMemo(
381
- () => x?.getLabel ?? d,
382
- [x, d]
391
+ ), S = e.useMemo(
392
+ () => x?.getLabel ?? b,
393
+ [x, b]
383
394
  );
384
- G(
385
- () => !x && e.length > 0,
395
+ H(
396
+ () => !x && t.length > 0,
386
397
  "ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",
387
- [x, e.length]
398
+ [x, t.length]
388
399
  );
389
- const I = t.useRef(null), {
400
+ const E = e.useRef(null), {
390
401
  value: C,
391
- onValueChange: R,
392
- setOpen: P,
393
- shouldFilter: w,
394
- searchValue: y,
395
- filterFn: E,
396
- setActiveDescendantId: S,
397
- registerItemsSync: D,
398
- unregisterItem: V
399
- } = _(), [l, k] = t.useState(0), T = t.useId();
400
- t.useImperativeHandle(M, () => I.current, []), t.useLayoutEffect(() => {
401
- const a = e.map((b) => [
402
- d(b),
403
- L(b)
402
+ onValueChange: L,
403
+ setOpen: V,
404
+ shouldFilter: y,
405
+ searchValue: w,
406
+ filterFn: M,
407
+ setActiveDescendantId: R,
408
+ registerItemsSync: k,
409
+ unregisterItem: N
410
+ } = _(), [p, I] = e.useState(0), A = e.useId();
411
+ e.useImperativeHandle(D, () => E.current, []), e.useLayoutEffect(() => {
412
+ const n = t.map((i) => [
413
+ b(i),
414
+ S(i)
404
415
  ]);
405
- return D(a), () => {
406
- for (const b of e)
407
- V(d(b));
416
+ return k(n), () => {
417
+ for (const i of t)
418
+ N(b(i));
408
419
  };
409
- }, [e, d, L, D, V]);
410
- const f = t.useMemo(() => {
411
- if (!w || !y.trim()) return e;
412
- const a = [];
413
- for (const b of e) {
414
- let g = x?.hasDistinctLabel ? K(L(b), y) : E(d(b), y);
420
+ }, [t, b, S, k, N]);
421
+ const u = e.useMemo(() => {
422
+ if (!y || !w.trim()) return t;
423
+ const n = [];
424
+ for (const i of t) {
425
+ let g = x?.hasDistinctLabel ? K(S(i), w) : M(b(i), w);
415
426
  if (o)
416
- for (const N of o(b))
417
- g = Math.max(g, K(N, y));
418
- g > 0 && a.push({ item: b, score: g });
427
+ for (const P of o(i))
428
+ g = Math.max(g, K(P, w));
429
+ g > 0 && n.push({ item: i, score: g });
419
430
  }
420
- return a.sort((b, g) => g.score - b.score), a.map((b) => b.item);
431
+ return n.sort((i, g) => g.score - i.score), n.map((i) => i.item);
421
432
  }, [
422
- e,
423
- w,
433
+ t,
424
434
  y,
425
- d,
426
- L,
435
+ w,
436
+ b,
437
+ S,
427
438
  o,
428
- E,
439
+ M,
429
440
  x?.hasDistinctLabel
430
441
  ]), F = te({
431
- count: f.length,
432
- getScrollElement: () => I.current,
433
- estimateSize: () => i,
434
- overscan: c
435
- }), O = l >= 0 && l < f.length ? d(f[l]) : null;
436
- t.useEffect(() => {
437
- k(0);
438
- }, [y, f.length]);
439
- const q = t.useRef(!1);
440
- t.useEffect(() => {
441
- if (q.current || !C) return;
442
- const a = f.findIndex((b) => d(b) === C);
443
- a >= 0 && (k(a), F.scrollToIndex(a, { align: "center" }), q.current = !0);
444
- }, [C, f, d, F]);
445
- const $ = t.useRef(!1);
446
- t.useEffect(() => {
447
- $.current && l >= 0 && l < f.length && F.scrollToIndex(l, { align: "auto" }), $.current = !1;
448
- }, [l, f.length, F]), t.useEffect(() => {
449
- const a = I.current?.closest(
442
+ count: u.length,
443
+ getScrollElement: () => E.current,
444
+ estimateSize: () => s,
445
+ overscan: f
446
+ }), O = p >= 0 && p < u.length ? b(u[p]) : null;
447
+ e.useEffect(() => {
448
+ I(0);
449
+ }, [w, u.length]);
450
+ const j = e.useRef(!1);
451
+ e.useEffect(() => {
452
+ if (j.current || !C) return;
453
+ const n = u.findIndex((i) => b(i) === C);
454
+ n >= 0 && (I(n), F.scrollToIndex(n, { align: "center" }), j.current = !0);
455
+ }, [C, u, b, F]);
456
+ const $ = e.useRef(!1);
457
+ e.useEffect(() => {
458
+ $.current && p >= 0 && p < u.length && F.scrollToIndex(p, { align: "auto" }), $.current = !1;
459
+ }, [p, u.length, F]), e.useEffect(() => {
460
+ const n = E.current?.closest(
450
461
  '[data-slot="combobox-command"]'
451
462
  );
452
- if (!a) return;
453
- const b = (g) => {
463
+ if (!n) return;
464
+ const i = (g) => {
454
465
  switch (g.key) {
455
466
  case "ArrowDown":
456
- g.preventDefault(), g.stopPropagation(), $.current = !0, k(
457
- (N) => N < f.length - 1 ? N + 1 : N
467
+ g.preventDefault(), g.stopPropagation(), $.current = !0, I(
468
+ (P) => P < u.length - 1 ? P + 1 : P
458
469
  );
459
470
  break;
460
471
  case "ArrowUp":
461
- g.preventDefault(), g.stopPropagation(), $.current = !0, k((N) => N > 0 ? N - 1 : N);
472
+ g.preventDefault(), g.stopPropagation(), $.current = !0, I((P) => P > 0 ? P - 1 : P);
462
473
  break;
463
474
  case "Enter":
464
- if (g.preventDefault(), g.stopPropagation(), l >= 0 && l < f.length) {
465
- const N = d(f[l]);
466
- R(N === C ? "" : N), P(!1);
475
+ if (g.preventDefault(), g.stopPropagation(), p >= 0 && p < u.length) {
476
+ const P = b(u[p]);
477
+ L(P === C ? "" : P), V(!1);
467
478
  }
468
479
  break;
469
480
  case "Home":
470
- g.preventDefault(), g.stopPropagation(), $.current = !0, k(0);
481
+ g.preventDefault(), g.stopPropagation(), $.current = !0, I(0);
471
482
  break;
472
483
  case "End":
473
- g.preventDefault(), g.stopPropagation(), $.current = !0, k(f.length - 1);
484
+ g.preventDefault(), g.stopPropagation(), $.current = !0, I(u.length - 1);
474
485
  break;
475
486
  }
476
487
  };
477
- return a.addEventListener("keydown", b, { capture: !0 }), () => a.removeEventListener("keydown", b, { capture: !0 });
478
- }, [f, l, C, R, P, d]);
479
- const z = t.useMemo(() => {
480
- const a = /* @__PURE__ */ new Map();
481
- return f.forEach((b, g) => {
482
- a.set(d(b), g);
483
- }), a;
484
- }, [f, d]), H = t.useCallback(
485
- (a) => {
486
- const b = z.get(a);
487
- b !== void 0 && k(b);
488
+ return n.addEventListener("keydown", i, { capture: !0 }), () => n.removeEventListener("keydown", i, { capture: !0 });
489
+ }, [u, p, C, L, V, b]);
490
+ const z = e.useMemo(() => {
491
+ const n = /* @__PURE__ */ new Map();
492
+ return u.forEach((i, g) => {
493
+ n.set(b(i), g);
494
+ }), n;
495
+ }, [u, b]), q = e.useCallback(
496
+ (n) => {
497
+ const i = z.get(n);
498
+ i !== void 0 && I(i);
488
499
  },
489
500
  [z]
490
- ), h = t.useCallback(
491
- (a) => (z.get(a) ?? 0) + 1,
501
+ ), U = e.useCallback(
502
+ (n) => (z.get(n) ?? 0) + 1,
492
503
  [z]
493
- ), j = f.length, U = t.useMemo(
504
+ ), G = u.length, W = e.useMemo(
494
505
  () => ({
495
506
  activeValue: O,
496
- onItemPointerMove: H,
497
- idPrefix: T,
498
- filteredCount: j,
499
- getItemPosition: h
507
+ onItemPointerMove: q,
508
+ idPrefix: A,
509
+ filteredCount: G,
510
+ getItemPosition: U
500
511
  }),
501
- [O, H, T, j, h]
502
- ), W = O != null ? `${T}item-${O}` : void 0;
503
- return t.useEffect(() => (S(W), () => S(void 0)), [W, S]), f.length === 0 ? /* @__PURE__ */ u(
512
+ [O, q, A, G, U]
513
+ ), h = O != null ? `${A}item-${O}` : void 0;
514
+ return e.useEffect(() => (R(h), () => R(void 0)), [h, R]), u.length === 0 ? /* @__PURE__ */ d(
504
515
  "div",
505
516
  {
506
- ref: I,
507
- className: A(
517
+ ref: E,
518
+ className: T(
508
519
  "scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",
509
- p
520
+ m
510
521
  ),
511
522
  "data-hook": v,
512
523
  "data-slot": "combobox-virtual-list",
513
524
  role: "listbox",
514
- children: m
525
+ children: c
515
526
  }
516
- ) : /* @__PURE__ */ u(Q.Provider, { value: U, children: /* @__PURE__ */ u(
527
+ ) : /* @__PURE__ */ d(Q.Provider, { value: W, children: /* @__PURE__ */ d(
517
528
  "div",
518
529
  {
519
- ref: I,
520
- className: A(
530
+ ref: E,
531
+ className: T(
521
532
  "scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",
522
- p
533
+ m
523
534
  ),
524
535
  "data-hook": v,
525
536
  "data-slot": "combobox-virtual-list",
526
537
  role: "listbox",
527
- children: /* @__PURE__ */ u(
538
+ children: /* @__PURE__ */ d(
528
539
  "div",
529
540
  {
530
541
  className: "relative w-full",
531
542
  style: { height: `${F.getTotalSize()}px` },
532
- children: F.getVirtualItems().map((a) => /* @__PURE__ */ u(
543
+ children: F.getVirtualItems().map((n) => /* @__PURE__ */ d(
533
544
  "div",
534
545
  {
535
546
  ref: F.measureElement,
536
547
  className: "absolute top-0 left-0 w-full px-2",
537
- "data-index": a.index,
548
+ "data-index": n.index,
538
549
  style: {
539
- transform: `translateY(${a.start}px)`
550
+ transform: `translateY(${n.start}px)`
540
551
  },
541
- children: s(
542
- f[a.index],
543
- a.index,
544
- y
552
+ children: l(
553
+ u[n.index],
554
+ n.index,
555
+ w
545
556
  )
546
557
  },
547
- a.key
558
+ n.key
548
559
  ))
549
560
  }
550
561
  )
551
562
  }
552
563
  ) });
553
564
  }
554
- const $e = t.forwardRef(ge), ve = t.forwardRef((e, r) => /* @__PURE__ */ u(ie, { ref: r, "data-slot": "combobox-empty", ...e }));
565
+ const $e = e.forwardRef(ge), ve = e.forwardRef((t, r) => /* @__PURE__ */ d(ie, { ref: r, "data-slot": "combobox-empty", ...t }));
555
566
  ve.displayName = "ComboboxEmpty";
556
- const Ce = t.forwardRef(({ children: e, ...r }, n) => {
557
- const o = t.useRef(null);
558
- return G(
567
+ const Ce = e.forwardRef(({ children: t, ...r }, a) => {
568
+ const o = e.useRef(null);
569
+ return H(
559
570
  () => o.current ? o.current.querySelectorAll('[data-slot="combobox-item"]').length >= 100 : !1,
560
571
  `ComboboxGroup contains 100+ items. Use <ComboboxVirtualList> for large datasets to avoid DOM bloat and slow renders.
561
572
  Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,
562
- [e]
563
- ), /* @__PURE__ */ u(
573
+ [t]
574
+ ), /* @__PURE__ */ d(
564
575
  le,
565
576
  {
566
- ref: (i) => {
567
- o.current = i, typeof n == "function" ? n(i) : n && (n.current = i);
577
+ ref: (s) => {
578
+ o.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
568
579
  },
569
580
  "data-slot": "combobox-group",
570
581
  ...r,
571
- children: e
582
+ children: t
572
583
  }
573
584
  );
574
585
  });
575
586
  Ce.displayName = "ComboboxGroup";
576
- function we(e, r, n) {
587
+ function we(t, r, a) {
577
588
  if (!r || !r.trim())
578
- return e;
589
+ return t;
579
590
  const o = new RegExp(
580
591
  `(${r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
581
592
  "gi"
582
- ), i = e.split(o);
583
- return /* @__PURE__ */ u("span", { children: i.map(
584
- (c, s) => s % 2 === 1 ? /* @__PURE__ */ u("span", { className: n, children: c }, s) : /* @__PURE__ */ u(t.Fragment, { children: c }, s)
593
+ ), s = t.split(o);
594
+ return /* @__PURE__ */ d("span", { children: s.map(
595
+ (f, l) => l % 2 === 1 ? /* @__PURE__ */ d("span", { className: a, children: f }, l) : /* @__PURE__ */ d(e.Fragment, { children: f }, l)
585
596
  ) });
586
597
  }
587
- const ye = t.forwardRef(
598
+ const ye = e.forwardRef(
588
599
  ({
589
- value: e,
600
+ value: t,
590
601
  label: r,
591
- dataHook: n,
602
+ dataHook: a,
592
603
  children: o,
593
- className: i,
594
- highlight: c,
595
- highlightClassName: s,
596
- keywords: m,
597
- onSelect: p,
604
+ className: s,
605
+ highlight: f,
606
+ highlightClassName: l,
607
+ keywords: c,
608
+ onSelect: m,
598
609
  ...v
599
- }, M) => {
600
- const { value: x, onValueChange: d, setOpen: L, registerItem: I, unregisterItem: C } = _(), R = t.useContext(Q), P = x === e, w = t.useMemo(() => r || (typeof o == "string" ? o : typeof o == "number" ? String(o) : e), [r, o, e]), y = t.useRef(I), E = t.useRef(C);
601
- t.useEffect(() => {
602
- y.current = I, E.current = C;
603
- }, [I, C]);
604
- const S = !!R;
605
- t.useEffect(() => {
606
- if (!S)
607
- return y.current(e, w), () => E.current(e);
608
- }, [e, w, S]);
609
- const D = () => {
610
- d(e === x ? "" : e), L(!1), p?.(e);
611
- }, V = () => c && typeof o == "string" ? we(
610
+ }, D) => {
611
+ const { value: x, onValueChange: b, setOpen: S, registerItem: E, unregisterItem: C } = _(), L = e.useContext(Q), V = x === t, y = e.useMemo(() => r || (typeof o == "string" ? o : typeof o == "number" ? String(o) : t), [r, o, t]), w = e.useRef(E), M = e.useRef(C);
612
+ e.useEffect(() => {
613
+ w.current = E, M.current = C;
614
+ }, [E, C]);
615
+ const R = !!L;
616
+ e.useEffect(() => {
617
+ if (!R)
618
+ return w.current(t, y), () => M.current(t);
619
+ }, [t, y, R]);
620
+ const k = () => {
621
+ b(t === x ? "" : t), S(!1), m?.(t);
622
+ }, N = () => f && typeof o == "string" ? we(
612
623
  o,
613
- c,
614
- s || "text-sm leading-normal font-semibold"
624
+ f,
625
+ l || "text-sm leading-normal font-semibold"
615
626
  ) : o;
616
- if (R) {
617
- const l = R.activeValue === e, k = !!v.disabled;
627
+ if (L) {
628
+ const p = L.activeValue === t, I = !!v.disabled;
618
629
  return /* @__PURE__ */ B(
619
630
  "div",
620
631
  {
621
- ref: M,
622
- "aria-disabled": k || void 0,
623
- "aria-posinset": R.getItemPosition(e),
624
- "aria-selected": P,
625
- "aria-setsize": R.filteredCount,
626
- className: A(
632
+ ref: D,
633
+ "aria-disabled": I || void 0,
634
+ "aria-posinset": L.getItemPosition(t),
635
+ "aria-selected": V,
636
+ "aria-setsize": L.filteredCount,
637
+ className: T(
627
638
  "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",
628
639
  "[&_svg]:pointer-events-none [&_svg]:shrink-0",
629
- k && "pointer-events-none opacity-50",
630
- i
640
+ I && "pointer-events-none opacity-50",
641
+ s
631
642
  ),
632
- "data-highlighted": l || void 0,
633
- "data-hook": n,
643
+ "data-highlighted": p || void 0,
644
+ "data-hook": a,
634
645
  "data-slot": "combobox-item",
635
- id: `${R.idPrefix}item-${e}`,
646
+ id: `${L.idPrefix}item-${t}`,
636
647
  role: "option",
637
648
  tabIndex: -1,
638
- onClick: k ? void 0 : D,
639
- onKeyDown: k ? void 0 : (T) => {
640
- (T.key === "Enter" || T.key === " ") && D();
649
+ onClick: I ? void 0 : k,
650
+ onKeyDown: I ? void 0 : (A) => {
651
+ (A.key === "Enter" || A.key === " ") && k();
641
652
  },
642
- onPointerMove: k ? void 0 : () => R.onItemPointerMove(e),
653
+ onPointerMove: I ? void 0 : () => L.onItemPointerMove(t),
643
654
  children: [
644
- V(),
645
- P && /* @__PURE__ */ u(
655
+ N(),
656
+ V && /* @__PURE__ */ d(
646
657
  Y,
647
658
  {
648
659
  "aria-hidden": "true",
@@ -656,17 +667,17 @@ const ye = t.forwardRef(
656
667
  return /* @__PURE__ */ B(
657
668
  ce,
658
669
  {
659
- ref: M,
660
- className: A("justify-between", i),
670
+ ref: D,
671
+ className: T("justify-between", s),
661
672
  "data-slot": "combobox-item",
662
- dataHook: n,
663
- keywords: m ? [w, ...m] : [w],
664
- value: e,
665
- onSelect: D,
673
+ dataHook: a,
674
+ keywords: c ? [y, ...c] : [y],
675
+ value: t,
676
+ onSelect: k,
666
677
  ...v,
667
678
  children: [
668
- V(),
669
- P && /* @__PURE__ */ u(
679
+ N(),
680
+ V && /* @__PURE__ */ d(
670
681
  Y,
671
682
  {
672
683
  "aria-hidden": "true",
@@ -679,32 +690,32 @@ const ye = t.forwardRef(
679
690
  }
680
691
  );
681
692
  ye.displayName = "ComboboxItem";
682
- const ke = t.forwardRef((e, r) => /* @__PURE__ */ u(fe, { ref: r, "data-slot": "combobox-separator", ...e }));
693
+ const ke = e.forwardRef((t, r) => /* @__PURE__ */ d(fe, { ref: r, "data-slot": "combobox-separator", ...t }));
683
694
  ke.displayName = "ComboboxSeparator";
684
- function je({
685
- className: e,
695
+ function Oe({
696
+ className: t,
686
697
  children: r,
687
- loadingText: n
698
+ loadingText: a
688
699
  }) {
689
- return /* @__PURE__ */ u(
700
+ return /* @__PURE__ */ d(
690
701
  "div",
691
702
  {
692
703
  "aria-live": "polite",
693
- className: A(
704
+ className: T(
694
705
  "text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",
695
- e
706
+ t
696
707
  ),
697
708
  "data-slot": "combobox-loading",
698
709
  role: "status",
699
710
  children: r || /* @__PURE__ */ B(Z, { children: [
700
- /* @__PURE__ */ u(
711
+ /* @__PURE__ */ d(
701
712
  "div",
702
713
  {
703
714
  "aria-hidden": "true",
704
715
  className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"
705
716
  }
706
717
  ),
707
- n ?? "Loading..."
718
+ a ?? "Loading..."
708
719
  ] })
709
720
  }
710
721
  );
@@ -717,7 +728,7 @@ export {
717
728
  xe as ComboboxInput,
718
729
  ye as ComboboxItem,
719
730
  he as ComboboxList,
720
- je as ComboboxLoading,
731
+ Oe as ComboboxLoading,
721
732
  ke as ComboboxSeparator,
722
733
  me as ComboboxTrigger,
723
734
  Ae as ComboboxValue,