@brightlocal/ui-components 2.26.0 → 3.0.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 +9 -2
- package/component-meta.json +4010 -255
- package/deprecations.json +189 -2
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +155 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/progress-state.d.ts +121 -0
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/progress-state.js +368 -0
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +297 -296
- package/dist/brand-illustration-motif.d.ts +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +44 -40
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +23 -23
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +23 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +94 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +183 -183
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +47 -44
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +4 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +143 -141
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +74 -77
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +182 -13
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +462 -314
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +29 -25
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +58 -6
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +278 -194
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +523 -494
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +51 -51
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/motion.cjs +1 -1
- package/dist/lib/motion.js +10 -8
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +8 -6
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +52 -20
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +87 -81
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +127 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +189 -98
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +37 -3
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +102 -64
- package/dist/route-progress.cjs +1 -0
- package/dist/route-progress.d.ts +103 -0
- package/dist/route-progress.d.ts.map +1 -0
- package/dist/route-progress.js +106 -0
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +19 -18
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +35 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +103 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -36
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +57 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +35 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.d.ts.map +1 -1
- package/dist/stepper.js +23 -22
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +36 -29
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +116 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +84 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +113 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +81 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +42 -2
- package/src/blocks/empty-state.tsx +424 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/progress-state.tsx +542 -0
- package/src/blocks/sidebar.tsx +46 -40
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +9 -4
- package/src/components/button.tsx +5 -8
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +52 -17
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +43 -17
- package/src/components/chip.tsx +9 -6
- package/src/components/combobox.tsx +21 -12
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +405 -31
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +8 -4
- package/src/components/global-layout.tsx +264 -65
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/link.tsx +39 -5
- package/src/components/list.tsx +18 -14
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +279 -1
- package/src/components/progress.tsx +120 -11
- package/src/components/route-progress.tsx +354 -0
- package/src/components/select.tsx +5 -4
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +89 -7
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +5 -14
- package/src/components/spinner.tsx +94 -0
- package/src/components/stepper.tsx +6 -7
- package/src/components/table.tsx +11 -4
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +229 -0
- package/src/components/typography-text.tsx +225 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +12 -0
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
package/dist/combobox.js
CHANGED
|
@@ -7,7 +7,8 @@ import { defaultFilter as K } from "cmdk";
|
|
|
7
7
|
import { cn as T } from "@brightlocal/ui-components/lib/utils";
|
|
8
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
|
-
import { Command as se, CommandEmpty as ie, CommandGroup as le, CommandInput as
|
|
10
|
+
import { Command as se, CommandEmpty as ie, CommandGroup as le, CommandInput as ce, CommandItem as ue, CommandList as de, CommandSeparator as fe } from "@brightlocal/ui-components/command";
|
|
11
|
+
import { Spinner as be } from "@brightlocal/ui-components/spinner";
|
|
11
12
|
const J = e.createContext(null), Q = e.createContext(null);
|
|
12
13
|
function _() {
|
|
13
14
|
const t = e.useContext(J);
|
|
@@ -15,7 +16,7 @@ function _() {
|
|
|
15
16
|
throw new Error("Combobox components must be used within a <Combobox>");
|
|
16
17
|
return t;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function Te({
|
|
19
20
|
value: t,
|
|
20
21
|
onValueChange: r,
|
|
21
22
|
open: a,
|
|
@@ -23,21 +24,21 @@ function Fe({
|
|
|
23
24
|
onClose: s,
|
|
24
25
|
shouldFilter: f = !0,
|
|
25
26
|
disabled: l = !1,
|
|
26
|
-
itemToStringValue:
|
|
27
|
+
itemToStringValue: u,
|
|
27
28
|
children: m
|
|
28
29
|
}) {
|
|
29
|
-
const [v, D] = e.useState(""), [
|
|
30
|
+
const [v, D] = e.useState(""), [h, b] = e.useState(!1), [S, E] = e.useState(
|
|
30
31
|
() => /* @__PURE__ */ new Map()
|
|
31
|
-
), [C, L] = e.useState(""), [V,
|
|
32
|
-
(
|
|
33
|
-
|
|
32
|
+
), [C, L] = e.useState(""), [V, w] = e.useState(void 0), y = t !== void 0, M = a !== void 0, R = y ? t : v, k = M ? a : h, N = e.useCallback(
|
|
33
|
+
(x) => {
|
|
34
|
+
x || L(""), M || b(x), o?.(x);
|
|
34
35
|
},
|
|
35
36
|
[M, o]
|
|
36
37
|
), p = e.useCallback(
|
|
37
|
-
(
|
|
38
|
-
|
|
38
|
+
(x) => {
|
|
39
|
+
y || D(x), r?.(x);
|
|
39
40
|
},
|
|
40
|
-
[
|
|
41
|
+
[y, r]
|
|
41
42
|
), I = e.useRef(s);
|
|
42
43
|
e.useEffect(() => {
|
|
43
44
|
I.current = s;
|
|
@@ -48,24 +49,24 @@ function Fe({
|
|
|
48
49
|
}, [k]), e.useEffect(() => () => {
|
|
49
50
|
A.current && I.current?.();
|
|
50
51
|
}, []);
|
|
51
|
-
const
|
|
52
|
+
const c = e.useRef(/* @__PURE__ */ new Map()), F = e.useRef(!1), O = e.useRef(!0);
|
|
52
53
|
e.useEffect(() => () => {
|
|
53
54
|
O.current = !1;
|
|
54
55
|
}, []);
|
|
55
56
|
const j = e.useCallback(() => {
|
|
56
57
|
F.current || (F.current = !0, queueMicrotask(() => {
|
|
57
|
-
F.current = !1, O.current && E(new Map(
|
|
58
|
+
F.current = !1, O.current && E(new Map(c.current));
|
|
58
59
|
}));
|
|
59
60
|
}, []), $ = e.useCallback(
|
|
60
|
-
(
|
|
61
|
-
|
|
61
|
+
(x, n) => {
|
|
62
|
+
c.current.get(x) !== n && (c.current.set(x, n), j());
|
|
62
63
|
},
|
|
63
64
|
[j]
|
|
64
65
|
), z = e.useCallback(
|
|
65
|
-
(
|
|
66
|
-
for (const [n, i] of
|
|
67
|
-
|
|
68
|
-
E(new Map(
|
|
66
|
+
(x) => {
|
|
67
|
+
for (const [n, i] of x)
|
|
68
|
+
c.current.set(n, i);
|
|
69
|
+
E(new Map(c.current));
|
|
69
70
|
},
|
|
70
71
|
[]
|
|
71
72
|
), q = e.useRef(R);
|
|
@@ -73,13 +74,13 @@ function Fe({
|
|
|
73
74
|
q.current = R;
|
|
74
75
|
}, [R]);
|
|
75
76
|
const U = e.useCallback(
|
|
76
|
-
(
|
|
77
|
-
|
|
77
|
+
(x) => {
|
|
78
|
+
x !== q.current && c.current.has(x) && (c.current.delete(x), j());
|
|
78
79
|
},
|
|
79
80
|
[j]
|
|
80
81
|
), G = e.useMemo(
|
|
81
|
-
() =>
|
|
82
|
-
[
|
|
82
|
+
() => u ? (x, n, i) => K(u(x), n, i) : K,
|
|
83
|
+
[u]
|
|
83
84
|
), W = e.useMemo(
|
|
84
85
|
() => ({
|
|
85
86
|
open: k,
|
|
@@ -92,12 +93,12 @@ function Fe({
|
|
|
92
93
|
registerItem: $,
|
|
93
94
|
registerItemsSync: z,
|
|
94
95
|
unregisterItem: U,
|
|
95
|
-
itemToStringValue:
|
|
96
|
+
itemToStringValue: u,
|
|
96
97
|
filterFn: G,
|
|
97
98
|
searchValue: C,
|
|
98
99
|
setSearchValue: L,
|
|
99
100
|
activeDescendantId: V,
|
|
100
|
-
setActiveDescendantId:
|
|
101
|
+
setActiveDescendantId: w
|
|
101
102
|
}),
|
|
102
103
|
[
|
|
103
104
|
k,
|
|
@@ -110,16 +111,16 @@ function Fe({
|
|
|
110
111
|
$,
|
|
111
112
|
z,
|
|
112
113
|
U,
|
|
113
|
-
|
|
114
|
+
u,
|
|
114
115
|
G,
|
|
115
116
|
C,
|
|
116
117
|
V,
|
|
117
|
-
|
|
118
|
+
w
|
|
118
119
|
]
|
|
119
120
|
);
|
|
120
121
|
return /* @__PURE__ */ d(J.Provider, { value: W, children: /* @__PURE__ */ d(re, { open: k, onOpenChange: N, children: m }) });
|
|
121
122
|
}
|
|
122
|
-
const
|
|
123
|
+
const me = oe([
|
|
123
124
|
// Base layout
|
|
124
125
|
"relative flex w-full items-center justify-between gap-2",
|
|
125
126
|
"px-4 py-2 h-9",
|
|
@@ -128,7 +129,7 @@ const be = oe([
|
|
|
128
129
|
"bg-neutral-50 shadow-xs",
|
|
129
130
|
"dark:bg-white/5 dark:border-white/15",
|
|
130
131
|
// Typography
|
|
131
|
-
"text-
|
|
132
|
+
"text-body text-foreground",
|
|
132
133
|
// Placeholder state
|
|
133
134
|
"data-[placeholder=true]:text-muted-foreground",
|
|
134
135
|
// Focus state
|
|
@@ -142,7 +143,7 @@ const be = oe([
|
|
|
142
143
|
"transition-[background-color,border-color,box-shadow] duration-fast ease-out",
|
|
143
144
|
// Icon styles
|
|
144
145
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
145
|
-
]),
|
|
146
|
+
]), pe = e.forwardRef(
|
|
146
147
|
({
|
|
147
148
|
className: t,
|
|
148
149
|
dataHook: r,
|
|
@@ -151,18 +152,18 @@ const be = oe([
|
|
|
151
152
|
trackingLabel: s,
|
|
152
153
|
children: f,
|
|
153
154
|
...l
|
|
154
|
-
},
|
|
155
|
-
const { open: m, disabled: v, value: D } = _(),
|
|
155
|
+
}, u) => {
|
|
156
|
+
const { open: m, disabled: v, value: D } = _(), h = e.useId(), b = !D, S = a || l["aria-invalid"] === !0 || l["aria-invalid"] === "true";
|
|
156
157
|
return /* @__PURE__ */ d(ae, { asChild: !0, children: /* @__PURE__ */ B(
|
|
157
158
|
"button",
|
|
158
159
|
{
|
|
159
|
-
ref:
|
|
160
|
-
"aria-controls": m ?
|
|
160
|
+
ref: u,
|
|
161
|
+
"aria-controls": m ? h : void 0,
|
|
161
162
|
"aria-expanded": m,
|
|
162
163
|
"aria-haspopup": "listbox",
|
|
163
164
|
"aria-invalid": S ? "true" : void 0,
|
|
164
165
|
className: T(
|
|
165
|
-
|
|
166
|
+
me(),
|
|
166
167
|
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
168
|
t
|
|
168
169
|
),
|
|
@@ -190,8 +191,8 @@ const be = oe([
|
|
|
190
191
|
) });
|
|
191
192
|
}
|
|
192
193
|
);
|
|
193
|
-
|
|
194
|
-
function
|
|
194
|
+
pe.displayName = "ComboboxTrigger";
|
|
195
|
+
function he(t) {
|
|
195
196
|
return t != null && typeof t == "object" && "value" in t && typeof t.value == "string";
|
|
196
197
|
}
|
|
197
198
|
function X(t, r, a) {
|
|
@@ -202,15 +203,15 @@ function X(t, r, a) {
|
|
|
202
203
|
hasDistinctLabel: !!a
|
|
203
204
|
};
|
|
204
205
|
const o = t[0];
|
|
205
|
-
if (!
|
|
206
|
-
const s = (
|
|
206
|
+
if (!he(o)) return null;
|
|
207
|
+
const s = (u) => u.value, f = "label" in o && typeof o.label == "string";
|
|
207
208
|
return {
|
|
208
209
|
getValue: s,
|
|
209
|
-
getLabel: a ?? (f ? (
|
|
210
|
+
getLabel: a ?? (f ? (u) => String(u.label) : s),
|
|
210
211
|
hasDistinctLabel: f || !!a
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function $e({
|
|
214
215
|
placeholder: t,
|
|
215
216
|
className: r,
|
|
216
217
|
displayValue: a,
|
|
@@ -218,7 +219,7 @@ function Ae({
|
|
|
218
219
|
getItemValue: s,
|
|
219
220
|
getItemLabel: f
|
|
220
221
|
}) {
|
|
221
|
-
const { value: l, itemLabels:
|
|
222
|
+
const { value: l, itemLabels: u } = _(), m = e.useMemo(
|
|
222
223
|
() => o ? X(o, s, f) : null,
|
|
223
224
|
[o, s, f]
|
|
224
225
|
);
|
|
@@ -228,13 +229,13 @@ function Ae({
|
|
|
228
229
|
[o, m]
|
|
229
230
|
);
|
|
230
231
|
const v = e.useMemo(() => !o || !m ? null : new Map(
|
|
231
|
-
o.map((
|
|
232
|
-
), [o, m]), D = l ? v?.get(l) ||
|
|
232
|
+
o.map((h) => [m.getValue(h), m.getLabel(h)])
|
|
233
|
+
), [o, m]), D = l ? v?.get(l) || u.get(l) || a?.(l) || l : t;
|
|
233
234
|
return /* @__PURE__ */ d(
|
|
234
235
|
"span",
|
|
235
236
|
{
|
|
236
237
|
className: T(
|
|
237
|
-
"
|
|
238
|
+
"text-body overflow-hidden text-ellipsis whitespace-nowrap",
|
|
238
239
|
r
|
|
239
240
|
),
|
|
240
241
|
"data-slot": "combobox-value",
|
|
@@ -242,7 +243,7 @@ function Ae({
|
|
|
242
243
|
}
|
|
243
244
|
);
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
+
function Oe({
|
|
246
247
|
dataHook: t,
|
|
247
248
|
className: r,
|
|
248
249
|
children: a,
|
|
@@ -250,40 +251,40 @@ function Te({
|
|
|
250
251
|
side: s = "bottom",
|
|
251
252
|
sideOffset: f,
|
|
252
253
|
avoidCollisions: l,
|
|
253
|
-
hideList:
|
|
254
|
+
hideList: u = !1,
|
|
254
255
|
ariaLabel: m
|
|
255
256
|
}) {
|
|
256
|
-
const { open: v, shouldFilter: D, filterFn:
|
|
257
|
+
const { open: v, shouldFilter: D, filterFn: h, itemToStringValue: b } = _(), [S, E] = e.useState(
|
|
257
258
|
null
|
|
258
|
-
), C = e.useRef(null), L = e.useCallback((
|
|
259
|
-
if (C.current?.(), C.current = null, !
|
|
260
|
-
let
|
|
259
|
+
), C = e.useRef(null), L = e.useCallback((w) => {
|
|
260
|
+
if (C.current?.(), C.current = null, !w) return;
|
|
261
|
+
let y = !1;
|
|
261
262
|
const M = (p) => {
|
|
262
|
-
|
|
263
|
+
y || (p === "top" || p === "bottom") && (y = !0, R.disconnect(), E(p));
|
|
263
264
|
}, R = new MutationObserver(() => {
|
|
264
|
-
M(
|
|
265
|
+
M(w.getAttribute("data-side"));
|
|
265
266
|
});
|
|
266
|
-
R.observe(
|
|
267
|
+
R.observe(w, {
|
|
267
268
|
attributes: !0,
|
|
268
269
|
attributeFilter: ["data-side"]
|
|
269
270
|
});
|
|
270
271
|
let k = 0, N = 0;
|
|
271
272
|
k = requestAnimationFrame(() => {
|
|
272
273
|
N = requestAnimationFrame(() => {
|
|
273
|
-
M(
|
|
274
|
+
M(w.getAttribute("data-side"));
|
|
274
275
|
});
|
|
275
276
|
}), C.current = () => {
|
|
276
|
-
|
|
277
|
+
y = !0, R.disconnect(), cancelAnimationFrame(k), cancelAnimationFrame(N);
|
|
277
278
|
};
|
|
278
279
|
}, []);
|
|
279
280
|
e.useEffect(() => {
|
|
280
281
|
if (!v) {
|
|
281
282
|
C.current?.(), C.current = null;
|
|
282
|
-
const
|
|
283
|
-
return () => clearTimeout(
|
|
283
|
+
const w = setTimeout(() => E(null), 150);
|
|
284
|
+
return () => clearTimeout(w);
|
|
284
285
|
}
|
|
285
286
|
}, [v]);
|
|
286
|
-
const V = b ?
|
|
287
|
+
const V = b ? h : void 0;
|
|
287
288
|
return /* @__PURE__ */ d(
|
|
288
289
|
ne,
|
|
289
290
|
{
|
|
@@ -305,7 +306,7 @@ function Te({
|
|
|
305
306
|
className: T(
|
|
306
307
|
"min-h-0 flex-1 border-0 shadow-none",
|
|
307
308
|
"[&_[data-slot='command-input-wrapper']]:shrink-0",
|
|
308
|
-
|
|
309
|
+
u && "[&_[data-slot='command-input-wrapper']]:border-b-0"
|
|
309
310
|
),
|
|
310
311
|
"data-slot": "combobox-command",
|
|
311
312
|
dataHook: t || "combobox-command",
|
|
@@ -318,7 +319,7 @@ function Te({
|
|
|
318
319
|
);
|
|
319
320
|
}
|
|
320
321
|
const xe = e.forwardRef(({ debounceMs: t, onValueChange: r, ...a }, o) => {
|
|
321
|
-
const { setSearchValue: s, shouldFilter: f, activeDescendantId: l } = _(),
|
|
322
|
+
const { setSearchValue: s, shouldFilter: f, activeDescendantId: l } = _(), u = e.useRef(
|
|
322
323
|
void 0
|
|
323
324
|
);
|
|
324
325
|
H(
|
|
@@ -332,18 +333,18 @@ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs fo
|
|
|
332
333
|
"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.",
|
|
333
334
|
[t, a.value]
|
|
334
335
|
), e.useEffect(() => () => {
|
|
335
|
-
|
|
336
|
+
u.current && clearTimeout(u.current);
|
|
336
337
|
}, []);
|
|
337
338
|
const m = e.useCallback(
|
|
338
339
|
(v) => {
|
|
339
|
-
s(v), t && t > 0 ? (clearTimeout(
|
|
340
|
+
s(v), t && t > 0 ? (clearTimeout(u.current), u.current = setTimeout(() => {
|
|
340
341
|
r?.(v);
|
|
341
342
|
}, t)) : r?.(v);
|
|
342
343
|
},
|
|
343
344
|
[t, r, s]
|
|
344
345
|
);
|
|
345
346
|
return /* @__PURE__ */ d(
|
|
346
|
-
|
|
347
|
+
ce,
|
|
347
348
|
{
|
|
348
349
|
ref: o,
|
|
349
350
|
"aria-activedescendant": l,
|
|
@@ -354,7 +355,7 @@ Set shouldFilter={false} on <Combobox> for async search, or remove debounceMs fo
|
|
|
354
355
|
);
|
|
355
356
|
});
|
|
356
357
|
xe.displayName = "ComboboxInput";
|
|
357
|
-
const
|
|
358
|
+
const ge = e.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ d(
|
|
358
359
|
de,
|
|
359
360
|
{
|
|
360
361
|
ref: a,
|
|
@@ -363,8 +364,8 @@ const he = e.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ d(
|
|
|
363
364
|
...r
|
|
364
365
|
}
|
|
365
366
|
));
|
|
366
|
-
|
|
367
|
-
function
|
|
367
|
+
ge.displayName = "ComboboxList";
|
|
368
|
+
function ve({
|
|
368
369
|
items: t,
|
|
369
370
|
getItemValue: r,
|
|
370
371
|
getItemLabel: a,
|
|
@@ -372,37 +373,37 @@ function ge({
|
|
|
372
373
|
estimateSize: s = 36,
|
|
373
374
|
overscan: f = 5,
|
|
374
375
|
children: l,
|
|
375
|
-
renderEmpty:
|
|
376
|
+
renderEmpty: u,
|
|
376
377
|
className: m,
|
|
377
378
|
dataHook: v
|
|
378
379
|
}, D) {
|
|
379
|
-
const
|
|
380
|
+
const h = e.useMemo(
|
|
380
381
|
() => X(t, r, a),
|
|
381
382
|
[t, r, a]
|
|
382
383
|
), b = e.useMemo(
|
|
383
|
-
() =>
|
|
384
|
+
() => h?.getValue ?? ((n) => {
|
|
384
385
|
if (typeof n == "string" || typeof n == "number")
|
|
385
386
|
return String(n);
|
|
386
387
|
throw new Error(
|
|
387
388
|
"[BrightLocal DS] ComboboxVirtualList: `getItemValue` is required for non-primitive items without a `value` property."
|
|
388
389
|
);
|
|
389
390
|
}),
|
|
390
|
-
[
|
|
391
|
+
[h]
|
|
391
392
|
), S = e.useMemo(
|
|
392
|
-
() =>
|
|
393
|
-
[
|
|
393
|
+
() => h?.getLabel ?? b,
|
|
394
|
+
[h, b]
|
|
394
395
|
);
|
|
395
396
|
H(
|
|
396
|
-
() => !
|
|
397
|
+
() => !h && t.length > 0,
|
|
397
398
|
"ComboboxVirtualList: could not infer `getItemValue` from item shape. Pass `getItemValue` explicitly, or use items with a `value` string property.",
|
|
398
|
-
[
|
|
399
|
+
[h, t.length]
|
|
399
400
|
);
|
|
400
401
|
const E = e.useRef(null), {
|
|
401
402
|
value: C,
|
|
402
403
|
onValueChange: L,
|
|
403
404
|
setOpen: V,
|
|
404
|
-
shouldFilter:
|
|
405
|
-
searchValue:
|
|
405
|
+
shouldFilter: w,
|
|
406
|
+
searchValue: y,
|
|
406
407
|
filterFn: M,
|
|
407
408
|
setActiveDescendantId: R,
|
|
408
409
|
registerItemsSync: k,
|
|
@@ -418,45 +419,45 @@ function ge({
|
|
|
418
419
|
N(b(i));
|
|
419
420
|
};
|
|
420
421
|
}, [t, b, S, k, N]);
|
|
421
|
-
const
|
|
422
|
-
if (!
|
|
422
|
+
const c = e.useMemo(() => {
|
|
423
|
+
if (!w || !y.trim()) return t;
|
|
423
424
|
const n = [];
|
|
424
425
|
for (const i of t) {
|
|
425
|
-
let g =
|
|
426
|
+
let g = h?.hasDistinctLabel ? K(S(i), y) : M(b(i), y);
|
|
426
427
|
if (o)
|
|
427
428
|
for (const P of o(i))
|
|
428
|
-
g = Math.max(g, K(P,
|
|
429
|
+
g = Math.max(g, K(P, y));
|
|
429
430
|
g > 0 && n.push({ item: i, score: g });
|
|
430
431
|
}
|
|
431
432
|
return n.sort((i, g) => g.score - i.score), n.map((i) => i.item);
|
|
432
433
|
}, [
|
|
433
434
|
t,
|
|
434
|
-
y,
|
|
435
435
|
w,
|
|
436
|
+
y,
|
|
436
437
|
b,
|
|
437
438
|
S,
|
|
438
439
|
o,
|
|
439
440
|
M,
|
|
440
|
-
|
|
441
|
+
h?.hasDistinctLabel
|
|
441
442
|
]), F = te({
|
|
442
|
-
count:
|
|
443
|
+
count: c.length,
|
|
443
444
|
getScrollElement: () => E.current,
|
|
444
445
|
estimateSize: () => s,
|
|
445
446
|
overscan: f
|
|
446
|
-
}), O = p >= 0 && p <
|
|
447
|
+
}), O = p >= 0 && p < c.length ? b(c[p]) : null;
|
|
447
448
|
e.useEffect(() => {
|
|
448
449
|
I(0);
|
|
449
|
-
}, [
|
|
450
|
+
}, [y, c.length]);
|
|
450
451
|
const j = e.useRef(!1);
|
|
451
452
|
e.useEffect(() => {
|
|
452
453
|
if (j.current || !C) return;
|
|
453
|
-
const n =
|
|
454
|
+
const n = c.findIndex((i) => b(i) === C);
|
|
454
455
|
n >= 0 && (I(n), F.scrollToIndex(n, { align: "center" }), j.current = !0);
|
|
455
|
-
}, [C,
|
|
456
|
+
}, [C, c, b, F]);
|
|
456
457
|
const $ = e.useRef(!1);
|
|
457
458
|
e.useEffect(() => {
|
|
458
|
-
$.current && p >= 0 && p <
|
|
459
|
-
}, [p,
|
|
459
|
+
$.current && p >= 0 && p < c.length && F.scrollToIndex(p, { align: "auto" }), $.current = !1;
|
|
460
|
+
}, [p, c.length, F]), e.useEffect(() => {
|
|
460
461
|
const n = E.current?.closest(
|
|
461
462
|
'[data-slot="combobox-command"]'
|
|
462
463
|
);
|
|
@@ -465,15 +466,15 @@ function ge({
|
|
|
465
466
|
switch (g.key) {
|
|
466
467
|
case "ArrowDown":
|
|
467
468
|
g.preventDefault(), g.stopPropagation(), $.current = !0, I(
|
|
468
|
-
(P) => P <
|
|
469
|
+
(P) => P < c.length - 1 ? P + 1 : P
|
|
469
470
|
);
|
|
470
471
|
break;
|
|
471
472
|
case "ArrowUp":
|
|
472
473
|
g.preventDefault(), g.stopPropagation(), $.current = !0, I((P) => P > 0 ? P - 1 : P);
|
|
473
474
|
break;
|
|
474
475
|
case "Enter":
|
|
475
|
-
if (g.preventDefault(), g.stopPropagation(), p >= 0 && p <
|
|
476
|
-
const P = b(
|
|
476
|
+
if (g.preventDefault(), g.stopPropagation(), p >= 0 && p < c.length) {
|
|
477
|
+
const P = b(c[p]);
|
|
477
478
|
L(P === C ? "" : P), V(!1);
|
|
478
479
|
}
|
|
479
480
|
break;
|
|
@@ -481,18 +482,18 @@ function ge({
|
|
|
481
482
|
g.preventDefault(), g.stopPropagation(), $.current = !0, I(0);
|
|
482
483
|
break;
|
|
483
484
|
case "End":
|
|
484
|
-
g.preventDefault(), g.stopPropagation(), $.current = !0, I(
|
|
485
|
+
g.preventDefault(), g.stopPropagation(), $.current = !0, I(c.length - 1);
|
|
485
486
|
break;
|
|
486
487
|
}
|
|
487
488
|
};
|
|
488
489
|
return n.addEventListener("keydown", i, { capture: !0 }), () => n.removeEventListener("keydown", i, { capture: !0 });
|
|
489
|
-
}, [
|
|
490
|
+
}, [c, p, C, L, V, b]);
|
|
490
491
|
const z = e.useMemo(() => {
|
|
491
492
|
const n = /* @__PURE__ */ new Map();
|
|
492
|
-
return
|
|
493
|
+
return c.forEach((i, g) => {
|
|
493
494
|
n.set(b(i), g);
|
|
494
495
|
}), n;
|
|
495
|
-
}, [
|
|
496
|
+
}, [c, b]), q = e.useCallback(
|
|
496
497
|
(n) => {
|
|
497
498
|
const i = z.get(n);
|
|
498
499
|
i !== void 0 && I(i);
|
|
@@ -501,7 +502,7 @@ function ge({
|
|
|
501
502
|
), U = e.useCallback(
|
|
502
503
|
(n) => (z.get(n) ?? 0) + 1,
|
|
503
504
|
[z]
|
|
504
|
-
), G =
|
|
505
|
+
), G = c.length, W = e.useMemo(
|
|
505
506
|
() => ({
|
|
506
507
|
activeValue: O,
|
|
507
508
|
onItemPointerMove: q,
|
|
@@ -510,8 +511,8 @@ function ge({
|
|
|
510
511
|
getItemPosition: U
|
|
511
512
|
}),
|
|
512
513
|
[O, q, A, G, U]
|
|
513
|
-
),
|
|
514
|
-
return e.useEffect(() => (R(
|
|
514
|
+
), x = O != null ? `${A}item-${O}` : void 0;
|
|
515
|
+
return e.useEffect(() => (R(x), () => R(void 0)), [x, R]), c.length === 0 ? /* @__PURE__ */ d(
|
|
515
516
|
"div",
|
|
516
517
|
{
|
|
517
518
|
ref: E,
|
|
@@ -522,7 +523,7 @@ function ge({
|
|
|
522
523
|
"data-hook": v,
|
|
523
524
|
"data-slot": "combobox-virtual-list",
|
|
524
525
|
role: "listbox",
|
|
525
|
-
children:
|
|
526
|
+
children: u
|
|
526
527
|
}
|
|
527
528
|
) : /* @__PURE__ */ d(Q.Provider, { value: W, children: /* @__PURE__ */ d(
|
|
528
529
|
"div",
|
|
@@ -550,9 +551,9 @@ function ge({
|
|
|
550
551
|
transform: `translateY(${n.start}px)`
|
|
551
552
|
},
|
|
552
553
|
children: l(
|
|
553
|
-
|
|
554
|
+
c[n.index],
|
|
554
555
|
n.index,
|
|
555
|
-
|
|
556
|
+
y
|
|
556
557
|
)
|
|
557
558
|
},
|
|
558
559
|
n.key
|
|
@@ -562,9 +563,9 @@ function ge({
|
|
|
562
563
|
}
|
|
563
564
|
) });
|
|
564
565
|
}
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
const
|
|
566
|
+
const je = e.forwardRef(ve), Ce = e.forwardRef((t, r) => /* @__PURE__ */ d(ie, { ref: r, "data-slot": "combobox-empty", ...t }));
|
|
567
|
+
Ce.displayName = "ComboboxEmpty";
|
|
568
|
+
const ye = e.forwardRef(({ children: t, ...r }, a) => {
|
|
568
569
|
const o = e.useRef(null);
|
|
569
570
|
return H(
|
|
570
571
|
() => o.current ? o.current.querySelectorAll('[data-slot="combobox-item"]').length >= 100 : !1,
|
|
@@ -583,7 +584,7 @@ Import: import { ComboboxVirtualList } from "@brightlocal/ui-components/combobox
|
|
|
583
584
|
}
|
|
584
585
|
);
|
|
585
586
|
});
|
|
586
|
-
|
|
587
|
+
ye.displayName = "ComboboxGroup";
|
|
587
588
|
function we(t, r, a) {
|
|
588
589
|
if (!r || !r.trim())
|
|
589
590
|
return t;
|
|
@@ -595,7 +596,7 @@ function we(t, r, a) {
|
|
|
595
596
|
(f, l) => l % 2 === 1 ? /* @__PURE__ */ d("span", { className: a, children: f }, l) : /* @__PURE__ */ d(e.Fragment, { children: f }, l)
|
|
596
597
|
) });
|
|
597
598
|
}
|
|
598
|
-
const
|
|
599
|
+
const ke = e.forwardRef(
|
|
599
600
|
({
|
|
600
601
|
value: t,
|
|
601
602
|
label: r,
|
|
@@ -604,25 +605,25 @@ const ye = e.forwardRef(
|
|
|
604
605
|
className: s,
|
|
605
606
|
highlight: f,
|
|
606
607
|
highlightClassName: l,
|
|
607
|
-
keywords:
|
|
608
|
+
keywords: u,
|
|
608
609
|
onSelect: m,
|
|
609
610
|
...v
|
|
610
611
|
}, D) => {
|
|
611
|
-
const { value:
|
|
612
|
+
const { value: h, onValueChange: b, setOpen: S, registerItem: E, unregisterItem: C } = _(), L = e.useContext(Q), V = h === t, w = e.useMemo(() => r || (typeof o == "string" ? o : typeof o == "number" ? String(o) : t), [r, o, t]), y = e.useRef(E), M = e.useRef(C);
|
|
612
613
|
e.useEffect(() => {
|
|
613
|
-
|
|
614
|
+
y.current = E, M.current = C;
|
|
614
615
|
}, [E, C]);
|
|
615
616
|
const R = !!L;
|
|
616
617
|
e.useEffect(() => {
|
|
617
618
|
if (!R)
|
|
618
|
-
return
|
|
619
|
-
}, [t,
|
|
619
|
+
return y.current(t, w), () => M.current(t);
|
|
620
|
+
}, [t, w, R]);
|
|
620
621
|
const k = () => {
|
|
621
|
-
b(t ===
|
|
622
|
+
b(t === h ? "" : t), S(!1), m?.(t);
|
|
622
623
|
}, N = () => f && typeof o == "string" ? we(
|
|
623
624
|
o,
|
|
624
625
|
f,
|
|
625
|
-
l || "text-
|
|
626
|
+
l || "text-label font-semibold"
|
|
626
627
|
) : o;
|
|
627
628
|
if (L) {
|
|
628
629
|
const p = L.activeValue === t, I = !!v.disabled;
|
|
@@ -635,7 +636,7 @@ const ye = e.forwardRef(
|
|
|
635
636
|
"aria-selected": V,
|
|
636
637
|
"aria-setsize": L.filteredCount,
|
|
637
638
|
className: T(
|
|
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
|
|
639
|
+
"data-[highlighted=true]:bg-accent data-[highlighted=true]:text-accent-foreground text-label relative flex cursor-default items-center justify-between gap-2 rounded-sm px-2 py-3 outline-hidden select-none",
|
|
639
640
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
640
641
|
I && "pointer-events-none opacity-50",
|
|
641
642
|
s
|
|
@@ -665,13 +666,13 @@ const ye = e.forwardRef(
|
|
|
665
666
|
);
|
|
666
667
|
}
|
|
667
668
|
return /* @__PURE__ */ B(
|
|
668
|
-
|
|
669
|
+
ue,
|
|
669
670
|
{
|
|
670
671
|
ref: D,
|
|
671
672
|
className: T("justify-between", s),
|
|
672
673
|
"data-slot": "combobox-item",
|
|
673
674
|
dataHook: a,
|
|
674
|
-
keywords:
|
|
675
|
+
keywords: u ? [w, ...u] : [w],
|
|
675
676
|
value: t,
|
|
676
677
|
onSelect: k,
|
|
677
678
|
...v,
|
|
@@ -689,10 +690,10 @@ const ye = e.forwardRef(
|
|
|
689
690
|
);
|
|
690
691
|
}
|
|
691
692
|
);
|
|
692
|
-
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
function
|
|
693
|
+
ke.displayName = "ComboboxItem";
|
|
694
|
+
const Ie = e.forwardRef((t, r) => /* @__PURE__ */ d(fe, { ref: r, "data-slot": "combobox-separator", ...t }));
|
|
695
|
+
Ie.displayName = "ComboboxSeparator";
|
|
696
|
+
function ze({
|
|
696
697
|
className: t,
|
|
697
698
|
children: r,
|
|
698
699
|
loadingText: a
|
|
@@ -702,35 +703,36 @@ function Oe({
|
|
|
702
703
|
{
|
|
703
704
|
"aria-live": "polite",
|
|
704
705
|
className: T(
|
|
705
|
-
|
|
706
|
+
// The entrance fade doubles as the flash-threshold appearance delay
|
|
707
|
+
// (`both` holds the hidden start): a fetch that resolves inside the
|
|
708
|
+
// flash zone never flashes a spinner, which would read slower than
|
|
709
|
+
// no indicator at all. flash-delay draws the delay from
|
|
710
|
+
// --ds-motion-flash-threshold — the same threshold useDelayedPending
|
|
711
|
+
// mirrors in JS.
|
|
712
|
+
"text-body-sm text-muted-foreground relative flex items-center justify-center gap-2 py-6",
|
|
713
|
+
"animate-entrance-fade flash-delay",
|
|
706
714
|
t
|
|
707
715
|
),
|
|
708
716
|
"data-slot": "combobox-loading",
|
|
709
717
|
role: "status",
|
|
710
718
|
children: r || /* @__PURE__ */ B(Z, { children: [
|
|
711
|
-
/* @__PURE__ */ d(
|
|
712
|
-
|
|
713
|
-
{
|
|
714
|
-
"aria-hidden": "true",
|
|
715
|
-
className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"
|
|
716
|
-
}
|
|
717
|
-
),
|
|
718
|
-
a ?? "Loading..."
|
|
719
|
+
/* @__PURE__ */ d(be, { size: "md" }),
|
|
720
|
+
/* @__PURE__ */ d("span", { className: "sr-only", children: a ?? "Loading suggestions" })
|
|
719
721
|
] })
|
|
720
722
|
}
|
|
721
723
|
);
|
|
722
724
|
}
|
|
723
725
|
export {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
726
|
+
Te as Combobox,
|
|
727
|
+
Oe as ComboboxContent,
|
|
728
|
+
Ce as ComboboxEmpty,
|
|
729
|
+
ye as ComboboxGroup,
|
|
728
730
|
xe as ComboboxInput,
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
731
|
+
ke as ComboboxItem,
|
|
732
|
+
ge as ComboboxList,
|
|
733
|
+
ze as ComboboxLoading,
|
|
734
|
+
Ie as ComboboxSeparator,
|
|
735
|
+
pe as ComboboxTrigger,
|
|
736
|
+
$e as ComboboxValue,
|
|
737
|
+
je as ComboboxVirtualList
|
|
736
738
|
};
|