@brightlocal/ui-components 2.9.2 → 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.
- package/README.md +3 -1
- package/component-meta.json +41 -9
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +42 -25
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +1 -3
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +46 -49
- package/dist/browser-entry.d.ts +17 -0
- package/dist/browser-entry.d.ts.map +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +25 -25
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +85 -82
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +13 -1
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +196 -150
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +3 -3
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +480 -440
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +101 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +383 -119
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +402 -391
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +1 -4
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +163 -170
- package/dist/map.cjs +1 -0
- package/dist/map.d.ts +192 -0
- package/dist/map.d.ts.map +1 -0
- package/dist/map.js +250 -0
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -30
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +101 -52
- package/package.json +4 -1
- package/src/blocks/sidebar.tsx +21 -26
- package/src/browser-entry.ts +89 -0
- package/src/browser-tokens.css +1 -0
- package/src/components/badge.tsx +22 -5
- package/src/components/button.tsx +13 -13
- package/src/components/card.tsx +35 -19
- package/src/components/carousel.tsx +101 -9
- package/src/components/combobox.tsx +106 -28
- package/src/components/command.tsx +637 -16
- package/src/components/input-chip.tsx +102 -65
- package/src/components/map.tsx +574 -0
- package/src/components/sonner.tsx +9 -3
- package/src/components/tabs.tsx +118 -22
- package/src/hooks/use-breakpoint.ts +2 -3
- package/src/index.ts +1 -0
package/dist/carousel.js
CHANGED
|
@@ -1,254 +1,300 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import
|
|
4
|
-
import { ArrowRight as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
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
|
|
12
|
+
return r;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const H = o.forwardRef(
|
|
15
15
|
({
|
|
16
|
-
orientation:
|
|
16
|
+
orientation: r = "horizontal",
|
|
17
17
|
opts: l,
|
|
18
|
-
setApi:
|
|
19
|
-
plugins:
|
|
20
|
-
className:
|
|
21
|
-
children:
|
|
22
|
-
dataHook:
|
|
23
|
-
trackingEl:
|
|
24
|
-
trackingLabel:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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:
|
|
32
|
+
axis: r === "horizontal" ? "x" : "y"
|
|
31
33
|
},
|
|
32
|
-
|
|
33
|
-
), [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
[
|
|
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
|
-
!
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
}, [
|
|
54
|
-
|
|
83
|
+
}, [e, m, x]), /* @__PURE__ */ p(
|
|
84
|
+
D.Provider,
|
|
55
85
|
{
|
|
56
86
|
value: {
|
|
57
|
-
carouselRef:
|
|
58
|
-
api:
|
|
87
|
+
carouselRef: K,
|
|
88
|
+
api: e,
|
|
59
89
|
opts: l,
|
|
60
|
-
orientation:
|
|
61
|
-
scrollPrev:
|
|
62
|
-
scrollNext:
|
|
63
|
-
canScrollPrev:
|
|
64
|
-
canScrollNext:
|
|
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__ */
|
|
98
|
+
children: /* @__PURE__ */ p(
|
|
67
99
|
"div",
|
|
68
100
|
{
|
|
69
|
-
ref:
|
|
101
|
+
ref: M,
|
|
70
102
|
"aria-roledescription": "carousel",
|
|
71
|
-
className:
|
|
72
|
-
"data-hook":
|
|
103
|
+
className: C("relative", f),
|
|
104
|
+
"data-hook": c,
|
|
73
105
|
"data-slot": "carousel",
|
|
74
|
-
"data-tracking-el":
|
|
75
|
-
"data-tracking-label":
|
|
106
|
+
"data-tracking-el": i,
|
|
107
|
+
"data-tracking-label": s,
|
|
76
108
|
role: "region",
|
|
77
|
-
onKeyDownCapture:
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
109
|
+
onKeyDownCapture: T,
|
|
110
|
+
...u,
|
|
111
|
+
children: t
|
|
80
112
|
}
|
|
81
113
|
)
|
|
82
114
|
}
|
|
83
115
|
);
|
|
84
116
|
}
|
|
85
117
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
const { carouselRef:
|
|
89
|
-
|
|
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:
|
|
93
|
-
className:
|
|
135
|
+
ref: f,
|
|
136
|
+
className: C("overflow-hidden", i && "w-full", r),
|
|
94
137
|
"data-slot": "carousel-content",
|
|
95
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ p(
|
|
96
139
|
"div",
|
|
97
140
|
{
|
|
98
|
-
ref:
|
|
99
|
-
className:
|
|
141
|
+
ref: d,
|
|
142
|
+
className: C(
|
|
100
143
|
"flex",
|
|
101
|
-
|
|
144
|
+
i ? "-mt-4 h-full w-full flex-col" : "-ml-4"
|
|
102
145
|
),
|
|
103
|
-
...
|
|
146
|
+
...n,
|
|
147
|
+
children: m
|
|
104
148
|
}
|
|
105
149
|
)
|
|
106
150
|
}
|
|
107
151
|
);
|
|
108
152
|
});
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
const { orientation:
|
|
112
|
-
return /* @__PURE__ */
|
|
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:
|
|
159
|
+
ref: f,
|
|
116
160
|
"aria-roledescription": "slide",
|
|
117
|
-
className:
|
|
161
|
+
className: C(
|
|
118
162
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
...
|
|
169
|
+
...d,
|
|
170
|
+
children: s ? l : null
|
|
125
171
|
}
|
|
126
172
|
);
|
|
127
173
|
});
|
|
128
|
-
|
|
129
|
-
function
|
|
130
|
-
className:
|
|
174
|
+
V.displayName = "CarouselItem";
|
|
175
|
+
function Q({
|
|
176
|
+
className: r,
|
|
131
177
|
variant: l = "outline",
|
|
132
|
-
size:
|
|
133
|
-
dataHook:
|
|
134
|
-
hideWhenDisabled:
|
|
135
|
-
...
|
|
178
|
+
size: n = "default",
|
|
179
|
+
dataHook: d = "carousel-previous",
|
|
180
|
+
hideWhenDisabled: f = !1,
|
|
181
|
+
...t
|
|
136
182
|
}) {
|
|
137
|
-
const { orientation:
|
|
138
|
-
return
|
|
139
|
-
|
|
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:
|
|
188
|
+
className: C(
|
|
143
189
|
"absolute",
|
|
144
|
-
|
|
145
|
-
|
|
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:
|
|
149
|
-
disabled: !
|
|
150
|
-
size:
|
|
194
|
+
dataHook: d,
|
|
195
|
+
disabled: !s,
|
|
196
|
+
size: n,
|
|
151
197
|
variant: l,
|
|
152
|
-
onClick:
|
|
153
|
-
...
|
|
198
|
+
onClick: i,
|
|
199
|
+
...t,
|
|
154
200
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ p(F, {}),
|
|
202
|
+
/* @__PURE__ */ p("span", { className: "sr-only", children: "Previous slide" })
|
|
157
203
|
]
|
|
158
204
|
}
|
|
159
205
|
);
|
|
160
206
|
}
|
|
161
|
-
|
|
162
|
-
function
|
|
163
|
-
className:
|
|
207
|
+
Q.displayName = "CarouselPrevious";
|
|
208
|
+
function W({
|
|
209
|
+
className: r,
|
|
164
210
|
variant: l = "outline",
|
|
165
|
-
size:
|
|
166
|
-
dataHook:
|
|
167
|
-
hideWhenDisabled:
|
|
168
|
-
...
|
|
211
|
+
size: n = "default",
|
|
212
|
+
dataHook: d = "carousel-next",
|
|
213
|
+
hideWhenDisabled: f = !1,
|
|
214
|
+
...t
|
|
169
215
|
}) {
|
|
170
|
-
const { orientation:
|
|
171
|
-
return
|
|
172
|
-
|
|
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:
|
|
221
|
+
className: C(
|
|
176
222
|
"absolute",
|
|
177
|
-
|
|
178
|
-
|
|
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:
|
|
182
|
-
disabled: !
|
|
183
|
-
size:
|
|
227
|
+
dataHook: d,
|
|
228
|
+
disabled: !s,
|
|
229
|
+
size: n,
|
|
184
230
|
variant: l,
|
|
185
|
-
onClick:
|
|
186
|
-
...
|
|
231
|
+
onClick: i,
|
|
232
|
+
...t,
|
|
187
233
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ p(q, {}),
|
|
235
|
+
/* @__PURE__ */ p("span", { className: "sr-only", children: "Next slide" })
|
|
190
236
|
]
|
|
191
237
|
}
|
|
192
238
|
);
|
|
193
239
|
}
|
|
194
|
-
|
|
195
|
-
function
|
|
196
|
-
className:
|
|
240
|
+
W.displayName = "CarouselNext";
|
|
241
|
+
function X({
|
|
242
|
+
className: r,
|
|
197
243
|
dataHook: l = "carousel-dots",
|
|
198
|
-
trackingEl:
|
|
199
|
-
trackingLabel:
|
|
200
|
-
...
|
|
244
|
+
trackingEl: n,
|
|
245
|
+
trackingLabel: d,
|
|
246
|
+
...f
|
|
201
247
|
}) {
|
|
202
|
-
const { api:
|
|
248
|
+
const { api: t } = v(), [c, i] = o.useState(0), [s, m] = o.useState([]);
|
|
203
249
|
return o.useEffect(() => {
|
|
204
|
-
if (!
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
250
|
+
if (!t) return;
|
|
251
|
+
m(t.scrollSnapList()), i(t.selectedScrollSnap());
|
|
252
|
+
const h = () => {
|
|
253
|
+
i(t.selectedScrollSnap());
|
|
208
254
|
}, u = () => {
|
|
209
|
-
|
|
255
|
+
m(t.scrollSnapList()), i(t.selectedScrollSnap());
|
|
210
256
|
};
|
|
211
|
-
return
|
|
212
|
-
|
|
257
|
+
return t.on("select", h), t.on("reInit", u), () => {
|
|
258
|
+
t.off("select", h), t.off("reInit", u);
|
|
213
259
|
};
|
|
214
|
-
}, [
|
|
260
|
+
}, [t]), s.length === 0 ? null : /* @__PURE__ */ p(
|
|
215
261
|
"div",
|
|
216
262
|
{
|
|
217
263
|
"aria-label": "Slide navigation",
|
|
218
|
-
className:
|
|
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
|
-
|
|
266
|
+
r
|
|
221
267
|
),
|
|
222
268
|
"data-hook": l,
|
|
223
269
|
"data-slot": "carousel-dots",
|
|
224
|
-
"data-tracking-el":
|
|
225
|
-
"data-tracking-label":
|
|
270
|
+
"data-tracking-el": n,
|
|
271
|
+
"data-tracking-label": d,
|
|
226
272
|
role: "group",
|
|
227
|
-
...
|
|
228
|
-
children:
|
|
273
|
+
...f,
|
|
274
|
+
children: s.map((h, u) => /* @__PURE__ */ p(
|
|
229
275
|
"button",
|
|
230
276
|
{
|
|
231
|
-
"aria-current": u ===
|
|
277
|
+
"aria-current": u === c ? "step" : void 0,
|
|
232
278
|
"aria-label": `Go to slide ${u + 1}`,
|
|
233
|
-
className:
|
|
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 ===
|
|
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: () =>
|
|
285
|
+
onClick: () => t?.scrollTo(u)
|
|
240
286
|
},
|
|
241
287
|
u
|
|
242
288
|
))
|
|
243
289
|
}
|
|
244
290
|
);
|
|
245
291
|
}
|
|
246
|
-
|
|
292
|
+
X.displayName = "CarouselDots";
|
|
247
293
|
export {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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/combobox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
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"),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:l=!0,disabled:c=!1,itemToStringValue:a,children:x}){const[d,y]=t.useState(""),[D,h]=t.useState(!1),[b,w]=t.useState(()=>new Map),[v,C]=t.useState(""),[V,k]=t.useState(void 0),S=e!==void 0,I=n!==void 0,j=S?e:d,R=I?n:D,E=t.useCallback(p=>{p||C(""),I||h(p),o?.(p)},[I,o]),M=t.useCallback(p=>{S||y(p),r?.(p)},[S,r]),u=t.useRef(new Map),L=t.useRef(!1),$=t.useRef(!0);t.useEffect(()=>()=>{$.current=!1},[]);const f=t.useCallback(()=>{L.current||(L.current=!0,queueMicrotask(()=>{L.current=!1,$.current&&w(new Map(u.current))}))},[]),P=t.useCallback((p,q)=>{u.current.get(p)!==q&&(u.current.set(p,q),f())},[f]),A=t.useCallback(p=>{for(const[q,G]of p)u.current.set(q,G);w(new Map(u.current))},[]),W=t.useRef(j);t.useLayoutEffect(()=>{W.current=j},[j]);const T=t.useCallback(p=>{p!==W.current&&u.current.has(p)&&(u.current.delete(p),f())},[f]),O=t.useMemo(()=>a?(p,q,G)=>B.defaultFilter(a(p),q,G):B.defaultFilter,[a]),H=t.useMemo(()=>({open:R,setOpen:E,value:j,onValueChange:M,shouldFilter:l,disabled:c,itemLabels:b,registerItem:P,registerItemsSync:A,unregisterItem:T,itemToStringValue:a,filterFn:O,searchValue:v,setSearchValue:C,activeDescendantId:V,setActiveDescendantId:k}),[R,E,j,M,l,c,b,P,A,T,a,O,v,V,k]);return i.jsx(Q.Provider,{value:H,children:i.jsx(Y.Popover,{open:R,onOpenChange:E,children:x})})}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:l,children:c,...a},x)=>{const{open:d,disabled:y,value:D}=z(),h=t.useId(),b=!D,w=n||a["aria-invalid"]===!0||a["aria-invalid"]==="true";return i.jsx(Y.PopoverTrigger,{asChild:!0,children:i.jsxs("button",{ref:x,"aria-controls":d?h:void 0,"aria-expanded":d,"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":b,"data-slot":"combobox-trigger","data-state":d?"open":"closed","data-tracking-el":o||"combobox-trigger","data-tracking-label":l,disabled:y||a.disabled,role:"combobox",type:"button",...a,children:[c,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=x=>x.value,c="label"in o&&typeof o.label=="string";return{getValue:l,getLabel:n??(c?x=>String(x.label):l),hasDistinctLabel:c||!!n}}function me({placeholder:e,className:r,displayValue:n,items:o,getItemValue:l,getItemLabel:c}){const{value:a,itemLabels:x}=z(),d=t.useMemo(()=>o?ee(o,l,c):null,[o,l,c]);U.useDevWarning(()=>!!o&&o.length>0&&!d,"ComboboxValue: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[o,d]);const y=t.useMemo(()=>!o||!d?null:new Map(o.map(h=>[d.getValue(h),d.getLabel(h)])),[o,d]),D=a?y?.get(a)||x.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:D})}function xe({dataHook:e,className:r,children:n,align:o="start",side:l="bottom",sideOffset:c,avoidCollisions:a,hideList:x=!1}){const{open:d,shouldFilter:y,filterFn:D,itemToStringValue:h}=z(),[b,w]=t.useState(null),v=t.useRef(null),C=t.useCallback(k=>{if(v.current?.(),v.current=null,!k)return;let S=!1;const I=M=>{S||(M==="top"||M==="bottom")&&(S=!0,j.disconnect(),w(M))},j=new MutationObserver(()=>{I(k.getAttribute("data-side"))});j.observe(k,{attributes:!0,attributeFilter:["data-side"]});let R=0,E=0;R=requestAnimationFrame(()=>{E=requestAnimationFrame(()=>{I(k.getAttribute("data-side"))})}),v.current=()=>{S=!0,j.disconnect(),cancelAnimationFrame(R),cancelAnimationFrame(E)}},[]);t.useEffect(()=>{if(!d){v.current?.(),v.current=null;const k=setTimeout(()=>w(null),150);return()=>clearTimeout(k)}},[d]);const V=h?D:void 0;return i.jsx(Y.PopoverContent,{ref:C,align:o,"aria-label":"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:b??l,sideOffset:c,children:i.jsx(_.Command,{className:F.cn("min-h-0 flex-1 border-0 shadow-none","[&_[data-slot='command-input-wrapper']]:shrink-0",x&&"[&_[data-slot='command-input-wrapper']]:border-b-0"),"data-slot":"combobox-command",dataHook:e||"combobox-command",filter:V,shouldFilter:y,children:n})})}const te=t.forwardRef(({debounceMs:e,onValueChange:r,...n},o)=>{const{setSearchValue:l,shouldFilter:c,activeDescendantId:a}=z(),x=t.useRef(void 0);U.useDevWarning(()=>!!(e&&e>0&&c),`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.`,[
|
|
4
|
-
Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox"`,[
|
|
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(()=>()=>{x.current&&clearTimeout(x.current)},[]);const d=t.useCallback(y=>{l(y),e&&e>0?(clearTimeout(x.current),x.current=setTimeout(()=>{r?.(y)},e)):r?.(y)},[e,r,l]);return i.jsx(_.CommandInput,{ref:o,"aria-activedescendant":a,"data-slot":"combobox-input",onValueChange:d,...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:c=5,children:a,renderEmpty:x,className:d,dataHook:y},D){const h=t.useMemo(()=>ee(e,r,n),[e,r,n]),b=t.useMemo(()=>h?.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.")}),[h]),w=t.useMemo(()=>h?.getLabel??b,[h,b]);U.useDevWarning(()=>!h&&e.length>0,"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",[h,e.length]);const v=t.useRef(null),{value:C,onValueChange:V,setOpen:k,shouldFilter:S,searchValue:I,filterFn:j,setActiveDescendantId:R,registerItemsSync:E,unregisterItem:M}=z(),[u,L]=t.useState(0),$=t.useId();t.useImperativeHandle(D,()=>v.current,[]),t.useLayoutEffect(()=>{const s=e.map(m=>[b(m),w(m)]);return E(s),()=>{for(const m of e)M(b(m))}},[e,b,w,E,M]);const f=t.useMemo(()=>{if(!S||!I.trim())return e;const s=[];for(const m of e){let g=h?.hasDistinctLabel?B.defaultFilter(w(m),I):j(b(m),I);if(o)for(const N of o(m))g=Math.max(g,B.defaultFilter(N,I));g>0&&s.push({item:m,score:g})}return s.sort((m,g)=>g.score-m.score),s.map(m=>m.item)},[e,S,I,b,w,o,j,h?.hasDistinctLabel]),P=le.useVirtualizer({count:f.length,getScrollElement:()=>v.current,estimateSize:()=>l,overscan:c}),A=u>=0&&u<f.length?b(f[u]):null;t.useEffect(()=>{L(0)},[I,f.length]);const W=t.useRef(!1);t.useEffect(()=>{if(W.current||!C)return;const s=f.findIndex(m=>b(m)===C);s>=0&&(L(s),P.scrollToIndex(s,{align:"center"}),W.current=!0)},[C,f,b,P]);const T=t.useRef(!1);t.useEffect(()=>{T.current&&u>=0&&u<f.length&&P.scrollToIndex(u,{align:"auto"}),T.current=!1},[u,f.length,P]),t.useEffect(()=>{const s=v.current?.closest('[data-slot="combobox-command"]');if(!s)return;const m=g=>{switch(g.key){case"ArrowDown":g.preventDefault(),g.stopPropagation(),T.current=!0,L(N=>N<f.length-1?N+1:N);break;case"ArrowUp":g.preventDefault(),g.stopPropagation(),T.current=!0,L(N=>N>0?N-1:N);break;case"Enter":if(g.preventDefault(),g.stopPropagation(),u>=0&&u<f.length){const N=b(f[u]);V(N===C?"":N),k(!1)}break;case"Home":g.preventDefault(),g.stopPropagation(),T.current=!0,L(0);break;case"End":g.preventDefault(),g.stopPropagation(),T.current=!0,L(f.length-1);break}};return s.addEventListener("keydown",m,{capture:!0}),()=>s.removeEventListener("keydown",m,{capture:!0})},[f,u,C,V,k,b]);const O=t.useMemo(()=>{const s=new Map;return f.forEach((m,g)=>{s.set(b(m),g)}),s},[f,b]),H=t.useCallback(s=>{const m=O.get(s);m!==void 0&&L(m)},[O]),p=t.useCallback(s=>(O.get(s)??0)+1,[O]),q=f.length,G=t.useMemo(()=>({activeValue:A,onItemPointerMove:H,idPrefix:$,filteredCount:q,getItemPosition:p}),[A,H,$,q,p]),J=A!=null?`${$}item-${A}`:void 0;return t.useEffect(()=>(R(J),()=>R(void 0)),[J,R]),f.length===0?i.jsx("div",{ref:v,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",d),"data-hook":y,"data-slot":"combobox-virtual-list",role:"listbox",children:x}):i.jsx(X.Provider,{value:G,children:i.jsx("div",{ref:v,className:F.cn("scrollbar max-h-[300px] min-h-0 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto py-1",d),"data-hook":y,"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(f[s.index],s.index,I)},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((c,a)=>a%2===1?i.jsx("span",{className:n,children:c},a):i.jsx(t.Fragment,{children:c},a))})}const se=t.forwardRef(({value:e,label:r,dataHook:n,children:o,className:l,highlight:c,highlightClassName:a,keywords:x,...d},y)=>{const{value:D,onValueChange:h,setOpen:b,registerItem:w,unregisterItem:v}=z(),C=t.useContext(X),V=D===e,k=t.useMemo(()=>r||(typeof o=="string"?o:typeof o=="number"?String(o):e),[r,o,e]),S=t.useRef(w),I=t.useRef(v);t.useEffect(()=>{S.current=w,I.current=v},[w,v]);const j=!!C;t.useEffect(()=>{if(!j)return S.current(e,k),()=>I.current(e)},[e,k,j]);const R=()=>{h(e===D?"":e),b(!1)},E=()=>c&&typeof o=="string"?he(o,c,a||"text-sm leading-normal font-semibold"):o;if(C){const M=C.activeValue===e,u=!!d.disabled;return i.jsxs("div",{ref:y,"aria-disabled":u||void 0,"aria-posinset":C.getItemPosition(e),"aria-selected":V,"aria-setsize":C.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",u&&"pointer-events-none opacity-50",l),"data-highlighted":M||void 0,"data-hook":n,"data-slot":"combobox-item",id:`${C.idPrefix}item-${e}`,role:"option",tabIndex:-1,onClick:u?void 0:R,onKeyDown:u?void 0:L=>{(L.key==="Enter"||L.key===" ")&&R()},onPointerMove:u?void 0:()=>C.onItemPointerMove(e),children:[E(),V&&i.jsx(K.Check,{"aria-hidden":"true",className:"text-muted-foreground shrink-0"})]})}return i.jsxs(_.CommandItem,{ref:y,className:F.cn("justify-between",l),"data-slot":"combobox-item",dataHook:n,keywords:x?[k,...x]:[k],value:e,onSelect:R,...d,children:[E(),V&&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}){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]"}),"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;
|
package/dist/combobox.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export interface ComboboxValueProps<T = unknown> {
|
|
|
109
109
|
* ```
|
|
110
110
|
*/
|
|
111
111
|
items?: readonly T[];
|
|
112
|
-
/** Extract the value string from an item.
|
|
112
|
+
/** Extract the value string from an item. Auto-inferred for items with a `value` string property. */
|
|
113
113
|
getItemValue?: (item: T) => string;
|
|
114
114
|
/** Extract the display label from an item. Falls back to `getItemValue` when not provided. */
|
|
115
115
|
getItemLabel?: (item: T) => string;
|
|
@@ -161,8 +161,8 @@ declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('@b
|
|
|
161
161
|
export interface ComboboxVirtualListProps<T> {
|
|
162
162
|
/** Array of items to virtualise. Memoize with useMemo to avoid re-registering labels on every render. */
|
|
163
163
|
items: readonly T[];
|
|
164
|
-
/** Extract the string value for each item (used for selection and keyboard navigation) */
|
|
165
|
-
getItemValue
|
|
164
|
+
/** Extract the string value for each item (used for selection and keyboard navigation). Auto-inferred for items with a `value` string property. */
|
|
165
|
+
getItemValue?: (item: T) => string;
|
|
166
166
|
/**
|
|
167
167
|
* Extract a display label for filtering and trigger display. Defaults to `getItemValue`.
|
|
168
168
|
* Only used when `shouldFilter` is true on the parent Combobox.
|
package/dist/combobox.d.ts.map
CHANGED
|
@@ -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;IACvB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kHAAkH;IAClH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,eAAe;IACf,QAAQ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