@bergetai/ui 0.13.0 → 0.13.2
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.cjs +901 -656
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -31
- package/dist/index.d.ts +67 -31
- package/dist/index.js +866 -625
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -597,31 +597,25 @@ function CardFooter({ className, ...props }) {
|
|
|
597
597
|
|
|
598
598
|
// src/components/card/Card.tsx
|
|
599
599
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
600
|
-
var cardVariants = cva3("
|
|
600
|
+
var cardVariants = cva3("ring-0", {
|
|
601
601
|
variants: {
|
|
602
602
|
variant: {
|
|
603
603
|
outlined: "bg-transparent border border-berget-border-subtle",
|
|
604
604
|
filled: "bg-berget-card-filled-bg border border-berget-border-subtle"
|
|
605
|
-
},
|
|
606
|
-
padding: {
|
|
607
|
-
none: "p-0",
|
|
608
|
-
sm: "p-3 sm:p-4",
|
|
609
|
-
md: "p-4 sm:p-6",
|
|
610
|
-
lg: "p-6 sm:p-8"
|
|
611
605
|
}
|
|
612
606
|
},
|
|
613
607
|
defaultVariants: {
|
|
614
|
-
variant: "outlined"
|
|
615
|
-
padding: "md"
|
|
608
|
+
variant: "outlined"
|
|
616
609
|
}
|
|
617
610
|
});
|
|
618
611
|
var Card2 = React5.forwardRef(
|
|
619
|
-
({ className, variant,
|
|
612
|
+
({ className, variant, size, children, ...props }, ref) => {
|
|
620
613
|
return /* @__PURE__ */ jsx7(
|
|
621
614
|
Card,
|
|
622
615
|
{
|
|
623
616
|
ref,
|
|
624
|
-
|
|
617
|
+
size,
|
|
618
|
+
className: cn(cardVariants({ variant }), className),
|
|
625
619
|
...props,
|
|
626
620
|
children
|
|
627
621
|
}
|
|
@@ -936,7 +930,6 @@ var ModelCard = React9.forwardRef(
|
|
|
936
930
|
Card2,
|
|
937
931
|
{
|
|
938
932
|
variant: "filled",
|
|
939
|
-
padding: "none",
|
|
940
933
|
className: "relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6",
|
|
941
934
|
children: [
|
|
942
935
|
lifecycle && /* @__PURE__ */ jsx11("div", { className: "absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm", children: /* @__PURE__ */ jsx11(
|
|
@@ -1264,168 +1257,460 @@ AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
|
1264
1257
|
|
|
1265
1258
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
1266
1259
|
import * as React13 from "react";
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
import {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
)
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
/* @__PURE__ */ jsx16(ChevronRight, { className: "ml-auto" })
|
|
1293
|
-
] })
|
|
1294
|
-
}
|
|
1295
|
-
));
|
|
1296
|
-
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
1297
|
-
var DropdownMenuSubContent = React13.forwardRef(
|
|
1298
|
-
({ className, side = "right", align = "start", alignOffset = -3, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsx16(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx16(
|
|
1299
|
-
DropdownMenuPrimitive.Positioner,
|
|
1260
|
+
|
|
1261
|
+
// src/primitives/dropdown-menu.tsx
|
|
1262
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
1263
|
+
import { cn as cn5 } from "cn";
|
|
1264
|
+
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
1265
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1266
|
+
function DropdownMenu({ ...props }) {
|
|
1267
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1268
|
+
}
|
|
1269
|
+
function DropdownMenuPortal({ ...props }) {
|
|
1270
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1271
|
+
}
|
|
1272
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
1273
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1274
|
+
}
|
|
1275
|
+
function DropdownMenuContent({
|
|
1276
|
+
align = "start",
|
|
1277
|
+
alignOffset = 0,
|
|
1278
|
+
side = "bottom",
|
|
1279
|
+
sideOffset = 4,
|
|
1280
|
+
className,
|
|
1281
|
+
...props
|
|
1282
|
+
}) {
|
|
1283
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx16(
|
|
1284
|
+
MenuPrimitive.Positioner,
|
|
1300
1285
|
{
|
|
1301
|
-
|
|
1286
|
+
className: "isolate z-50 outline-none",
|
|
1302
1287
|
align,
|
|
1303
1288
|
alignOffset,
|
|
1289
|
+
side,
|
|
1304
1290
|
sideOffset,
|
|
1305
|
-
className: "isolate z-50 outline-none",
|
|
1306
1291
|
children: /* @__PURE__ */ jsx16(
|
|
1307
|
-
|
|
1292
|
+
MenuPrimitive.Popup,
|
|
1308
1293
|
{
|
|
1309
|
-
|
|
1310
|
-
className:
|
|
1311
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:slide-in-from-top-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 origin-[--transform-origin]",
|
|
1312
|
-
className
|
|
1313
|
-
),
|
|
1294
|
+
"data-slot": "dropdown-menu-content",
|
|
1295
|
+
className: cn5("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1314
1296
|
...props
|
|
1315
1297
|
}
|
|
1316
1298
|
)
|
|
1317
1299
|
}
|
|
1318
|
-
) })
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1300
|
+
) });
|
|
1301
|
+
}
|
|
1302
|
+
function DropdownMenuGroup({ ...props }) {
|
|
1303
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1304
|
+
}
|
|
1305
|
+
function DropdownMenuLabel({
|
|
1306
|
+
className,
|
|
1307
|
+
inset,
|
|
1308
|
+
...props
|
|
1309
|
+
}) {
|
|
1310
|
+
return /* @__PURE__ */ jsx16(
|
|
1311
|
+
MenuPrimitive.GroupLabel,
|
|
1312
|
+
{
|
|
1313
|
+
"data-slot": "dropdown-menu-label",
|
|
1314
|
+
"data-inset": inset,
|
|
1315
|
+
className: cn5(
|
|
1316
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
1317
|
+
className
|
|
1318
|
+
),
|
|
1319
|
+
...props
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
function DropdownMenuItem({
|
|
1324
|
+
className,
|
|
1325
|
+
inset,
|
|
1326
|
+
variant = "default",
|
|
1327
|
+
...props
|
|
1328
|
+
}) {
|
|
1329
|
+
return /* @__PURE__ */ jsx16(
|
|
1330
|
+
MenuPrimitive.Item,
|
|
1331
|
+
{
|
|
1332
|
+
"data-slot": "dropdown-menu-item",
|
|
1333
|
+
"data-inset": inset,
|
|
1334
|
+
"data-variant": variant,
|
|
1335
|
+
className: cn5(
|
|
1336
|
+
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
1337
|
+
className
|
|
1338
|
+
),
|
|
1339
|
+
...props
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
function DropdownMenuSub({ ...props }) {
|
|
1344
|
+
return /* @__PURE__ */ jsx16(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1345
|
+
}
|
|
1346
|
+
function DropdownMenuSubTrigger({
|
|
1347
|
+
className,
|
|
1348
|
+
inset,
|
|
1349
|
+
children,
|
|
1350
|
+
...props
|
|
1351
|
+
}) {
|
|
1352
|
+
return /* @__PURE__ */ jsxs8(
|
|
1353
|
+
MenuPrimitive.SubmenuTrigger,
|
|
1354
|
+
{
|
|
1355
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1356
|
+
"data-inset": inset,
|
|
1357
|
+
className: cn5(
|
|
1358
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1359
|
+
className
|
|
1360
|
+
),
|
|
1361
|
+
...props,
|
|
1362
|
+
children: [
|
|
1363
|
+
children,
|
|
1364
|
+
/* @__PURE__ */ jsx16(ChevronRightIcon, { className: "ml-auto" })
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
function DropdownMenuSubContent({
|
|
1370
|
+
align = "start",
|
|
1371
|
+
alignOffset = -3,
|
|
1372
|
+
side = "right",
|
|
1373
|
+
sideOffset = 0,
|
|
1374
|
+
className,
|
|
1375
|
+
...props
|
|
1376
|
+
}) {
|
|
1377
|
+
return /* @__PURE__ */ jsx16(
|
|
1378
|
+
DropdownMenuContent,
|
|
1379
|
+
{
|
|
1380
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1381
|
+
className: cn5("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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", className),
|
|
1382
|
+
align,
|
|
1383
|
+
alignOffset,
|
|
1384
|
+
side,
|
|
1385
|
+
sideOffset,
|
|
1386
|
+
...props
|
|
1387
|
+
}
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
function DropdownMenuCheckboxItem({
|
|
1391
|
+
className,
|
|
1392
|
+
children,
|
|
1393
|
+
checked,
|
|
1394
|
+
inset,
|
|
1395
|
+
...props
|
|
1396
|
+
}) {
|
|
1397
|
+
return /* @__PURE__ */ jsxs8(
|
|
1398
|
+
MenuPrimitive.CheckboxItem,
|
|
1399
|
+
{
|
|
1400
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1401
|
+
"data-inset": inset,
|
|
1402
|
+
className: cn5(
|
|
1403
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1404
|
+
className
|
|
1405
|
+
),
|
|
1406
|
+
checked,
|
|
1407
|
+
...props,
|
|
1408
|
+
children: [
|
|
1409
|
+
/* @__PURE__ */ jsx16(
|
|
1410
|
+
"span",
|
|
1411
|
+
{
|
|
1412
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1413
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
1414
|
+
children: /* @__PURE__ */ jsx16(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx16(
|
|
1415
|
+
CheckIcon,
|
|
1416
|
+
{}
|
|
1417
|
+
) })
|
|
1418
|
+
}
|
|
1336
1419
|
),
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
inset && "pl-8",
|
|
1402
|
-
className
|
|
1403
|
-
),
|
|
1404
|
-
render: asChildRender(asChild, children),
|
|
1405
|
-
...props,
|
|
1406
|
-
children: asChild ? void 0 : children
|
|
1407
|
-
}
|
|
1408
|
-
));
|
|
1409
|
-
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
1410
|
-
var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1411
|
-
DropdownMenuPrimitive.Separator,
|
|
1412
|
-
{
|
|
1413
|
-
ref,
|
|
1414
|
-
className: cn("-mx-1 my-1 h-px bg-berget-separator", className),
|
|
1415
|
-
...props
|
|
1416
|
-
}
|
|
1417
|
-
));
|
|
1418
|
-
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
1419
|
-
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
1420
|
+
children
|
|
1421
|
+
]
|
|
1422
|
+
}
|
|
1423
|
+
);
|
|
1424
|
+
}
|
|
1425
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
1426
|
+
return /* @__PURE__ */ jsx16(
|
|
1427
|
+
MenuPrimitive.RadioGroup,
|
|
1428
|
+
{
|
|
1429
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1430
|
+
...props
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
function DropdownMenuRadioItem({
|
|
1435
|
+
className,
|
|
1436
|
+
children,
|
|
1437
|
+
inset,
|
|
1438
|
+
...props
|
|
1439
|
+
}) {
|
|
1440
|
+
return /* @__PURE__ */ jsxs8(
|
|
1441
|
+
MenuPrimitive.RadioItem,
|
|
1442
|
+
{
|
|
1443
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1444
|
+
"data-inset": inset,
|
|
1445
|
+
className: cn5(
|
|
1446
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1447
|
+
className
|
|
1448
|
+
),
|
|
1449
|
+
...props,
|
|
1450
|
+
children: [
|
|
1451
|
+
/* @__PURE__ */ jsx16(
|
|
1452
|
+
"span",
|
|
1453
|
+
{
|
|
1454
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1455
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
1456
|
+
children: /* @__PURE__ */ jsx16(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx16(
|
|
1457
|
+
CheckIcon,
|
|
1458
|
+
{}
|
|
1459
|
+
) })
|
|
1460
|
+
}
|
|
1461
|
+
),
|
|
1462
|
+
children
|
|
1463
|
+
]
|
|
1464
|
+
}
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
function DropdownMenuSeparator({
|
|
1468
|
+
className,
|
|
1469
|
+
...props
|
|
1470
|
+
}) {
|
|
1471
|
+
return /* @__PURE__ */ jsx16(
|
|
1472
|
+
MenuPrimitive.Separator,
|
|
1473
|
+
{
|
|
1474
|
+
"data-slot": "dropdown-menu-separator",
|
|
1475
|
+
className: cn5("-mx-1 my-1 h-px bg-border", className),
|
|
1476
|
+
...props
|
|
1477
|
+
}
|
|
1478
|
+
);
|
|
1479
|
+
}
|
|
1480
|
+
function DropdownMenuShortcut({
|
|
1481
|
+
className,
|
|
1482
|
+
...props
|
|
1483
|
+
}) {
|
|
1420
1484
|
return /* @__PURE__ */ jsx16(
|
|
1421
1485
|
"span",
|
|
1422
1486
|
{
|
|
1423
|
-
|
|
1487
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1488
|
+
className: cn5(
|
|
1489
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
1490
|
+
className
|
|
1491
|
+
),
|
|
1492
|
+
...props
|
|
1493
|
+
}
|
|
1494
|
+
);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
1498
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1499
|
+
var DropdownMenuTrigger2 = React13.forwardRef(
|
|
1500
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx17(DropdownMenuTrigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1501
|
+
);
|
|
1502
|
+
DropdownMenuTrigger2.displayName = "DropdownMenuTrigger";
|
|
1503
|
+
var DropdownMenuSubTrigger2 = React13.forwardRef(
|
|
1504
|
+
({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1505
|
+
DropdownMenuSubTrigger,
|
|
1506
|
+
{
|
|
1507
|
+
ref,
|
|
1508
|
+
className: cn(
|
|
1509
|
+
// Berget density & radius; focus/accent styling comes from the primitive.
|
|
1510
|
+
"gap-2 rounded-berget-xs px-2 py-1.5",
|
|
1511
|
+
inset && "pl-8",
|
|
1512
|
+
className
|
|
1513
|
+
),
|
|
1514
|
+
render: asChildRender(asChild, children),
|
|
1515
|
+
...props,
|
|
1516
|
+
children: asChild ? void 0 : children
|
|
1517
|
+
}
|
|
1518
|
+
)
|
|
1519
|
+
);
|
|
1520
|
+
DropdownMenuSubTrigger2.displayName = "DropdownMenuSubTrigger";
|
|
1521
|
+
var DropdownMenuSubContent2 = React13.forwardRef(
|
|
1522
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1523
|
+
DropdownMenuSubContent,
|
|
1524
|
+
{
|
|
1525
|
+
ref,
|
|
1526
|
+
className: cn(
|
|
1527
|
+
"rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg",
|
|
1528
|
+
className
|
|
1529
|
+
),
|
|
1530
|
+
...props
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1533
|
+
);
|
|
1534
|
+
DropdownMenuSubContent2.displayName = "DropdownMenuSubContent";
|
|
1535
|
+
var DropdownMenuContent2 = React13.forwardRef(
|
|
1536
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1537
|
+
DropdownMenuContent,
|
|
1538
|
+
{
|
|
1539
|
+
ref,
|
|
1540
|
+
className: cn(
|
|
1541
|
+
"rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-md",
|
|
1542
|
+
className
|
|
1543
|
+
),
|
|
1544
|
+
...props
|
|
1545
|
+
}
|
|
1546
|
+
)
|
|
1547
|
+
);
|
|
1548
|
+
DropdownMenuContent2.displayName = "DropdownMenuContent";
|
|
1549
|
+
var DropdownMenuItem2 = React13.forwardRef(
|
|
1550
|
+
({ className, inset, asChild, children, textValue, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1551
|
+
DropdownMenuItem,
|
|
1552
|
+
{
|
|
1553
|
+
ref,
|
|
1554
|
+
label: textValue,
|
|
1555
|
+
className: cn(
|
|
1556
|
+
// Berget density & radius; focus accent and destructive variant from the primitive.
|
|
1557
|
+
"gap-2 rounded-berget-xs px-2 py-1.5",
|
|
1558
|
+
inset && "pl-8",
|
|
1559
|
+
className
|
|
1560
|
+
),
|
|
1561
|
+
render: asChildRender(asChild, children),
|
|
1562
|
+
...props,
|
|
1563
|
+
children: asChild ? void 0 : children
|
|
1564
|
+
}
|
|
1565
|
+
)
|
|
1566
|
+
);
|
|
1567
|
+
DropdownMenuItem2.displayName = "DropdownMenuItem";
|
|
1568
|
+
var DropdownMenuCheckboxItem2 = React13.forwardRef(
|
|
1569
|
+
({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1570
|
+
DropdownMenuCheckboxItem,
|
|
1571
|
+
{
|
|
1572
|
+
ref,
|
|
1573
|
+
label: textValue,
|
|
1574
|
+
className: cn("rounded-berget-xs", className),
|
|
1575
|
+
render: asChildRender(asChild, children),
|
|
1576
|
+
...props,
|
|
1577
|
+
children: asChild ? void 0 : children
|
|
1578
|
+
}
|
|
1579
|
+
)
|
|
1580
|
+
);
|
|
1581
|
+
DropdownMenuCheckboxItem2.displayName = "DropdownMenuCheckboxItem";
|
|
1582
|
+
var DropdownMenuRadioItem2 = React13.forwardRef(
|
|
1583
|
+
({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1584
|
+
DropdownMenuRadioItem,
|
|
1585
|
+
{
|
|
1586
|
+
ref,
|
|
1587
|
+
label: textValue,
|
|
1588
|
+
className: cn("rounded-berget-xs", className),
|
|
1589
|
+
render: asChildRender(asChild, children),
|
|
1590
|
+
...props,
|
|
1591
|
+
children: asChild ? void 0 : children
|
|
1592
|
+
}
|
|
1593
|
+
)
|
|
1594
|
+
);
|
|
1595
|
+
DropdownMenuRadioItem2.displayName = "DropdownMenuRadioItem";
|
|
1596
|
+
var DropdownMenuLabel2 = React13.forwardRef(
|
|
1597
|
+
({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1598
|
+
DropdownMenuLabel,
|
|
1599
|
+
{
|
|
1600
|
+
ref,
|
|
1601
|
+
className: cn(
|
|
1602
|
+
"px-2 py-1.5 text-sm font-semibold text-berget-foreground",
|
|
1603
|
+
inset && "pl-8",
|
|
1604
|
+
className
|
|
1605
|
+
),
|
|
1606
|
+
render: asChildRender(asChild, children),
|
|
1607
|
+
...props,
|
|
1608
|
+
children: asChild ? void 0 : children
|
|
1609
|
+
}
|
|
1610
|
+
)
|
|
1611
|
+
);
|
|
1612
|
+
DropdownMenuLabel2.displayName = "DropdownMenuLabel";
|
|
1613
|
+
var DropdownMenuSeparator2 = React13.forwardRef(
|
|
1614
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1615
|
+
DropdownMenuSeparator,
|
|
1616
|
+
{
|
|
1617
|
+
ref,
|
|
1618
|
+
className: cn("bg-berget-separator", className),
|
|
1619
|
+
...props
|
|
1620
|
+
}
|
|
1621
|
+
)
|
|
1622
|
+
);
|
|
1623
|
+
DropdownMenuSeparator2.displayName = "DropdownMenuSeparator";
|
|
1624
|
+
var DropdownMenuShortcut2 = ({ className, ...props }) => {
|
|
1625
|
+
return /* @__PURE__ */ jsx17(
|
|
1626
|
+
DropdownMenuShortcut,
|
|
1627
|
+
{
|
|
1628
|
+
className: cn("text-berget-muted-foreground", className),
|
|
1424
1629
|
...props
|
|
1425
1630
|
}
|
|
1426
1631
|
);
|
|
1427
1632
|
};
|
|
1428
|
-
|
|
1633
|
+
DropdownMenuShortcut2.displayName = "DropdownMenuShortcut";
|
|
1634
|
+
|
|
1635
|
+
// src/components/tooltip/Tooltip.tsx
|
|
1636
|
+
import * as React14 from "react";
|
|
1637
|
+
|
|
1638
|
+
// src/primitives/tooltip.tsx
|
|
1639
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
1640
|
+
import { cn as cn6 } from "cn";
|
|
1641
|
+
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1642
|
+
function TooltipProvider({
|
|
1643
|
+
delay = 0,
|
|
1644
|
+
...props
|
|
1645
|
+
}) {
|
|
1646
|
+
return /* @__PURE__ */ jsx18(
|
|
1647
|
+
TooltipPrimitive.Provider,
|
|
1648
|
+
{
|
|
1649
|
+
"data-slot": "tooltip-provider",
|
|
1650
|
+
delay,
|
|
1651
|
+
...props
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
function Tooltip({ ...props }) {
|
|
1656
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
1657
|
+
}
|
|
1658
|
+
function TooltipTrigger({ ...props }) {
|
|
1659
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1660
|
+
}
|
|
1661
|
+
function TooltipContent({
|
|
1662
|
+
className,
|
|
1663
|
+
side = "top",
|
|
1664
|
+
sideOffset = 4,
|
|
1665
|
+
align = "center",
|
|
1666
|
+
alignOffset = 0,
|
|
1667
|
+
children,
|
|
1668
|
+
...props
|
|
1669
|
+
}) {
|
|
1670
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx18(
|
|
1671
|
+
TooltipPrimitive.Positioner,
|
|
1672
|
+
{
|
|
1673
|
+
align,
|
|
1674
|
+
alignOffset,
|
|
1675
|
+
side,
|
|
1676
|
+
sideOffset,
|
|
1677
|
+
className: "isolate z-50",
|
|
1678
|
+
children: /* @__PURE__ */ jsxs9(
|
|
1679
|
+
TooltipPrimitive.Popup,
|
|
1680
|
+
{
|
|
1681
|
+
"data-slot": "tooltip-content",
|
|
1682
|
+
className: cn6(
|
|
1683
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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",
|
|
1684
|
+
className
|
|
1685
|
+
),
|
|
1686
|
+
...props,
|
|
1687
|
+
children: [
|
|
1688
|
+
children,
|
|
1689
|
+
/* @__PURE__ */ jsx18(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
1690
|
+
]
|
|
1691
|
+
}
|
|
1692
|
+
)
|
|
1693
|
+
}
|
|
1694
|
+
) });
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
// src/components/tooltip/Tooltip.tsx
|
|
1698
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1699
|
+
var TooltipTrigger2 = React14.forwardRef(
|
|
1700
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx19(TooltipTrigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1701
|
+
);
|
|
1702
|
+
TooltipTrigger2.displayName = "TooltipTrigger";
|
|
1703
|
+
var TooltipContent2 = React14.forwardRef(
|
|
1704
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1705
|
+
TooltipContent,
|
|
1706
|
+
{
|
|
1707
|
+
ref,
|
|
1708
|
+
className: cn("rounded-berget-xs shadow-berget-md", className),
|
|
1709
|
+
...props
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
);
|
|
1713
|
+
TooltipContent2.displayName = "TooltipContent";
|
|
1429
1714
|
|
|
1430
1715
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
1431
1716
|
import { NavigationMenu as NavigationMenuPrimitive2 } from "@base-ui/react/navigation-menu";
|
|
@@ -1435,18 +1720,18 @@ import { ChevronDown } from "lucide-react";
|
|
|
1435
1720
|
// src/primitives/navigation-menu.tsx
|
|
1436
1721
|
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
1437
1722
|
import { cva as cva7 } from "class-variance-authority";
|
|
1438
|
-
import { cn as
|
|
1723
|
+
import { cn as cn7 } from "cn";
|
|
1439
1724
|
import { ChevronDownIcon } from "lucide-react";
|
|
1440
|
-
import { jsx as
|
|
1725
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1441
1726
|
function NavigationMenuList({
|
|
1442
1727
|
className,
|
|
1443
1728
|
...props
|
|
1444
1729
|
}) {
|
|
1445
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ jsx20(
|
|
1446
1731
|
NavigationMenuPrimitive.List,
|
|
1447
1732
|
{
|
|
1448
1733
|
"data-slot": "navigation-menu-list",
|
|
1449
|
-
className:
|
|
1734
|
+
className: cn7(
|
|
1450
1735
|
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
1451
1736
|
className
|
|
1452
1737
|
),
|
|
@@ -1458,11 +1743,11 @@ function NavigationMenuItem({
|
|
|
1458
1743
|
className,
|
|
1459
1744
|
...props
|
|
1460
1745
|
}) {
|
|
1461
|
-
return /* @__PURE__ */
|
|
1746
|
+
return /* @__PURE__ */ jsx20(
|
|
1462
1747
|
NavigationMenuPrimitive.Item,
|
|
1463
1748
|
{
|
|
1464
1749
|
"data-slot": "navigation-menu-item",
|
|
1465
|
-
className:
|
|
1750
|
+
className: cn7("relative", className),
|
|
1466
1751
|
...props
|
|
1467
1752
|
}
|
|
1468
1753
|
);
|
|
@@ -1474,11 +1759,11 @@ function NavigationMenuContent({
|
|
|
1474
1759
|
className,
|
|
1475
1760
|
...props
|
|
1476
1761
|
}) {
|
|
1477
|
-
return /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ jsx20(
|
|
1478
1763
|
NavigationMenuPrimitive.Content,
|
|
1479
1764
|
{
|
|
1480
1765
|
"data-slot": "navigation-menu-content",
|
|
1481
|
-
className:
|
|
1766
|
+
className: cn7(
|
|
1482
1767
|
"data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
1483
1768
|
className
|
|
1484
1769
|
),
|
|
@@ -1490,29 +1775,29 @@ function NavigationMenuIndicator({
|
|
|
1490
1775
|
className,
|
|
1491
1776
|
...props
|
|
1492
1777
|
}) {
|
|
1493
|
-
return /* @__PURE__ */
|
|
1778
|
+
return /* @__PURE__ */ jsx20(
|
|
1494
1779
|
NavigationMenuPrimitive.Icon,
|
|
1495
1780
|
{
|
|
1496
1781
|
"data-slot": "navigation-menu-indicator",
|
|
1497
|
-
className:
|
|
1782
|
+
className: cn7(
|
|
1498
1783
|
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
1499
1784
|
className
|
|
1500
1785
|
),
|
|
1501
1786
|
...props,
|
|
1502
|
-
children: /* @__PURE__ */
|
|
1787
|
+
children: /* @__PURE__ */ jsx20("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
1503
1788
|
}
|
|
1504
1789
|
);
|
|
1505
1790
|
}
|
|
1506
1791
|
|
|
1507
1792
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
1508
|
-
import { jsx as
|
|
1793
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1509
1794
|
function NavigationMenu({
|
|
1510
1795
|
align = "start",
|
|
1511
1796
|
className,
|
|
1512
1797
|
children,
|
|
1513
1798
|
...props
|
|
1514
1799
|
}) {
|
|
1515
|
-
return /* @__PURE__ */
|
|
1800
|
+
return /* @__PURE__ */ jsxs11(
|
|
1516
1801
|
NavigationMenuPrimitive2.Root,
|
|
1517
1802
|
{
|
|
1518
1803
|
"data-slot": "navigation-menu",
|
|
@@ -1523,7 +1808,7 @@ function NavigationMenu({
|
|
|
1523
1808
|
...props,
|
|
1524
1809
|
children: [
|
|
1525
1810
|
children,
|
|
1526
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ jsx21(NavigationMenuPositioner, { align })
|
|
1527
1812
|
]
|
|
1528
1813
|
}
|
|
1529
1814
|
);
|
|
@@ -1536,7 +1821,7 @@ function NavigationMenuTrigger({
|
|
|
1536
1821
|
children,
|
|
1537
1822
|
...props
|
|
1538
1823
|
}) {
|
|
1539
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ jsxs11(
|
|
1540
1825
|
NavigationMenuPrimitive2.Trigger,
|
|
1541
1826
|
{
|
|
1542
1827
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -1545,7 +1830,7 @@ function NavigationMenuTrigger({
|
|
|
1545
1830
|
children: [
|
|
1546
1831
|
children,
|
|
1547
1832
|
" ",
|
|
1548
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ jsx21(
|
|
1549
1834
|
ChevronDown,
|
|
1550
1835
|
{
|
|
1551
1836
|
className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
@@ -1557,7 +1842,7 @@ function NavigationMenuTrigger({
|
|
|
1557
1842
|
);
|
|
1558
1843
|
}
|
|
1559
1844
|
function NavigationMenuLink({ className, ...props }) {
|
|
1560
|
-
return /* @__PURE__ */
|
|
1845
|
+
return /* @__PURE__ */ jsx21(
|
|
1561
1846
|
NavigationMenuPrimitive2.Link,
|
|
1562
1847
|
{
|
|
1563
1848
|
"data-slot": "navigation-menu-link",
|
|
@@ -1577,7 +1862,7 @@ function NavigationMenuPositioner({
|
|
|
1577
1862
|
alignOffset = 0,
|
|
1578
1863
|
...props
|
|
1579
1864
|
}) {
|
|
1580
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ jsx21(NavigationMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx21(
|
|
1581
1866
|
NavigationMenuPrimitive2.Positioner,
|
|
1582
1867
|
{
|
|
1583
1868
|
side,
|
|
@@ -1589,24 +1874,24 @@ function NavigationMenuPositioner({
|
|
|
1589
1874
|
className
|
|
1590
1875
|
),
|
|
1591
1876
|
...props,
|
|
1592
|
-
children: /* @__PURE__ */
|
|
1877
|
+
children: /* @__PURE__ */ jsx21(NavigationMenuPrimitive2.Popup, { className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg ring-1 ring-berget-border transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0", children: /* @__PURE__ */ jsx21(NavigationMenuPrimitive2.Viewport, { className: "relative size-full overflow-hidden" }) })
|
|
1593
1878
|
}
|
|
1594
1879
|
) });
|
|
1595
1880
|
}
|
|
1596
1881
|
|
|
1597
1882
|
// src/primitives/sidebar.tsx
|
|
1598
|
-
import * as
|
|
1883
|
+
import * as React16 from "react";
|
|
1599
1884
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
1600
1885
|
import { useRender } from "@base-ui/react/use-render";
|
|
1601
1886
|
import { cva as cva9 } from "class-variance-authority";
|
|
1602
|
-
import { cn as
|
|
1887
|
+
import { cn as cn12 } from "cn";
|
|
1603
1888
|
|
|
1604
1889
|
// src/hooks/use-mobile.tsx
|
|
1605
|
-
import * as
|
|
1890
|
+
import * as React15 from "react";
|
|
1606
1891
|
var MOBILE_BREAKPOINT = 768;
|
|
1607
1892
|
function useIsMobile() {
|
|
1608
|
-
const [isMobile, setIsMobile] =
|
|
1609
|
-
|
|
1893
|
+
const [isMobile, setIsMobile] = React15.useState(void 0);
|
|
1894
|
+
React15.useEffect(() => {
|
|
1610
1895
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1611
1896
|
const onChange = () => {
|
|
1612
1897
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1620,16 +1905,16 @@ function useIsMobile() {
|
|
|
1620
1905
|
|
|
1621
1906
|
// src/primitives/input.tsx
|
|
1622
1907
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
1623
|
-
import { cn as
|
|
1624
|
-
import { jsx as
|
|
1908
|
+
import { cn as cn8 } from "cn";
|
|
1909
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1625
1910
|
function Input({ className, type, ...props }) {
|
|
1626
|
-
return /* @__PURE__ */
|
|
1911
|
+
return /* @__PURE__ */ jsx22(
|
|
1627
1912
|
InputPrimitive,
|
|
1628
1913
|
{
|
|
1629
1914
|
type,
|
|
1630
1915
|
"data-slot": "input",
|
|
1631
|
-
className:
|
|
1632
|
-
"h-8 w-full min-w-0 rounded-lg border border-input bg-
|
|
1916
|
+
className: cn8(
|
|
1917
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1633
1918
|
className
|
|
1634
1919
|
),
|
|
1635
1920
|
...props
|
|
@@ -1639,19 +1924,19 @@ function Input({ className, type, ...props }) {
|
|
|
1639
1924
|
|
|
1640
1925
|
// src/primitives/separator.tsx
|
|
1641
1926
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1642
|
-
import { cn as
|
|
1643
|
-
import { jsx as
|
|
1927
|
+
import { cn as cn9 } from "cn";
|
|
1928
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1644
1929
|
function Separator({
|
|
1645
1930
|
className,
|
|
1646
1931
|
orientation = "horizontal",
|
|
1647
1932
|
...props
|
|
1648
1933
|
}) {
|
|
1649
|
-
return /* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ jsx23(
|
|
1650
1935
|
SeparatorPrimitive,
|
|
1651
1936
|
{
|
|
1652
1937
|
"data-slot": "separator",
|
|
1653
1938
|
orientation,
|
|
1654
|
-
className:
|
|
1939
|
+
className: cn9(
|
|
1655
1940
|
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
1656
1941
|
className
|
|
1657
1942
|
),
|
|
@@ -1662,21 +1947,21 @@ function Separator({
|
|
|
1662
1947
|
|
|
1663
1948
|
// src/primitives/sheet.tsx
|
|
1664
1949
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
1665
|
-
import { cn as
|
|
1950
|
+
import { cn as cn10 } from "cn";
|
|
1666
1951
|
import { XIcon } from "lucide-react";
|
|
1667
|
-
import { jsx as
|
|
1952
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1668
1953
|
function Sheet({ ...props }) {
|
|
1669
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsx24(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
1670
1955
|
}
|
|
1671
1956
|
function SheetPortal({ ...props }) {
|
|
1672
|
-
return /* @__PURE__ */
|
|
1957
|
+
return /* @__PURE__ */ jsx24(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1673
1958
|
}
|
|
1674
1959
|
function SheetOverlay({ className, ...props }) {
|
|
1675
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsx24(
|
|
1676
1961
|
SheetPrimitive.Backdrop,
|
|
1677
1962
|
{
|
|
1678
1963
|
"data-slot": "sheet-overlay",
|
|
1679
|
-
className:
|
|
1964
|
+
className: cn10(
|
|
1680
1965
|
"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
1681
1966
|
className
|
|
1682
1967
|
),
|
|
@@ -1691,25 +1976,25 @@ function SheetContent({
|
|
|
1691
1976
|
showCloseButton = true,
|
|
1692
1977
|
...props
|
|
1693
1978
|
}) {
|
|
1694
|
-
return /* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
/* @__PURE__ */
|
|
1979
|
+
return /* @__PURE__ */ jsxs12(SheetPortal, { children: [
|
|
1980
|
+
/* @__PURE__ */ jsx24(SheetOverlay, {}),
|
|
1981
|
+
/* @__PURE__ */ jsxs12(
|
|
1697
1982
|
SheetPrimitive.Popup,
|
|
1698
1983
|
{
|
|
1699
1984
|
"data-slot": "sheet-content",
|
|
1700
1985
|
"data-side": side,
|
|
1701
|
-
className:
|
|
1986
|
+
className: cn10(
|
|
1702
1987
|
"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",
|
|
1703
1988
|
className
|
|
1704
1989
|
),
|
|
1705
1990
|
...props,
|
|
1706
1991
|
children: [
|
|
1707
1992
|
children,
|
|
1708
|
-
showCloseButton && /* @__PURE__ */
|
|
1993
|
+
showCloseButton && /* @__PURE__ */ jsxs12(
|
|
1709
1994
|
SheetPrimitive.Close,
|
|
1710
1995
|
{
|
|
1711
1996
|
"data-slot": "sheet-close",
|
|
1712
|
-
render: /* @__PURE__ */
|
|
1997
|
+
render: /* @__PURE__ */ jsx24(
|
|
1713
1998
|
Button,
|
|
1714
1999
|
{
|
|
1715
2000
|
variant: "ghost",
|
|
@@ -1718,11 +2003,11 @@ function SheetContent({
|
|
|
1718
2003
|
}
|
|
1719
2004
|
),
|
|
1720
2005
|
children: [
|
|
1721
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx24(
|
|
1722
2007
|
XIcon,
|
|
1723
2008
|
{}
|
|
1724
2009
|
),
|
|
1725
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsx24("span", { className: "sr-only", children: "Close" })
|
|
1726
2011
|
]
|
|
1727
2012
|
}
|
|
1728
2013
|
)
|
|
@@ -1732,21 +2017,21 @@ function SheetContent({
|
|
|
1732
2017
|
] });
|
|
1733
2018
|
}
|
|
1734
2019
|
function SheetHeader({ className, ...props }) {
|
|
1735
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ jsx24(
|
|
1736
2021
|
"div",
|
|
1737
2022
|
{
|
|
1738
2023
|
"data-slot": "sheet-header",
|
|
1739
|
-
className:
|
|
2024
|
+
className: cn10("flex flex-col gap-0.5 p-4", className),
|
|
1740
2025
|
...props
|
|
1741
2026
|
}
|
|
1742
2027
|
);
|
|
1743
2028
|
}
|
|
1744
2029
|
function SheetTitle({ className, ...props }) {
|
|
1745
|
-
return /* @__PURE__ */
|
|
2030
|
+
return /* @__PURE__ */ jsx24(
|
|
1746
2031
|
SheetPrimitive.Title,
|
|
1747
2032
|
{
|
|
1748
2033
|
"data-slot": "sheet-title",
|
|
1749
|
-
className:
|
|
2034
|
+
className: cn10(
|
|
1750
2035
|
"text-base font-medium text-foreground",
|
|
1751
2036
|
className
|
|
1752
2037
|
),
|
|
@@ -1758,88 +2043,42 @@ function SheetDescription({
|
|
|
1758
2043
|
className,
|
|
1759
2044
|
...props
|
|
1760
2045
|
}) {
|
|
1761
|
-
return /* @__PURE__ */
|
|
2046
|
+
return /* @__PURE__ */ jsx24(
|
|
1762
2047
|
SheetPrimitive.Description,
|
|
1763
2048
|
{
|
|
1764
2049
|
"data-slot": "sheet-description",
|
|
1765
|
-
className:
|
|
2050
|
+
className: cn10("text-sm text-muted-foreground", className),
|
|
1766
2051
|
...props
|
|
1767
2052
|
}
|
|
1768
2053
|
);
|
|
1769
2054
|
}
|
|
1770
2055
|
|
|
1771
2056
|
// src/primitives/skeleton.tsx
|
|
1772
|
-
import { cn as
|
|
1773
|
-
import { jsx as
|
|
2057
|
+
import { cn as cn11 } from "cn";
|
|
2058
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1774
2059
|
function Skeleton({ className, ...props }) {
|
|
1775
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ jsx25(
|
|
1776
2061
|
"div",
|
|
1777
2062
|
{
|
|
1778
2063
|
"data-slot": "skeleton",
|
|
1779
|
-
className:
|
|
2064
|
+
className: cn11("animate-pulse rounded-md bg-muted", className),
|
|
1780
2065
|
...props
|
|
1781
2066
|
}
|
|
1782
2067
|
);
|
|
1783
2068
|
}
|
|
1784
2069
|
|
|
1785
|
-
// src/primitives/tooltip.tsx
|
|
1786
|
-
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
1787
|
-
import { cn as cn10 } from "cn";
|
|
1788
|
-
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1789
|
-
function Tooltip({ ...props }) {
|
|
1790
|
-
return /* @__PURE__ */ jsx23(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
1791
|
-
}
|
|
1792
|
-
function TooltipTrigger({ ...props }) {
|
|
1793
|
-
return /* @__PURE__ */ jsx23(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1794
|
-
}
|
|
1795
|
-
function TooltipContent({
|
|
1796
|
-
className,
|
|
1797
|
-
side = "top",
|
|
1798
|
-
sideOffset = 4,
|
|
1799
|
-
align = "center",
|
|
1800
|
-
alignOffset = 0,
|
|
1801
|
-
children,
|
|
1802
|
-
...props
|
|
1803
|
-
}) {
|
|
1804
|
-
return /* @__PURE__ */ jsx23(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
|
|
1805
|
-
TooltipPrimitive.Positioner,
|
|
1806
|
-
{
|
|
1807
|
-
align,
|
|
1808
|
-
alignOffset,
|
|
1809
|
-
side,
|
|
1810
|
-
sideOffset,
|
|
1811
|
-
className: "isolate z-50",
|
|
1812
|
-
children: /* @__PURE__ */ jsxs12(
|
|
1813
|
-
TooltipPrimitive.Popup,
|
|
1814
|
-
{
|
|
1815
|
-
"data-slot": "tooltip-content",
|
|
1816
|
-
className: cn10(
|
|
1817
|
-
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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",
|
|
1818
|
-
className
|
|
1819
|
-
),
|
|
1820
|
-
...props,
|
|
1821
|
-
children: [
|
|
1822
|
-
children,
|
|
1823
|
-
/* @__PURE__ */ jsx23(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
1824
|
-
]
|
|
1825
|
-
}
|
|
1826
|
-
)
|
|
1827
|
-
}
|
|
1828
|
-
) });
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
2070
|
// src/primitives/sidebar.tsx
|
|
1832
2071
|
import { PanelLeftIcon } from "lucide-react";
|
|
1833
|
-
import { jsx as
|
|
2072
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1834
2073
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1835
2074
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1836
2075
|
var SIDEBAR_WIDTH = "16rem";
|
|
1837
2076
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1838
2077
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1839
2078
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1840
|
-
var SidebarContext =
|
|
2079
|
+
var SidebarContext = React16.createContext(null);
|
|
1841
2080
|
function useSidebar() {
|
|
1842
|
-
const context =
|
|
2081
|
+
const context = React16.useContext(SidebarContext);
|
|
1843
2082
|
if (!context) {
|
|
1844
2083
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1845
2084
|
}
|
|
@@ -1855,10 +2094,10 @@ function SidebarProvider({
|
|
|
1855
2094
|
...props
|
|
1856
2095
|
}) {
|
|
1857
2096
|
const isMobile = useIsMobile();
|
|
1858
|
-
const [openMobile, setOpenMobile] =
|
|
1859
|
-
const [_open, _setOpen] =
|
|
2097
|
+
const [openMobile, setOpenMobile] = React16.useState(false);
|
|
2098
|
+
const [_open, _setOpen] = React16.useState(defaultOpen);
|
|
1860
2099
|
const open = openProp ?? _open;
|
|
1861
|
-
const setOpen =
|
|
2100
|
+
const setOpen = React16.useCallback(
|
|
1862
2101
|
(value) => {
|
|
1863
2102
|
const openState = typeof value === "function" ? value(open) : value;
|
|
1864
2103
|
if (setOpenProp) {
|
|
@@ -1870,10 +2109,10 @@ function SidebarProvider({
|
|
|
1870
2109
|
},
|
|
1871
2110
|
[setOpenProp, open]
|
|
1872
2111
|
);
|
|
1873
|
-
const toggleSidebar =
|
|
2112
|
+
const toggleSidebar = React16.useCallback(() => {
|
|
1874
2113
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1875
2114
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
1876
|
-
|
|
2115
|
+
React16.useEffect(() => {
|
|
1877
2116
|
const handleKeyDown = (event) => {
|
|
1878
2117
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1879
2118
|
event.preventDefault();
|
|
@@ -1884,7 +2123,7 @@ function SidebarProvider({
|
|
|
1884
2123
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1885
2124
|
}, [toggleSidebar]);
|
|
1886
2125
|
const state = open ? "expanded" : "collapsed";
|
|
1887
|
-
const contextValue =
|
|
2126
|
+
const contextValue = React16.useMemo(
|
|
1888
2127
|
() => ({
|
|
1889
2128
|
state,
|
|
1890
2129
|
open,
|
|
@@ -1896,7 +2135,7 @@ function SidebarProvider({
|
|
|
1896
2135
|
}),
|
|
1897
2136
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
1898
2137
|
);
|
|
1899
|
-
return /* @__PURE__ */
|
|
2138
|
+
return /* @__PURE__ */ jsx26(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx26(
|
|
1900
2139
|
"div",
|
|
1901
2140
|
{
|
|
1902
2141
|
"data-slot": "sidebar-wrapper",
|
|
@@ -1905,7 +2144,7 @@ function SidebarProvider({
|
|
|
1905
2144
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
1906
2145
|
...style
|
|
1907
2146
|
},
|
|
1908
|
-
className:
|
|
2147
|
+
className: cn12(
|
|
1909
2148
|
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
1910
2149
|
className
|
|
1911
2150
|
),
|
|
@@ -1925,11 +2164,11 @@ function Sidebar({
|
|
|
1925
2164
|
}) {
|
|
1926
2165
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1927
2166
|
if (collapsible === "none") {
|
|
1928
|
-
return /* @__PURE__ */
|
|
2167
|
+
return /* @__PURE__ */ jsx26(
|
|
1929
2168
|
"div",
|
|
1930
2169
|
{
|
|
1931
2170
|
"data-slot": "sidebar",
|
|
1932
|
-
className:
|
|
2171
|
+
className: cn12(
|
|
1933
2172
|
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
1934
2173
|
className
|
|
1935
2174
|
),
|
|
@@ -1939,7 +2178,7 @@ function Sidebar({
|
|
|
1939
2178
|
);
|
|
1940
2179
|
}
|
|
1941
2180
|
if (isMobile) {
|
|
1942
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ jsx26(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs13(
|
|
1943
2182
|
SheetContent,
|
|
1944
2183
|
{
|
|
1945
2184
|
dir,
|
|
@@ -1953,10 +2192,10 @@ function Sidebar({
|
|
|
1953
2192
|
side,
|
|
1954
2193
|
children: [
|
|
1955
2194
|
/* @__PURE__ */ jsxs13(SheetHeader, { className: "sr-only", children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ jsx26(SheetTitle, { children: "Sidebar" }),
|
|
2196
|
+
/* @__PURE__ */ jsx26(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1958
2197
|
] }),
|
|
1959
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ jsx26("div", { className: "flex h-full w-full flex-col", children })
|
|
1960
2199
|
]
|
|
1961
2200
|
}
|
|
1962
2201
|
) });
|
|
@@ -1971,11 +2210,11 @@ function Sidebar({
|
|
|
1971
2210
|
"data-side": side,
|
|
1972
2211
|
"data-slot": "sidebar",
|
|
1973
2212
|
children: [
|
|
1974
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ jsx26(
|
|
1975
2214
|
"div",
|
|
1976
2215
|
{
|
|
1977
2216
|
"data-slot": "sidebar-gap",
|
|
1978
|
-
className:
|
|
2217
|
+
className: cn12(
|
|
1979
2218
|
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
1980
2219
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
1981
2220
|
"group-data-[side=right]:rotate-180",
|
|
@@ -1983,19 +2222,19 @@ function Sidebar({
|
|
|
1983
2222
|
)
|
|
1984
2223
|
}
|
|
1985
2224
|
),
|
|
1986
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsx26(
|
|
1987
2226
|
"div",
|
|
1988
2227
|
{
|
|
1989
2228
|
"data-slot": "sidebar-container",
|
|
1990
2229
|
"data-side": side,
|
|
1991
|
-
className:
|
|
2230
|
+
className: cn12(
|
|
1992
2231
|
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
1993
2232
|
// Adjust the padding for floating and inset variants.
|
|
1994
2233
|
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
1995
2234
|
className
|
|
1996
2235
|
),
|
|
1997
2236
|
...props,
|
|
1998
|
-
children: /* @__PURE__ */
|
|
2237
|
+
children: /* @__PURE__ */ jsx26(
|
|
1999
2238
|
"div",
|
|
2000
2239
|
{
|
|
2001
2240
|
"data-sidebar": "sidebar",
|
|
@@ -2023,22 +2262,22 @@ function SidebarTrigger({
|
|
|
2023
2262
|
"data-slot": "sidebar-trigger",
|
|
2024
2263
|
variant: "ghost",
|
|
2025
2264
|
size: "icon-sm",
|
|
2026
|
-
className:
|
|
2265
|
+
className: cn12(className),
|
|
2027
2266
|
onClick: (event) => {
|
|
2028
2267
|
onClick?.(event);
|
|
2029
2268
|
toggleSidebar();
|
|
2030
2269
|
},
|
|
2031
2270
|
...props,
|
|
2032
2271
|
children: [
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
/* @__PURE__ */
|
|
2272
|
+
/* @__PURE__ */ jsx26(PanelLeftIcon, {}),
|
|
2273
|
+
/* @__PURE__ */ jsx26("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2035
2274
|
]
|
|
2036
2275
|
}
|
|
2037
2276
|
);
|
|
2038
2277
|
}
|
|
2039
2278
|
function SidebarRail({ className, ...props }) {
|
|
2040
2279
|
const { toggleSidebar } = useSidebar();
|
|
2041
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsx26(
|
|
2042
2281
|
"button",
|
|
2043
2282
|
{
|
|
2044
2283
|
"data-sidebar": "rail",
|
|
@@ -2047,7 +2286,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
2047
2286
|
tabIndex: -1,
|
|
2048
2287
|
onClick: toggleSidebar,
|
|
2049
2288
|
title: "Toggle Sidebar",
|
|
2050
|
-
className:
|
|
2289
|
+
className: cn12(
|
|
2051
2290
|
"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
2052
2291
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
2053
2292
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -2061,11 +2300,11 @@ function SidebarRail({ className, ...props }) {
|
|
|
2061
2300
|
);
|
|
2062
2301
|
}
|
|
2063
2302
|
function SidebarInset({ className, ...props }) {
|
|
2064
|
-
return /* @__PURE__ */
|
|
2303
|
+
return /* @__PURE__ */ jsx26(
|
|
2065
2304
|
"main",
|
|
2066
2305
|
{
|
|
2067
2306
|
"data-slot": "sidebar-inset",
|
|
2068
|
-
className:
|
|
2307
|
+
className: cn12(
|
|
2069
2308
|
"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
2070
2309
|
className
|
|
2071
2310
|
),
|
|
@@ -2077,34 +2316,34 @@ function SidebarInput({
|
|
|
2077
2316
|
className,
|
|
2078
2317
|
...props
|
|
2079
2318
|
}) {
|
|
2080
|
-
return /* @__PURE__ */
|
|
2319
|
+
return /* @__PURE__ */ jsx26(
|
|
2081
2320
|
Input,
|
|
2082
2321
|
{
|
|
2083
2322
|
"data-slot": "sidebar-input",
|
|
2084
2323
|
"data-sidebar": "input",
|
|
2085
|
-
className:
|
|
2324
|
+
className: cn12("h-8 w-full bg-background shadow-none", className),
|
|
2086
2325
|
...props
|
|
2087
2326
|
}
|
|
2088
2327
|
);
|
|
2089
2328
|
}
|
|
2090
2329
|
function SidebarHeader({ className, ...props }) {
|
|
2091
|
-
return /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ jsx26(
|
|
2092
2331
|
"div",
|
|
2093
2332
|
{
|
|
2094
2333
|
"data-slot": "sidebar-header",
|
|
2095
2334
|
"data-sidebar": "header",
|
|
2096
|
-
className:
|
|
2335
|
+
className: cn12("flex flex-col gap-2 p-2", className),
|
|
2097
2336
|
...props
|
|
2098
2337
|
}
|
|
2099
2338
|
);
|
|
2100
2339
|
}
|
|
2101
2340
|
function SidebarFooter({ className, ...props }) {
|
|
2102
|
-
return /* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ jsx26(
|
|
2103
2342
|
"div",
|
|
2104
2343
|
{
|
|
2105
2344
|
"data-slot": "sidebar-footer",
|
|
2106
2345
|
"data-sidebar": "footer",
|
|
2107
|
-
className:
|
|
2346
|
+
className: cn12("flex flex-col gap-2 p-2", className),
|
|
2108
2347
|
...props
|
|
2109
2348
|
}
|
|
2110
2349
|
);
|
|
@@ -2113,23 +2352,23 @@ function SidebarSeparator({
|
|
|
2113
2352
|
className,
|
|
2114
2353
|
...props
|
|
2115
2354
|
}) {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2355
|
+
return /* @__PURE__ */ jsx26(
|
|
2117
2356
|
Separator,
|
|
2118
2357
|
{
|
|
2119
2358
|
"data-slot": "sidebar-separator",
|
|
2120
2359
|
"data-sidebar": "separator",
|
|
2121
|
-
className:
|
|
2360
|
+
className: cn12("mx-2 w-auto bg-sidebar-border", className),
|
|
2122
2361
|
...props
|
|
2123
2362
|
}
|
|
2124
2363
|
);
|
|
2125
2364
|
}
|
|
2126
2365
|
function SidebarContent({ className, ...props }) {
|
|
2127
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ jsx26(
|
|
2128
2367
|
"div",
|
|
2129
2368
|
{
|
|
2130
2369
|
"data-slot": "sidebar-content",
|
|
2131
2370
|
"data-sidebar": "content",
|
|
2132
|
-
className:
|
|
2371
|
+
className: cn12(
|
|
2133
2372
|
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2134
2373
|
className
|
|
2135
2374
|
),
|
|
@@ -2138,12 +2377,12 @@ function SidebarContent({ className, ...props }) {
|
|
|
2138
2377
|
);
|
|
2139
2378
|
}
|
|
2140
2379
|
function SidebarGroup({ className, ...props }) {
|
|
2141
|
-
return /* @__PURE__ */
|
|
2380
|
+
return /* @__PURE__ */ jsx26(
|
|
2142
2381
|
"div",
|
|
2143
2382
|
{
|
|
2144
2383
|
"data-slot": "sidebar-group",
|
|
2145
2384
|
"data-sidebar": "group",
|
|
2146
|
-
className:
|
|
2385
|
+
className: cn12("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2147
2386
|
...props
|
|
2148
2387
|
}
|
|
2149
2388
|
);
|
|
@@ -2157,7 +2396,7 @@ function SidebarGroupLabel({
|
|
|
2157
2396
|
defaultTagName: "div",
|
|
2158
2397
|
props: mergeProps(
|
|
2159
2398
|
{
|
|
2160
|
-
className:
|
|
2399
|
+
className: cn12(
|
|
2161
2400
|
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2162
2401
|
className
|
|
2163
2402
|
)
|
|
@@ -2180,7 +2419,7 @@ function SidebarGroupAction({
|
|
|
2180
2419
|
defaultTagName: "button",
|
|
2181
2420
|
props: mergeProps(
|
|
2182
2421
|
{
|
|
2183
|
-
className:
|
|
2422
|
+
className: cn12(
|
|
2184
2423
|
"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2185
2424
|
className
|
|
2186
2425
|
)
|
|
@@ -2198,34 +2437,34 @@ function SidebarGroupContent({
|
|
|
2198
2437
|
className,
|
|
2199
2438
|
...props
|
|
2200
2439
|
}) {
|
|
2201
|
-
return /* @__PURE__ */
|
|
2440
|
+
return /* @__PURE__ */ jsx26(
|
|
2202
2441
|
"div",
|
|
2203
2442
|
{
|
|
2204
2443
|
"data-slot": "sidebar-group-content",
|
|
2205
2444
|
"data-sidebar": "group-content",
|
|
2206
|
-
className:
|
|
2445
|
+
className: cn12("w-full text-sm", className),
|
|
2207
2446
|
...props
|
|
2208
2447
|
}
|
|
2209
2448
|
);
|
|
2210
2449
|
}
|
|
2211
2450
|
function SidebarMenu({ className, ...props }) {
|
|
2212
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx26(
|
|
2213
2452
|
"ul",
|
|
2214
2453
|
{
|
|
2215
2454
|
"data-slot": "sidebar-menu",
|
|
2216
2455
|
"data-sidebar": "menu",
|
|
2217
|
-
className:
|
|
2456
|
+
className: cn12("flex w-full min-w-0 flex-col gap-0", className),
|
|
2218
2457
|
...props
|
|
2219
2458
|
}
|
|
2220
2459
|
);
|
|
2221
2460
|
}
|
|
2222
2461
|
function SidebarMenuItem({ className, ...props }) {
|
|
2223
|
-
return /* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ jsx26(
|
|
2224
2463
|
"li",
|
|
2225
2464
|
{
|
|
2226
2465
|
"data-slot": "sidebar-menu-item",
|
|
2227
2466
|
"data-sidebar": "menu-item",
|
|
2228
|
-
className:
|
|
2467
|
+
className: cn12("group/menu-item relative", className),
|
|
2229
2468
|
...props
|
|
2230
2469
|
}
|
|
2231
2470
|
);
|
|
@@ -2264,11 +2503,11 @@ function SidebarMenuButton({
|
|
|
2264
2503
|
defaultTagName: "button",
|
|
2265
2504
|
props: mergeProps(
|
|
2266
2505
|
{
|
|
2267
|
-
className:
|
|
2506
|
+
className: cn12(sidebarMenuButtonVariants({ variant, size }), className)
|
|
2268
2507
|
},
|
|
2269
2508
|
props
|
|
2270
2509
|
),
|
|
2271
|
-
render: !tooltip ? render : /* @__PURE__ */
|
|
2510
|
+
render: !tooltip ? render : /* @__PURE__ */ jsx26(TooltipTrigger, { render }),
|
|
2272
2511
|
state: {
|
|
2273
2512
|
slot: "sidebar-menu-button",
|
|
2274
2513
|
sidebar: "menu-button",
|
|
@@ -2286,7 +2525,7 @@ function SidebarMenuButton({
|
|
|
2286
2525
|
}
|
|
2287
2526
|
return /* @__PURE__ */ jsxs13(Tooltip, { children: [
|
|
2288
2527
|
comp,
|
|
2289
|
-
/* @__PURE__ */
|
|
2528
|
+
/* @__PURE__ */ jsx26(
|
|
2290
2529
|
TooltipContent,
|
|
2291
2530
|
{
|
|
2292
2531
|
side: "right",
|
|
@@ -2307,7 +2546,7 @@ function SidebarMenuAction({
|
|
|
2307
2546
|
defaultTagName: "button",
|
|
2308
2547
|
props: mergeProps(
|
|
2309
2548
|
{
|
|
2310
|
-
className:
|
|
2549
|
+
className: cn12(
|
|
2311
2550
|
"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2312
2551
|
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",
|
|
2313
2552
|
className
|
|
@@ -2326,12 +2565,12 @@ function SidebarMenuBadge({
|
|
|
2326
2565
|
className,
|
|
2327
2566
|
...props
|
|
2328
2567
|
}) {
|
|
2329
|
-
return /* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ jsx26(
|
|
2330
2569
|
"div",
|
|
2331
2570
|
{
|
|
2332
2571
|
"data-slot": "sidebar-menu-badge",
|
|
2333
2572
|
"data-sidebar": "menu-badge",
|
|
2334
|
-
className:
|
|
2573
|
+
className: cn12(
|
|
2335
2574
|
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
|
|
2336
2575
|
className
|
|
2337
2576
|
),
|
|
@@ -2344,7 +2583,7 @@ function SidebarMenuSkeleton({
|
|
|
2344
2583
|
showIcon = false,
|
|
2345
2584
|
...props
|
|
2346
2585
|
}) {
|
|
2347
|
-
const [width] =
|
|
2586
|
+
const [width] = React16.useState(() => {
|
|
2348
2587
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2349
2588
|
});
|
|
2350
2589
|
return /* @__PURE__ */ jsxs13(
|
|
@@ -2352,17 +2591,17 @@ function SidebarMenuSkeleton({
|
|
|
2352
2591
|
{
|
|
2353
2592
|
"data-slot": "sidebar-menu-skeleton",
|
|
2354
2593
|
"data-sidebar": "menu-skeleton",
|
|
2355
|
-
className:
|
|
2594
|
+
className: cn12("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2356
2595
|
...props,
|
|
2357
2596
|
children: [
|
|
2358
|
-
showIcon && /* @__PURE__ */
|
|
2597
|
+
showIcon && /* @__PURE__ */ jsx26(
|
|
2359
2598
|
Skeleton,
|
|
2360
2599
|
{
|
|
2361
2600
|
className: "size-4 rounded-md",
|
|
2362
2601
|
"data-sidebar": "menu-skeleton-icon"
|
|
2363
2602
|
}
|
|
2364
2603
|
),
|
|
2365
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ jsx26(
|
|
2366
2605
|
Skeleton,
|
|
2367
2606
|
{
|
|
2368
2607
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -2377,12 +2616,12 @@ function SidebarMenuSkeleton({
|
|
|
2377
2616
|
);
|
|
2378
2617
|
}
|
|
2379
2618
|
function SidebarMenuSub({ className, ...props }) {
|
|
2380
|
-
return /* @__PURE__ */
|
|
2619
|
+
return /* @__PURE__ */ jsx26(
|
|
2381
2620
|
"ul",
|
|
2382
2621
|
{
|
|
2383
2622
|
"data-slot": "sidebar-menu-sub",
|
|
2384
2623
|
"data-sidebar": "menu-sub",
|
|
2385
|
-
className:
|
|
2624
|
+
className: cn12(
|
|
2386
2625
|
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
2387
2626
|
className
|
|
2388
2627
|
),
|
|
@@ -2394,12 +2633,12 @@ function SidebarMenuSubItem({
|
|
|
2394
2633
|
className,
|
|
2395
2634
|
...props
|
|
2396
2635
|
}) {
|
|
2397
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ jsx26(
|
|
2398
2637
|
"li",
|
|
2399
2638
|
{
|
|
2400
2639
|
"data-slot": "sidebar-menu-sub-item",
|
|
2401
2640
|
"data-sidebar": "menu-sub-item",
|
|
2402
|
-
className:
|
|
2641
|
+
className: cn12("group/menu-sub-item relative", className),
|
|
2403
2642
|
...props
|
|
2404
2643
|
}
|
|
2405
2644
|
);
|
|
@@ -2415,7 +2654,7 @@ function SidebarMenuSubButton({
|
|
|
2415
2654
|
defaultTagName: "a",
|
|
2416
2655
|
props: mergeProps(
|
|
2417
2656
|
{
|
|
2418
|
-
className:
|
|
2657
|
+
className: cn12(
|
|
2419
2658
|
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
2420
2659
|
className
|
|
2421
2660
|
)
|
|
@@ -2433,7 +2672,7 @@ function SidebarMenuSubButton({
|
|
|
2433
2672
|
}
|
|
2434
2673
|
|
|
2435
2674
|
// src/components/sidebar/Sidebar.tsx
|
|
2436
|
-
import { jsx as
|
|
2675
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2437
2676
|
var iconModeButtonClasses = "group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!";
|
|
2438
2677
|
var sizingMenuButtonClasses = "text-base px-3 py-2 h-auto";
|
|
2439
2678
|
var sizingSubButtonClasses = "data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto";
|
|
@@ -2441,7 +2680,7 @@ function SidebarGroupLabel2({
|
|
|
2441
2680
|
className,
|
|
2442
2681
|
...props
|
|
2443
2682
|
}) {
|
|
2444
|
-
return /* @__PURE__ */
|
|
2683
|
+
return /* @__PURE__ */ jsx27(
|
|
2445
2684
|
SidebarGroupLabel,
|
|
2446
2685
|
{
|
|
2447
2686
|
className: cn("px-3 uppercase tracking-caption", className),
|
|
@@ -2454,7 +2693,7 @@ function SidebarProvider2({
|
|
|
2454
2693
|
style,
|
|
2455
2694
|
...props
|
|
2456
2695
|
}) {
|
|
2457
|
-
return /* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ jsx27(
|
|
2458
2697
|
SidebarProvider,
|
|
2459
2698
|
{
|
|
2460
2699
|
className,
|
|
@@ -2467,7 +2706,7 @@ function SidebarProvider2({
|
|
|
2467
2706
|
);
|
|
2468
2707
|
}
|
|
2469
2708
|
function SidebarGroup2({ className, ...props }) {
|
|
2470
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ jsx27(
|
|
2471
2710
|
SidebarGroup,
|
|
2472
2711
|
{
|
|
2473
2712
|
className: cn("group-data-[collapsible=icon]:px-2.5", className),
|
|
@@ -2479,7 +2718,7 @@ function SidebarFooter2({
|
|
|
2479
2718
|
className,
|
|
2480
2719
|
...props
|
|
2481
2720
|
}) {
|
|
2482
|
-
return /* @__PURE__ */
|
|
2721
|
+
return /* @__PURE__ */ jsx27(
|
|
2483
2722
|
SidebarFooter,
|
|
2484
2723
|
{
|
|
2485
2724
|
className: cn(
|
|
@@ -2494,7 +2733,7 @@ function SidebarHeader2({
|
|
|
2494
2733
|
className,
|
|
2495
2734
|
...props
|
|
2496
2735
|
}) {
|
|
2497
|
-
return /* @__PURE__ */
|
|
2736
|
+
return /* @__PURE__ */ jsx27(
|
|
2498
2737
|
SidebarHeader,
|
|
2499
2738
|
{
|
|
2500
2739
|
className: cn(
|
|
@@ -2506,8 +2745,8 @@ function SidebarHeader2({
|
|
|
2506
2745
|
);
|
|
2507
2746
|
}
|
|
2508
2747
|
function SidebarLogo() {
|
|
2509
|
-
return /* @__PURE__ */
|
|
2510
|
-
/* @__PURE__ */
|
|
2748
|
+
return /* @__PURE__ */ jsx27(SidebarHeader, { className: "px-0", children: /* @__PURE__ */ jsxs14("div", { className: "relative flex h-15 items-center overflow-hidden px-5", children: [
|
|
2749
|
+
/* @__PURE__ */ jsx27(
|
|
2511
2750
|
BergetLogo,
|
|
2512
2751
|
{
|
|
2513
2752
|
variant: "logotype",
|
|
@@ -2515,11 +2754,11 @@ function SidebarLogo() {
|
|
|
2515
2754
|
className: "shrink-0 transition-[opacity,visibility] duration-150 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:invisible group-data-[collapsible=icon]:opacity-0"
|
|
2516
2755
|
}
|
|
2517
2756
|
),
|
|
2518
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx27("span", { className: "pointer-events-none invisible absolute inset-y-0 left-0 flex w-15 items-center pl-5 opacity-0 transition-[padding-left,opacity,visibility] duration-200 ease-linear group-data-[collapsible=icon]:visible group-data-[collapsible=icon]:pl-3 group-data-[collapsible=icon]:opacity-100", children: /* @__PURE__ */ jsx27(BergetLogo, { variant: "symbol", size: 32 }) })
|
|
2519
2758
|
] }) });
|
|
2520
2759
|
}
|
|
2521
2760
|
function SidebarPageHeader({ className, ...props }) {
|
|
2522
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ jsx27(
|
|
2523
2762
|
"header",
|
|
2524
2763
|
{
|
|
2525
2764
|
className: cn(
|
|
@@ -2531,7 +2770,7 @@ function SidebarPageHeader({ className, ...props }) {
|
|
|
2531
2770
|
);
|
|
2532
2771
|
}
|
|
2533
2772
|
function SidebarMenuButton2({ className, ...props }) {
|
|
2534
|
-
return /* @__PURE__ */
|
|
2773
|
+
return /* @__PURE__ */ jsx27(
|
|
2535
2774
|
SidebarMenuButton,
|
|
2536
2775
|
{
|
|
2537
2776
|
className: cn(sizingMenuButtonClasses, iconModeButtonClasses, className),
|
|
@@ -2540,7 +2779,7 @@ function SidebarMenuButton2({ className, ...props }) {
|
|
|
2540
2779
|
);
|
|
2541
2780
|
}
|
|
2542
2781
|
function SidebarMenuSubButton2({ className, ...props }) {
|
|
2543
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ jsx27(
|
|
2544
2783
|
SidebarMenuSubButton,
|
|
2545
2784
|
{
|
|
2546
2785
|
className: cn(sizingSubButtonClasses, "[&>svg]:text-inherit", className),
|
|
@@ -2550,22 +2789,22 @@ function SidebarMenuSubButton2({ className, ...props }) {
|
|
|
2550
2789
|
}
|
|
2551
2790
|
|
|
2552
2791
|
// src/components/table/Table.tsx
|
|
2553
|
-
import * as
|
|
2792
|
+
import * as React17 from "react";
|
|
2554
2793
|
|
|
2555
2794
|
// src/primitives/table.tsx
|
|
2556
|
-
import { cn as
|
|
2557
|
-
import { jsx as
|
|
2795
|
+
import { cn as cn13 } from "cn";
|
|
2796
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2558
2797
|
function Table({ className, ...props }) {
|
|
2559
|
-
return /* @__PURE__ */
|
|
2798
|
+
return /* @__PURE__ */ jsx28(
|
|
2560
2799
|
"div",
|
|
2561
2800
|
{
|
|
2562
2801
|
"data-slot": "table-container",
|
|
2563
2802
|
className: "relative w-full overflow-x-auto",
|
|
2564
|
-
children: /* @__PURE__ */
|
|
2803
|
+
children: /* @__PURE__ */ jsx28(
|
|
2565
2804
|
"table",
|
|
2566
2805
|
{
|
|
2567
2806
|
"data-slot": "table",
|
|
2568
|
-
className:
|
|
2807
|
+
className: cn13("w-full caption-bottom text-sm", className),
|
|
2569
2808
|
...props
|
|
2570
2809
|
}
|
|
2571
2810
|
)
|
|
@@ -2573,31 +2812,31 @@ function Table({ className, ...props }) {
|
|
|
2573
2812
|
);
|
|
2574
2813
|
}
|
|
2575
2814
|
function TableHeader({ className, ...props }) {
|
|
2576
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsx28(
|
|
2577
2816
|
"thead",
|
|
2578
2817
|
{
|
|
2579
2818
|
"data-slot": "table-header",
|
|
2580
|
-
className:
|
|
2819
|
+
className: cn13("[&_tr]:border-b", className),
|
|
2581
2820
|
...props
|
|
2582
2821
|
}
|
|
2583
2822
|
);
|
|
2584
2823
|
}
|
|
2585
2824
|
function TableBody({ className, ...props }) {
|
|
2586
|
-
return /* @__PURE__ */
|
|
2825
|
+
return /* @__PURE__ */ jsx28(
|
|
2587
2826
|
"tbody",
|
|
2588
2827
|
{
|
|
2589
2828
|
"data-slot": "table-body",
|
|
2590
|
-
className:
|
|
2829
|
+
className: cn13("[&_tr:last-child]:border-0", className),
|
|
2591
2830
|
...props
|
|
2592
2831
|
}
|
|
2593
2832
|
);
|
|
2594
2833
|
}
|
|
2595
2834
|
function TableFooter({ className, ...props }) {
|
|
2596
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ jsx28(
|
|
2597
2836
|
"tfoot",
|
|
2598
2837
|
{
|
|
2599
2838
|
"data-slot": "table-footer",
|
|
2600
|
-
className:
|
|
2839
|
+
className: cn13(
|
|
2601
2840
|
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
2602
2841
|
className
|
|
2603
2842
|
),
|
|
@@ -2606,11 +2845,11 @@ function TableFooter({ className, ...props }) {
|
|
|
2606
2845
|
);
|
|
2607
2846
|
}
|
|
2608
2847
|
function TableRow({ className, ...props }) {
|
|
2609
|
-
return /* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ jsx28(
|
|
2610
2849
|
"tr",
|
|
2611
2850
|
{
|
|
2612
2851
|
"data-slot": "table-row",
|
|
2613
|
-
className:
|
|
2852
|
+
className: cn13(
|
|
2614
2853
|
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
2615
2854
|
className
|
|
2616
2855
|
),
|
|
@@ -2619,11 +2858,11 @@ function TableRow({ className, ...props }) {
|
|
|
2619
2858
|
);
|
|
2620
2859
|
}
|
|
2621
2860
|
function TableHead({ className, ...props }) {
|
|
2622
|
-
return /* @__PURE__ */
|
|
2861
|
+
return /* @__PURE__ */ jsx28(
|
|
2623
2862
|
"th",
|
|
2624
2863
|
{
|
|
2625
2864
|
"data-slot": "table-head",
|
|
2626
|
-
className:
|
|
2865
|
+
className: cn13(
|
|
2627
2866
|
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
2628
2867
|
className
|
|
2629
2868
|
),
|
|
@@ -2632,11 +2871,11 @@ function TableHead({ className, ...props }) {
|
|
|
2632
2871
|
);
|
|
2633
2872
|
}
|
|
2634
2873
|
function TableCell({ className, ...props }) {
|
|
2635
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ jsx28(
|
|
2636
2875
|
"td",
|
|
2637
2876
|
{
|
|
2638
2877
|
"data-slot": "table-cell",
|
|
2639
|
-
className:
|
|
2878
|
+
className: cn13(
|
|
2640
2879
|
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
2641
2880
|
className
|
|
2642
2881
|
),
|
|
@@ -2648,23 +2887,23 @@ function TableCaption({
|
|
|
2648
2887
|
className,
|
|
2649
2888
|
...props
|
|
2650
2889
|
}) {
|
|
2651
|
-
return /* @__PURE__ */
|
|
2890
|
+
return /* @__PURE__ */ jsx28(
|
|
2652
2891
|
"caption",
|
|
2653
2892
|
{
|
|
2654
2893
|
"data-slot": "table-caption",
|
|
2655
|
-
className:
|
|
2894
|
+
className: cn13("mt-4 text-sm text-muted-foreground", className),
|
|
2656
2895
|
...props
|
|
2657
2896
|
}
|
|
2658
2897
|
);
|
|
2659
2898
|
}
|
|
2660
2899
|
|
|
2661
2900
|
// src/components/table/Table.tsx
|
|
2662
|
-
import { jsx as
|
|
2663
|
-
var Table2 =
|
|
2664
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2901
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2902
|
+
var Table2 = React17.forwardRef(
|
|
2903
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx29(Table, { ref, className, ...props })
|
|
2665
2904
|
);
|
|
2666
2905
|
Table2.displayName = "Table";
|
|
2667
|
-
var TableHeader2 =
|
|
2906
|
+
var TableHeader2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2668
2907
|
TableHeader,
|
|
2669
2908
|
{
|
|
2670
2909
|
ref,
|
|
@@ -2673,7 +2912,7 @@ var TableHeader2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2673
2912
|
}
|
|
2674
2913
|
));
|
|
2675
2914
|
TableHeader2.displayName = "TableHeader";
|
|
2676
|
-
var TableBody2 =
|
|
2915
|
+
var TableBody2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2677
2916
|
TableBody,
|
|
2678
2917
|
{
|
|
2679
2918
|
ref,
|
|
@@ -2682,7 +2921,7 @@ var TableBody2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2682
2921
|
}
|
|
2683
2922
|
));
|
|
2684
2923
|
TableBody2.displayName = "TableBody";
|
|
2685
|
-
var TableFooter2 =
|
|
2924
|
+
var TableFooter2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2686
2925
|
TableFooter,
|
|
2687
2926
|
{
|
|
2688
2927
|
ref,
|
|
@@ -2694,8 +2933,8 @@ var TableFooter2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2694
2933
|
}
|
|
2695
2934
|
));
|
|
2696
2935
|
TableFooter2.displayName = "TableFooter";
|
|
2697
|
-
var TableRow2 =
|
|
2698
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2936
|
+
var TableRow2 = React17.forwardRef(
|
|
2937
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2699
2938
|
TableRow,
|
|
2700
2939
|
{
|
|
2701
2940
|
ref,
|
|
@@ -2708,7 +2947,7 @@ var TableRow2 = React16.forwardRef(
|
|
|
2708
2947
|
)
|
|
2709
2948
|
);
|
|
2710
2949
|
TableRow2.displayName = "TableRow";
|
|
2711
|
-
var TableHead2 =
|
|
2950
|
+
var TableHead2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2712
2951
|
TableHead,
|
|
2713
2952
|
{
|
|
2714
2953
|
ref,
|
|
@@ -2720,7 +2959,7 @@ var TableHead2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2720
2959
|
}
|
|
2721
2960
|
));
|
|
2722
2961
|
TableHead2.displayName = "TableHead";
|
|
2723
|
-
var TableCell2 =
|
|
2962
|
+
var TableCell2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2724
2963
|
TableCell,
|
|
2725
2964
|
{
|
|
2726
2965
|
ref,
|
|
@@ -2729,7 +2968,7 @@ var TableCell2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2729
2968
|
}
|
|
2730
2969
|
));
|
|
2731
2970
|
TableCell2.displayName = "TableCell";
|
|
2732
|
-
var TableCaption2 =
|
|
2971
|
+
var TableCaption2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2733
2972
|
TableCaption,
|
|
2734
2973
|
{
|
|
2735
2974
|
ref,
|
|
@@ -2740,21 +2979,21 @@ var TableCaption2 = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2740
2979
|
TableCaption2.displayName = "TableCaption";
|
|
2741
2980
|
|
|
2742
2981
|
// src/components/item/Item.tsx
|
|
2743
|
-
import * as
|
|
2982
|
+
import * as React18 from "react";
|
|
2744
2983
|
|
|
2745
2984
|
// src/primitives/item.tsx
|
|
2746
2985
|
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
2747
2986
|
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
2748
2987
|
import { cva as cva10 } from "class-variance-authority";
|
|
2749
|
-
import { cn as
|
|
2750
|
-
import { jsx as
|
|
2988
|
+
import { cn as cn14 } from "cn";
|
|
2989
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2751
2990
|
function ItemGroup({ className, ...props }) {
|
|
2752
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx30(
|
|
2753
2992
|
"div",
|
|
2754
2993
|
{
|
|
2755
2994
|
role: "list",
|
|
2756
2995
|
"data-slot": "item-group",
|
|
2757
|
-
className:
|
|
2996
|
+
className: cn14(
|
|
2758
2997
|
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
2759
2998
|
className
|
|
2760
2999
|
),
|
|
@@ -2766,12 +3005,12 @@ function ItemSeparator({
|
|
|
2766
3005
|
className,
|
|
2767
3006
|
...props
|
|
2768
3007
|
}) {
|
|
2769
|
-
return /* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ jsx30(
|
|
2770
3009
|
Separator,
|
|
2771
3010
|
{
|
|
2772
3011
|
"data-slot": "item-separator",
|
|
2773
3012
|
orientation: "horizontal",
|
|
2774
|
-
className:
|
|
3013
|
+
className: cn14("my-2", className),
|
|
2775
3014
|
...props
|
|
2776
3015
|
}
|
|
2777
3016
|
);
|
|
@@ -2808,7 +3047,7 @@ function Item({
|
|
|
2808
3047
|
defaultTagName: "div",
|
|
2809
3048
|
props: mergeProps2(
|
|
2810
3049
|
{
|
|
2811
|
-
className:
|
|
3050
|
+
className: cn14(itemVariants({ variant, size, className }))
|
|
2812
3051
|
},
|
|
2813
3052
|
props
|
|
2814
3053
|
),
|
|
@@ -2840,22 +3079,22 @@ function ItemMedia({
|
|
|
2840
3079
|
variant = "default",
|
|
2841
3080
|
...props
|
|
2842
3081
|
}) {
|
|
2843
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ jsx30(
|
|
2844
3083
|
"div",
|
|
2845
3084
|
{
|
|
2846
3085
|
"data-slot": "item-media",
|
|
2847
3086
|
"data-variant": variant,
|
|
2848
|
-
className:
|
|
3087
|
+
className: cn14(itemMediaVariants({ variant, className })),
|
|
2849
3088
|
...props
|
|
2850
3089
|
}
|
|
2851
3090
|
);
|
|
2852
3091
|
}
|
|
2853
3092
|
function ItemContent({ className, ...props }) {
|
|
2854
|
-
return /* @__PURE__ */
|
|
3093
|
+
return /* @__PURE__ */ jsx30(
|
|
2855
3094
|
"div",
|
|
2856
3095
|
{
|
|
2857
3096
|
"data-slot": "item-content",
|
|
2858
|
-
className:
|
|
3097
|
+
className: cn14(
|
|
2859
3098
|
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
2860
3099
|
className
|
|
2861
3100
|
),
|
|
@@ -2864,11 +3103,11 @@ function ItemContent({ className, ...props }) {
|
|
|
2864
3103
|
);
|
|
2865
3104
|
}
|
|
2866
3105
|
function ItemTitle({ className, ...props }) {
|
|
2867
|
-
return /* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsx30(
|
|
2868
3107
|
"div",
|
|
2869
3108
|
{
|
|
2870
3109
|
"data-slot": "item-title",
|
|
2871
|
-
className:
|
|
3110
|
+
className: cn14(
|
|
2872
3111
|
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
2873
3112
|
className
|
|
2874
3113
|
),
|
|
@@ -2877,11 +3116,11 @@ function ItemTitle({ className, ...props }) {
|
|
|
2877
3116
|
);
|
|
2878
3117
|
}
|
|
2879
3118
|
function ItemDescription({ className, ...props }) {
|
|
2880
|
-
return /* @__PURE__ */
|
|
3119
|
+
return /* @__PURE__ */ jsx30(
|
|
2881
3120
|
"p",
|
|
2882
3121
|
{
|
|
2883
3122
|
"data-slot": "item-description",
|
|
2884
|
-
className:
|
|
3123
|
+
className: cn14(
|
|
2885
3124
|
"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
2886
3125
|
className
|
|
2887
3126
|
),
|
|
@@ -2890,21 +3129,21 @@ function ItemDescription({ className, ...props }) {
|
|
|
2890
3129
|
);
|
|
2891
3130
|
}
|
|
2892
3131
|
function ItemActions({ className, ...props }) {
|
|
2893
|
-
return /* @__PURE__ */
|
|
3132
|
+
return /* @__PURE__ */ jsx30(
|
|
2894
3133
|
"div",
|
|
2895
3134
|
{
|
|
2896
3135
|
"data-slot": "item-actions",
|
|
2897
|
-
className:
|
|
3136
|
+
className: cn14("flex items-center gap-2", className),
|
|
2898
3137
|
...props
|
|
2899
3138
|
}
|
|
2900
3139
|
);
|
|
2901
3140
|
}
|
|
2902
3141
|
function ItemHeader({ className, ...props }) {
|
|
2903
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ jsx30(
|
|
2904
3143
|
"div",
|
|
2905
3144
|
{
|
|
2906
3145
|
"data-slot": "item-header",
|
|
2907
|
-
className:
|
|
3146
|
+
className: cn14(
|
|
2908
3147
|
"flex basis-full items-center justify-between gap-2",
|
|
2909
3148
|
className
|
|
2910
3149
|
),
|
|
@@ -2913,11 +3152,11 @@ function ItemHeader({ className, ...props }) {
|
|
|
2913
3152
|
);
|
|
2914
3153
|
}
|
|
2915
3154
|
function ItemFooter({ className, ...props }) {
|
|
2916
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx30(
|
|
2917
3156
|
"div",
|
|
2918
3157
|
{
|
|
2919
3158
|
"data-slot": "item-footer",
|
|
2920
|
-
className:
|
|
3159
|
+
className: cn14(
|
|
2921
3160
|
"flex basis-full items-center justify-between gap-2",
|
|
2922
3161
|
className
|
|
2923
3162
|
),
|
|
@@ -2927,9 +3166,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
2927
3166
|
}
|
|
2928
3167
|
|
|
2929
3168
|
// src/components/item/Item.tsx
|
|
2930
|
-
import { jsx as
|
|
3169
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2931
3170
|
function Item2({ className, asChild, children, ...props }) {
|
|
2932
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ jsx31(
|
|
2933
3172
|
Item,
|
|
2934
3173
|
{
|
|
2935
3174
|
render: asChild ? children : void 0,
|
|
@@ -2948,8 +3187,8 @@ function Item2({ className, asChild, children, ...props }) {
|
|
|
2948
3187
|
}
|
|
2949
3188
|
);
|
|
2950
3189
|
}
|
|
2951
|
-
var ItemMedia2 =
|
|
2952
|
-
return /* @__PURE__ */
|
|
3190
|
+
var ItemMedia2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3191
|
+
return /* @__PURE__ */ jsx31(
|
|
2953
3192
|
ItemMedia,
|
|
2954
3193
|
{
|
|
2955
3194
|
ref,
|
|
@@ -2959,8 +3198,8 @@ var ItemMedia2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
2959
3198
|
);
|
|
2960
3199
|
});
|
|
2961
3200
|
ItemMedia2.displayName = "ItemMedia";
|
|
2962
|
-
var ItemTitle2 =
|
|
2963
|
-
return /* @__PURE__ */
|
|
3201
|
+
var ItemTitle2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3202
|
+
return /* @__PURE__ */ jsx31(
|
|
2964
3203
|
ItemTitle,
|
|
2965
3204
|
{
|
|
2966
3205
|
ref,
|
|
@@ -2970,8 +3209,8 @@ var ItemTitle2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
2970
3209
|
);
|
|
2971
3210
|
});
|
|
2972
3211
|
ItemTitle2.displayName = "ItemTitle";
|
|
2973
|
-
var ItemDescription2 =
|
|
2974
|
-
return /* @__PURE__ */
|
|
3212
|
+
var ItemDescription2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3213
|
+
return /* @__PURE__ */ jsx31(
|
|
2975
3214
|
ItemDescription,
|
|
2976
3215
|
{
|
|
2977
3216
|
ref,
|
|
@@ -2981,8 +3220,8 @@ var ItemDescription2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
2981
3220
|
);
|
|
2982
3221
|
});
|
|
2983
3222
|
ItemDescription2.displayName = "ItemDescription";
|
|
2984
|
-
var ItemSeparator2 =
|
|
2985
|
-
return /* @__PURE__ */
|
|
3223
|
+
var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3224
|
+
return /* @__PURE__ */ jsx31(
|
|
2986
3225
|
ItemSeparator,
|
|
2987
3226
|
{
|
|
2988
3227
|
ref,
|
|
@@ -2995,7 +3234,7 @@ ItemSeparator2.displayName = "ItemSeparator";
|
|
|
2995
3234
|
|
|
2996
3235
|
// src/components/search-input/SearchInput.tsx
|
|
2997
3236
|
import { Search } from "lucide-react";
|
|
2998
|
-
import { jsx as
|
|
3237
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2999
3238
|
var SearchInput = ({
|
|
3000
3239
|
type = "search",
|
|
3001
3240
|
placeholder = "Search...",
|
|
@@ -3003,14 +3242,14 @@ var SearchInput = ({
|
|
|
3003
3242
|
ref,
|
|
3004
3243
|
...props
|
|
3005
3244
|
}) => /* @__PURE__ */ jsxs15("div", { className: "relative flex w-full items-center", "data-slot": "search-input", children: [
|
|
3006
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ jsx32(
|
|
3007
3246
|
Search,
|
|
3008
3247
|
{
|
|
3009
3248
|
"aria-hidden": "true",
|
|
3010
3249
|
className: "pointer-events-none absolute left-2.5 size-4 text-berget-muted-foreground"
|
|
3011
3250
|
}
|
|
3012
3251
|
),
|
|
3013
|
-
/* @__PURE__ */
|
|
3252
|
+
/* @__PURE__ */ jsx32(
|
|
3014
3253
|
Input,
|
|
3015
3254
|
{
|
|
3016
3255
|
ref,
|
|
@@ -3024,33 +3263,33 @@ var SearchInput = ({
|
|
|
3024
3263
|
SearchInput.displayName = "SearchInput";
|
|
3025
3264
|
|
|
3026
3265
|
// src/components/checkbox/Checkbox.tsx
|
|
3027
|
-
import * as
|
|
3266
|
+
import * as React19 from "react";
|
|
3028
3267
|
import { Checkbox as CheckboxPrimitive2 } from "@base-ui/react/checkbox";
|
|
3029
|
-
import { Check
|
|
3268
|
+
import { Check } from "lucide-react";
|
|
3030
3269
|
import { cva as cva11 } from "class-variance-authority";
|
|
3031
3270
|
|
|
3032
3271
|
// src/primitives/checkbox.tsx
|
|
3033
3272
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
3034
|
-
import { cn as
|
|
3035
|
-
import { CheckIcon } from "lucide-react";
|
|
3036
|
-
import { jsx as
|
|
3273
|
+
import { cn as cn15 } from "cn";
|
|
3274
|
+
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
3275
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3037
3276
|
function Checkbox({ className, ...props }) {
|
|
3038
|
-
return /* @__PURE__ */
|
|
3277
|
+
return /* @__PURE__ */ jsx33(
|
|
3039
3278
|
CheckboxPrimitive.Root,
|
|
3040
3279
|
{
|
|
3041
3280
|
"data-slot": "checkbox",
|
|
3042
|
-
className:
|
|
3281
|
+
className: cn15(
|
|
3043
3282
|
"peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
3044
3283
|
className
|
|
3045
3284
|
),
|
|
3046
3285
|
...props,
|
|
3047
|
-
children: /* @__PURE__ */
|
|
3286
|
+
children: /* @__PURE__ */ jsx33(
|
|
3048
3287
|
CheckboxPrimitive.Indicator,
|
|
3049
3288
|
{
|
|
3050
3289
|
"data-slot": "checkbox-indicator",
|
|
3051
3290
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
3052
|
-
children: /* @__PURE__ */
|
|
3053
|
-
|
|
3291
|
+
children: /* @__PURE__ */ jsx33(
|
|
3292
|
+
CheckIcon2,
|
|
3054
3293
|
{}
|
|
3055
3294
|
)
|
|
3056
3295
|
}
|
|
@@ -3060,7 +3299,7 @@ function Checkbox({ className, ...props }) {
|
|
|
3060
3299
|
}
|
|
3061
3300
|
|
|
3062
3301
|
// src/components/checkbox/Checkbox.tsx
|
|
3063
|
-
import { jsx as
|
|
3302
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3064
3303
|
var checkboxVariants = cva11(
|
|
3065
3304
|
"inline-flex items-center justify-center rounded-berget-xs transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3066
3305
|
{
|
|
@@ -3082,7 +3321,7 @@ var checkboxVariants = cva11(
|
|
|
3082
3321
|
}
|
|
3083
3322
|
}
|
|
3084
3323
|
);
|
|
3085
|
-
var Checkbox2 =
|
|
3324
|
+
var Checkbox2 = React19.forwardRef(
|
|
3086
3325
|
({
|
|
3087
3326
|
"aria-label": ariaLabel,
|
|
3088
3327
|
className,
|
|
@@ -3095,17 +3334,16 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3095
3334
|
disabled,
|
|
3096
3335
|
...props
|
|
3097
3336
|
}, ref) => {
|
|
3098
|
-
const generatedId =
|
|
3337
|
+
const generatedId = React19.useId();
|
|
3099
3338
|
const checkboxId = id || generatedId;
|
|
3100
3339
|
const errorId = `${checkboxId}-error`;
|
|
3101
3340
|
return /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-3", children: [
|
|
3102
|
-
/* @__PURE__ */
|
|
3341
|
+
/* @__PURE__ */ jsx34("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx34(
|
|
3103
3342
|
Checkbox,
|
|
3104
3343
|
{
|
|
3105
3344
|
ref,
|
|
3106
3345
|
id: checkboxId,
|
|
3107
3346
|
disabled,
|
|
3108
|
-
nativeButton: true,
|
|
3109
3347
|
"aria-invalid": !!error,
|
|
3110
3348
|
"aria-describedby": error ? errorId : void 0,
|
|
3111
3349
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -3116,8 +3354,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3116
3354
|
className
|
|
3117
3355
|
),
|
|
3118
3356
|
...props,
|
|
3119
|
-
children: /* @__PURE__ */
|
|
3120
|
-
|
|
3357
|
+
children: /* @__PURE__ */ jsx34(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx34(
|
|
3358
|
+
Check,
|
|
3121
3359
|
{
|
|
3122
3360
|
className: "h-4 w-4 text-current stroke-current",
|
|
3123
3361
|
style: { color: "currentColor", stroke: "currentColor" }
|
|
@@ -3126,7 +3364,7 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3126
3364
|
}
|
|
3127
3365
|
) }),
|
|
3128
3366
|
(label || description || error) && /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1", children: [
|
|
3129
|
-
label && /* @__PURE__ */
|
|
3367
|
+
label && /* @__PURE__ */ jsx34(
|
|
3130
3368
|
"label",
|
|
3131
3369
|
{
|
|
3132
3370
|
htmlFor: checkboxId,
|
|
@@ -3138,8 +3376,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3138
3376
|
children: label
|
|
3139
3377
|
}
|
|
3140
3378
|
),
|
|
3141
|
-
description && /* @__PURE__ */
|
|
3142
|
-
error && /* @__PURE__ */
|
|
3379
|
+
description && /* @__PURE__ */ jsx34(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3380
|
+
error && /* @__PURE__ */ jsx34(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3143
3381
|
] })
|
|
3144
3382
|
] });
|
|
3145
3383
|
}
|
|
@@ -3147,10 +3385,10 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3147
3385
|
Checkbox2.displayName = "Checkbox";
|
|
3148
3386
|
|
|
3149
3387
|
// src/components/switch/Switch.tsx
|
|
3150
|
-
import * as
|
|
3388
|
+
import * as React20 from "react";
|
|
3151
3389
|
import { Switch as SwitchPrimitives } from "@base-ui/react/switch";
|
|
3152
3390
|
import { cva as cva12 } from "class-variance-authority";
|
|
3153
|
-
import { jsx as
|
|
3391
|
+
import { jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3154
3392
|
var switchRootVariants = cva12(
|
|
3155
3393
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
3156
3394
|
{
|
|
@@ -3187,7 +3425,7 @@ var switchThumbVariants = cva12(
|
|
|
3187
3425
|
}
|
|
3188
3426
|
}
|
|
3189
3427
|
);
|
|
3190
|
-
var Switch =
|
|
3428
|
+
var Switch = React20.forwardRef(
|
|
3191
3429
|
({
|
|
3192
3430
|
"aria-label": ariaLabel,
|
|
3193
3431
|
className,
|
|
@@ -3200,17 +3438,16 @@ var Switch = React19.forwardRef(
|
|
|
3200
3438
|
disabled,
|
|
3201
3439
|
...props
|
|
3202
3440
|
}, ref) => {
|
|
3203
|
-
const generatedId =
|
|
3441
|
+
const generatedId = React20.useId();
|
|
3204
3442
|
const switchId = id || generatedId;
|
|
3205
3443
|
const errorId = `${switchId}-error`;
|
|
3206
3444
|
return /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3", children: [
|
|
3207
|
-
/* @__PURE__ */
|
|
3445
|
+
/* @__PURE__ */ jsx35(
|
|
3208
3446
|
SwitchPrimitives.Root,
|
|
3209
3447
|
{
|
|
3210
3448
|
ref,
|
|
3211
3449
|
id: switchId,
|
|
3212
3450
|
disabled,
|
|
3213
|
-
nativeButton: true,
|
|
3214
3451
|
"aria-invalid": !!error,
|
|
3215
3452
|
"aria-describedby": error ? errorId : void 0,
|
|
3216
3453
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -3220,11 +3457,11 @@ var Switch = React19.forwardRef(
|
|
|
3220
3457
|
className
|
|
3221
3458
|
),
|
|
3222
3459
|
...props,
|
|
3223
|
-
children: /* @__PURE__ */
|
|
3460
|
+
children: /* @__PURE__ */ jsx35(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
3224
3461
|
}
|
|
3225
3462
|
),
|
|
3226
3463
|
(label || description || error) && /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1", children: [
|
|
3227
|
-
label && /* @__PURE__ */
|
|
3464
|
+
label && /* @__PURE__ */ jsx35(
|
|
3228
3465
|
"label",
|
|
3229
3466
|
{
|
|
3230
3467
|
htmlFor: switchId,
|
|
@@ -3235,8 +3472,8 @@ var Switch = React19.forwardRef(
|
|
|
3235
3472
|
children: label
|
|
3236
3473
|
}
|
|
3237
3474
|
),
|
|
3238
|
-
description && /* @__PURE__ */
|
|
3239
|
-
error && /* @__PURE__ */
|
|
3475
|
+
description && /* @__PURE__ */ jsx35(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3476
|
+
error && /* @__PURE__ */ jsx35(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3240
3477
|
] })
|
|
3241
3478
|
] });
|
|
3242
3479
|
}
|
|
@@ -3245,26 +3482,26 @@ Switch.displayName = "Switch";
|
|
|
3245
3482
|
|
|
3246
3483
|
// src/primitives/select.tsx
|
|
3247
3484
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3248
|
-
import { cn as
|
|
3249
|
-
import { ChevronDownIcon as ChevronDownIcon2, CheckIcon as
|
|
3250
|
-
import { jsx as
|
|
3485
|
+
import { cn as cn16 } from "cn";
|
|
3486
|
+
import { ChevronDownIcon as ChevronDownIcon2, CheckIcon as CheckIcon3, ChevronUpIcon } from "lucide-react";
|
|
3487
|
+
import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3251
3488
|
var Select = SelectPrimitive.Root;
|
|
3252
3489
|
function SelectGroup({ className, ...props }) {
|
|
3253
|
-
return /* @__PURE__ */
|
|
3490
|
+
return /* @__PURE__ */ jsx36(
|
|
3254
3491
|
SelectPrimitive.Group,
|
|
3255
3492
|
{
|
|
3256
3493
|
"data-slot": "select-group",
|
|
3257
|
-
className:
|
|
3494
|
+
className: cn16("scroll-my-1 p-1", className),
|
|
3258
3495
|
...props
|
|
3259
3496
|
}
|
|
3260
3497
|
);
|
|
3261
3498
|
}
|
|
3262
3499
|
function SelectValue({ className, ...props }) {
|
|
3263
|
-
return /* @__PURE__ */
|
|
3500
|
+
return /* @__PURE__ */ jsx36(
|
|
3264
3501
|
SelectPrimitive.Value,
|
|
3265
3502
|
{
|
|
3266
3503
|
"data-slot": "select-value",
|
|
3267
|
-
className:
|
|
3504
|
+
className: cn16("flex flex-1 text-left", className),
|
|
3268
3505
|
...props
|
|
3269
3506
|
}
|
|
3270
3507
|
);
|
|
@@ -3280,17 +3517,17 @@ function SelectTrigger({
|
|
|
3280
3517
|
{
|
|
3281
3518
|
"data-slot": "select-trigger",
|
|
3282
3519
|
"data-size": size,
|
|
3283
|
-
className:
|
|
3284
|
-
"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-
|
|
3520
|
+
className: cn16(
|
|
3521
|
+
"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3285
3522
|
className
|
|
3286
3523
|
),
|
|
3287
3524
|
...props,
|
|
3288
3525
|
children: [
|
|
3289
3526
|
children,
|
|
3290
|
-
/* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ jsx36(
|
|
3291
3528
|
SelectPrimitive.Icon,
|
|
3292
3529
|
{
|
|
3293
|
-
render: /* @__PURE__ */
|
|
3530
|
+
render: /* @__PURE__ */ jsx36(ChevronDownIcon2, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
3294
3531
|
}
|
|
3295
3532
|
)
|
|
3296
3533
|
]
|
|
@@ -3307,7 +3544,7 @@ function SelectContent({
|
|
|
3307
3544
|
alignItemWithTrigger = true,
|
|
3308
3545
|
...props
|
|
3309
3546
|
}) {
|
|
3310
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx36(
|
|
3311
3548
|
SelectPrimitive.Positioner,
|
|
3312
3549
|
{
|
|
3313
3550
|
side,
|
|
@@ -3321,12 +3558,12 @@ function SelectContent({
|
|
|
3321
3558
|
{
|
|
3322
3559
|
"data-slot": "select-content",
|
|
3323
3560
|
"data-align-trigger": alignItemWithTrigger,
|
|
3324
|
-
className:
|
|
3561
|
+
className: cn16("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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", className),
|
|
3325
3562
|
...props,
|
|
3326
3563
|
children: [
|
|
3327
|
-
/* @__PURE__ */
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__PURE__ */ jsx36(SelectScrollUpButton, {}),
|
|
3565
|
+
/* @__PURE__ */ jsx36(SelectPrimitive.List, { children }),
|
|
3566
|
+
/* @__PURE__ */ jsx36(SelectScrollDownButton, {})
|
|
3330
3567
|
]
|
|
3331
3568
|
}
|
|
3332
3569
|
)
|
|
@@ -3337,11 +3574,11 @@ function SelectLabel({
|
|
|
3337
3574
|
className,
|
|
3338
3575
|
...props
|
|
3339
3576
|
}) {
|
|
3340
|
-
return /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ jsx36(
|
|
3341
3578
|
SelectPrimitive.GroupLabel,
|
|
3342
3579
|
{
|
|
3343
3580
|
"data-slot": "select-label",
|
|
3344
|
-
className:
|
|
3581
|
+
className: cn16("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
3345
3582
|
...props
|
|
3346
3583
|
}
|
|
3347
3584
|
);
|
|
@@ -3355,18 +3592,18 @@ function SelectItem({
|
|
|
3355
3592
|
SelectPrimitive.Item,
|
|
3356
3593
|
{
|
|
3357
3594
|
"data-slot": "select-item",
|
|
3358
|
-
className:
|
|
3595
|
+
className: cn16(
|
|
3359
3596
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
3360
3597
|
className
|
|
3361
3598
|
),
|
|
3362
3599
|
...props,
|
|
3363
3600
|
children: [
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ jsx36(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
3602
|
+
/* @__PURE__ */ jsx36(
|
|
3366
3603
|
SelectPrimitive.ItemIndicator,
|
|
3367
3604
|
{
|
|
3368
|
-
render: /* @__PURE__ */
|
|
3369
|
-
children: /* @__PURE__ */
|
|
3605
|
+
render: /* @__PURE__ */ jsx36("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
3606
|
+
children: /* @__PURE__ */ jsx36(CheckIcon3, { className: "pointer-events-none" })
|
|
3370
3607
|
}
|
|
3371
3608
|
)
|
|
3372
3609
|
]
|
|
@@ -3377,11 +3614,11 @@ function SelectSeparator({
|
|
|
3377
3614
|
className,
|
|
3378
3615
|
...props
|
|
3379
3616
|
}) {
|
|
3380
|
-
return /* @__PURE__ */
|
|
3617
|
+
return /* @__PURE__ */ jsx36(
|
|
3381
3618
|
SelectPrimitive.Separator,
|
|
3382
3619
|
{
|
|
3383
3620
|
"data-slot": "select-separator",
|
|
3384
|
-
className:
|
|
3621
|
+
className: cn16("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
3385
3622
|
...props
|
|
3386
3623
|
}
|
|
3387
3624
|
);
|
|
@@ -3390,16 +3627,16 @@ function SelectScrollUpButton({
|
|
|
3390
3627
|
className,
|
|
3391
3628
|
...props
|
|
3392
3629
|
}) {
|
|
3393
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ jsx36(
|
|
3394
3631
|
SelectPrimitive.ScrollUpArrow,
|
|
3395
3632
|
{
|
|
3396
3633
|
"data-slot": "select-scroll-up-button",
|
|
3397
|
-
className:
|
|
3634
|
+
className: cn16(
|
|
3398
3635
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3399
3636
|
className
|
|
3400
3637
|
),
|
|
3401
3638
|
...props,
|
|
3402
|
-
children: /* @__PURE__ */
|
|
3639
|
+
children: /* @__PURE__ */ jsx36(
|
|
3403
3640
|
ChevronUpIcon,
|
|
3404
3641
|
{}
|
|
3405
3642
|
)
|
|
@@ -3410,16 +3647,16 @@ function SelectScrollDownButton({
|
|
|
3410
3647
|
className,
|
|
3411
3648
|
...props
|
|
3412
3649
|
}) {
|
|
3413
|
-
return /* @__PURE__ */
|
|
3650
|
+
return /* @__PURE__ */ jsx36(
|
|
3414
3651
|
SelectPrimitive.ScrollDownArrow,
|
|
3415
3652
|
{
|
|
3416
3653
|
"data-slot": "select-scroll-down-button",
|
|
3417
|
-
className:
|
|
3654
|
+
className: cn16(
|
|
3418
3655
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3419
3656
|
className
|
|
3420
3657
|
),
|
|
3421
3658
|
...props,
|
|
3422
|
-
children: /* @__PURE__ */
|
|
3659
|
+
children: /* @__PURE__ */ jsx36(
|
|
3423
3660
|
ChevronDownIcon2,
|
|
3424
3661
|
{}
|
|
3425
3662
|
)
|
|
@@ -3428,18 +3665,18 @@ function SelectScrollDownButton({
|
|
|
3428
3665
|
}
|
|
3429
3666
|
|
|
3430
3667
|
// src/components/country-select/CountrySelect.tsx
|
|
3431
|
-
import * as
|
|
3668
|
+
import * as React22 from "react";
|
|
3432
3669
|
import { ChevronDown as ChevronDown2, Globe } from "lucide-react";
|
|
3433
3670
|
|
|
3434
3671
|
// src/components/icon/Icon.tsx
|
|
3435
|
-
import * as
|
|
3436
|
-
import { jsx as
|
|
3672
|
+
import * as React21 from "react";
|
|
3673
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3437
3674
|
var iconStrokeMap = {
|
|
3438
3675
|
16: 1.4,
|
|
3439
3676
|
24: 1.6,
|
|
3440
3677
|
32: 1.8
|
|
3441
3678
|
};
|
|
3442
|
-
var Icon =
|
|
3679
|
+
var Icon = React21.forwardRef(
|
|
3443
3680
|
({
|
|
3444
3681
|
icon: IconComponent,
|
|
3445
3682
|
size,
|
|
@@ -3451,7 +3688,7 @@ var Icon = React20.forwardRef(
|
|
|
3451
3688
|
const strokeWidth = iconStrokeMap[size];
|
|
3452
3689
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
3453
3690
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
3454
|
-
return /* @__PURE__ */
|
|
3691
|
+
return /* @__PURE__ */ jsx37(
|
|
3455
3692
|
IconComponent,
|
|
3456
3693
|
{
|
|
3457
3694
|
ref,
|
|
@@ -3467,13 +3704,13 @@ Icon.displayName = "Icon";
|
|
|
3467
3704
|
|
|
3468
3705
|
// src/primitives/popover.tsx
|
|
3469
3706
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3470
|
-
import { cn as
|
|
3471
|
-
import { jsx as
|
|
3707
|
+
import { cn as cn17 } from "cn";
|
|
3708
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3472
3709
|
function Popover({ ...props }) {
|
|
3473
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ jsx38(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
3474
3711
|
}
|
|
3475
3712
|
function PopoverTrigger({ ...props }) {
|
|
3476
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ jsx38(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
3477
3714
|
}
|
|
3478
3715
|
function PopoverContent({
|
|
3479
3716
|
className,
|
|
@@ -3483,7 +3720,7 @@ function PopoverContent({
|
|
|
3483
3720
|
sideOffset = 4,
|
|
3484
3721
|
...props
|
|
3485
3722
|
}) {
|
|
3486
|
-
return /* @__PURE__ */
|
|
3723
|
+
return /* @__PURE__ */ jsx38(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx38(
|
|
3487
3724
|
PopoverPrimitive.Positioner,
|
|
3488
3725
|
{
|
|
3489
3726
|
align,
|
|
@@ -3491,11 +3728,11 @@ function PopoverContent({
|
|
|
3491
3728
|
side,
|
|
3492
3729
|
sideOffset,
|
|
3493
3730
|
className: "isolate z-50",
|
|
3494
|
-
children: /* @__PURE__ */
|
|
3731
|
+
children: /* @__PURE__ */ jsx38(
|
|
3495
3732
|
PopoverPrimitive.Popup,
|
|
3496
3733
|
{
|
|
3497
3734
|
"data-slot": "popover-content",
|
|
3498
|
-
className:
|
|
3735
|
+
className: cn17(
|
|
3499
3736
|
"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",
|
|
3500
3737
|
className
|
|
3501
3738
|
),
|
|
@@ -3508,28 +3745,28 @@ function PopoverContent({
|
|
|
3508
3745
|
|
|
3509
3746
|
// src/primitives/command.tsx
|
|
3510
3747
|
import { Command as CommandPrimitive } from "cmdk";
|
|
3511
|
-
import { cn as
|
|
3748
|
+
import { cn as cn21 } from "cn";
|
|
3512
3749
|
|
|
3513
3750
|
// src/primitives/dialog.tsx
|
|
3514
3751
|
import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
3515
|
-
import { cn as
|
|
3752
|
+
import { cn as cn18 } from "cn";
|
|
3516
3753
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
3517
|
-
import { jsx as
|
|
3754
|
+
import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3518
3755
|
|
|
3519
3756
|
// src/primitives/input-group.tsx
|
|
3520
3757
|
import { cva as cva13 } from "class-variance-authority";
|
|
3521
|
-
import { cn as
|
|
3758
|
+
import { cn as cn20 } from "cn";
|
|
3522
3759
|
|
|
3523
3760
|
// src/primitives/textarea.tsx
|
|
3524
|
-
import { cn as
|
|
3525
|
-
import { jsx as
|
|
3761
|
+
import { cn as cn19 } from "cn";
|
|
3762
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3526
3763
|
function Textarea({ className, ...props }) {
|
|
3527
|
-
return /* @__PURE__ */
|
|
3764
|
+
return /* @__PURE__ */ jsx40(
|
|
3528
3765
|
"textarea",
|
|
3529
3766
|
{
|
|
3530
3767
|
"data-slot": "textarea",
|
|
3531
|
-
className:
|
|
3532
|
-
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-
|
|
3768
|
+
className: cn19(
|
|
3769
|
+
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
3533
3770
|
className
|
|
3534
3771
|
),
|
|
3535
3772
|
...props
|
|
@@ -3538,14 +3775,14 @@ function Textarea({ className, ...props }) {
|
|
|
3538
3775
|
}
|
|
3539
3776
|
|
|
3540
3777
|
// src/primitives/input-group.tsx
|
|
3541
|
-
import { jsx as
|
|
3778
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3542
3779
|
function InputGroup({ className, ...props }) {
|
|
3543
|
-
return /* @__PURE__ */
|
|
3780
|
+
return /* @__PURE__ */ jsx41(
|
|
3544
3781
|
"div",
|
|
3545
3782
|
{
|
|
3546
3783
|
"data-slot": "input-group",
|
|
3547
3784
|
role: "group",
|
|
3548
|
-
className:
|
|
3785
|
+
className: cn20(
|
|
3549
3786
|
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
3550
3787
|
className
|
|
3551
3788
|
),
|
|
@@ -3574,13 +3811,13 @@ function InputGroupAddon({
|
|
|
3574
3811
|
align = "inline-start",
|
|
3575
3812
|
...props
|
|
3576
3813
|
}) {
|
|
3577
|
-
return /* @__PURE__ */
|
|
3814
|
+
return /* @__PURE__ */ jsx41(
|
|
3578
3815
|
"div",
|
|
3579
3816
|
{
|
|
3580
3817
|
role: "group",
|
|
3581
3818
|
"data-slot": "input-group-addon",
|
|
3582
3819
|
"data-align": align,
|
|
3583
|
-
className:
|
|
3820
|
+
className: cn20(inputGroupAddonVariants({ align }), className),
|
|
3584
3821
|
onClick: (e) => {
|
|
3585
3822
|
if (e.target.closest("button")) {
|
|
3586
3823
|
return;
|
|
@@ -3609,17 +3846,17 @@ var inputGroupButtonVariants = cva13(
|
|
|
3609
3846
|
);
|
|
3610
3847
|
|
|
3611
3848
|
// src/primitives/command.tsx
|
|
3612
|
-
import { SearchIcon, CheckIcon as
|
|
3613
|
-
import { jsx as
|
|
3849
|
+
import { SearchIcon, CheckIcon as CheckIcon4 } from "lucide-react";
|
|
3850
|
+
import { jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3614
3851
|
function Command({
|
|
3615
3852
|
className,
|
|
3616
3853
|
...props
|
|
3617
3854
|
}) {
|
|
3618
|
-
return /* @__PURE__ */
|
|
3855
|
+
return /* @__PURE__ */ jsx42(
|
|
3619
3856
|
CommandPrimitive,
|
|
3620
3857
|
{
|
|
3621
3858
|
"data-slot": "command",
|
|
3622
|
-
className:
|
|
3859
|
+
className: cn21(
|
|
3623
3860
|
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
3624
3861
|
className
|
|
3625
3862
|
),
|
|
@@ -3631,30 +3868,30 @@ function CommandInput({
|
|
|
3631
3868
|
className,
|
|
3632
3869
|
...props
|
|
3633
3870
|
}) {
|
|
3634
|
-
return /* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3871
|
+
return /* @__PURE__ */ jsx42("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs20(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
3872
|
+
/* @__PURE__ */ jsx42(
|
|
3636
3873
|
CommandPrimitive.Input,
|
|
3637
3874
|
{
|
|
3638
3875
|
"data-slot": "command-input",
|
|
3639
|
-
className:
|
|
3876
|
+
className: cn21(
|
|
3640
3877
|
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
3641
3878
|
className
|
|
3642
3879
|
),
|
|
3643
3880
|
...props
|
|
3644
3881
|
}
|
|
3645
3882
|
),
|
|
3646
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsx42(InputGroupAddon, { children: /* @__PURE__ */ jsx42(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
3647
3884
|
] }) });
|
|
3648
3885
|
}
|
|
3649
3886
|
function CommandList({
|
|
3650
3887
|
className,
|
|
3651
3888
|
...props
|
|
3652
3889
|
}) {
|
|
3653
|
-
return /* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ jsx42(
|
|
3654
3891
|
CommandPrimitive.List,
|
|
3655
3892
|
{
|
|
3656
3893
|
"data-slot": "command-list",
|
|
3657
|
-
className:
|
|
3894
|
+
className: cn21(
|
|
3658
3895
|
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
3659
3896
|
className
|
|
3660
3897
|
),
|
|
@@ -3666,11 +3903,11 @@ function CommandEmpty({
|
|
|
3666
3903
|
className,
|
|
3667
3904
|
...props
|
|
3668
3905
|
}) {
|
|
3669
|
-
return /* @__PURE__ */
|
|
3906
|
+
return /* @__PURE__ */ jsx42(
|
|
3670
3907
|
CommandPrimitive.Empty,
|
|
3671
3908
|
{
|
|
3672
3909
|
"data-slot": "command-empty",
|
|
3673
|
-
className:
|
|
3910
|
+
className: cn21("py-6 text-center text-sm", className),
|
|
3674
3911
|
...props
|
|
3675
3912
|
}
|
|
3676
3913
|
);
|
|
@@ -3679,11 +3916,11 @@ function CommandGroup({
|
|
|
3679
3916
|
className,
|
|
3680
3917
|
...props
|
|
3681
3918
|
}) {
|
|
3682
|
-
return /* @__PURE__ */
|
|
3919
|
+
return /* @__PURE__ */ jsx42(
|
|
3683
3920
|
CommandPrimitive.Group,
|
|
3684
3921
|
{
|
|
3685
3922
|
"data-slot": "command-group",
|
|
3686
|
-
className:
|
|
3923
|
+
className: cn21(
|
|
3687
3924
|
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
3688
3925
|
className
|
|
3689
3926
|
),
|
|
@@ -3700,14 +3937,14 @@ function CommandItem({
|
|
|
3700
3937
|
CommandPrimitive.Item,
|
|
3701
3938
|
{
|
|
3702
3939
|
"data-slot": "command-item",
|
|
3703
|
-
className:
|
|
3940
|
+
className: cn21(
|
|
3704
3941
|
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
3705
3942
|
className
|
|
3706
3943
|
),
|
|
3707
3944
|
...props,
|
|
3708
3945
|
children: [
|
|
3709
3946
|
children,
|
|
3710
|
-
/* @__PURE__ */
|
|
3947
|
+
/* @__PURE__ */ jsx42(CheckIcon4, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
3711
3948
|
]
|
|
3712
3949
|
}
|
|
3713
3950
|
);
|
|
@@ -3855,8 +4092,8 @@ var isEUCountry = (countryCode) => {
|
|
|
3855
4092
|
};
|
|
3856
4093
|
|
|
3857
4094
|
// src/components/country-select/CountrySelect.tsx
|
|
3858
|
-
import { Fragment as
|
|
3859
|
-
var CountrySelect =
|
|
4095
|
+
import { Fragment as Fragment2, jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4096
|
+
var CountrySelect = React22.forwardRef(
|
|
3860
4097
|
({
|
|
3861
4098
|
value,
|
|
3862
4099
|
onValueChange,
|
|
@@ -3866,14 +4103,14 @@ var CountrySelect = React21.forwardRef(
|
|
|
3866
4103
|
align = "center",
|
|
3867
4104
|
sideOffset = 4
|
|
3868
4105
|
}, ref) => {
|
|
3869
|
-
const [open, setOpen] =
|
|
3870
|
-
const selectedCountry =
|
|
4106
|
+
const [open, setOpen] = React22.useState(false);
|
|
4107
|
+
const selectedCountry = React22.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
3871
4108
|
return /* @__PURE__ */ jsxs21(Popover, { open, onOpenChange: setOpen, children: [
|
|
3872
4109
|
/* @__PURE__ */ jsxs21(
|
|
3873
4110
|
PopoverTrigger,
|
|
3874
4111
|
{
|
|
3875
4112
|
ref,
|
|
3876
|
-
render: /* @__PURE__ */
|
|
4113
|
+
render: /* @__PURE__ */ jsx43(
|
|
3877
4114
|
"button",
|
|
3878
4115
|
{
|
|
3879
4116
|
type: "button",
|
|
@@ -3895,16 +4132,16 @@ var CountrySelect = React21.forwardRef(
|
|
|
3895
4132
|
}
|
|
3896
4133
|
),
|
|
3897
4134
|
children: [
|
|
3898
|
-
/* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
4135
|
+
/* @__PURE__ */ jsx43("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs21(Fragment2, { children: [
|
|
4136
|
+
/* @__PURE__ */ jsx43("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
4137
|
+
/* @__PURE__ */ jsx43("span", { className: "truncate", children: selectedCountry.name }),
|
|
3901
4138
|
/* @__PURE__ */ jsxs21("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
3902
4139
|
"(",
|
|
3903
4140
|
selectedCountry.code,
|
|
3904
4141
|
")"
|
|
3905
4142
|
] })
|
|
3906
|
-
] }) : /* @__PURE__ */ jsxs21(
|
|
3907
|
-
/* @__PURE__ */
|
|
4143
|
+
] }) : /* @__PURE__ */ jsxs21(Fragment2, { children: [
|
|
4144
|
+
/* @__PURE__ */ jsx43(
|
|
3908
4145
|
Icon,
|
|
3909
4146
|
{
|
|
3910
4147
|
icon: Globe,
|
|
@@ -3912,9 +4149,9 @@ var CountrySelect = React21.forwardRef(
|
|
|
3912
4149
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
3913
4150
|
}
|
|
3914
4151
|
),
|
|
3915
|
-
/* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ jsx43("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
3916
4153
|
] }) }),
|
|
3917
|
-
/* @__PURE__ */
|
|
4154
|
+
/* @__PURE__ */ jsx43(
|
|
3918
4155
|
Icon,
|
|
3919
4156
|
{
|
|
3920
4157
|
icon: ChevronDown2,
|
|
@@ -3929,17 +4166,17 @@ var CountrySelect = React21.forwardRef(
|
|
|
3929
4166
|
]
|
|
3930
4167
|
}
|
|
3931
4168
|
),
|
|
3932
|
-
/* @__PURE__ */
|
|
4169
|
+
/* @__PURE__ */ jsx43(
|
|
3933
4170
|
PopoverContent,
|
|
3934
4171
|
{
|
|
3935
4172
|
align,
|
|
3936
4173
|
sideOffset,
|
|
3937
4174
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
3938
4175
|
children: /* @__PURE__ */ jsxs21(Command, { children: [
|
|
3939
|
-
/* @__PURE__ */
|
|
4176
|
+
/* @__PURE__ */ jsx43(CommandInput, { placeholder: "Search country..." }),
|
|
3940
4177
|
/* @__PURE__ */ jsxs21(CommandList, { children: [
|
|
3941
|
-
/* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
4178
|
+
/* @__PURE__ */ jsx43(CommandEmpty, { children: "No countries found." }),
|
|
4179
|
+
/* @__PURE__ */ jsx43(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ jsxs21(
|
|
3943
4180
|
CommandItem,
|
|
3944
4181
|
{
|
|
3945
4182
|
value: `${country.name} ${country.code}`,
|
|
@@ -3953,12 +4190,12 @@ var CountrySelect = React21.forwardRef(
|
|
|
3953
4190
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
3954
4191
|
),
|
|
3955
4192
|
children: [
|
|
3956
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsx43("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
3957
4194
|
/* @__PURE__ */ jsxs21("div", { className: "flex-1 min-w-0", children: [
|
|
3958
|
-
/* @__PURE__ */
|
|
3959
|
-
/* @__PURE__ */
|
|
4195
|
+
/* @__PURE__ */ jsx43("div", { className: "text-sm truncate", children: country.name }),
|
|
4196
|
+
/* @__PURE__ */ jsx43("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
3960
4197
|
] }),
|
|
3961
|
-
value === country.code && /* @__PURE__ */
|
|
4198
|
+
value === country.code && /* @__PURE__ */ jsx43("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
3962
4199
|
]
|
|
3963
4200
|
},
|
|
3964
4201
|
country.code
|
|
@@ -3973,14 +4210,14 @@ var CountrySelect = React21.forwardRef(
|
|
|
3973
4210
|
CountrySelect.displayName = "CountrySelect";
|
|
3974
4211
|
|
|
3975
4212
|
// src/primitives/label.tsx
|
|
3976
|
-
import { cn as
|
|
3977
|
-
import { jsx as
|
|
4213
|
+
import { cn as cn22 } from "cn";
|
|
4214
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3978
4215
|
function Label({ className, ...props }) {
|
|
3979
|
-
return /* @__PURE__ */
|
|
4216
|
+
return /* @__PURE__ */ jsx44(
|
|
3980
4217
|
"label",
|
|
3981
4218
|
{
|
|
3982
4219
|
"data-slot": "label",
|
|
3983
|
-
className:
|
|
4220
|
+
className: cn22(
|
|
3984
4221
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
3985
4222
|
className
|
|
3986
4223
|
),
|
|
@@ -3992,14 +4229,14 @@ function Label({ className, ...props }) {
|
|
|
3992
4229
|
// src/primitives/field.tsx
|
|
3993
4230
|
import { useMemo as useMemo4 } from "react";
|
|
3994
4231
|
import { cva as cva14 } from "class-variance-authority";
|
|
3995
|
-
import { cn as
|
|
3996
|
-
import { jsx as
|
|
4232
|
+
import { cn as cn23 } from "cn";
|
|
4233
|
+
import { jsx as jsx45, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3997
4234
|
function FieldSet({ className, ...props }) {
|
|
3998
|
-
return /* @__PURE__ */
|
|
4235
|
+
return /* @__PURE__ */ jsx45(
|
|
3999
4236
|
"fieldset",
|
|
4000
4237
|
{
|
|
4001
4238
|
"data-slot": "field-set",
|
|
4002
|
-
className:
|
|
4239
|
+
className: cn23(
|
|
4003
4240
|
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
4004
4241
|
className
|
|
4005
4242
|
),
|
|
@@ -4012,12 +4249,12 @@ function FieldLegend({
|
|
|
4012
4249
|
variant = "legend",
|
|
4013
4250
|
...props
|
|
4014
4251
|
}) {
|
|
4015
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx45(
|
|
4016
4253
|
"legend",
|
|
4017
4254
|
{
|
|
4018
4255
|
"data-slot": "field-legend",
|
|
4019
4256
|
"data-variant": variant,
|
|
4020
|
-
className:
|
|
4257
|
+
className: cn23(
|
|
4021
4258
|
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
4022
4259
|
className
|
|
4023
4260
|
),
|
|
@@ -4026,11 +4263,11 @@ function FieldLegend({
|
|
|
4026
4263
|
);
|
|
4027
4264
|
}
|
|
4028
4265
|
function FieldGroup({ className, ...props }) {
|
|
4029
|
-
return /* @__PURE__ */
|
|
4266
|
+
return /* @__PURE__ */ jsx45(
|
|
4030
4267
|
"div",
|
|
4031
4268
|
{
|
|
4032
4269
|
"data-slot": "field-group",
|
|
4033
|
-
className:
|
|
4270
|
+
className: cn23(
|
|
4034
4271
|
"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
4035
4272
|
className
|
|
4036
4273
|
),
|
|
@@ -4058,23 +4295,23 @@ function Field({
|
|
|
4058
4295
|
orientation = "vertical",
|
|
4059
4296
|
...props
|
|
4060
4297
|
}) {
|
|
4061
|
-
return /* @__PURE__ */
|
|
4298
|
+
return /* @__PURE__ */ jsx45(
|
|
4062
4299
|
"div",
|
|
4063
4300
|
{
|
|
4064
4301
|
role: "group",
|
|
4065
4302
|
"data-slot": "field",
|
|
4066
4303
|
"data-orientation": orientation,
|
|
4067
|
-
className:
|
|
4304
|
+
className: cn23(fieldVariants({ orientation }), className),
|
|
4068
4305
|
...props
|
|
4069
4306
|
}
|
|
4070
4307
|
);
|
|
4071
4308
|
}
|
|
4072
4309
|
function FieldContent({ className, ...props }) {
|
|
4073
|
-
return /* @__PURE__ */
|
|
4310
|
+
return /* @__PURE__ */ jsx45(
|
|
4074
4311
|
"div",
|
|
4075
4312
|
{
|
|
4076
4313
|
"data-slot": "field-content",
|
|
4077
|
-
className:
|
|
4314
|
+
className: cn23(
|
|
4078
4315
|
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
4079
4316
|
className
|
|
4080
4317
|
),
|
|
@@ -4086,11 +4323,11 @@ function FieldLabel({
|
|
|
4086
4323
|
className,
|
|
4087
4324
|
...props
|
|
4088
4325
|
}) {
|
|
4089
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ jsx45(
|
|
4090
4327
|
Label,
|
|
4091
4328
|
{
|
|
4092
4329
|
"data-slot": "field-label",
|
|
4093
|
-
className:
|
|
4330
|
+
className: cn23(
|
|
4094
4331
|
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
4095
4332
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
4096
4333
|
className
|
|
@@ -4100,11 +4337,11 @@ function FieldLabel({
|
|
|
4100
4337
|
);
|
|
4101
4338
|
}
|
|
4102
4339
|
function FieldTitle({ className, ...props }) {
|
|
4103
|
-
return /* @__PURE__ */
|
|
4340
|
+
return /* @__PURE__ */ jsx45(
|
|
4104
4341
|
"div",
|
|
4105
4342
|
{
|
|
4106
4343
|
"data-slot": "field-label",
|
|
4107
|
-
className:
|
|
4344
|
+
className: cn23(
|
|
4108
4345
|
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
4109
4346
|
className
|
|
4110
4347
|
),
|
|
@@ -4113,11 +4350,11 @@ function FieldTitle({ className, ...props }) {
|
|
|
4113
4350
|
);
|
|
4114
4351
|
}
|
|
4115
4352
|
function FieldDescription({ className, ...props }) {
|
|
4116
|
-
return /* @__PURE__ */
|
|
4353
|
+
return /* @__PURE__ */ jsx45(
|
|
4117
4354
|
"p",
|
|
4118
4355
|
{
|
|
4119
4356
|
"data-slot": "field-description",
|
|
4120
|
-
className:
|
|
4357
|
+
className: cn23(
|
|
4121
4358
|
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
4122
4359
|
"last:mt-0 nth-last-2:-mt-1",
|
|
4123
4360
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
@@ -4137,14 +4374,14 @@ function FieldSeparator({
|
|
|
4137
4374
|
{
|
|
4138
4375
|
"data-slot": "field-separator",
|
|
4139
4376
|
"data-content": !!children,
|
|
4140
|
-
className:
|
|
4377
|
+
className: cn23(
|
|
4141
4378
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
4142
4379
|
className
|
|
4143
4380
|
),
|
|
4144
4381
|
...props,
|
|
4145
4382
|
children: [
|
|
4146
|
-
/* @__PURE__ */
|
|
4147
|
-
children && /* @__PURE__ */
|
|
4383
|
+
/* @__PURE__ */ jsx45(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
4384
|
+
children && /* @__PURE__ */ jsx45(
|
|
4148
4385
|
"span",
|
|
4149
4386
|
{
|
|
4150
4387
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
@@ -4175,19 +4412,19 @@ function FieldError({
|
|
|
4175
4412
|
if (uniqueErrors?.length == 1) {
|
|
4176
4413
|
return uniqueErrors[0]?.message;
|
|
4177
4414
|
}
|
|
4178
|
-
return /* @__PURE__ */
|
|
4179
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
4415
|
+
return /* @__PURE__ */ jsx45("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
4416
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx45("li", { children: error.message }, index)
|
|
4180
4417
|
) });
|
|
4181
4418
|
}, [children, errors]);
|
|
4182
4419
|
if (!content) {
|
|
4183
4420
|
return null;
|
|
4184
4421
|
}
|
|
4185
|
-
return /* @__PURE__ */
|
|
4422
|
+
return /* @__PURE__ */ jsx45(
|
|
4186
4423
|
"div",
|
|
4187
4424
|
{
|
|
4188
4425
|
role: "alert",
|
|
4189
4426
|
"data-slot": "field-error",
|
|
4190
|
-
className:
|
|
4427
|
+
className: cn23("text-sm font-normal text-destructive", className),
|
|
4191
4428
|
...props,
|
|
4192
4429
|
children: content
|
|
4193
4430
|
}
|
|
@@ -4195,10 +4432,10 @@ function FieldError({
|
|
|
4195
4432
|
}
|
|
4196
4433
|
|
|
4197
4434
|
// src/components/link/Link.tsx
|
|
4198
|
-
import * as
|
|
4435
|
+
import * as React23 from "react";
|
|
4199
4436
|
import { cva as cva15 } from "class-variance-authority";
|
|
4200
4437
|
import { ExternalLink } from "lucide-react";
|
|
4201
|
-
import { jsx as
|
|
4438
|
+
import { jsx as jsx46, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4202
4439
|
var linkVariants = cva15(
|
|
4203
4440
|
"inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
4204
4441
|
{
|
|
@@ -4223,7 +4460,7 @@ var linkVariants = cva15(
|
|
|
4223
4460
|
}
|
|
4224
4461
|
}
|
|
4225
4462
|
);
|
|
4226
|
-
var Link =
|
|
4463
|
+
var Link = React23.forwardRef(
|
|
4227
4464
|
({
|
|
4228
4465
|
className,
|
|
4229
4466
|
variant,
|
|
@@ -4252,8 +4489,8 @@ var Link = React22.forwardRef(
|
|
|
4252
4489
|
},
|
|
4253
4490
|
children: [
|
|
4254
4491
|
children,
|
|
4255
|
-
icon && /* @__PURE__ */
|
|
4256
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */
|
|
4492
|
+
icon && /* @__PURE__ */ jsx46("span", { className: "inline-flex items-center", children: icon }),
|
|
4493
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx46("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx46(Icon, { icon: ExternalLink, size: 16 }) })
|
|
4257
4494
|
]
|
|
4258
4495
|
}
|
|
4259
4496
|
);
|
|
@@ -4262,7 +4499,7 @@ var Link = React22.forwardRef(
|
|
|
4262
4499
|
Link.displayName = "Link";
|
|
4263
4500
|
|
|
4264
4501
|
// src/components/container/Container.tsx
|
|
4265
|
-
import * as
|
|
4502
|
+
import * as React24 from "react";
|
|
4266
4503
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
4267
4504
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
4268
4505
|
import { cva as cva16 } from "class-variance-authority";
|
|
@@ -4287,7 +4524,7 @@ var containerVariants = cva16("w-full mx-auto", {
|
|
|
4287
4524
|
padding: "md"
|
|
4288
4525
|
}
|
|
4289
4526
|
});
|
|
4290
|
-
var Container =
|
|
4527
|
+
var Container = React24.forwardRef(
|
|
4291
4528
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
4292
4529
|
return useRender3({
|
|
4293
4530
|
ref,
|
|
@@ -4306,7 +4543,7 @@ var Container = React23.forwardRef(
|
|
|
4306
4543
|
Container.displayName = "Container";
|
|
4307
4544
|
|
|
4308
4545
|
// src/components/grid/Grid.tsx
|
|
4309
|
-
import * as
|
|
4546
|
+
import * as React25 from "react";
|
|
4310
4547
|
import { cva as cva17 } from "class-variance-authority";
|
|
4311
4548
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
4312
4549
|
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
@@ -4332,7 +4569,7 @@ var gridVariants = cva17("grid", {
|
|
|
4332
4569
|
justify: "start"
|
|
4333
4570
|
}
|
|
4334
4571
|
});
|
|
4335
|
-
var Grid =
|
|
4572
|
+
var Grid = React25.forwardRef(
|
|
4336
4573
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
4337
4574
|
return useRender4({
|
|
4338
4575
|
ref,
|
|
@@ -4359,7 +4596,7 @@ var Grid = React24.forwardRef(
|
|
|
4359
4596
|
Grid.displayName = "Grid";
|
|
4360
4597
|
|
|
4361
4598
|
// src/components/box/Box.tsx
|
|
4362
|
-
import * as
|
|
4599
|
+
import * as React26 from "react";
|
|
4363
4600
|
import { cva as cva18 } from "class-variance-authority";
|
|
4364
4601
|
import { mergeProps as mergeProps5 } from "@base-ui/react/merge-props";
|
|
4365
4602
|
import { useRender as useRender5 } from "@base-ui/react/use-render";
|
|
@@ -4399,7 +4636,7 @@ var boxVariants = cva18("flex", {
|
|
|
4399
4636
|
wrap: "nowrap"
|
|
4400
4637
|
}
|
|
4401
4638
|
});
|
|
4402
|
-
var Box =
|
|
4639
|
+
var Box = React26.forwardRef(
|
|
4403
4640
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
4404
4641
|
return useRender5({
|
|
4405
4642
|
ref,
|
|
@@ -4422,23 +4659,23 @@ var Box = React25.forwardRef(
|
|
|
4422
4659
|
Box.displayName = "Box";
|
|
4423
4660
|
|
|
4424
4661
|
// src/components/language-select/LanguageSelect.tsx
|
|
4425
|
-
import * as
|
|
4662
|
+
import * as React27 from "react";
|
|
4426
4663
|
import { Globe as Globe2 } from "lucide-react";
|
|
4427
|
-
import { jsx as
|
|
4428
|
-
var LanguageSelect =
|
|
4664
|
+
import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4665
|
+
var LanguageSelect = React27.forwardRef(
|
|
4429
4666
|
({ className, options, value, onValueChange }, ref) => {
|
|
4430
4667
|
return /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
|
|
4431
|
-
/* @__PURE__ */
|
|
4432
|
-
/* @__PURE__ */
|
|
4433
|
-
/* @__PURE__ */
|
|
4668
|
+
/* @__PURE__ */ jsx47(DropdownMenuTrigger2, { ref, asChild: true, children: /* @__PURE__ */ jsxs24(Button2, { variant: "outline", size: "icon", className, "aria-label": "Select language", children: [
|
|
4669
|
+
/* @__PURE__ */ jsx47("span", { className: "sr-only", children: "Select language" }),
|
|
4670
|
+
/* @__PURE__ */ jsx47(Icon, { icon: Globe2, size: 16, "aria-hidden": true })
|
|
4434
4671
|
] }) }),
|
|
4435
|
-
/* @__PURE__ */
|
|
4672
|
+
/* @__PURE__ */ jsx47(DropdownMenuContent2, { align: "start", children: /* @__PURE__ */ jsx47(
|
|
4436
4673
|
DropdownMenuRadioGroup,
|
|
4437
4674
|
{
|
|
4438
4675
|
value,
|
|
4439
4676
|
onValueChange: onValueChange ? (v) => onValueChange(v) : void 0,
|
|
4440
|
-
children: options.map((option) => /* @__PURE__ */
|
|
4441
|
-
|
|
4677
|
+
children: options.map((option) => /* @__PURE__ */ jsx47(
|
|
4678
|
+
DropdownMenuRadioItem2,
|
|
4442
4679
|
{
|
|
4443
4680
|
value: option.value,
|
|
4444
4681
|
disabled: option.disabled,
|
|
@@ -4455,12 +4692,12 @@ var LanguageSelect = React26.forwardRef(
|
|
|
4455
4692
|
LanguageSelect.displayName = "LanguageSelect";
|
|
4456
4693
|
|
|
4457
4694
|
// src/components/list/List.tsx
|
|
4458
|
-
import * as
|
|
4695
|
+
import * as React29 from "react";
|
|
4459
4696
|
|
|
4460
4697
|
// src/components/divider/Divider.tsx
|
|
4461
|
-
import * as
|
|
4698
|
+
import * as React28 from "react";
|
|
4462
4699
|
import { cva as cva19 } from "class-variance-authority";
|
|
4463
|
-
import { jsx as
|
|
4700
|
+
import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4464
4701
|
var dividerVariants = cva19("", {
|
|
4465
4702
|
variants: {
|
|
4466
4703
|
variant: {
|
|
@@ -4481,7 +4718,7 @@ var dividerVariants = cva19("", {
|
|
|
4481
4718
|
size: "thin"
|
|
4482
4719
|
}
|
|
4483
4720
|
});
|
|
4484
|
-
var Divider =
|
|
4721
|
+
var Divider = React28.forwardRef(
|
|
4485
4722
|
({
|
|
4486
4723
|
className,
|
|
4487
4724
|
orientation = "horizontal",
|
|
@@ -4493,15 +4730,15 @@ var Divider = React27.forwardRef(
|
|
|
4493
4730
|
}, ref) => {
|
|
4494
4731
|
if (label) {
|
|
4495
4732
|
return /* @__PURE__ */ jsxs25("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
4496
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
4733
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx48(
|
|
4497
4734
|
Separator,
|
|
4498
4735
|
{
|
|
4499
4736
|
orientation: "horizontal",
|
|
4500
4737
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
4501
4738
|
}
|
|
4502
4739
|
),
|
|
4503
|
-
/* @__PURE__ */
|
|
4504
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsx48(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
4741
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx48(
|
|
4505
4742
|
Separator,
|
|
4506
4743
|
{
|
|
4507
4744
|
orientation: "horizontal",
|
|
@@ -4510,7 +4747,7 @@ var Divider = React27.forwardRef(
|
|
|
4510
4747
|
)
|
|
4511
4748
|
] });
|
|
4512
4749
|
}
|
|
4513
|
-
return /* @__PURE__ */
|
|
4750
|
+
return /* @__PURE__ */ jsx48(
|
|
4514
4751
|
Separator,
|
|
4515
4752
|
{
|
|
4516
4753
|
ref,
|
|
@@ -4527,19 +4764,19 @@ var Divider = React27.forwardRef(
|
|
|
4527
4764
|
Divider.displayName = "Divider";
|
|
4528
4765
|
|
|
4529
4766
|
// src/components/list/List.tsx
|
|
4530
|
-
import { Check as
|
|
4531
|
-
import { jsx as
|
|
4532
|
-
var List =
|
|
4767
|
+
import { Check as Check2 } from "lucide-react";
|
|
4768
|
+
import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4769
|
+
var List = React29.forwardRef(
|
|
4533
4770
|
({ className, children, ...props }, ref) => {
|
|
4534
|
-
const childrenArray =
|
|
4535
|
-
return /* @__PURE__ */
|
|
4771
|
+
const childrenArray = React29.Children.toArray(children);
|
|
4772
|
+
return /* @__PURE__ */ jsx49("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs26(React29.Fragment, { children: [
|
|
4536
4773
|
child,
|
|
4537
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
4774
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx49(Divider, { variant: "subtle" })
|
|
4538
4775
|
] }, index)) });
|
|
4539
4776
|
}
|
|
4540
4777
|
);
|
|
4541
4778
|
List.displayName = "List";
|
|
4542
|
-
var ListItem =
|
|
4779
|
+
var ListItem = React29.forwardRef(
|
|
4543
4780
|
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
4544
4781
|
"div",
|
|
4545
4782
|
{
|
|
@@ -4551,15 +4788,15 @@ var ListItem = React28.forwardRef(
|
|
|
4551
4788
|
),
|
|
4552
4789
|
...props,
|
|
4553
4790
|
children: [
|
|
4554
|
-
icon && /* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4791
|
+
icon && /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
4792
|
+
/* @__PURE__ */ jsx49("div", { className: "flex-1 min-w-0", children })
|
|
4556
4793
|
]
|
|
4557
4794
|
}
|
|
4558
4795
|
)
|
|
4559
4796
|
);
|
|
4560
4797
|
ListItem.displayName = "ListItem";
|
|
4561
|
-
var ListHeader =
|
|
4562
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
4798
|
+
var ListHeader = React29.forwardRef(
|
|
4799
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
4563
4800
|
"div",
|
|
4564
4801
|
{
|
|
4565
4802
|
ref,
|
|
@@ -4570,11 +4807,11 @@ var ListHeader = React28.forwardRef(
|
|
|
4570
4807
|
)
|
|
4571
4808
|
);
|
|
4572
4809
|
ListHeader.displayName = "ListHeader";
|
|
4573
|
-
var FeatureList =
|
|
4810
|
+
var FeatureList = React29.forwardRef(
|
|
4574
4811
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
4575
|
-
return /* @__PURE__ */
|
|
4576
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
4577
|
-
/* @__PURE__ */
|
|
4812
|
+
return /* @__PURE__ */ jsx49("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs26("li", { className: "flex items-start gap-fluid-md", children: [
|
|
4813
|
+
variant === "bullet" ? /* @__PURE__ */ jsx49("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx49(Icon, { icon: Check2, size: 24, className: "text-berget-logo-light" }) }),
|
|
4814
|
+
/* @__PURE__ */ jsx49(Typography, { variant: "body", color: "muted", children: item })
|
|
4578
4815
|
] }, index)) });
|
|
4579
4816
|
}
|
|
4580
4817
|
);
|
|
@@ -4582,8 +4819,8 @@ FeatureList.displayName = "FeatureList";
|
|
|
4582
4819
|
|
|
4583
4820
|
// src/components/code-block/CodeBlock.tsx
|
|
4584
4821
|
import { useState as useState5, useEffect as useEffect4, useCallback as useCallback4 } from "react";
|
|
4585
|
-
import { Copy, Check as
|
|
4586
|
-
import { jsx as
|
|
4822
|
+
import { Copy, Check as Check3 } from "lucide-react";
|
|
4823
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4587
4824
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
4588
4825
|
const [html, setHtml] = useState5(null);
|
|
4589
4826
|
const [copied, setCopied] = useState5(false);
|
|
@@ -4599,13 +4836,13 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
4599
4836
|
setCopied(true);
|
|
4600
4837
|
setTimeout(() => setCopied(false), 2e3);
|
|
4601
4838
|
}, [code]);
|
|
4602
|
-
const copyButton = /* @__PURE__ */
|
|
4839
|
+
const copyButton = /* @__PURE__ */ jsx50(
|
|
4603
4840
|
"button",
|
|
4604
4841
|
{
|
|
4605
4842
|
onClick: handleCopy,
|
|
4606
4843
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
4607
4844
|
"aria-label": "Copy code",
|
|
4608
|
-
children: copied ? /* @__PURE__ */
|
|
4845
|
+
children: copied ? /* @__PURE__ */ jsx50(Check3, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx50(Copy, { className: "w-3.5 h-3.5" })
|
|
4609
4846
|
}
|
|
4610
4847
|
);
|
|
4611
4848
|
return /* @__PURE__ */ jsxs27(
|
|
@@ -4616,25 +4853,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
4616
4853
|
className
|
|
4617
4854
|
),
|
|
4618
4855
|
children: [
|
|
4619
|
-
title && /* @__PURE__ */
|
|
4620
|
-
/* @__PURE__ */
|
|
4621
|
-
html ? /* @__PURE__ */
|
|
4856
|
+
title && /* @__PURE__ */ jsx50("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ jsx50("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
4857
|
+
/* @__PURE__ */ jsx50("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
4858
|
+
html ? /* @__PURE__ */ jsx50(
|
|
4622
4859
|
"div",
|
|
4623
4860
|
{
|
|
4624
4861
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
4625
4862
|
dangerouslySetInnerHTML: { __html: html }
|
|
4626
4863
|
}
|
|
4627
|
-
) : /* @__PURE__ */
|
|
4864
|
+
) : /* @__PURE__ */ jsx50("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx50("code", { children: code }) })
|
|
4628
4865
|
]
|
|
4629
4866
|
}
|
|
4630
4867
|
);
|
|
4631
4868
|
}
|
|
4632
4869
|
|
|
4633
4870
|
// src/components/window-frame/WindowFrame.tsx
|
|
4634
|
-
import * as
|
|
4871
|
+
import * as React30 from "react";
|
|
4635
4872
|
import { useState as useState6 } from "react";
|
|
4636
|
-
import { jsx as
|
|
4637
|
-
var WindowFrame =
|
|
4873
|
+
import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4874
|
+
var WindowFrame = React30.forwardRef(
|
|
4638
4875
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
4639
4876
|
const [internalActive, setInternalActive] = useState6(tabs?.[0]?.id ?? "");
|
|
4640
4877
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -4657,11 +4894,11 @@ var WindowFrame = React29.forwardRef(
|
|
|
4657
4894
|
children: [
|
|
4658
4895
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
4659
4896
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
/* @__PURE__ */
|
|
4897
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-berget-brand-muscaria-400" }),
|
|
4898
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-berget-brand-chanterelle-200" }),
|
|
4899
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-berget-brand-moss-400" })
|
|
4663
4900
|
] }),
|
|
4664
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
4901
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx51("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx51(
|
|
4665
4902
|
"button",
|
|
4666
4903
|
{
|
|
4667
4904
|
type: "button",
|
|
@@ -4673,9 +4910,9 @@ var WindowFrame = React29.forwardRef(
|
|
|
4673
4910
|
children: tab.label
|
|
4674
4911
|
},
|
|
4675
4912
|
tab.id
|
|
4676
|
-
)) }) : /* @__PURE__ */
|
|
4913
|
+
)) }) : /* @__PURE__ */ jsx51("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
4677
4914
|
] }),
|
|
4678
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ jsx51("div", { children })
|
|
4679
4916
|
]
|
|
4680
4917
|
}
|
|
4681
4918
|
);
|
|
@@ -4685,7 +4922,7 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
4685
4922
|
|
|
4686
4923
|
// src/components/fog-illustration/FogIllustration.tsx
|
|
4687
4924
|
import { useEffect as useEffect5, useRef } from "react";
|
|
4688
|
-
import { jsx as
|
|
4925
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
4689
4926
|
var FOG_BRAND_PALETTE = {
|
|
4690
4927
|
ink: "#171a1a",
|
|
4691
4928
|
milk: "#f7f5ed",
|
|
@@ -4998,7 +5235,7 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
4998
5235
|
gl.deleteFramebuffer(fbo);
|
|
4999
5236
|
};
|
|
5000
5237
|
}, []);
|
|
5001
|
-
return /* @__PURE__ */
|
|
5238
|
+
return /* @__PURE__ */ jsx52("canvas", { ref, "aria-hidden": "true", className: cn("size-full", className) });
|
|
5002
5239
|
};
|
|
5003
5240
|
export {
|
|
5004
5241
|
Alert2 as Alert,
|
|
@@ -5042,20 +5279,20 @@ export {
|
|
|
5042
5279
|
DialogTitle,
|
|
5043
5280
|
DialogTrigger,
|
|
5044
5281
|
DropdownMenu,
|
|
5045
|
-
DropdownMenuCheckboxItem,
|
|
5046
|
-
DropdownMenuContent,
|
|
5282
|
+
DropdownMenuCheckboxItem2 as DropdownMenuCheckboxItem,
|
|
5283
|
+
DropdownMenuContent2 as DropdownMenuContent,
|
|
5047
5284
|
DropdownMenuGroup,
|
|
5048
|
-
DropdownMenuItem,
|
|
5049
|
-
DropdownMenuLabel,
|
|
5285
|
+
DropdownMenuItem2 as DropdownMenuItem,
|
|
5286
|
+
DropdownMenuLabel2 as DropdownMenuLabel,
|
|
5050
5287
|
DropdownMenuPortal,
|
|
5051
5288
|
DropdownMenuRadioGroup,
|
|
5052
|
-
DropdownMenuRadioItem,
|
|
5053
|
-
DropdownMenuSeparator,
|
|
5054
|
-
DropdownMenuShortcut,
|
|
5289
|
+
DropdownMenuRadioItem2 as DropdownMenuRadioItem,
|
|
5290
|
+
DropdownMenuSeparator2 as DropdownMenuSeparator,
|
|
5291
|
+
DropdownMenuShortcut2 as DropdownMenuShortcut,
|
|
5055
5292
|
DropdownMenuSub,
|
|
5056
|
-
DropdownMenuSubContent,
|
|
5057
|
-
DropdownMenuSubTrigger,
|
|
5058
|
-
DropdownMenuTrigger,
|
|
5293
|
+
DropdownMenuSubContent2 as DropdownMenuSubContent,
|
|
5294
|
+
DropdownMenuSubTrigger2 as DropdownMenuSubTrigger,
|
|
5295
|
+
DropdownMenuTrigger2 as DropdownMenuTrigger,
|
|
5059
5296
|
EU_COUNTRY_CODES,
|
|
5060
5297
|
FOG_BRAND_PALETTE,
|
|
5061
5298
|
FeatureList,
|
|
@@ -5147,6 +5384,10 @@ export {
|
|
|
5147
5384
|
Textarea,
|
|
5148
5385
|
ThemeProvider,
|
|
5149
5386
|
ThemeToggle,
|
|
5387
|
+
Tooltip,
|
|
5388
|
+
TooltipContent2 as TooltipContent,
|
|
5389
|
+
TooltipProvider,
|
|
5390
|
+
TooltipTrigger2 as TooltipTrigger,
|
|
5150
5391
|
Typography,
|
|
5151
5392
|
WindowFrame,
|
|
5152
5393
|
alertVariants2 as alertVariants,
|