@brightlocal/ui-components 2.10.0 → 2.11.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 (58) hide show
  1. package/README.md +3 -1
  2. package/component-meta.json +41 -9
  3. package/dist/badge.cjs +1 -1
  4. package/dist/badge.d.ts.map +1 -1
  5. package/dist/badge.js +42 -25
  6. package/dist/blocks/sidebar.cjs +1 -1
  7. package/dist/blocks/sidebar.d.ts +1 -3
  8. package/dist/blocks/sidebar.d.ts.map +1 -1
  9. package/dist/blocks/sidebar.js +46 -49
  10. package/dist/button.cjs +1 -1
  11. package/dist/button.js +25 -25
  12. package/dist/card.cjs +1 -1
  13. package/dist/card.d.ts +10 -1
  14. package/dist/card.d.ts.map +1 -1
  15. package/dist/card.js +85 -82
  16. package/dist/carousel.cjs +1 -1
  17. package/dist/carousel.d.ts +13 -1
  18. package/dist/carousel.d.ts.map +1 -1
  19. package/dist/carousel.js +196 -150
  20. package/dist/command.cjs +1 -1
  21. package/dist/command.d.ts +101 -1
  22. package/dist/command.d.ts.map +1 -1
  23. package/dist/command.js +383 -119
  24. package/dist/hooks/use-breakpoint.cjs +1 -1
  25. package/dist/hooks/use-breakpoint.d.ts.map +1 -1
  26. package/dist/hooks/use-breakpoint.js +10 -10
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +402 -391
  31. package/dist/input-chip.cjs +1 -1
  32. package/dist/input-chip.d.ts +1 -4
  33. package/dist/input-chip.d.ts.map +1 -1
  34. package/dist/input-chip.js +163 -170
  35. package/dist/map.cjs +1 -0
  36. package/dist/map.d.ts +192 -0
  37. package/dist/map.d.ts.map +1 -0
  38. package/dist/map.js +250 -0
  39. package/dist/sonner.cjs +1 -1
  40. package/dist/sonner.d.ts.map +1 -1
  41. package/dist/sonner.js +32 -30
  42. package/dist/tabs.cjs +1 -1
  43. package/dist/tabs.d.ts +4 -0
  44. package/dist/tabs.d.ts.map +1 -1
  45. package/dist/tabs.js +101 -52
  46. package/package.json +3 -3
  47. package/src/blocks/sidebar.tsx +21 -26
  48. package/src/components/badge.tsx +22 -5
  49. package/src/components/button.tsx +13 -13
  50. package/src/components/card.tsx +35 -19
  51. package/src/components/carousel.tsx +101 -9
  52. package/src/components/command.tsx +637 -16
  53. package/src/components/input-chip.tsx +102 -65
  54. package/src/components/map.tsx +574 -0
  55. package/src/components/sonner.tsx +9 -3
  56. package/src/components/tabs.tsx +118 -22
  57. package/src/hooks/use-breakpoint.ts +2 -3
  58. package/src/index.ts +1 -0
package/dist/carousel.js CHANGED
@@ -1,254 +1,300 @@
1
- import { jsx as n, jsxs as S } from "react/jsx-runtime";
1
+ import { jsx as p, jsxs as R } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import E from "embla-carousel-react";
4
- import { ArrowRight as A, ArrowLeft as K } from "@brightlocal/icons";
5
- import { cn as p } from "@brightlocal/ui-components/lib/utils";
6
- import { Button as N } from "@brightlocal/ui-components/button";
7
- const w = o.createContext(null);
8
- function C() {
9
- const t = o.useContext(w);
10
- if (!t)
3
+ import $ from "embla-carousel-react";
4
+ import { ArrowRight as q, ArrowLeft as F } from "@brightlocal/icons";
5
+ import { cn as C } from "@brightlocal/ui-components/lib/utils";
6
+ import { Button as E } from "@brightlocal/ui-components/button";
7
+ const D = o.createContext(null);
8
+ function v() {
9
+ const r = o.useContext(D);
10
+ if (!r)
11
11
  throw new Error("useCarousel must be used within a <Carousel />");
12
- return t;
12
+ return r;
13
13
  }
14
- const L = o.forwardRef(
14
+ const H = o.forwardRef(
15
15
  ({
16
- orientation: t = "horizontal",
16
+ orientation: r = "horizontal",
17
17
  opts: l,
18
- setApi: a,
19
- plugins: s,
20
- className: i,
21
- children: e,
22
- dataHook: f,
23
- trackingEl: d,
24
- trackingLabel: c,
25
- ...g
26
- }, b) => {
27
- const [u, r] = E(
18
+ setApi: n,
19
+ plugins: d,
20
+ className: f,
21
+ children: t,
22
+ dataHook: c,
23
+ trackingEl: i,
24
+ trackingLabel: s,
25
+ lazyLoad: m = !1,
26
+ overscan: h = 1,
27
+ ...u
28
+ }, M) => {
29
+ const [K, e] = $(
28
30
  {
29
31
  ...l,
30
- axis: t === "horizontal" ? "x" : "y"
32
+ axis: r === "horizontal" ? "x" : "y"
31
33
  },
32
- s
33
- ), [y, k] = o.useState(!1), [P, z] = o.useState(!1), h = o.useCallback((m) => {
34
- m && (k(m.canScrollPrev()), z(m.canScrollNext()));
35
- }, []), v = o.useCallback(() => {
36
- r?.scrollPrev();
37
- }, [r]), x = o.useCallback(() => {
38
- r?.scrollNext();
39
- }, [r]), I = o.useCallback(
40
- (m) => {
41
- const R = t === "horizontal" ? "ArrowLeft" : "ArrowUp", D = t === "horizontal" ? "ArrowRight" : "ArrowDown";
42
- m.key === R ? (m.preventDefault(), v()) : m.key === D && (m.preventDefault(), x());
34
+ d
35
+ ), [L, j] = o.useState(!1), [O, A] = o.useState(!1), g = Math.max(0, Math.floor(h)), [B, G] = o.useState(() => {
36
+ if (!m) return /* @__PURE__ */ new Set();
37
+ const a = l?.startIndex ?? 0, b = /* @__PURE__ */ new Set();
38
+ for (let S = Math.max(0, a - g); S <= a + g; S++)
39
+ b.add(S);
40
+ return b;
41
+ }), w = o.useCallback((a) => {
42
+ a && (j(a.canScrollPrev()), A(a.canScrollNext()));
43
+ }, []), N = o.useCallback(() => {
44
+ e?.scrollPrev();
45
+ }, [e]), k = o.useCallback(() => {
46
+ e?.scrollNext();
47
+ }, [e]), T = o.useCallback(
48
+ (a) => {
49
+ const b = r === "horizontal" ? "ArrowLeft" : "ArrowUp", S = r === "horizontal" ? "ArrowRight" : "ArrowDown";
50
+ a.key === b ? (a.preventDefault(), N()) : a.key === S && (a.preventDefault(), k());
43
51
  },
44
- [t, v, x]
52
+ [r, N, k]
53
+ );
54
+ o.useEffect(() => {
55
+ !e || !n || n(e);
56
+ }, [e, n]), o.useEffect(() => {
57
+ if (e)
58
+ return w(e), e.on("reInit", w), e.on("select", w), () => {
59
+ e?.off("reInit", w), e?.off("select", w);
60
+ };
61
+ }, [e, w]);
62
+ const x = o.useCallback(
63
+ (a) => {
64
+ if (!a || !m) return;
65
+ const b = a.slidesInView(), S = a.slideNodes().length;
66
+ G((y) => {
67
+ const I = new Set(y);
68
+ for (const z of b) {
69
+ const U = Math.max(0, z - g), _ = Math.min(S - 1, z + g);
70
+ for (let P = U; P <= _; P++)
71
+ I.add(P);
72
+ }
73
+ return I.size === y.size ? y : I;
74
+ });
75
+ },
76
+ [m, g]
45
77
  );
46
78
  return o.useEffect(() => {
47
- !r || !a || a(r);
48
- }, [r, a]), o.useEffect(() => {
49
- if (r)
50
- return h(r), r.on("reInit", h), r.on("select", h), () => {
51
- r?.off("reInit", h), r?.off("select", h);
79
+ if (!(!e || !m))
80
+ return x(e), e.on("slidesInView", x), e.on("select", x), e.on("reInit", x), () => {
81
+ e.off("slidesInView", x), e.off("select", x), e.off("reInit", x);
52
82
  };
53
- }, [r, h]), /* @__PURE__ */ n(
54
- w.Provider,
83
+ }, [e, m, x]), /* @__PURE__ */ p(
84
+ D.Provider,
55
85
  {
56
86
  value: {
57
- carouselRef: u,
58
- api: r,
87
+ carouselRef: K,
88
+ api: e,
59
89
  opts: l,
60
- orientation: t || (l?.axis === "y" ? "vertical" : "horizontal"),
61
- scrollPrev: v,
62
- scrollNext: x,
63
- canScrollPrev: y,
64
- canScrollNext: P
90
+ orientation: r || (l?.axis === "y" ? "vertical" : "horizontal"),
91
+ scrollPrev: N,
92
+ scrollNext: k,
93
+ canScrollPrev: L,
94
+ canScrollNext: O,
95
+ lazyLoad: m,
96
+ loadedSlides: B
65
97
  },
66
- children: /* @__PURE__ */ n(
98
+ children: /* @__PURE__ */ p(
67
99
  "div",
68
100
  {
69
- ref: b,
101
+ ref: M,
70
102
  "aria-roledescription": "carousel",
71
- className: p("relative", i),
72
- "data-hook": f,
103
+ className: C("relative", f),
104
+ "data-hook": c,
73
105
  "data-slot": "carousel",
74
- "data-tracking-el": d,
75
- "data-tracking-label": c,
106
+ "data-tracking-el": i,
107
+ "data-tracking-label": s,
76
108
  role: "region",
77
- onKeyDownCapture: I,
78
- ...g,
79
- children: e
109
+ onKeyDownCapture: T,
110
+ ...u,
111
+ children: t
80
112
  }
81
113
  )
82
114
  }
83
115
  );
84
116
  }
85
117
  );
86
- L.displayName = "Carousel";
87
- const j = o.forwardRef(({ className: t, ...l }, a) => {
88
- const { carouselRef: s, orientation: i } = C(), e = i === "vertical";
89
- return /* @__PURE__ */ n(
118
+ H.displayName = "Carousel";
119
+ const J = o.forwardRef(({ className: r, children: l, ...n }, d) => {
120
+ const { carouselRef: f, orientation: t, lazyLoad: c } = v(), i = t === "vertical";
121
+ let s = 0;
122
+ const m = c ? o.Children.map(l, (h) => {
123
+ if (o.isValidElement(h) && h.type === V) {
124
+ const u = s++;
125
+ return o.cloneElement(
126
+ h,
127
+ { _lazyIndex: u }
128
+ );
129
+ }
130
+ return h;
131
+ }) : l;
132
+ return /* @__PURE__ */ p(
90
133
  "div",
91
134
  {
92
- ref: s,
93
- className: p("overflow-hidden", e && "w-full", t),
135
+ ref: f,
136
+ className: C("overflow-hidden", i && "w-full", r),
94
137
  "data-slot": "carousel-content",
95
- children: /* @__PURE__ */ n(
138
+ children: /* @__PURE__ */ p(
96
139
  "div",
97
140
  {
98
- ref: a,
99
- className: p(
141
+ ref: d,
142
+ className: C(
100
143
  "flex",
101
- e ? "-mt-4 h-full w-full flex-col" : "-ml-4"
144
+ i ? "-mt-4 h-full w-full flex-col" : "-ml-4"
102
145
  ),
103
- ...l
146
+ ...n,
147
+ children: m
104
148
  }
105
149
  )
106
150
  }
107
151
  );
108
152
  });
109
- j.displayName = "CarouselContent";
110
- const O = o.forwardRef(({ className: t, ...l }, a) => {
111
- const { orientation: s } = C();
112
- return /* @__PURE__ */ n(
153
+ J.displayName = "CarouselContent";
154
+ const V = o.forwardRef(({ className: r, children: l, _lazyIndex: n, ...d }, f) => {
155
+ const { orientation: t, lazyLoad: c, loadedSlides: i } = v(), s = !c || n === void 0 || i.has(n);
156
+ return /* @__PURE__ */ p(
113
157
  "div",
114
158
  {
115
- ref: a,
159
+ ref: f,
116
160
  "aria-roledescription": "slide",
117
- className: p(
161
+ className: C(
118
162
  "min-w-0 shrink-0 grow-0 basis-full",
119
- s === "horizontal" ? "pl-4" : "w-full pt-4",
120
- t
163
+ t === "horizontal" ? "pl-4" : "w-full pt-4",
164
+ r
121
165
  ),
166
+ "data-lazy-loaded": c ? String(s) : void 0,
122
167
  "data-slot": "carousel-item",
123
168
  role: "group",
124
- ...l
169
+ ...d,
170
+ children: s ? l : null
125
171
  }
126
172
  );
127
173
  });
128
- O.displayName = "CarouselItem";
129
- function B({
130
- className: t,
174
+ V.displayName = "CarouselItem";
175
+ function Q({
176
+ className: r,
131
177
  variant: l = "outline",
132
- size: a = "default",
133
- dataHook: s = "carousel-previous",
134
- hideWhenDisabled: i = !1,
135
- ...e
178
+ size: n = "default",
179
+ dataHook: d = "carousel-previous",
180
+ hideWhenDisabled: f = !1,
181
+ ...t
136
182
  }) {
137
- const { orientation: f, scrollPrev: d, canScrollPrev: c } = C();
138
- return i && !c ? null : /* @__PURE__ */ S(
139
- N,
183
+ const { orientation: c, scrollPrev: i, canScrollPrev: s } = v();
184
+ return f && !s ? null : /* @__PURE__ */ R(
185
+ E,
140
186
  {
141
187
  iconOnly: !0,
142
- className: p(
188
+ className: C(
143
189
  "absolute",
144
- f === "horizontal" ? "top-1/2 left-1 -translate-y-1/2 sm:-left-12" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
145
- t
190
+ c === "horizontal" ? "top-1/2 left-1 -translate-y-1/2 sm:-left-12" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
191
+ r
146
192
  ),
147
193
  "data-slot": "carousel-previous",
148
- dataHook: s,
149
- disabled: !c,
150
- size: a,
194
+ dataHook: d,
195
+ disabled: !s,
196
+ size: n,
151
197
  variant: l,
152
- onClick: d,
153
- ...e,
198
+ onClick: i,
199
+ ...t,
154
200
  children: [
155
- /* @__PURE__ */ n(K, {}),
156
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Previous slide" })
201
+ /* @__PURE__ */ p(F, {}),
202
+ /* @__PURE__ */ p("span", { className: "sr-only", children: "Previous slide" })
157
203
  ]
158
204
  }
159
205
  );
160
206
  }
161
- B.displayName = "CarouselPrevious";
162
- function G({
163
- className: t,
207
+ Q.displayName = "CarouselPrevious";
208
+ function W({
209
+ className: r,
164
210
  variant: l = "outline",
165
- size: a = "default",
166
- dataHook: s = "carousel-next",
167
- hideWhenDisabled: i = !1,
168
- ...e
211
+ size: n = "default",
212
+ dataHook: d = "carousel-next",
213
+ hideWhenDisabled: f = !1,
214
+ ...t
169
215
  }) {
170
- const { orientation: f, scrollNext: d, canScrollNext: c } = C();
171
- return i && !c ? null : /* @__PURE__ */ S(
172
- N,
216
+ const { orientation: c, scrollNext: i, canScrollNext: s } = v();
217
+ return f && !s ? null : /* @__PURE__ */ R(
218
+ E,
173
219
  {
174
220
  iconOnly: !0,
175
- className: p(
221
+ className: C(
176
222
  "absolute",
177
- f === "horizontal" ? "top-1/2 right-1 -translate-y-1/2 sm:-right-12" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
178
- t
223
+ c === "horizontal" ? "top-1/2 right-1 -translate-y-1/2 sm:-right-12" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
224
+ r
179
225
  ),
180
226
  "data-slot": "carousel-next",
181
- dataHook: s,
182
- disabled: !c,
183
- size: a,
227
+ dataHook: d,
228
+ disabled: !s,
229
+ size: n,
184
230
  variant: l,
185
- onClick: d,
186
- ...e,
231
+ onClick: i,
232
+ ...t,
187
233
  children: [
188
- /* @__PURE__ */ n(A, {}),
189
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Next slide" })
234
+ /* @__PURE__ */ p(q, {}),
235
+ /* @__PURE__ */ p("span", { className: "sr-only", children: "Next slide" })
190
236
  ]
191
237
  }
192
238
  );
193
239
  }
194
- G.displayName = "CarouselNext";
195
- function T({
196
- className: t,
240
+ W.displayName = "CarouselNext";
241
+ function X({
242
+ className: r,
197
243
  dataHook: l = "carousel-dots",
198
- trackingEl: a,
199
- trackingLabel: s,
200
- ...i
244
+ trackingEl: n,
245
+ trackingLabel: d,
246
+ ...f
201
247
  }) {
202
- const { api: e } = C(), [f, d] = o.useState(0), [c, g] = o.useState([]);
248
+ const { api: t } = v(), [c, i] = o.useState(0), [s, m] = o.useState([]);
203
249
  return o.useEffect(() => {
204
- if (!e) return;
205
- g(e.scrollSnapList()), d(e.selectedScrollSnap());
206
- const b = () => {
207
- d(e.selectedScrollSnap());
250
+ if (!t) return;
251
+ m(t.scrollSnapList()), i(t.selectedScrollSnap());
252
+ const h = () => {
253
+ i(t.selectedScrollSnap());
208
254
  }, u = () => {
209
- g(e.scrollSnapList()), d(e.selectedScrollSnap());
255
+ m(t.scrollSnapList()), i(t.selectedScrollSnap());
210
256
  };
211
- return e.on("select", b), e.on("reInit", u), () => {
212
- e.off("select", b), e.off("reInit", u);
257
+ return t.on("select", h), t.on("reInit", u), () => {
258
+ t.off("select", h), t.off("reInit", u);
213
259
  };
214
- }, [e]), c.length === 0 ? null : /* @__PURE__ */ n(
260
+ }, [t]), s.length === 0 ? null : /* @__PURE__ */ p(
215
261
  "div",
216
262
  {
217
263
  "aria-label": "Slide navigation",
218
- className: p(
264
+ className: C(
219
265
  "border-border dark:border-input dark:bg-input/30 inline-flex items-center justify-center gap-2 rounded-full border bg-white px-2.5 py-2",
220
- t
266
+ r
221
267
  ),
222
268
  "data-hook": l,
223
269
  "data-slot": "carousel-dots",
224
- "data-tracking-el": a,
225
- "data-tracking-label": s,
270
+ "data-tracking-el": n,
271
+ "data-tracking-label": d,
226
272
  role: "group",
227
- ...i,
228
- children: c.map((b, u) => /* @__PURE__ */ n(
273
+ ...f,
274
+ children: s.map((h, u) => /* @__PURE__ */ p(
229
275
  "button",
230
276
  {
231
- "aria-current": u === f ? "step" : void 0,
277
+ "aria-current": u === c ? "step" : void 0,
232
278
  "aria-label": `Go to slide ${u + 1}`,
233
- className: p(
279
+ className: C(
234
280
  "focus-visible:shadow-default size-3 rounded-full transition-[width,background-color] duration-200 ease-out outline-none",
235
- u === f ? "bg-muted-foreground/50 dark:bg-muted-foreground/70 w-9" : "bg-input hover:bg-muted-foreground/30 dark:bg-input/80 dark:hover:bg-muted-foreground/50"
281
+ u === c ? "bg-muted-foreground/50 dark:bg-muted-foreground/70 w-9" : "bg-input hover:bg-muted-foreground/30 dark:bg-input/80 dark:hover:bg-muted-foreground/50"
236
282
  ),
237
283
  "data-slot": "carousel-dot",
238
284
  type: "button",
239
- onClick: () => e?.scrollTo(u)
285
+ onClick: () => t?.scrollTo(u)
240
286
  },
241
287
  u
242
288
  ))
243
289
  }
244
290
  );
245
291
  }
246
- T.displayName = "CarouselDots";
292
+ X.displayName = "CarouselDots";
247
293
  export {
248
- L as Carousel,
249
- j as CarouselContent,
250
- T as CarouselDots,
251
- O as CarouselItem,
252
- G as CarouselNext,
253
- B as CarouselPrevious
294
+ H as Carousel,
295
+ J as CarouselContent,
296
+ X as CarouselDots,
297
+ V as CarouselItem,
298
+ W as CarouselNext,
299
+ Q as CarouselPrevious
254
300
  };
package/dist/command.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),O=require("react"),m=require("cmdk"),f=require("@brightlocal/icons"),E=require("@brightlocal/ui-components/button"),c=require("@brightlocal/ui-components/lib/utils");function G(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const d=G(O),C=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,...n},s)=>r.jsx(m.Command,{ref:s,className:c.cn("bg-popover text-popover-foreground flex w-full flex-col overflow-hidden rounded-lg border shadow-md",a),"data-hook":t,"data-slot":"command","data-tracking-el":e,"data-tracking-label":o,...n}));C.displayName="Command";const b=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,value:n,onValueChange:s,onClear:l,...i},R)=>{const u=d.useRef(null),[S,g]=d.useState("");d.useImperativeHandle(R,()=>u.current,[]);const p=n!==void 0,x=p?n:S,I=String(x).length>0,_=h=>{p||g(h),s?.(h)},q=()=>{p||g(""),s?.(""),l?.(),u.current?.focus()};return r.jsxs("div",{className:"border-base-border flex h-12 items-center gap-2 self-stretch border-b px-3","data-hook":t,"data-slot":"command-input-wrapper",children:[r.jsx(f.Search,{className:"shrink-0 opacity-50"}),r.jsx(m.Command.Input,{ref:u,className:c.cn("placeholder:text-muted-foreground flex w-full bg-transparent text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50",a),"data-slot":"command-input","data-tracking-el":e,"data-tracking-label":o,value:x,onValueChange:_,...i}),I&&r.jsx(E.Button,{"aria-label":"Clear search",className:"text-muted-foreground hover:text-foreground",dataHook:"command-input-clear",variant:"ghost",onClick:q,children:r.jsx(f.X,{})})]})});b.displayName="CommandInput";const k=d.forwardRef(({className:a,dataHook:t,...e},o)=>r.jsx(m.Command.List,{ref:o,className:c.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",a),"data-hook":t,"data-slot":"command-list",...e}));k.displayName="CommandList";const y=d.forwardRef(({dataHook:a,...t},e)=>{const o=d.useCallback(n=>{n?.setAttribute("role","option"),typeof e=="function"?e(n):e&&(e.current=n)},[e]);return r.jsx(m.Command.Empty,{ref:o,"aria-disabled":"true","aria-selected":"false",className:"py-6 text-center text-sm","data-hook":a,"data-slot":"command-empty",...t})});y.displayName="CommandEmpty";const v=d.forwardRef(({className:a,dataHook:t,...e},o)=>r.jsx(m.Command.Group,{ref:o,className:c.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",a),"data-hook":t,"data-slot":"command-group",...e}));v.displayName="CommandGroup";const N=d.forwardRef(({className:a,dataHook:t,...e},o)=>r.jsx(m.Command.Separator,{ref:o,className:c.cn("bg-border -mx-1 h-px",a),"data-hook":t,"data-slot":"command-separator",...e}));N.displayName="CommandSeparator";const j=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,selected:n,children:s,...l},i)=>r.jsxs(m.Command.Item,{ref:i,className:c.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",a),"data-hook":t,"data-selected-item":n||void 0,"data-slot":"command-item","data-tracking-el":e,"data-tracking-label":o,...l,children:[s,n&&r.jsx(f.Check,{className:"text-foreground ml-auto"})]}));j.displayName="CommandItem";const w=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,...n},s)=>r.jsx("span",{ref:s,className:c.cn("text-muted-foreground ml-auto text-xs tracking-widest",a),"data-hook":t,"data-slot":"command-shortcut","data-tracking-el":e,"data-tracking-label":o,...n}));w.displayName="CommandShortcut";exports.Command=C;exports.CommandEmpty=y;exports.CommandGroup=v;exports.CommandInput=b;exports.CommandItem=j;exports.CommandList=k;exports.CommandSeparator=N;exports.CommandShortcut=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),Z=require("react"),y=require("cmdk"),ee=require("@tanstack/react-virtual"),_=require("@brightlocal/icons"),te=require("@brightlocal/ui-components/button"),I=require("@brightlocal/ui-components/lib/utils"),ae=require("@brightlocal/ui-components/lib/use-dev-warning");function oe(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const e=oe(Z),A=e.createContext({searchValue:"",setSearchValue:()=>{},activeDescendantId:void 0,setActiveDescendantId:()=>{},listboxId:void 0,setListboxId:()=>{}}),G=e.forwardRef(({className:t,dataHook:o,trackingEl:a,trackingLabel:n,...s},u)=>{const[h,p]=e.useState(""),[k,N]=e.useState(void 0),[v,j]=e.useState(void 0),C=e.useMemo(()=>({searchValue:h,setSearchValue:p,activeDescendantId:k,setActiveDescendantId:N,listboxId:v,setListboxId:j}),[h,k,v]);return d.jsx(A.Provider,{value:C,children:d.jsx(y.Command,{ref:u,className:I.cn("bg-popover text-popover-foreground flex w-full flex-col overflow-hidden rounded-lg border shadow-md",t),"data-hook":o,"data-slot":"command","data-tracking-el":a,"data-tracking-label":n,...s})})});G.displayName="Command";const H=e.forwardRef(({className:t,dataHook:o,trackingEl:a,trackingLabel:n,value:s,onValueChange:u,onClear:h,debounceMs:p,...k},N)=>{const v=e.useRef(null),[j,C]=e.useState(""),x=e.useRef(void 0),{setSearchValue:m,activeDescendantId:w,listboxId:g}=e.useContext(A);e.useImperativeHandle(N,()=>v.current,[]),ae.useDevWarning(()=>!!(p&&p>0&&s!==void 0),"debounceMs is set on <CommandInput> 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.",[p,s]),e.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),e.useEffect(()=>{const r=v.current;r&&(g&&r.setAttribute("aria-controls",g),w?r.setAttribute("aria-activedescendant",w):r.removeAttribute("aria-activedescendant"))});const l=s!==void 0,S=l?s:j,E=String(S).length>0,L=r=>{l||C(r),m(r),p&&p>0?(clearTimeout(x.current),x.current=setTimeout(()=>{u?.(r)},p)):u?.(r)},V=()=>{l||C(""),m(""),clearTimeout(x.current),u?.(""),h?.(),v.current?.focus()};return d.jsxs("div",{className:"border-base-border flex h-12 items-center gap-2 self-stretch border-b px-3","data-hook":o,"data-slot":"command-input-wrapper",children:[d.jsx(_.Search,{className:"shrink-0 opacity-50"}),d.jsx(y.Command.Input,{ref:v,className:I.cn("placeholder:text-muted-foreground flex w-full bg-transparent text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),"data-slot":"command-input","data-tracking-el":a,"data-tracking-label":n,value:S,onValueChange:L,...k}),E&&d.jsx(te.Button,{"aria-label":"Clear search",className:"text-muted-foreground hover:text-foreground",dataHook:"command-input-clear",variant:"ghost",onClick:V,children:d.jsx(_.X,{})})]})});H.displayName="CommandInput";const B=e.forwardRef(({className:t,dataHook:o,...a},n)=>d.jsx(y.Command.List,{ref:n,className:I.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),"data-hook":o,"data-slot":"command-list",...a}));B.displayName="CommandList";const F=e.forwardRef(({dataHook:t,...o},a)=>{const n=e.useCallback(s=>{s?.setAttribute("role","option"),typeof a=="function"?a(s):a&&(a.current=s)},[a]);return d.jsx(y.Command.Empty,{ref:n,"aria-disabled":"true","aria-selected":"false",className:"py-6 text-center text-sm","data-hook":t,"data-slot":"command-empty",...o})});F.displayName="CommandEmpty";const W=e.forwardRef(({className:t,dataHook:o,...a},n)=>d.jsx(y.Command.Group,{ref:n,className:I.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),"data-hook":o,"data-slot":"command-group",...a}));W.displayName="CommandGroup";const K=e.forwardRef(({className:t,dataHook:o,...a},n)=>d.jsx(y.Command.Separator,{ref:n,className:I.cn("bg-border -mx-1 h-px",t),"data-hook":o,"data-slot":"command-separator",...a}));K.displayName="CommandSeparator";const U=e.forwardRef(({className:t,dataHook:o,trackingEl:a,trackingLabel:n,selected:s,children:u,...h},p)=>d.jsxs(y.Command.Item,{ref:p,className:I.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),"data-hook":o,"data-selected-item":s||void 0,"data-slot":"command-item","data-tracking-el":a,"data-tracking-label":n,...h,children:[u,s&&d.jsx(_.Check,{className:"text-foreground ml-auto"})]}));U.displayName="CommandItem";const X=e.forwardRef(({className:t,dataHook:o,trackingEl:a,trackingLabel:n,...s},u)=>d.jsx("span",{ref:u,className:I.cn("text-muted-foreground ml-auto text-xs tracking-widest",t),"data-hook":o,"data-slot":"command-shortcut","data-tracking-el":a,"data-tracking-label":n,...s}));X.displayName="CommandShortcut";const Y=e.createContext(null);function ne({items:t,getItemValue:o,getItemLabel:a,getItemKeywords:n,estimateSize:s=44,overscan:u=5,children:h,renderEmpty:p,"aria-label":k,className:N,dataHook:v},j){const C=e.useRef(null),{searchValue:x,setActiveDescendantId:m,setListboxId:w}=e.useContext(A),[g,l]=e.useState(0),S=e.useId(),E=e.useId(),L=e.useRef(new Map);e.useImperativeHandle(j,()=>C.current,[]);const V=e.useMemo(()=>a??o,[a,o]),r=e.useMemo(()=>{if(!x.trim())return t;const c=[];for(const f of t){let i=y.defaultFilter(V(f),x);if(n)for(const b of n(f))i=Math.max(i,y.defaultFilter(b,x));i>0&&c.push({item:f,score:i})}return c.sort((f,i)=>i.score-f.score),c.map(f=>f.item)},[t,x,V,n]),P=ee.useVirtualizer({count:r.length,getScrollElement:()=>C.current,estimateSize:()=>s,overscan:u}),R=g>=0&&g<r.length?o(r[g]):null;e.useEffect(()=>{l(0)},[x,r.length]);const D=e.useRef(!1);e.useEffect(()=>{D.current&&g>=0&&g<r.length&&P.scrollToIndex(g,{align:"auto"}),D.current=!1},[g,r.length,P]),e.useEffect(()=>{const c=C.current?.closest('[data-slot="command"]');if(!c)return;const f=i=>{switch(i.key){case"ArrowDown":i.preventDefault(),i.stopPropagation(),D.current=!0,l(b=>b<r.length-1?b+1:b);break;case"ArrowUp":i.preventDefault(),i.stopPropagation(),D.current=!0,l(b=>b>0?b-1:b);break;case"Enter":{i.preventDefault(),i.stopPropagation(),R!=null&&L.current.get(R)?.();break}case"Home":i.preventDefault(),i.stopPropagation(),D.current=!0,l(0);break;case"End":i.preventDefault(),i.stopPropagation(),D.current=!0,l(r.length-1);break}};return c.addEventListener("keydown",f,{capture:!0}),()=>c.removeEventListener("keydown",f,{capture:!0})},[r,R]);const M=e.useMemo(()=>{const c=new Map;return r.forEach((f,i)=>{c.set(o(f),i)}),c},[r,o]),T=e.useCallback(c=>{const f=M.get(c);f!==void 0&&l(f)},[M]),q=e.useCallback(c=>(M.get(c)??0)+1,[M]),O=r.length,Q=e.useMemo(()=>({activeValue:R,onItemPointerMove:T,idPrefix:S,filteredCount:O,getItemPosition:q,onSelectCallbacks:L}),[R,T,S,O,q]),z=R!=null?`${S}item-${R}`:void 0;e.useEffect(()=>(m(z),()=>m(void 0)),[z,m]),e.useEffect(()=>(w(E),()=>w(void 0)),[E,w]);const $=I.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",N);return r.length===0?d.jsx("div",{ref:C,"aria-label":k,className:$,"data-hook":v,"data-slot":"command-virtual-list",id:E,role:"listbox",tabIndex:-1,children:p}):d.jsx(Y.Provider,{value:Q,children:d.jsx("div",{ref:C,"aria-label":k,className:$,"data-hook":v,"data-slot":"command-virtual-list",id:E,role:"listbox",tabIndex:-1,children:d.jsx("div",{className:"relative w-full",style:{height:`${P.getTotalSize()}px`},children:P.getVirtualItems().map(c=>d.jsx("div",{ref:P.measureElement,className:"absolute top-0 left-0 w-full px-2","data-index":c.index,style:{transform:`translateY(${c.start}px)`},children:h(r[c.index],c.index,x)},c.key))})})})}const re=e.forwardRef(ne),J=e.forwardRef(({value:t,dataHook:o,trackingEl:a,trackingLabel:n,selected:s,disabled:u,onSelect:h,children:p,className:k,onClick:N,onKeyDown:v,onPointerMove:j,...C},x)=>{const m=e.useContext(Y),w=m?.activeValue===t,g=e.useRef(h);return e.useEffect(()=>{g.current=h}),e.useEffect(()=>{if(m)return m.onSelectCallbacks.current.set(t,()=>g.current?.()),()=>{m.onSelectCallbacks.current.delete(t)}},[t,m]),d.jsxs("div",{ref:x,...C,"aria-disabled":u||void 0,"aria-posinset":m?.getItemPosition(t),"aria-selected":s||void 0,"aria-setsize":m?.filteredCount,className:I.cn("data-[highlighted=true]:bg-accent data-[highlighted=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none","[&_svg]:pointer-events-none [&_svg]:shrink-0",u&&"pointer-events-none opacity-50",k),"data-highlighted":w||void 0,"data-hook":o,"data-selected-item":s||void 0,"data-slot":"command-virtual-item","data-tracking-el":a,"data-tracking-label":n,id:m?`${m.idPrefix}item-${t}`:void 0,role:"option",tabIndex:-1,onClick:u?void 0:l=>{h?.(),N?.(l)},onKeyDown:u?void 0:l=>{(l.key==="Enter"||l.key===" ")&&h?.(),v?.(l)},onPointerMove:u?void 0:l=>{m?.onItemPointerMove(t),j?.(l)},children:[p,s&&d.jsx(_.Check,{className:"text-foreground ml-auto"})]})});J.displayName="CommandVirtualItem";exports.Command=G;exports.CommandEmpty=F;exports.CommandGroup=W;exports.CommandInput=H;exports.CommandItem=U;exports.CommandList=B;exports.CommandSeparator=K;exports.CommandShortcut=X;exports.CommandVirtualItem=J;exports.CommandVirtualList=re;
package/dist/command.d.ts CHANGED
@@ -42,6 +42,13 @@ export interface CommandInputProps extends React.ComponentProps<typeof CommandPr
42
42
  * Callback when clear button is clicked
43
43
  */
44
44
  onClear?: () => void;
45
+ /**
46
+ * Debounce delay in milliseconds for the `onValueChange` callback.
47
+ * The input display updates immediately; only the callback is debounced.
48
+ * Useful for async filtering to avoid firing on every keystroke.
49
+ * @example 300
50
+ */
51
+ debounceMs?: number;
45
52
  }
46
53
  /**
47
54
  * Search input for the Command component.
@@ -146,5 +153,98 @@ export interface CommandShortcutProps extends React.ComponentProps<"span"> {
146
153
  * Displays keyboard shortcut for a command item.
147
154
  */
148
155
  declare const CommandShortcut: React.ForwardRefExoticComponent<Omit<CommandShortcutProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
149
- export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
156
+ /**
157
+ * Props for the CommandVirtualList component
158
+ */
159
+ export interface CommandVirtualListProps<T> {
160
+ /**
161
+ * Array of items to render. Memoize to avoid re-registration on every render.
162
+ */
163
+ items: T[];
164
+ /**
165
+ * Extract a unique string value from each item.
166
+ */
167
+ getItemValue: (item: T) => string;
168
+ /**
169
+ * Extract a display label for filtering. Defaults to `getItemValue`.
170
+ */
171
+ getItemLabel?: (item: T) => string;
172
+ /**
173
+ * Extra searchable keywords per item.
174
+ */
175
+ getItemKeywords?: (item: T) => string[];
176
+ /**
177
+ * Estimated item height in px for the virtualiser.
178
+ * @default 44
179
+ */
180
+ estimateSize?: number;
181
+ /**
182
+ * Number of items to render outside the visible viewport.
183
+ * @default 5
184
+ */
185
+ overscan?: number;
186
+ /**
187
+ * Render function called for each visible item.
188
+ */
189
+ children: (item: T, index: number, searchValue: string) => React.ReactNode;
190
+ /**
191
+ * Content rendered when the filtered list is empty.
192
+ */
193
+ renderEmpty?: React.ReactNode;
194
+ /**
195
+ * Accessible label for the listbox.
196
+ * Required for a11y — describes the list's purpose to screen readers.
197
+ */
198
+ "aria-label": string;
199
+ /**
200
+ * Additional CSS classes for the scroll container.
201
+ */
202
+ className?: string;
203
+ /**
204
+ * Data hook for automated testing.
205
+ */
206
+ dataHook?: string;
207
+ }
208
+ declare const CommandVirtualList: <T>(props: CommandVirtualListProps<T> & {
209
+ ref?: React.Ref<HTMLDivElement>;
210
+ }) => React.ReactElement | null;
211
+ /**
212
+ * Props for the CommandVirtualItem component
213
+ */
214
+ export interface CommandVirtualItemProps extends React.ComponentPropsWithoutRef<"div"> {
215
+ /**
216
+ * Unique value identifying this item.
217
+ */
218
+ value: string;
219
+ /**
220
+ * Data hook for automated testing.
221
+ */
222
+ dataHook?: string;
223
+ /**
224
+ * Tracking element identifier for analytics.
225
+ */
226
+ trackingEl?: string;
227
+ /**
228
+ * Tracking label for analytics context.
229
+ */
230
+ trackingLabel?: string;
231
+ /**
232
+ * Whether this item is selected (shows checkmark).
233
+ */
234
+ selected?: boolean;
235
+ /**
236
+ * Whether this item is disabled.
237
+ */
238
+ disabled?: boolean;
239
+ /**
240
+ * Callback when the item is activated (click or Enter).
241
+ */
242
+ onSelect?: () => void;
243
+ }
244
+ /**
245
+ * Item within a CommandVirtualList. Renders as a plain div with proper
246
+ * ARIA attributes, bypassing cmdk item registration for performance.
247
+ */
248
+ declare const CommandVirtualItem: React.ForwardRefExoticComponent<CommandVirtualItemProps & React.RefAttributes<HTMLDivElement>>;
249
+ export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommandVirtualItem, CommandVirtualList, };
150
250
  //# sourceMappingURL=command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAMnD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CACxD,OAAO,gBAAgB,CACxB;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB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