@campminder/ds 0.2.0 → 0.3.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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
3
- import { ChevronDown, CheckIcon, ChevronRightIcon, MoreHorizontalIcon, Loader2, ChevronDownIcon, ChevronUpIcon, XIcon, PlusIcon, SearchIcon, Check, Circle, ChevronRight, PencilIcon, TrashIcon, ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronsUpDown, CameraIcon, PanelLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, BadgeCheck, AlertTriangleIcon } from 'lucide-react';
3
+ import { ChevronDown, CheckIcon, ChevronRightIcon, MoreHorizontalIcon, Loader2, ChevronDownIcon, ChevronUpIcon, XIcon, PlusIcon, Columns3, Search, GripVertical, X, SearchIcon, ChevronLeft, ChevronRight, Check, Circle, ListFilter, PencilIcon, TrashIcon, ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronsUpDown, CameraIcon, PanelLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, BadgeCheck, ChevronUp, AlertTriangleIcon } from 'lucide-react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -10,13 +10,14 @@ import { useRender } from '@base-ui/react/use-render';
10
10
  import { cva } from 'class-variance-authority';
11
11
  import { Button as Button$1 } from '@base-ui/react/button';
12
12
  import * as React3 from 'react';
13
- import { useEffect, useMemo, useState, useRef, useLayoutEffect } from 'react';
13
+ import { useEffect, useState, useMemo, useRef, useLayoutEffect } from 'react';
14
14
  import { useForm, Controller } from 'react-hook-form';
15
15
  import { zodResolver } from '@hookform/resolvers/zod';
16
16
  import { z } from 'zod';
17
17
  import { Input as Input$1 } from '@base-ui/react/input';
18
18
  import { Select as Select$1 } from '@base-ui/react/select';
19
19
  import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
20
+ import { Popover as Popover$1 } from '@base-ui/react/popover';
20
21
  import { Command as Command$1 } from 'cmdk';
21
22
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
22
23
  import { Menu } from '@base-ui/react/menu';
@@ -25,7 +26,6 @@ import RPNInput, { getCountryCallingCode } from 'react-phone-number-input';
25
26
  export { getCountries, isValidPhoneNumber } from 'react-phone-number-input';
26
27
  import flags from 'react-phone-number-input/flags';
27
28
  import en from 'react-phone-number-input/locale/en.json';
28
- import { Popover as Popover$1 } from '@base-ui/react/popover';
29
29
  import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
30
30
  import { Progress as Progress$1 } from '@base-ui/react/progress';
31
31
  import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
@@ -1177,6 +1177,397 @@ function Checkbox({ className, ...props }) {
1177
1177
  }
1178
1178
  );
1179
1179
  }
1180
+ function Popover({ ...props }) {
1181
+ return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
1182
+ }
1183
+ function PopoverTrigger({ ...props }) {
1184
+ return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
1185
+ }
1186
+ function PopoverContent({
1187
+ className,
1188
+ align = "center",
1189
+ alignOffset = 0,
1190
+ side = "bottom",
1191
+ sideOffset = 4,
1192
+ ...props
1193
+ }) {
1194
+ return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
1195
+ Popover$1.Positioner,
1196
+ {
1197
+ align,
1198
+ alignOffset,
1199
+ side,
1200
+ sideOffset,
1201
+ className: "isolate z-50",
1202
+ children: /* @__PURE__ */ jsx(
1203
+ Popover$1.Popup,
1204
+ {
1205
+ "data-slot": "popover-content",
1206
+ className: cn(
1207
+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
1208
+ className
1209
+ ),
1210
+ ...props
1211
+ }
1212
+ )
1213
+ }
1214
+ ) });
1215
+ }
1216
+ function PopoverHeader({ className, ...props }) {
1217
+ return /* @__PURE__ */ jsx(
1218
+ "div",
1219
+ {
1220
+ "data-slot": "popover-header",
1221
+ className: cn("flex flex-col gap-0.5 text-sm", className),
1222
+ ...props
1223
+ }
1224
+ );
1225
+ }
1226
+ function PopoverTitle({ className, ...props }) {
1227
+ return /* @__PURE__ */ jsx(
1228
+ Popover$1.Title,
1229
+ {
1230
+ "data-slot": "popover-title",
1231
+ className: cn("font-medium", className),
1232
+ ...props
1233
+ }
1234
+ );
1235
+ }
1236
+ function PopoverDescription({
1237
+ className,
1238
+ ...props
1239
+ }) {
1240
+ return /* @__PURE__ */ jsx(
1241
+ Popover$1.Description,
1242
+ {
1243
+ "data-slot": "popover-description",
1244
+ className: cn("text-muted-foreground", className),
1245
+ ...props
1246
+ }
1247
+ );
1248
+ }
1249
+ var ALL_GROUPS = "__all__";
1250
+ function ColumnCustomizer({
1251
+ columns,
1252
+ value,
1253
+ onApply,
1254
+ groupOrder,
1255
+ title = "Customize columns",
1256
+ searchPlaceholder = "Search for a column",
1257
+ allGroupsLabel = "All columns",
1258
+ align = "end",
1259
+ trigger
1260
+ }) {
1261
+ const [open, setOpen] = useState(false);
1262
+ const [draft, setDraft] = useState(value);
1263
+ const [query, setQuery] = useState("");
1264
+ const [group, setGroup] = useState(ALL_GROUPS);
1265
+ const [dragIndex, setDragIndex] = useState(null);
1266
+ const q = query.trim().toLowerCase();
1267
+ const searching = q !== "";
1268
+ const labelFor = useMemo(() => {
1269
+ const m = /* @__PURE__ */ new Map();
1270
+ for (const c of columns) m.set(c.key, c.label);
1271
+ return m;
1272
+ }, [columns]);
1273
+ const groupKeys = useMemo(() => {
1274
+ if (groupOrder?.length) return groupOrder;
1275
+ const seen = [];
1276
+ for (const c of columns) if (!seen.includes(c.group)) seen.push(c.group);
1277
+ return seen;
1278
+ }, [columns, groupOrder]);
1279
+ const groups = useMemo(
1280
+ () => [
1281
+ { key: ALL_GROUPS, label: allGroupsLabel, count: columns.length },
1282
+ ...groupKeys.map((g) => ({
1283
+ key: g,
1284
+ label: g,
1285
+ count: columns.filter((c) => c.group === g).length
1286
+ }))
1287
+ ],
1288
+ [columns, groupKeys, allGroupsLabel]
1289
+ );
1290
+ const handleOpenChange = (next) => {
1291
+ if (next) {
1292
+ setDraft(value);
1293
+ setQuery("");
1294
+ setGroup(ALL_GROUPS);
1295
+ }
1296
+ setOpen(next);
1297
+ };
1298
+ const toggle = (k) => setDraft(
1299
+ (cur) => cur.includes(k) ? cur.filter((c) => c !== k) : [...cur, k]
1300
+ );
1301
+ const remove = (k) => setDraft((cur) => cur.filter((c) => c !== k));
1302
+ const reorder = (from, to) => setDraft((cur) => {
1303
+ const next = [...cur];
1304
+ const [moved] = next.splice(from, 1);
1305
+ next.splice(to, 0, moved);
1306
+ return next;
1307
+ });
1308
+ const visibleCols = useMemo(() => {
1309
+ const base = searching || group === ALL_GROUPS ? columns : columns.filter((c) => c.group === group);
1310
+ return searching ? base.filter((c) => c.label.toLowerCase().includes(q)) : base;
1311
+ }, [columns, q, group, searching]);
1312
+ const showSource = searching || group === ALL_GROUPS;
1313
+ const allChecked = visibleCols.length > 0 && visibleCols.every((c) => draft.includes(c.key));
1314
+ const toggleAll = () => setDraft(
1315
+ (cur) => allChecked ? cur.filter((k) => !visibleCols.some((c) => c.key === k)) : [
1316
+ ...cur,
1317
+ ...visibleCols.map((c) => c.key).filter((k) => !cur.includes(k))
1318
+ ]
1319
+ );
1320
+ const activeGroupLabel = groups.find((g) => g.key === group)?.label;
1321
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
1322
+ trigger ? /* @__PURE__ */ jsx(PopoverTrigger, { render: trigger }) : /* @__PURE__ */ jsxs(
1323
+ PopoverTrigger,
1324
+ {
1325
+ type: "button",
1326
+ className: cn(
1327
+ buttonVariants({ variant: "outline" }),
1328
+ "h-9 gap-1.5 text-muted-foreground"
1329
+ ),
1330
+ children: [
1331
+ /* @__PURE__ */ jsx(Columns3, { className: "size-4" }),
1332
+ "Columns"
1333
+ ]
1334
+ }
1335
+ ),
1336
+ /* @__PURE__ */ jsxs(
1337
+ PopoverContent,
1338
+ {
1339
+ align,
1340
+ className: "w-[720px] max-w-[calc(100vw-2rem)] gap-0 p-0",
1341
+ children: [
1342
+ /* @__PURE__ */ jsx(PopoverTitle, { className: "px-4 pt-4 pb-3 text-sm font-semibold", children: title }),
1343
+ /* @__PURE__ */ jsx("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1344
+ /* @__PURE__ */ jsx(Search, { className: "absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" }),
1345
+ /* @__PURE__ */ jsx(
1346
+ Input,
1347
+ {
1348
+ value: query,
1349
+ onChange: (e) => setQuery(e.target.value),
1350
+ placeholder: searchPlaceholder,
1351
+ "aria-label": searchPlaceholder,
1352
+ className: "h-10 pl-9"
1353
+ }
1354
+ )
1355
+ ] }) }),
1356
+ /* @__PURE__ */ jsxs("div", { className: "grid h-[380px] grid-cols-[12rem_1fr_16rem] border-y", children: [
1357
+ /* @__PURE__ */ jsx("div", { className: "overflow-y-auto border-r p-2", children: groups.map((gr) => /* @__PURE__ */ jsxs(
1358
+ "button",
1359
+ {
1360
+ type: "button",
1361
+ disabled: searching,
1362
+ onClick: () => setGroup(gr.key),
1363
+ className: cn(
1364
+ "flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-muted/60",
1365
+ !searching && group === gr.key && "bg-muted font-medium",
1366
+ searching && "opacity-40"
1367
+ ),
1368
+ children: [
1369
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: gr.label }),
1370
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-md bg-muted px-1.5 text-xs tabular-nums text-muted-foreground", children: gr.count })
1371
+ ]
1372
+ },
1373
+ gr.key
1374
+ )) }),
1375
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 overflow-y-auto p-3", children: [
1376
+ /* @__PURE__ */ jsx("div", { className: "px-1 pb-1 text-sm font-semibold", children: searching ? "Search results" : activeGroupLabel }),
1377
+ !searching && visibleCols.length > 0 && /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-center gap-2.5 border-b px-1 py-2 text-sm", children: [
1378
+ /* @__PURE__ */ jsx(
1379
+ Checkbox,
1380
+ {
1381
+ checked: allChecked,
1382
+ onCheckedChange: () => toggleAll()
1383
+ }
1384
+ ),
1385
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Select all" })
1386
+ ] }),
1387
+ /* @__PURE__ */ jsx("div", { className: "pt-1", children: visibleCols.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "px-1 py-6 text-center text-sm text-muted-foreground", children: [
1388
+ "No columns match \u201C",
1389
+ query,
1390
+ "\u201D."
1391
+ ] }) : visibleCols.map((c) => /* @__PURE__ */ jsxs(
1392
+ "label",
1393
+ {
1394
+ className: "flex cursor-pointer items-center gap-2.5 rounded-md px-1 py-2 text-sm hover:bg-muted/60",
1395
+ children: [
1396
+ /* @__PURE__ */ jsx(
1397
+ Checkbox,
1398
+ {
1399
+ checked: draft.includes(c.key),
1400
+ onCheckedChange: () => toggle(c.key)
1401
+ }
1402
+ ),
1403
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: c.label }),
1404
+ showSource && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: c.group })
1405
+ ]
1406
+ },
1407
+ c.key
1408
+ )) })
1409
+ ] }),
1410
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col border-l", children: [
1411
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-2.5", children: [
1412
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold", children: [
1413
+ draft.length,
1414
+ " selected"
1415
+ ] }),
1416
+ draft.length > 0 && /* @__PURE__ */ jsx(
1417
+ "button",
1418
+ {
1419
+ type: "button",
1420
+ onClick: () => setDraft([]),
1421
+ className: "text-xs font-medium text-primary hover:underline",
1422
+ children: "Clear all"
1423
+ }
1424
+ )
1425
+ ] }),
1426
+ /* @__PURE__ */ jsx("div", { className: "flex-1 space-y-1.5 overflow-y-auto px-3 pb-3", children: draft.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-1 py-6 text-center text-sm text-muted-foreground", children: "No columns selected." }) : draft.map((k, i) => /* @__PURE__ */ jsxs(
1427
+ "div",
1428
+ {
1429
+ draggable: true,
1430
+ onDragStart: () => setDragIndex(i),
1431
+ onDragOver: (e) => e.preventDefault(),
1432
+ onDrop: () => {
1433
+ if (dragIndex !== null && dragIndex !== i)
1434
+ reorder(dragIndex, i);
1435
+ setDragIndex(null);
1436
+ },
1437
+ onDragEnd: () => setDragIndex(null),
1438
+ className: cn(
1439
+ "flex items-center gap-2 rounded-md border bg-background px-2.5 py-2 text-sm",
1440
+ dragIndex === i && "opacity-50"
1441
+ ),
1442
+ children: [
1443
+ /* @__PURE__ */ jsx(GripVertical, { className: "size-3.5 shrink-0 cursor-grab text-muted-foreground" }),
1444
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labelFor.get(k) ?? k }),
1445
+ /* @__PURE__ */ jsx(
1446
+ "button",
1447
+ {
1448
+ type: "button",
1449
+ onClick: () => remove(k),
1450
+ "aria-label": `Remove ${labelFor.get(k) ?? k}`,
1451
+ className: "shrink-0 rounded-sm p-0.5 text-muted-foreground hover:text-foreground",
1452
+ children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
1453
+ }
1454
+ )
1455
+ ]
1456
+ },
1457
+ k
1458
+ )) })
1459
+ ] })
1460
+ ] }),
1461
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 px-4 py-3", children: [
1462
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => setOpen(false), children: "Cancel" }),
1463
+ /* @__PURE__ */ jsx(
1464
+ Button,
1465
+ {
1466
+ onClick: () => {
1467
+ onApply(draft);
1468
+ setOpen(false);
1469
+ },
1470
+ children: "Apply"
1471
+ }
1472
+ )
1473
+ ] })
1474
+ ]
1475
+ }
1476
+ )
1477
+ ] });
1478
+ }
1479
+ function ColumnPicker({
1480
+ columns,
1481
+ value,
1482
+ onChange,
1483
+ title = "Columns",
1484
+ searchPlaceholder = "Search columns",
1485
+ align = "end",
1486
+ trigger
1487
+ }) {
1488
+ const [query, setQuery] = useState("");
1489
+ const q = query.trim().toLowerCase();
1490
+ const visible = useMemo(() => new Set(value), [value]);
1491
+ const filtered = useMemo(
1492
+ () => q ? columns.filter((c) => c.label.toLowerCase().includes(q)) : columns,
1493
+ [columns, q]
1494
+ );
1495
+ const emit = (next) => onChange(columns.filter((c) => next.has(c.key)).map((c) => c.key));
1496
+ const toggle = (key) => {
1497
+ const next = new Set(visible);
1498
+ if (next.has(key)) next.delete(key);
1499
+ else next.add(key);
1500
+ emit(next);
1501
+ };
1502
+ const allChecked = filtered.length > 0 && filtered.every((c) => visible.has(c.key));
1503
+ const toggleAll = () => {
1504
+ const next = new Set(visible);
1505
+ for (const c of filtered) {
1506
+ if (allChecked) next.delete(c.key);
1507
+ else next.add(c.key);
1508
+ }
1509
+ emit(next);
1510
+ };
1511
+ return /* @__PURE__ */ jsxs(Popover, { children: [
1512
+ trigger ? /* @__PURE__ */ jsx(PopoverTrigger, { render: trigger }) : /* @__PURE__ */ jsxs(
1513
+ PopoverTrigger,
1514
+ {
1515
+ type: "button",
1516
+ className: cn(
1517
+ buttonVariants({ variant: "outline" }),
1518
+ "h-9 gap-1.5 text-muted-foreground"
1519
+ ),
1520
+ children: [
1521
+ /* @__PURE__ */ jsx(Columns3, { className: "size-4" }),
1522
+ "Columns"
1523
+ ]
1524
+ }
1525
+ ),
1526
+ /* @__PURE__ */ jsxs(PopoverContent, { align, className: "w-72 gap-0 p-0", children: [
1527
+ /* @__PURE__ */ jsx(PopoverTitle, { className: "px-3 pt-3 pb-2 text-sm font-semibold", children: title }),
1528
+ /* @__PURE__ */ jsx("div", { className: "px-3 pb-2", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1529
+ /* @__PURE__ */ jsx(Search, { className: "absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" }),
1530
+ /* @__PURE__ */ jsx(
1531
+ Input,
1532
+ {
1533
+ value: query,
1534
+ onChange: (e) => setQuery(e.target.value),
1535
+ placeholder: searchPlaceholder,
1536
+ "aria-label": searchPlaceholder,
1537
+ className: "h-9 pl-9"
1538
+ }
1539
+ )
1540
+ ] }) }),
1541
+ /* @__PURE__ */ jsx("div", { className: "max-h-[320px] overflow-y-auto border-t px-1.5 py-1.5", children: filtered.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: [
1542
+ "No columns match \u201C",
1543
+ query,
1544
+ "\u201D."
1545
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1546
+ /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted/60", children: [
1547
+ /* @__PURE__ */ jsx(Checkbox, { checked: allChecked, onCheckedChange: () => toggleAll() }),
1548
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Select all" })
1549
+ ] }),
1550
+ filtered.map((c) => /* @__PURE__ */ jsxs(
1551
+ "label",
1552
+ {
1553
+ className: "flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted/60",
1554
+ children: [
1555
+ /* @__PURE__ */ jsx(
1556
+ Checkbox,
1557
+ {
1558
+ checked: visible.has(c.key),
1559
+ onCheckedChange: () => toggle(c.key)
1560
+ }
1561
+ ),
1562
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: c.label })
1563
+ ]
1564
+ },
1565
+ c.key
1566
+ ))
1567
+ ] }) })
1568
+ ] })
1569
+ ] });
1570
+ }
1180
1571
  function Dialog({ ...props }) {
1181
1572
  return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "dialog", ...props });
1182
1573
  }
@@ -1271,7 +1662,7 @@ function DialogFooter({
1271
1662
  {
1272
1663
  "data-slot": "dialog-footer",
1273
1664
  className: cn(
1274
- "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
1665
+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-border bg-muted/50 p-4 sm:flex-row sm:justify-end",
1275
1666
  className
1276
1667
  ),
1277
1668
  ...props,
@@ -1610,6 +2001,449 @@ function CommandShortcut({
1610
2001
  }
1611
2002
  );
1612
2003
  }
2004
+ function Table({ className, ...props }) {
2005
+ return /* @__PURE__ */ jsx(
2006
+ "div",
2007
+ {
2008
+ "data-slot": "table-container",
2009
+ className: "relative w-full overflow-x-auto",
2010
+ children: /* @__PURE__ */ jsx(
2011
+ "table",
2012
+ {
2013
+ "data-slot": "table",
2014
+ className: cn("w-full caption-bottom text-sm", className),
2015
+ ...props
2016
+ }
2017
+ )
2018
+ }
2019
+ );
2020
+ }
2021
+ function TableHeader({ className, ...props }) {
2022
+ return /* @__PURE__ */ jsx(
2023
+ "thead",
2024
+ {
2025
+ "data-slot": "table-header",
2026
+ className: cn("[&_tr]:border-b", className),
2027
+ ...props
2028
+ }
2029
+ );
2030
+ }
2031
+ function TableBody({ className, ...props }) {
2032
+ return /* @__PURE__ */ jsx(
2033
+ "tbody",
2034
+ {
2035
+ "data-slot": "table-body",
2036
+ className: cn("[&_tr:last-child]:border-0", className),
2037
+ ...props
2038
+ }
2039
+ );
2040
+ }
2041
+ function TableFooter({ className, ...props }) {
2042
+ return /* @__PURE__ */ jsx(
2043
+ "tfoot",
2044
+ {
2045
+ "data-slot": "table-footer",
2046
+ className: cn(
2047
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
2048
+ className
2049
+ ),
2050
+ ...props
2051
+ }
2052
+ );
2053
+ }
2054
+ function TableRow({ className, ...props }) {
2055
+ return /* @__PURE__ */ jsx(
2056
+ "tr",
2057
+ {
2058
+ "data-slot": "table-row",
2059
+ className: cn(
2060
+ "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
2061
+ className
2062
+ ),
2063
+ ...props
2064
+ }
2065
+ );
2066
+ }
2067
+ function TableHead({ className, ...props }) {
2068
+ return /* @__PURE__ */ jsx(
2069
+ "th",
2070
+ {
2071
+ "data-slot": "table-head",
2072
+ className: cn(
2073
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
2074
+ className
2075
+ ),
2076
+ ...props
2077
+ }
2078
+ );
2079
+ }
2080
+ function TableCell({ className, ...props }) {
2081
+ return /* @__PURE__ */ jsx(
2082
+ "td",
2083
+ {
2084
+ "data-slot": "table-cell",
2085
+ className: cn(
2086
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
2087
+ className
2088
+ ),
2089
+ ...props
2090
+ }
2091
+ );
2092
+ }
2093
+ function TableCaption({
2094
+ className,
2095
+ ...props
2096
+ }) {
2097
+ return /* @__PURE__ */ jsx(
2098
+ "caption",
2099
+ {
2100
+ "data-slot": "table-caption",
2101
+ className: cn("mt-4 text-sm text-muted-foreground", className),
2102
+ ...props
2103
+ }
2104
+ );
2105
+ }
2106
+ var SELECT_COL_PX = 48;
2107
+ var STICKY_UNDERLAP_PX = 8;
2108
+ var selectColStyle = {
2109
+ width: SELECT_COL_PX,
2110
+ minWidth: SELECT_COL_PX,
2111
+ maxWidth: SELECT_COL_PX
2112
+ };
2113
+ var DEFAULT_STICKY_PX = 180;
2114
+ var HEADER_CELL_BG = "bg-[color-mix(in_oklab,var(--color-muted)_40%,var(--color-background))]";
2115
+ function alignClass(align) {
2116
+ return align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
2117
+ }
2118
+ function DataTable({
2119
+ data,
2120
+ columns,
2121
+ rowKey,
2122
+ selectable = false,
2123
+ selected: selectedProp,
2124
+ onSelectedChange,
2125
+ bulkActions,
2126
+ sort: sortProp,
2127
+ defaultSort = null,
2128
+ onSortChange,
2129
+ paginated = false,
2130
+ pageSize: pageSizeProp,
2131
+ pageSizeOptions = [25, 50, 100],
2132
+ page: pageProp,
2133
+ onPageChange,
2134
+ toolbar,
2135
+ onRowClick,
2136
+ emptyMessage = "No rows to show.",
2137
+ rowClassName,
2138
+ className
2139
+ }) {
2140
+ const [selInner, setSelInner] = useState(/* @__PURE__ */ new Set());
2141
+ const selected = selectedProp ?? selInner;
2142
+ const setSelected = (next) => {
2143
+ onSelectedChange?.(next);
2144
+ if (selectedProp === void 0) setSelInner(next);
2145
+ };
2146
+ const toggleRow = (id) => {
2147
+ const next = new Set(selected);
2148
+ if (next.has(id)) next.delete(id);
2149
+ else next.add(id);
2150
+ setSelected(next);
2151
+ };
2152
+ const clearSelection = () => setSelected(/* @__PURE__ */ new Set());
2153
+ const [sortInner, setSortInner] = useState(defaultSort);
2154
+ const sort = sortProp !== void 0 ? sortProp : sortInner;
2155
+ const colByKey = useMemo(() => {
2156
+ const m = /* @__PURE__ */ new Map();
2157
+ for (const c of columns) m.set(c.key, c);
2158
+ return m;
2159
+ }, [columns]);
2160
+ const toggleSort = (key) => {
2161
+ const next = sort?.key !== key ? { key, dir: "asc" } : sort.dir === "asc" ? { key, dir: "desc" } : null;
2162
+ onSortChange?.(next);
2163
+ if (sortProp === void 0) setSortInner(next);
2164
+ };
2165
+ const sorted = useMemo(() => {
2166
+ if (!sort) return data;
2167
+ const col = colByKey.get(sort.key);
2168
+ if (!col?.sortValue) return data;
2169
+ const { sortValue } = col;
2170
+ const arr = [...data];
2171
+ arr.sort((a, b) => {
2172
+ const av = sortValue(a);
2173
+ const bv = sortValue(b);
2174
+ const cmp = typeof av === "number" && typeof bv === "number" ? av - bv : String(av).localeCompare(String(bv));
2175
+ return sort.dir === "asc" ? cmp : -cmp;
2176
+ });
2177
+ return arr;
2178
+ }, [data, sort, colByKey]);
2179
+ const [pageSizeInner, setPageSizeInner] = useState(pageSizeProp ?? 25);
2180
+ const pageSize = paginated ? pageSizeInner : sorted.length || 1;
2181
+ const [pageInner, setPageInner] = useState(0);
2182
+ const page = pageProp !== void 0 ? pageProp : pageInner;
2183
+ const setPage = (p) => {
2184
+ onPageChange?.(p);
2185
+ if (pageProp === void 0) setPageInner(p);
2186
+ };
2187
+ const total = sorted.length;
2188
+ const pageCount = Math.max(1, Math.ceil(total / pageSize));
2189
+ const safePage = Math.min(page, pageCount - 1);
2190
+ const pageStart = paginated ? safePage * pageSize : 0;
2191
+ const rows = paginated ? sorted.slice(pageStart, pageStart + pageSize) : sorted;
2192
+ const pageIds = rows.map(rowKey);
2193
+ const allChecked = pageIds.length > 0 && pageIds.every((id) => selected.has(id));
2194
+ const toggleAll = () => {
2195
+ const next = new Set(selected);
2196
+ for (const id of pageIds) {
2197
+ if (allChecked) next.delete(id);
2198
+ else next.add(id);
2199
+ }
2200
+ setSelected(next);
2201
+ };
2202
+ const selectedCount = selected.size;
2203
+ const stickyLeft = useMemo(() => {
2204
+ const offsets = /* @__PURE__ */ new Map();
2205
+ let left = selectable ? SELECT_COL_PX - STICKY_UNDERLAP_PX : 0;
2206
+ for (const col of columns) {
2207
+ if (!col.sticky) continue;
2208
+ offsets.set(col.key, left);
2209
+ left += typeof col.width === "number" ? col.width : DEFAULT_STICKY_PX;
2210
+ }
2211
+ return offsets;
2212
+ }, [columns, selectable]);
2213
+ const colCount = (selectable ? 1 : 0) + columns.length + 1;
2214
+ const sortIcon = (key) => {
2215
+ if (sort?.key !== key)
2216
+ return /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-3.5 text-muted-foreground/50 opacity-0 transition-opacity group-hover/sort:opacity-100" });
2217
+ return sort.dir === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-3.5" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5" });
2218
+ };
2219
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
2220
+ toolbar,
2221
+ bulkActions?.length && selectedCount > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex w-fit flex-wrap items-center gap-2 rounded-lg border border-primary/40 bg-primary/5 px-3 py-1.5", children: [
2222
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium", children: [
2223
+ selectedCount,
2224
+ " selected"
2225
+ ] }),
2226
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "\xB7" }),
2227
+ bulkActions.map(
2228
+ (action, i) => action.options ? /* @__PURE__ */ jsxs(
2229
+ Select,
2230
+ {
2231
+ value: "",
2232
+ onValueChange: (v) => v && action.onPick?.(v),
2233
+ children: [
2234
+ /* @__PURE__ */ jsx(
2235
+ SelectTrigger,
2236
+ {
2237
+ "aria-label": action.label,
2238
+ className: "h-8 min-w-[130px] bg-background text-sm",
2239
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: action.label })
2240
+ }
2241
+ ),
2242
+ /* @__PURE__ */ jsx(SelectContent, { className: "w-auto min-w-(--anchor-width) max-w-[20rem]", children: action.options.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: o.value, children: o.label }, o.value)) })
2243
+ ]
2244
+ },
2245
+ i
2246
+ ) : /* @__PURE__ */ jsx(
2247
+ "button",
2248
+ {
2249
+ type: "button",
2250
+ onClick: action.onClick,
2251
+ className: "inline-flex h-8 items-center rounded-md border bg-background px-2.5 text-sm hover:bg-muted",
2252
+ children: action.label
2253
+ },
2254
+ i
2255
+ )
2256
+ ),
2257
+ /* @__PURE__ */ jsxs(
2258
+ "button",
2259
+ {
2260
+ type: "button",
2261
+ onClick: clearSelection,
2262
+ className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",
2263
+ children: [
2264
+ /* @__PURE__ */ jsx(X, { className: "size-3.5" }),
2265
+ "Clear"
2266
+ ]
2267
+ }
2268
+ )
2269
+ ] }) : null,
2270
+ /* @__PURE__ */ jsx("div", { className: "rounded-xl border bg-background overflow-hidden", children: /* @__PURE__ */ jsxs(Table, { className: "border-separate border-spacing-0", children: [
2271
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { className: "text-xs uppercase tracking-wide text-muted-foreground", children: [
2272
+ selectable && /* @__PURE__ */ jsx(
2273
+ TableHead,
2274
+ {
2275
+ style: selectColStyle,
2276
+ className: cn(
2277
+ "sticky left-0 z-30 px-0 py-2.5 border-b rounded-tl-xl",
2278
+ HEADER_CELL_BG
2279
+ ),
2280
+ children: /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(
2281
+ Checkbox,
2282
+ {
2283
+ checked: allChecked,
2284
+ onCheckedChange: toggleAll,
2285
+ "aria-label": "Select all"
2286
+ }
2287
+ ) })
2288
+ }
2289
+ ),
2290
+ columns.map((col, colIndex) => {
2291
+ const sortable = col.sortable && col.sortValue;
2292
+ const left = stickyLeft.get(col.key);
2293
+ const isFirstCol = !selectable && colIndex === 0;
2294
+ return /* @__PURE__ */ jsx(
2295
+ TableHead,
2296
+ {
2297
+ style: col.sticky ? { left, minWidth: col.width } : { minWidth: col.width },
2298
+ className: cn(
2299
+ "px-4 py-2.5 border-b font-medium text-muted-foreground",
2300
+ HEADER_CELL_BG,
2301
+ alignClass(col.align),
2302
+ col.sticky && "sticky z-20",
2303
+ isFirstCol && "rounded-tl-xl",
2304
+ col.headerClassName
2305
+ ),
2306
+ children: sortable ? /* @__PURE__ */ jsxs(
2307
+ "button",
2308
+ {
2309
+ type: "button",
2310
+ onClick: () => toggleSort(col.key),
2311
+ className: "group/sort inline-flex items-center gap-1 hover:text-foreground",
2312
+ children: [
2313
+ col.header,
2314
+ sortIcon(col.key)
2315
+ ]
2316
+ }
2317
+ ) : col.header
2318
+ },
2319
+ col.key
2320
+ );
2321
+ }),
2322
+ /* @__PURE__ */ jsx(TableHead, { "aria-hidden": true, className: cn("w-full border-b", HEADER_CELL_BG) })
2323
+ ] }) }),
2324
+ /* @__PURE__ */ jsx(TableBody, { children: data.length === 0 ? /* @__PURE__ */ jsx(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx(
2325
+ TableCell,
2326
+ {
2327
+ colSpan: colCount,
2328
+ className: "py-12 text-center text-sm text-muted-foreground rounded-bl-xl",
2329
+ children: emptyMessage
2330
+ }
2331
+ ) }) : rows.map((row, rowIndex) => {
2332
+ const id = rowKey(row);
2333
+ const isSel = selected.has(id);
2334
+ const rowBg = isSel ? "bg-muted" : "bg-background";
2335
+ const isLastRow = rowIndex === rows.length - 1;
2336
+ return /* @__PURE__ */ jsxs(
2337
+ TableRow,
2338
+ {
2339
+ className: cn(
2340
+ "group",
2341
+ rowBg,
2342
+ "hover:bg-muted",
2343
+ rowClassName?.(row)
2344
+ ),
2345
+ children: [
2346
+ selectable && /* @__PURE__ */ jsx(
2347
+ TableCell,
2348
+ {
2349
+ style: selectColStyle,
2350
+ className: cn(
2351
+ "sticky left-0 z-20 px-0 py-2.5 border-b group-hover:bg-muted",
2352
+ rowBg,
2353
+ isLastRow && "rounded-bl-xl"
2354
+ ),
2355
+ children: /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(
2356
+ Checkbox,
2357
+ {
2358
+ checked: isSel,
2359
+ onCheckedChange: () => toggleRow(id),
2360
+ "aria-label": "Select row"
2361
+ }
2362
+ ) })
2363
+ }
2364
+ ),
2365
+ columns.map((col, colIndex) => {
2366
+ const left = stickyLeft.get(col.key);
2367
+ const isFirstCol = !selectable && colIndex === 0;
2368
+ return /* @__PURE__ */ jsx(
2369
+ TableCell,
2370
+ {
2371
+ style: col.sticky ? { left } : void 0,
2372
+ className: cn(
2373
+ "px-4 py-2.5 border-b align-middle",
2374
+ alignClass(col.align),
2375
+ col.sticky && cn("sticky z-10 group-hover:bg-muted", rowBg),
2376
+ isFirstCol && isLastRow && "rounded-bl-xl",
2377
+ col.className
2378
+ ),
2379
+ onClick: col.sticky && onRowClick ? () => onRowClick(row) : void 0,
2380
+ children: col.render(row)
2381
+ },
2382
+ col.key
2383
+ );
2384
+ }),
2385
+ /* @__PURE__ */ jsx(TableCell, { "aria-hidden": true, className: "border-b" })
2386
+ ]
2387
+ },
2388
+ id
2389
+ );
2390
+ }) })
2391
+ ] }) }),
2392
+ paginated && total > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-1 text-sm text-muted-foreground", children: [
2393
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2394
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "Rows per page" }),
2395
+ /* @__PURE__ */ jsxs(
2396
+ Select,
2397
+ {
2398
+ value: String(pageSize),
2399
+ onValueChange: (v) => {
2400
+ if (!v) return;
2401
+ setPageSizeInner(Number(v));
2402
+ setPage(0);
2403
+ },
2404
+ children: [
2405
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": "Rows per page", className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2406
+ /* @__PURE__ */ jsx(SelectContent, { children: pageSizeOptions.map((n) => /* @__PURE__ */ jsx(SelectItem, { value: String(n), children: n }, n)) })
2407
+ ]
2408
+ }
2409
+ )
2410
+ ] }),
2411
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2412
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums whitespace-nowrap", children: [
2413
+ pageStart + 1,
2414
+ "\u2013",
2415
+ Math.min(pageStart + pageSize, total),
2416
+ " of ",
2417
+ total
2418
+ ] }),
2419
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
2420
+ /* @__PURE__ */ jsx(
2421
+ "button",
2422
+ {
2423
+ type: "button",
2424
+ onClick: () => setPage(safePage - 1),
2425
+ disabled: safePage === 0,
2426
+ "aria-label": "Previous page",
2427
+ className: "inline-flex size-8 items-center justify-center rounded-md border bg-background hover:bg-muted disabled:pointer-events-none disabled:opacity-40",
2428
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
2429
+ }
2430
+ ),
2431
+ /* @__PURE__ */ jsx(
2432
+ "button",
2433
+ {
2434
+ type: "button",
2435
+ onClick: () => setPage(safePage + 1),
2436
+ disabled: safePage >= pageCount - 1,
2437
+ "aria-label": "Next page",
2438
+ className: "inline-flex size-8 items-center justify-center rounded-md border bg-background hover:bg-muted disabled:pointer-events-none disabled:opacity-40",
2439
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
2440
+ }
2441
+ )
2442
+ ] })
2443
+ ] })
2444
+ ] })
2445
+ ] });
2446
+ }
1613
2447
  function DropdownMenu(props) {
1614
2448
  return /* @__PURE__ */ jsx(Menu.Root, { "data-slot": "dropdown-menu", ...props });
1615
2449
  }
@@ -1930,47 +2764,406 @@ function FieldSeparator({
1930
2764
  "data-slot": "field-separator-content",
1931
2765
  children
1932
2766
  }
1933
- )
2767
+ )
2768
+ ]
2769
+ }
2770
+ );
2771
+ }
2772
+ function FieldError({
2773
+ className,
2774
+ children,
2775
+ errors,
2776
+ ...props
2777
+ }) {
2778
+ const content = useMemo(() => {
2779
+ if (children) {
2780
+ return children;
2781
+ }
2782
+ if (!errors?.length) {
2783
+ return null;
2784
+ }
2785
+ const uniqueErrors = [
2786
+ ...new Map(errors.map((error) => [error?.message, error])).values()
2787
+ ];
2788
+ if (uniqueErrors?.length == 1) {
2789
+ return uniqueErrors[0]?.message;
2790
+ }
2791
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
2792
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
2793
+ ) });
2794
+ }, [children, errors]);
2795
+ if (!content) {
2796
+ return null;
2797
+ }
2798
+ return /* @__PURE__ */ jsx(
2799
+ "div",
2800
+ {
2801
+ role: "alert",
2802
+ "data-slot": "field-error",
2803
+ className: cn("text-sm font-normal text-destructive", className),
2804
+ ...props,
2805
+ children: content
2806
+ }
2807
+ );
2808
+ }
2809
+ function CheckIndicator({ checked }) {
2810
+ return /* @__PURE__ */ jsx(
2811
+ "span",
2812
+ {
2813
+ "aria-hidden": true,
2814
+ className: cn(
2815
+ "flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors",
2816
+ checked ? "border-primary bg-primary text-primary-foreground" : "border-input"
2817
+ ),
2818
+ children: checked && /* @__PURE__ */ jsx(Check, { className: "size-3.5" })
2819
+ }
2820
+ );
2821
+ }
2822
+ function FilterBar({
2823
+ search,
2824
+ onSearchChange,
2825
+ searchPlaceholder = "Search by name\u2026",
2826
+ showSearch = true,
2827
+ facets = [],
2828
+ values = {},
2829
+ onValuesChange,
2830
+ resultCount,
2831
+ resultNoun = "result",
2832
+ maxVisibleFacets = 3,
2833
+ right,
2834
+ left,
2835
+ filterVariant = "inline",
2836
+ className
2837
+ }) {
2838
+ const visibleFacets = facets.slice(0, maxVisibleFacets);
2839
+ const overflowFacets = facets.slice(maxVisibleFacets);
2840
+ const toggle = (key, value) => {
2841
+ const cur = values[key] ?? [];
2842
+ const next = cur.includes(value) ? cur.filter((v) => v !== value) : [...cur, value];
2843
+ onValuesChange?.({ ...values, [key]: next });
2844
+ };
2845
+ const clearAll = () => onValuesChange?.({});
2846
+ const activeCount = Object.values(values).reduce((n, a) => n + a.length, 0);
2847
+ const searchBox = /* @__PURE__ */ jsxs("div", { className: "relative w-56", children: [
2848
+ /* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2849
+ /* @__PURE__ */ jsx(
2850
+ Input,
2851
+ {
2852
+ value: search,
2853
+ onChange: (e) => onSearchChange(e.target.value),
2854
+ placeholder: searchPlaceholder,
2855
+ "aria-label": searchPlaceholder,
2856
+ className: "rounded-full bg-background pl-8 pr-8"
2857
+ }
2858
+ ),
2859
+ search && /* @__PURE__ */ jsx(
2860
+ "button",
2861
+ {
2862
+ type: "button",
2863
+ onClick: () => onSearchChange(""),
2864
+ "aria-label": "Clear search",
2865
+ className: "absolute right-2 top-1/2 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground",
2866
+ children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
2867
+ }
2868
+ )
2869
+ ] });
2870
+ return /* @__PURE__ */ jsx("div", { className: cn("space-y-2", className), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
2871
+ left,
2872
+ filterVariant === "inline" && /* @__PURE__ */ jsxs(Fragment, { children: [
2873
+ showSearch && searchBox,
2874
+ visibleFacets.map((facet) => /* @__PURE__ */ jsx(
2875
+ FacetDropdown,
2876
+ {
2877
+ facet,
2878
+ selected: values[facet.key] ?? [],
2879
+ onToggle: (value) => toggle(facet.key, value),
2880
+ onClear: () => onValuesChange?.({ ...values, [facet.key]: [] })
2881
+ },
2882
+ facet.key
2883
+ )),
2884
+ overflowFacets.length > 0 && /* @__PURE__ */ jsx(
2885
+ MoreFilters,
2886
+ {
2887
+ facets: overflowFacets,
2888
+ values,
2889
+ onToggle: toggle
2890
+ }
2891
+ ),
2892
+ activeCount > 0 && /* @__PURE__ */ jsxs(
2893
+ "button",
2894
+ {
2895
+ type: "button",
2896
+ onClick: clearAll,
2897
+ "aria-label": "Clear all filters",
2898
+ className: "inline-flex h-7 items-center gap-1 px-2 text-xs text-muted-foreground hover:text-foreground",
2899
+ children: [
2900
+ /* @__PURE__ */ jsx(X, { className: "size-3.5" }),
2901
+ activeCount
2902
+ ]
2903
+ }
2904
+ )
2905
+ ] }),
2906
+ filterVariant === "funnel" && /* @__PURE__ */ jsxs(Fragment, { children: [
2907
+ showSearch && searchBox,
2908
+ /* @__PURE__ */ jsx(
2909
+ FunnelFilter,
2910
+ {
2911
+ facets,
2912
+ values,
2913
+ onToggle: toggle,
2914
+ onClearAll: clearAll
2915
+ }
2916
+ )
2917
+ ] }),
2918
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
2919
+ typeof resultCount === "number" && /* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap text-sm text-muted-foreground", children: [
2920
+ resultCount,
2921
+ " ",
2922
+ resultNoun,
2923
+ resultCount === 1 ? "" : "s"
2924
+ ] }),
2925
+ right
2926
+ ] })
2927
+ ] }) });
2928
+ }
2929
+ function FacetDropdown({
2930
+ facet,
2931
+ selected,
2932
+ onToggle,
2933
+ onClear
2934
+ }) {
2935
+ const count = selected.length;
2936
+ const firstLabel = facet.options.find((o) => o.value === selected[0])?.label ?? selected[0];
2937
+ const summary = count === 0 ? facet.label : `${facet.label}: ${firstLabel}${count > 1 ? ` (+${count - 1})` : ""}`;
2938
+ return /* @__PURE__ */ jsxs(Popover, { children: [
2939
+ /* @__PURE__ */ jsx(
2940
+ PopoverTrigger,
2941
+ {
2942
+ render: /* @__PURE__ */ jsxs(
2943
+ "button",
2944
+ {
2945
+ type: "button",
2946
+ className: cn(
2947
+ "inline-flex h-7 max-w-[14rem] items-center gap-1 rounded-full border bg-background px-2.5 text-xs transition-colors",
2948
+ count > 0 ? "border-primary/40 bg-primary/5 text-foreground" : "text-muted-foreground hover:text-foreground"
2949
+ ),
2950
+ children: [
2951
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: summary }),
2952
+ /* @__PURE__ */ jsx(ChevronDown, { className: "size-3 shrink-0 opacity-60" })
2953
+ ]
2954
+ }
2955
+ )
2956
+ }
2957
+ ),
2958
+ /* @__PURE__ */ jsx(
2959
+ PopoverContent,
2960
+ {
2961
+ className: "w-60 p-0",
2962
+ align: "start",
2963
+ "aria-label": `${facet.label} options`,
2964
+ children: /* @__PURE__ */ jsxs(Command, { children: [
2965
+ facet.options.length > 6 && /* @__PURE__ */ jsx(CommandInput, { placeholder: `Search ${facet.label.toLowerCase()}\u2026` }),
2966
+ /* @__PURE__ */ jsxs(CommandList, { children: [
2967
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "No options." }),
2968
+ /* @__PURE__ */ jsx(CommandGroup, { children: facet.options.map((opt) => {
2969
+ const checked = selected.includes(opt.value);
2970
+ return /* @__PURE__ */ jsxs(
2971
+ CommandItem,
2972
+ {
2973
+ value: opt.label,
2974
+ onSelect: () => onToggle(opt.value),
2975
+ className: "gap-2.5",
2976
+ children: [
2977
+ /* @__PURE__ */ jsx(CheckIndicator, { checked }),
2978
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: opt.label }),
2979
+ checked && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "selected" })
2980
+ ]
2981
+ },
2982
+ opt.value
2983
+ );
2984
+ }) })
2985
+ ] }),
2986
+ count > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-1", children: /* @__PURE__ */ jsx(
2987
+ Button,
2988
+ {
2989
+ variant: "ghost",
2990
+ onClick: onClear,
2991
+ className: "w-full justify-center text-primary",
2992
+ children: "Clear"
2993
+ }
2994
+ ) })
2995
+ ] })
2996
+ }
2997
+ )
2998
+ ] });
2999
+ }
3000
+ function FunnelFilter({
3001
+ facets,
3002
+ values,
3003
+ onToggle,
3004
+ onClearAll
3005
+ }) {
3006
+ const [open, setOpen] = useState(false);
3007
+ const [drill, setDrill] = useState(null);
3008
+ const activeCount = Object.values(values).reduce((n, a) => n + a.length, 0);
3009
+ const facet = facets.find((f) => f.key === drill);
3010
+ return /* @__PURE__ */ jsxs(
3011
+ Popover,
3012
+ {
3013
+ open,
3014
+ onOpenChange: (o) => {
3015
+ setOpen(o);
3016
+ if (!o) setDrill(null);
3017
+ },
3018
+ children: [
3019
+ /* @__PURE__ */ jsx(
3020
+ PopoverTrigger,
3021
+ {
3022
+ render: /* @__PURE__ */ jsxs(
3023
+ "button",
3024
+ {
3025
+ type: "button",
3026
+ className: cn(
3027
+ "inline-flex h-9 items-center gap-1.5 rounded-md border bg-background px-3 text-sm transition-colors",
3028
+ activeCount > 0 ? "text-foreground" : "text-muted-foreground hover:text-foreground"
3029
+ ),
3030
+ children: [
3031
+ /* @__PURE__ */ jsx(ListFilter, { className: "size-4" }),
3032
+ "Filter",
3033
+ activeCount > 0 && /* @__PURE__ */ jsx(Badge, { className: "ml-0.5 h-5 bg-primary px-1.5 text-primary-foreground", children: activeCount })
3034
+ ]
3035
+ }
3036
+ )
3037
+ }
3038
+ ),
3039
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-1", align: "end", "aria-label": "Filters", children: !facet ? /* @__PURE__ */ jsxs(Fragment, { children: [
3040
+ /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Add filter" }),
3041
+ facets.map((f) => {
3042
+ const count = values[f.key]?.length ?? 0;
3043
+ return /* @__PURE__ */ jsxs(
3044
+ "button",
3045
+ {
3046
+ type: "button",
3047
+ onClick: () => setDrill(f.key),
3048
+ className: "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted/60",
3049
+ children: [
3050
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: f.label }),
3051
+ count > 0 && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary", children: count }),
3052
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 opacity-50" })
3053
+ ]
3054
+ },
3055
+ f.key
3056
+ );
3057
+ }),
3058
+ activeCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
3059
+ /* @__PURE__ */ jsx("div", { className: "my-1 border-t" }),
3060
+ /* @__PURE__ */ jsx(
3061
+ "button",
3062
+ {
3063
+ type: "button",
3064
+ onClick: onClearAll,
3065
+ className: "w-full rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-muted/60",
3066
+ children: "Clear all filters"
3067
+ }
3068
+ )
3069
+ ] })
3070
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3071
+ /* @__PURE__ */ jsxs(
3072
+ "button",
3073
+ {
3074
+ type: "button",
3075
+ onClick: () => setDrill(null),
3076
+ className: "flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground hover:bg-muted/60",
3077
+ children: [
3078
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5" }),
3079
+ facet.label
3080
+ ]
3081
+ }
3082
+ ),
3083
+ /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto", children: facet.options.map((opt) => {
3084
+ const checked = (values[facet.key] ?? []).includes(opt.value);
3085
+ return /* @__PURE__ */ jsxs(
3086
+ "button",
3087
+ {
3088
+ type: "button",
3089
+ onClick: () => onToggle(facet.key, opt.value),
3090
+ className: "flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted/60",
3091
+ children: [
3092
+ /* @__PURE__ */ jsx(
3093
+ "span",
3094
+ {
3095
+ className: cn(
3096
+ "flex size-4 shrink-0 items-center justify-center rounded border",
3097
+ checked ? "border-primary bg-primary text-primary-foreground" : "border-input"
3098
+ ),
3099
+ children: checked && /* @__PURE__ */ jsx(Check, { className: "size-3" })
3100
+ }
3101
+ ),
3102
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: opt.label })
3103
+ ]
3104
+ },
3105
+ opt.value
3106
+ );
3107
+ }) })
3108
+ ] }) })
1934
3109
  ]
1935
3110
  }
1936
3111
  );
1937
3112
  }
1938
- function FieldError({
1939
- className,
1940
- children,
1941
- errors,
1942
- ...props
3113
+ function MoreFilters({
3114
+ facets,
3115
+ values,
3116
+ onToggle
1943
3117
  }) {
1944
- const content = useMemo(() => {
1945
- if (children) {
1946
- return children;
1947
- }
1948
- if (!errors?.length) {
1949
- return null;
1950
- }
1951
- const uniqueErrors = [
1952
- ...new Map(errors.map((error) => [error?.message, error])).values()
1953
- ];
1954
- if (uniqueErrors?.length == 1) {
1955
- return uniqueErrors[0]?.message;
1956
- }
1957
- return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
1958
- (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
1959
- ) });
1960
- }, [children, errors]);
1961
- if (!content) {
1962
- return null;
1963
- }
1964
- return /* @__PURE__ */ jsx(
1965
- "div",
1966
- {
1967
- role: "alert",
1968
- "data-slot": "field-error",
1969
- className: cn("text-sm font-normal text-destructive", className),
1970
- ...props,
1971
- children: content
1972
- }
3118
+ const activeCount = facets.reduce(
3119
+ (n, f) => n + (values[f.key]?.length ?? 0),
3120
+ 0
1973
3121
  );
3122
+ return /* @__PURE__ */ jsxs(Popover, { children: [
3123
+ /* @__PURE__ */ jsx(
3124
+ PopoverTrigger,
3125
+ {
3126
+ render: /* @__PURE__ */ jsxs(
3127
+ "button",
3128
+ {
3129
+ type: "button",
3130
+ className: cn(
3131
+ "inline-flex h-7 items-center gap-1 rounded-full border bg-background px-2.5 text-xs transition-colors",
3132
+ activeCount > 0 ? "border-primary/40 bg-primary/5 text-foreground" : "text-muted-foreground hover:text-foreground"
3133
+ ),
3134
+ children: [
3135
+ /* @__PURE__ */ jsx(ListFilter, { className: "size-3.5" }),
3136
+ "More",
3137
+ activeCount > 0 && /* @__PURE__ */ jsx(Badge, { className: "ml-0.5 h-4 bg-primary px-1.5 text-primary-foreground", children: activeCount })
3138
+ ]
3139
+ }
3140
+ )
3141
+ }
3142
+ ),
3143
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", "aria-label": "Filters", children: /* @__PURE__ */ jsxs(Command, { children: [
3144
+ facets.reduce((n, f) => n + f.options.length, 0) > 8 && /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search filters\u2026" }),
3145
+ /* @__PURE__ */ jsxs(CommandList, { className: "max-h-[60vh]", children: [
3146
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "No filters." }),
3147
+ facets.map((facet) => /* @__PURE__ */ jsx(CommandGroup, { heading: facet.label, children: facet.options.map((opt) => {
3148
+ const checked = (values[facet.key] ?? []).includes(opt.value);
3149
+ return /* @__PURE__ */ jsxs(
3150
+ CommandItem,
3151
+ {
3152
+ value: `${facet.label} ${opt.label}`,
3153
+ onSelect: () => onToggle(facet.key, opt.value),
3154
+ className: "gap-2.5",
3155
+ children: [
3156
+ /* @__PURE__ */ jsx(CheckIndicator, { checked }),
3157
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: opt.label }),
3158
+ checked && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "selected" })
3159
+ ]
3160
+ },
3161
+ opt.value
3162
+ );
3163
+ }) }, facet.key))
3164
+ ] })
3165
+ ] }) })
3166
+ ] });
1974
3167
  }
1975
3168
  function PackagePicker({
1976
3169
  packages,
@@ -2938,75 +4131,6 @@ function PersonDropdown({
2938
4131
  }
2939
4132
  );
2940
4133
  }
2941
- function Popover({ ...props }) {
2942
- return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
2943
- }
2944
- function PopoverTrigger({ ...props }) {
2945
- return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
2946
- }
2947
- function PopoverContent({
2948
- className,
2949
- align = "center",
2950
- alignOffset = 0,
2951
- side = "bottom",
2952
- sideOffset = 4,
2953
- ...props
2954
- }) {
2955
- return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
2956
- Popover$1.Positioner,
2957
- {
2958
- align,
2959
- alignOffset,
2960
- side,
2961
- sideOffset,
2962
- className: "isolate z-50",
2963
- children: /* @__PURE__ */ jsx(
2964
- Popover$1.Popup,
2965
- {
2966
- "data-slot": "popover-content",
2967
- className: cn(
2968
- "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2969
- className
2970
- ),
2971
- ...props
2972
- }
2973
- )
2974
- }
2975
- ) });
2976
- }
2977
- function PopoverHeader({ className, ...props }) {
2978
- return /* @__PURE__ */ jsx(
2979
- "div",
2980
- {
2981
- "data-slot": "popover-header",
2982
- className: cn("flex flex-col gap-0.5 text-sm", className),
2983
- ...props
2984
- }
2985
- );
2986
- }
2987
- function PopoverTitle({ className, ...props }) {
2988
- return /* @__PURE__ */ jsx(
2989
- Popover$1.Title,
2990
- {
2991
- "data-slot": "popover-title",
2992
- className: cn("font-medium", className),
2993
- ...props
2994
- }
2995
- );
2996
- }
2997
- function PopoverDescription({
2998
- className,
2999
- ...props
3000
- }) {
3001
- return /* @__PURE__ */ jsx(
3002
- Popover$1.Description,
3003
- {
3004
- "data-slot": "popover-description",
3005
- className: cn("text-muted-foreground", className),
3006
- ...props
3007
- }
3008
- );
3009
- }
3010
4134
  function ScrollArea({
3011
4135
  className,
3012
4136
  children,
@@ -4190,7 +5314,7 @@ function SheetContent({
4190
5314
  "data-slot": "sheet-content",
4191
5315
  "data-side": side,
4192
5316
  className: cn(
4193
- "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
5317
+ "fixed z-50 flex flex-col gap-4 border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
4194
5318
  className
4195
5319
  ),
4196
5320
  ...props,
@@ -5233,108 +6357,6 @@ function Switch({
5233
6357
  }
5234
6358
  );
5235
6359
  }
5236
- function Table({ className, ...props }) {
5237
- return /* @__PURE__ */ jsx(
5238
- "div",
5239
- {
5240
- "data-slot": "table-container",
5241
- className: "relative w-full overflow-x-auto",
5242
- children: /* @__PURE__ */ jsx(
5243
- "table",
5244
- {
5245
- "data-slot": "table",
5246
- className: cn("w-full caption-bottom text-sm", className),
5247
- ...props
5248
- }
5249
- )
5250
- }
5251
- );
5252
- }
5253
- function TableHeader({ className, ...props }) {
5254
- return /* @__PURE__ */ jsx(
5255
- "thead",
5256
- {
5257
- "data-slot": "table-header",
5258
- className: cn("[&_tr]:border-b", className),
5259
- ...props
5260
- }
5261
- );
5262
- }
5263
- function TableBody({ className, ...props }) {
5264
- return /* @__PURE__ */ jsx(
5265
- "tbody",
5266
- {
5267
- "data-slot": "table-body",
5268
- className: cn("[&_tr:last-child]:border-0", className),
5269
- ...props
5270
- }
5271
- );
5272
- }
5273
- function TableFooter({ className, ...props }) {
5274
- return /* @__PURE__ */ jsx(
5275
- "tfoot",
5276
- {
5277
- "data-slot": "table-footer",
5278
- className: cn(
5279
- "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
5280
- className
5281
- ),
5282
- ...props
5283
- }
5284
- );
5285
- }
5286
- function TableRow({ className, ...props }) {
5287
- return /* @__PURE__ */ jsx(
5288
- "tr",
5289
- {
5290
- "data-slot": "table-row",
5291
- className: cn(
5292
- "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
5293
- className
5294
- ),
5295
- ...props
5296
- }
5297
- );
5298
- }
5299
- function TableHead({ className, ...props }) {
5300
- return /* @__PURE__ */ jsx(
5301
- "th",
5302
- {
5303
- "data-slot": "table-head",
5304
- className: cn(
5305
- "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
5306
- className
5307
- ),
5308
- ...props
5309
- }
5310
- );
5311
- }
5312
- function TableCell({ className, ...props }) {
5313
- return /* @__PURE__ */ jsx(
5314
- "td",
5315
- {
5316
- "data-slot": "table-cell",
5317
- className: cn(
5318
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
5319
- className
5320
- ),
5321
- ...props
5322
- }
5323
- );
5324
- }
5325
- function TableCaption({
5326
- className,
5327
- ...props
5328
- }) {
5329
- return /* @__PURE__ */ jsx(
5330
- "caption",
5331
- {
5332
- "data-slot": "table-caption",
5333
- className: cn("mt-4 text-sm text-muted-foreground", className),
5334
- ...props
5335
- }
5336
- );
5337
- }
5338
6360
  function Tabs({
5339
6361
  className,
5340
6362
  orientation = "horizontal",
@@ -5409,4 +6431,4 @@ function TabsContent({ className, ...props }) {
5409
6431
  );
5410
6432
  }
5411
6433
 
5412
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AddonCard, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CamperForm, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, NextStepPeek, PackagePicker, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SessionCard, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };
6434
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, AddonCard, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CamperForm, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnCustomizer, ColumnPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, ExpandDesc, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterBar, InlineAddonPicker, InlineSessionPicker, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, NextStepPeek, PackagePicker, PersonList, PersonSelect, PersonTabs, PhoneInput, PhotoUpload, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, STATUS_LABEL, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SessionCard, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusPill, StepBadge, StepCard, StepNotices, Switch, TSHIRT_SIZES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, __internal, badgeVariants, buttonVariants, calcAge, cn, computeSessionDeposit, computeSessionPrice, effectivePrice, eligibilityReason, fakeSpotsLeft, formatDOB, makeCamperFormSchema, mandatoryTotal, parseDOB, statusPillVariants, tabsListVariants, useIsMobile, useLocale, useSidebar };