@bergetai/ui 0.13.1 → 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 +893 -639
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -30
- package/dist/index.d.ts +65 -30
- package/dist/index.js +858 -608
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -71,20 +71,20 @@ __export(src_exports, {
|
|
|
71
71
|
DialogTitle: () => DialogTitle,
|
|
72
72
|
DialogTrigger: () => DialogTrigger,
|
|
73
73
|
DropdownMenu: () => DropdownMenu,
|
|
74
|
-
DropdownMenuCheckboxItem: () =>
|
|
75
|
-
DropdownMenuContent: () =>
|
|
74
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem2,
|
|
75
|
+
DropdownMenuContent: () => DropdownMenuContent2,
|
|
76
76
|
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
77
|
-
DropdownMenuItem: () =>
|
|
78
|
-
DropdownMenuLabel: () =>
|
|
77
|
+
DropdownMenuItem: () => DropdownMenuItem2,
|
|
78
|
+
DropdownMenuLabel: () => DropdownMenuLabel2,
|
|
79
79
|
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
80
80
|
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
81
|
-
DropdownMenuRadioItem: () =>
|
|
82
|
-
DropdownMenuSeparator: () =>
|
|
83
|
-
DropdownMenuShortcut: () =>
|
|
81
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem2,
|
|
82
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator2,
|
|
83
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut2,
|
|
84
84
|
DropdownMenuSub: () => DropdownMenuSub,
|
|
85
|
-
DropdownMenuSubContent: () =>
|
|
86
|
-
DropdownMenuSubTrigger: () =>
|
|
87
|
-
DropdownMenuTrigger: () =>
|
|
85
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent2,
|
|
86
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger2,
|
|
87
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger2,
|
|
88
88
|
EU_COUNTRY_CODES: () => EU_COUNTRY_CODES,
|
|
89
89
|
FOG_BRAND_PALETTE: () => FOG_BRAND_PALETTE,
|
|
90
90
|
FeatureList: () => FeatureList,
|
|
@@ -176,6 +176,10 @@ __export(src_exports, {
|
|
|
176
176
|
Textarea: () => Textarea,
|
|
177
177
|
ThemeProvider: () => ThemeProvider,
|
|
178
178
|
ThemeToggle: () => ThemeToggle,
|
|
179
|
+
Tooltip: () => Tooltip,
|
|
180
|
+
TooltipContent: () => TooltipContent2,
|
|
181
|
+
TooltipProvider: () => TooltipProvider,
|
|
182
|
+
TooltipTrigger: () => TooltipTrigger2,
|
|
179
183
|
Typography: () => Typography,
|
|
180
184
|
WindowFrame: () => WindowFrame,
|
|
181
185
|
alertVariants: () => alertVariants2,
|
|
@@ -1455,168 +1459,460 @@ AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
|
1455
1459
|
|
|
1456
1460
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
1457
1461
|
var React13 = __toESM(require("react"), 1);
|
|
1462
|
+
|
|
1463
|
+
// src/primitives/dropdown-menu.tsx
|
|
1458
1464
|
var import_menu = require("@base-ui/react/menu");
|
|
1465
|
+
var import_cn4 = require("cn");
|
|
1459
1466
|
var import_lucide_react3 = require("lucide-react");
|
|
1460
1467
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
)
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
render: asChildRender(asChild, children),
|
|
1480
|
-
...props,
|
|
1481
|
-
children: asChild ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1482
|
-
children,
|
|
1483
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.ChevronRight, { className: "ml-auto" })
|
|
1484
|
-
] })
|
|
1485
|
-
}
|
|
1486
|
-
));
|
|
1487
|
-
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
1488
|
-
var DropdownMenuSubContent = React13.forwardRef(
|
|
1489
|
-
({ className, side = "right", align = "start", alignOffset = -3, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1468
|
+
function DropdownMenu({ ...props }) {
|
|
1469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1470
|
+
}
|
|
1471
|
+
function DropdownMenuPortal({ ...props }) {
|
|
1472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1473
|
+
}
|
|
1474
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
1475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1476
|
+
}
|
|
1477
|
+
function DropdownMenuContent({
|
|
1478
|
+
align = "start",
|
|
1479
|
+
alignOffset = 0,
|
|
1480
|
+
side = "bottom",
|
|
1481
|
+
sideOffset = 4,
|
|
1482
|
+
className,
|
|
1483
|
+
...props
|
|
1484
|
+
}) {
|
|
1485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1490
1486
|
import_menu.Menu.Positioner,
|
|
1491
1487
|
{
|
|
1492
|
-
|
|
1488
|
+
className: "isolate z-50 outline-none",
|
|
1493
1489
|
align,
|
|
1494
1490
|
alignOffset,
|
|
1491
|
+
side,
|
|
1495
1492
|
sideOffset,
|
|
1496
|
-
className: "isolate z-50 outline-none",
|
|
1497
1493
|
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1498
1494
|
import_menu.Menu.Popup,
|
|
1499
1495
|
{
|
|
1500
|
-
|
|
1501
|
-
className: cn(
|
|
1502
|
-
"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]",
|
|
1503
|
-
className
|
|
1504
|
-
),
|
|
1496
|
+
"data-slot": "dropdown-menu-content",
|
|
1497
|
+
className: (0, import_cn4.cn)("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),
|
|
1505
1498
|
...props
|
|
1506
1499
|
}
|
|
1507
1500
|
)
|
|
1508
1501
|
}
|
|
1509
|
-
) })
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1502
|
+
) });
|
|
1503
|
+
}
|
|
1504
|
+
function DropdownMenuGroup({ ...props }) {
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1506
|
+
}
|
|
1507
|
+
function DropdownMenuLabel({
|
|
1508
|
+
className,
|
|
1509
|
+
inset,
|
|
1510
|
+
...props
|
|
1511
|
+
}) {
|
|
1512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1513
|
+
import_menu.Menu.GroupLabel,
|
|
1514
|
+
{
|
|
1515
|
+
"data-slot": "dropdown-menu-label",
|
|
1516
|
+
"data-inset": inset,
|
|
1517
|
+
className: (0, import_cn4.cn)(
|
|
1518
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
1519
|
+
className
|
|
1520
|
+
),
|
|
1521
|
+
...props
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
function DropdownMenuItem({
|
|
1526
|
+
className,
|
|
1527
|
+
inset,
|
|
1528
|
+
variant = "default",
|
|
1529
|
+
...props
|
|
1530
|
+
}) {
|
|
1531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1532
|
+
import_menu.Menu.Item,
|
|
1533
|
+
{
|
|
1534
|
+
"data-slot": "dropdown-menu-item",
|
|
1535
|
+
"data-inset": inset,
|
|
1536
|
+
"data-variant": variant,
|
|
1537
|
+
className: (0, import_cn4.cn)(
|
|
1538
|
+
"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",
|
|
1539
|
+
className
|
|
1540
|
+
),
|
|
1541
|
+
...props
|
|
1542
|
+
}
|
|
1543
|
+
);
|
|
1544
|
+
}
|
|
1545
|
+
function DropdownMenuSub({ ...props }) {
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1547
|
+
}
|
|
1548
|
+
function DropdownMenuSubTrigger({
|
|
1549
|
+
className,
|
|
1550
|
+
inset,
|
|
1551
|
+
children,
|
|
1552
|
+
...props
|
|
1553
|
+
}) {
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1555
|
+
import_menu.Menu.SubmenuTrigger,
|
|
1556
|
+
{
|
|
1557
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1558
|
+
"data-inset": inset,
|
|
1559
|
+
className: (0, import_cn4.cn)(
|
|
1560
|
+
"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",
|
|
1561
|
+
className
|
|
1562
|
+
),
|
|
1563
|
+
...props,
|
|
1564
|
+
children: [
|
|
1565
|
+
children,
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.ChevronRightIcon, { className: "ml-auto" })
|
|
1567
|
+
]
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
function DropdownMenuSubContent({
|
|
1572
|
+
align = "start",
|
|
1573
|
+
alignOffset = -3,
|
|
1574
|
+
side = "right",
|
|
1575
|
+
sideOffset = 0,
|
|
1576
|
+
className,
|
|
1577
|
+
...props
|
|
1578
|
+
}) {
|
|
1579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1580
|
+
DropdownMenuContent,
|
|
1581
|
+
{
|
|
1582
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1583
|
+
className: (0, import_cn4.cn)("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),
|
|
1584
|
+
align,
|
|
1585
|
+
alignOffset,
|
|
1586
|
+
side,
|
|
1587
|
+
sideOffset,
|
|
1588
|
+
...props
|
|
1589
|
+
}
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
function DropdownMenuCheckboxItem({
|
|
1593
|
+
className,
|
|
1594
|
+
children,
|
|
1595
|
+
checked,
|
|
1596
|
+
inset,
|
|
1597
|
+
...props
|
|
1598
|
+
}) {
|
|
1599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1600
|
+
import_menu.Menu.CheckboxItem,
|
|
1601
|
+
{
|
|
1602
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1603
|
+
"data-inset": inset,
|
|
1604
|
+
className: (0, import_cn4.cn)(
|
|
1605
|
+
"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",
|
|
1606
|
+
className
|
|
1607
|
+
),
|
|
1608
|
+
checked,
|
|
1609
|
+
...props,
|
|
1610
|
+
children: [
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1612
|
+
"span",
|
|
1613
|
+
{
|
|
1614
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1615
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
1616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1617
|
+
import_lucide_react3.CheckIcon,
|
|
1618
|
+
{}
|
|
1619
|
+
) })
|
|
1620
|
+
}
|
|
1527
1621
|
),
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
)
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
inset && "pl-8",
|
|
1593
|
-
className
|
|
1594
|
-
),
|
|
1595
|
-
render: asChildRender(asChild, children),
|
|
1596
|
-
...props,
|
|
1597
|
-
children: asChild ? void 0 : children
|
|
1598
|
-
}
|
|
1599
|
-
));
|
|
1600
|
-
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
1601
|
-
var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1602
|
-
import_menu.Menu.Separator,
|
|
1603
|
-
{
|
|
1604
|
-
ref,
|
|
1605
|
-
className: cn("-mx-1 my-1 h-px bg-berget-separator", className),
|
|
1606
|
-
...props
|
|
1607
|
-
}
|
|
1608
|
-
));
|
|
1609
|
-
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
1610
|
-
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
1622
|
+
children
|
|
1623
|
+
]
|
|
1624
|
+
}
|
|
1625
|
+
);
|
|
1626
|
+
}
|
|
1627
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
1628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1629
|
+
import_menu.Menu.RadioGroup,
|
|
1630
|
+
{
|
|
1631
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1632
|
+
...props
|
|
1633
|
+
}
|
|
1634
|
+
);
|
|
1635
|
+
}
|
|
1636
|
+
function DropdownMenuRadioItem({
|
|
1637
|
+
className,
|
|
1638
|
+
children,
|
|
1639
|
+
inset,
|
|
1640
|
+
...props
|
|
1641
|
+
}) {
|
|
1642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1643
|
+
import_menu.Menu.RadioItem,
|
|
1644
|
+
{
|
|
1645
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1646
|
+
"data-inset": inset,
|
|
1647
|
+
className: (0, import_cn4.cn)(
|
|
1648
|
+
"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",
|
|
1649
|
+
className
|
|
1650
|
+
),
|
|
1651
|
+
...props,
|
|
1652
|
+
children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1654
|
+
"span",
|
|
1655
|
+
{
|
|
1656
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1657
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
1658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_menu.Menu.RadioItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1659
|
+
import_lucide_react3.CheckIcon,
|
|
1660
|
+
{}
|
|
1661
|
+
) })
|
|
1662
|
+
}
|
|
1663
|
+
),
|
|
1664
|
+
children
|
|
1665
|
+
]
|
|
1666
|
+
}
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
function DropdownMenuSeparator({
|
|
1670
|
+
className,
|
|
1671
|
+
...props
|
|
1672
|
+
}) {
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1674
|
+
import_menu.Menu.Separator,
|
|
1675
|
+
{
|
|
1676
|
+
"data-slot": "dropdown-menu-separator",
|
|
1677
|
+
className: (0, import_cn4.cn)("-mx-1 my-1 h-px bg-border", className),
|
|
1678
|
+
...props
|
|
1679
|
+
}
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
function DropdownMenuShortcut({
|
|
1683
|
+
className,
|
|
1684
|
+
...props
|
|
1685
|
+
}) {
|
|
1611
1686
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1612
1687
|
"span",
|
|
1613
1688
|
{
|
|
1614
|
-
|
|
1689
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1690
|
+
className: (0, import_cn4.cn)(
|
|
1691
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
1692
|
+
className
|
|
1693
|
+
),
|
|
1694
|
+
...props
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
1700
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1701
|
+
var DropdownMenuTrigger2 = React13.forwardRef(
|
|
1702
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuTrigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1703
|
+
);
|
|
1704
|
+
DropdownMenuTrigger2.displayName = "DropdownMenuTrigger";
|
|
1705
|
+
var DropdownMenuSubTrigger2 = React13.forwardRef(
|
|
1706
|
+
({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1707
|
+
DropdownMenuSubTrigger,
|
|
1708
|
+
{
|
|
1709
|
+
ref,
|
|
1710
|
+
className: cn(
|
|
1711
|
+
// Berget density & radius; focus/accent styling comes from the primitive.
|
|
1712
|
+
"gap-2 rounded-berget-xs px-2 py-1.5",
|
|
1713
|
+
inset && "pl-8",
|
|
1714
|
+
className
|
|
1715
|
+
),
|
|
1716
|
+
render: asChildRender(asChild, children),
|
|
1717
|
+
...props,
|
|
1718
|
+
children: asChild ? void 0 : children
|
|
1719
|
+
}
|
|
1720
|
+
)
|
|
1721
|
+
);
|
|
1722
|
+
DropdownMenuSubTrigger2.displayName = "DropdownMenuSubTrigger";
|
|
1723
|
+
var DropdownMenuSubContent2 = React13.forwardRef(
|
|
1724
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1725
|
+
DropdownMenuSubContent,
|
|
1726
|
+
{
|
|
1727
|
+
ref,
|
|
1728
|
+
className: cn(
|
|
1729
|
+
"rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg",
|
|
1730
|
+
className
|
|
1731
|
+
),
|
|
1732
|
+
...props
|
|
1733
|
+
}
|
|
1734
|
+
)
|
|
1735
|
+
);
|
|
1736
|
+
DropdownMenuSubContent2.displayName = "DropdownMenuSubContent";
|
|
1737
|
+
var DropdownMenuContent2 = React13.forwardRef(
|
|
1738
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1739
|
+
DropdownMenuContent,
|
|
1740
|
+
{
|
|
1741
|
+
ref,
|
|
1742
|
+
className: cn(
|
|
1743
|
+
"rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-md",
|
|
1744
|
+
className
|
|
1745
|
+
),
|
|
1746
|
+
...props
|
|
1747
|
+
}
|
|
1748
|
+
)
|
|
1749
|
+
);
|
|
1750
|
+
DropdownMenuContent2.displayName = "DropdownMenuContent";
|
|
1751
|
+
var DropdownMenuItem2 = React13.forwardRef(
|
|
1752
|
+
({ className, inset, asChild, children, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1753
|
+
DropdownMenuItem,
|
|
1754
|
+
{
|
|
1755
|
+
ref,
|
|
1756
|
+
label: textValue,
|
|
1757
|
+
className: cn(
|
|
1758
|
+
// Berget density & radius; focus accent and destructive variant from the primitive.
|
|
1759
|
+
"gap-2 rounded-berget-xs px-2 py-1.5",
|
|
1760
|
+
inset && "pl-8",
|
|
1761
|
+
className
|
|
1762
|
+
),
|
|
1763
|
+
render: asChildRender(asChild, children),
|
|
1764
|
+
...props,
|
|
1765
|
+
children: asChild ? void 0 : children
|
|
1766
|
+
}
|
|
1767
|
+
)
|
|
1768
|
+
);
|
|
1769
|
+
DropdownMenuItem2.displayName = "DropdownMenuItem";
|
|
1770
|
+
var DropdownMenuCheckboxItem2 = React13.forwardRef(
|
|
1771
|
+
({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1772
|
+
DropdownMenuCheckboxItem,
|
|
1773
|
+
{
|
|
1774
|
+
ref,
|
|
1775
|
+
label: textValue,
|
|
1776
|
+
className: cn("rounded-berget-xs", className),
|
|
1777
|
+
render: asChildRender(asChild, children),
|
|
1778
|
+
...props,
|
|
1779
|
+
children: asChild ? void 0 : children
|
|
1780
|
+
}
|
|
1781
|
+
)
|
|
1782
|
+
);
|
|
1783
|
+
DropdownMenuCheckboxItem2.displayName = "DropdownMenuCheckboxItem";
|
|
1784
|
+
var DropdownMenuRadioItem2 = React13.forwardRef(
|
|
1785
|
+
({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1786
|
+
DropdownMenuRadioItem,
|
|
1787
|
+
{
|
|
1788
|
+
ref,
|
|
1789
|
+
label: textValue,
|
|
1790
|
+
className: cn("rounded-berget-xs", className),
|
|
1791
|
+
render: asChildRender(asChild, children),
|
|
1792
|
+
...props,
|
|
1793
|
+
children: asChild ? void 0 : children
|
|
1794
|
+
}
|
|
1795
|
+
)
|
|
1796
|
+
);
|
|
1797
|
+
DropdownMenuRadioItem2.displayName = "DropdownMenuRadioItem";
|
|
1798
|
+
var DropdownMenuLabel2 = React13.forwardRef(
|
|
1799
|
+
({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1800
|
+
DropdownMenuLabel,
|
|
1801
|
+
{
|
|
1802
|
+
ref,
|
|
1803
|
+
className: cn(
|
|
1804
|
+
"px-2 py-1.5 text-sm font-semibold text-berget-foreground",
|
|
1805
|
+
inset && "pl-8",
|
|
1806
|
+
className
|
|
1807
|
+
),
|
|
1808
|
+
render: asChildRender(asChild, children),
|
|
1809
|
+
...props,
|
|
1810
|
+
children: asChild ? void 0 : children
|
|
1811
|
+
}
|
|
1812
|
+
)
|
|
1813
|
+
);
|
|
1814
|
+
DropdownMenuLabel2.displayName = "DropdownMenuLabel";
|
|
1815
|
+
var DropdownMenuSeparator2 = React13.forwardRef(
|
|
1816
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1817
|
+
DropdownMenuSeparator,
|
|
1818
|
+
{
|
|
1819
|
+
ref,
|
|
1820
|
+
className: cn("bg-berget-separator", className),
|
|
1821
|
+
...props
|
|
1822
|
+
}
|
|
1823
|
+
)
|
|
1824
|
+
);
|
|
1825
|
+
DropdownMenuSeparator2.displayName = "DropdownMenuSeparator";
|
|
1826
|
+
var DropdownMenuShortcut2 = ({ className, ...props }) => {
|
|
1827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1828
|
+
DropdownMenuShortcut,
|
|
1829
|
+
{
|
|
1830
|
+
className: cn("text-berget-muted-foreground", className),
|
|
1615
1831
|
...props
|
|
1616
1832
|
}
|
|
1617
1833
|
);
|
|
1618
1834
|
};
|
|
1619
|
-
|
|
1835
|
+
DropdownMenuShortcut2.displayName = "DropdownMenuShortcut";
|
|
1836
|
+
|
|
1837
|
+
// src/components/tooltip/Tooltip.tsx
|
|
1838
|
+
var React14 = __toESM(require("react"), 1);
|
|
1839
|
+
|
|
1840
|
+
// src/primitives/tooltip.tsx
|
|
1841
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
1842
|
+
var import_cn5 = require("cn");
|
|
1843
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1844
|
+
function TooltipProvider({
|
|
1845
|
+
delay = 0,
|
|
1846
|
+
...props
|
|
1847
|
+
}) {
|
|
1848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1849
|
+
import_tooltip.Tooltip.Provider,
|
|
1850
|
+
{
|
|
1851
|
+
"data-slot": "tooltip-provider",
|
|
1852
|
+
delay,
|
|
1853
|
+
...props
|
|
1854
|
+
}
|
|
1855
|
+
);
|
|
1856
|
+
}
|
|
1857
|
+
function Tooltip({ ...props }) {
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
1859
|
+
}
|
|
1860
|
+
function TooltipTrigger({ ...props }) {
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1862
|
+
}
|
|
1863
|
+
function TooltipContent({
|
|
1864
|
+
className,
|
|
1865
|
+
side = "top",
|
|
1866
|
+
sideOffset = 4,
|
|
1867
|
+
align = "center",
|
|
1868
|
+
alignOffset = 0,
|
|
1869
|
+
children,
|
|
1870
|
+
...props
|
|
1871
|
+
}) {
|
|
1872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1873
|
+
import_tooltip.Tooltip.Positioner,
|
|
1874
|
+
{
|
|
1875
|
+
align,
|
|
1876
|
+
alignOffset,
|
|
1877
|
+
side,
|
|
1878
|
+
sideOffset,
|
|
1879
|
+
className: "isolate z-50",
|
|
1880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1881
|
+
import_tooltip.Tooltip.Popup,
|
|
1882
|
+
{
|
|
1883
|
+
"data-slot": "tooltip-content",
|
|
1884
|
+
className: (0, import_cn5.cn)(
|
|
1885
|
+
"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",
|
|
1886
|
+
className
|
|
1887
|
+
),
|
|
1888
|
+
...props,
|
|
1889
|
+
children: [
|
|
1890
|
+
children,
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.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" })
|
|
1892
|
+
]
|
|
1893
|
+
}
|
|
1894
|
+
)
|
|
1895
|
+
}
|
|
1896
|
+
) });
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
// src/components/tooltip/Tooltip.tsx
|
|
1900
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1901
|
+
var TooltipTrigger2 = React14.forwardRef(
|
|
1902
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipTrigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1903
|
+
);
|
|
1904
|
+
TooltipTrigger2.displayName = "TooltipTrigger";
|
|
1905
|
+
var TooltipContent2 = React14.forwardRef(
|
|
1906
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1907
|
+
TooltipContent,
|
|
1908
|
+
{
|
|
1909
|
+
ref,
|
|
1910
|
+
className: cn("rounded-berget-xs shadow-berget-md", className),
|
|
1911
|
+
...props
|
|
1912
|
+
}
|
|
1913
|
+
)
|
|
1914
|
+
);
|
|
1915
|
+
TooltipContent2.displayName = "TooltipContent";
|
|
1620
1916
|
|
|
1621
1917
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
1622
1918
|
var import_navigation_menu2 = require("@base-ui/react/navigation-menu");
|
|
@@ -1626,18 +1922,18 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
1626
1922
|
// src/primitives/navigation-menu.tsx
|
|
1627
1923
|
var import_navigation_menu = require("@base-ui/react/navigation-menu");
|
|
1628
1924
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1629
|
-
var
|
|
1925
|
+
var import_cn6 = require("cn");
|
|
1630
1926
|
var import_lucide_react4 = require("lucide-react");
|
|
1631
|
-
var
|
|
1927
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1632
1928
|
function NavigationMenuList({
|
|
1633
1929
|
className,
|
|
1634
1930
|
...props
|
|
1635
1931
|
}) {
|
|
1636
|
-
return /* @__PURE__ */ (0,
|
|
1932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1637
1933
|
import_navigation_menu.NavigationMenu.List,
|
|
1638
1934
|
{
|
|
1639
1935
|
"data-slot": "navigation-menu-list",
|
|
1640
|
-
className: (0,
|
|
1936
|
+
className: (0, import_cn6.cn)(
|
|
1641
1937
|
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
1642
1938
|
className
|
|
1643
1939
|
),
|
|
@@ -1649,11 +1945,11 @@ function NavigationMenuItem({
|
|
|
1649
1945
|
className,
|
|
1650
1946
|
...props
|
|
1651
1947
|
}) {
|
|
1652
|
-
return /* @__PURE__ */ (0,
|
|
1948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1653
1949
|
import_navigation_menu.NavigationMenu.Item,
|
|
1654
1950
|
{
|
|
1655
1951
|
"data-slot": "navigation-menu-item",
|
|
1656
|
-
className: (0,
|
|
1952
|
+
className: (0, import_cn6.cn)("relative", className),
|
|
1657
1953
|
...props
|
|
1658
1954
|
}
|
|
1659
1955
|
);
|
|
@@ -1665,11 +1961,11 @@ function NavigationMenuContent({
|
|
|
1665
1961
|
className,
|
|
1666
1962
|
...props
|
|
1667
1963
|
}) {
|
|
1668
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1669
1965
|
import_navigation_menu.NavigationMenu.Content,
|
|
1670
1966
|
{
|
|
1671
1967
|
"data-slot": "navigation-menu-content",
|
|
1672
|
-
className: (0,
|
|
1968
|
+
className: (0, import_cn6.cn)(
|
|
1673
1969
|
"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",
|
|
1674
1970
|
className
|
|
1675
1971
|
),
|
|
@@ -1681,29 +1977,29 @@ function NavigationMenuIndicator({
|
|
|
1681
1977
|
className,
|
|
1682
1978
|
...props
|
|
1683
1979
|
}) {
|
|
1684
|
-
return /* @__PURE__ */ (0,
|
|
1980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1685
1981
|
import_navigation_menu.NavigationMenu.Icon,
|
|
1686
1982
|
{
|
|
1687
1983
|
"data-slot": "navigation-menu-indicator",
|
|
1688
|
-
className: (0,
|
|
1984
|
+
className: (0, import_cn6.cn)(
|
|
1689
1985
|
"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",
|
|
1690
1986
|
className
|
|
1691
1987
|
),
|
|
1692
1988
|
...props,
|
|
1693
|
-
children: /* @__PURE__ */ (0,
|
|
1989
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
1694
1990
|
}
|
|
1695
1991
|
);
|
|
1696
1992
|
}
|
|
1697
1993
|
|
|
1698
1994
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
1699
|
-
var
|
|
1995
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1700
1996
|
function NavigationMenu({
|
|
1701
1997
|
align = "start",
|
|
1702
1998
|
className,
|
|
1703
1999
|
children,
|
|
1704
2000
|
...props
|
|
1705
2001
|
}) {
|
|
1706
|
-
return /* @__PURE__ */ (0,
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1707
2003
|
import_navigation_menu2.NavigationMenu.Root,
|
|
1708
2004
|
{
|
|
1709
2005
|
"data-slot": "navigation-menu",
|
|
@@ -1714,7 +2010,7 @@ function NavigationMenu({
|
|
|
1714
2010
|
...props,
|
|
1715
2011
|
children: [
|
|
1716
2012
|
children,
|
|
1717
|
-
/* @__PURE__ */ (0,
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(NavigationMenuPositioner, { align })
|
|
1718
2014
|
]
|
|
1719
2015
|
}
|
|
1720
2016
|
);
|
|
@@ -1727,7 +2023,7 @@ function NavigationMenuTrigger({
|
|
|
1727
2023
|
children,
|
|
1728
2024
|
...props
|
|
1729
2025
|
}) {
|
|
1730
|
-
return /* @__PURE__ */ (0,
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1731
2027
|
import_navigation_menu2.NavigationMenu.Trigger,
|
|
1732
2028
|
{
|
|
1733
2029
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -1736,7 +2032,7 @@ function NavigationMenuTrigger({
|
|
|
1736
2032
|
children: [
|
|
1737
2033
|
children,
|
|
1738
2034
|
" ",
|
|
1739
|
-
/* @__PURE__ */ (0,
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1740
2036
|
import_lucide_react5.ChevronDown,
|
|
1741
2037
|
{
|
|
1742
2038
|
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",
|
|
@@ -1748,7 +2044,7 @@ function NavigationMenuTrigger({
|
|
|
1748
2044
|
);
|
|
1749
2045
|
}
|
|
1750
2046
|
function NavigationMenuLink({ className, ...props }) {
|
|
1751
|
-
return /* @__PURE__ */ (0,
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1752
2048
|
import_navigation_menu2.NavigationMenu.Link,
|
|
1753
2049
|
{
|
|
1754
2050
|
"data-slot": "navigation-menu-link",
|
|
@@ -1768,7 +2064,7 @@ function NavigationMenuPositioner({
|
|
|
1768
2064
|
alignOffset = 0,
|
|
1769
2065
|
...props
|
|
1770
2066
|
}) {
|
|
1771
|
-
return /* @__PURE__ */ (0,
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_navigation_menu2.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1772
2068
|
import_navigation_menu2.NavigationMenu.Positioner,
|
|
1773
2069
|
{
|
|
1774
2070
|
side,
|
|
@@ -1780,24 +2076,24 @@ function NavigationMenuPositioner({
|
|
|
1780
2076
|
className
|
|
1781
2077
|
),
|
|
1782
2078
|
...props,
|
|
1783
|
-
children: /* @__PURE__ */ (0,
|
|
2079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_navigation_menu2.NavigationMenu.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__ */ (0, import_jsx_runtime21.jsx)(import_navigation_menu2.NavigationMenu.Viewport, { className: "relative size-full overflow-hidden" }) })
|
|
1784
2080
|
}
|
|
1785
2081
|
) });
|
|
1786
2082
|
}
|
|
1787
2083
|
|
|
1788
2084
|
// src/primitives/sidebar.tsx
|
|
1789
|
-
var
|
|
2085
|
+
var React16 = __toESM(require("react"), 1);
|
|
1790
2086
|
var import_merge_props = require("@base-ui/react/merge-props");
|
|
1791
2087
|
var import_use_render = require("@base-ui/react/use-render");
|
|
1792
2088
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1793
|
-
var
|
|
2089
|
+
var import_cn11 = require("cn");
|
|
1794
2090
|
|
|
1795
2091
|
// src/hooks/use-mobile.tsx
|
|
1796
|
-
var
|
|
2092
|
+
var React15 = __toESM(require("react"), 1);
|
|
1797
2093
|
var MOBILE_BREAKPOINT = 768;
|
|
1798
2094
|
function useIsMobile() {
|
|
1799
|
-
const [isMobile, setIsMobile] =
|
|
1800
|
-
|
|
2095
|
+
const [isMobile, setIsMobile] = React15.useState(void 0);
|
|
2096
|
+
React15.useEffect(() => {
|
|
1801
2097
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1802
2098
|
const onChange = () => {
|
|
1803
2099
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1811,15 +2107,15 @@ function useIsMobile() {
|
|
|
1811
2107
|
|
|
1812
2108
|
// src/primitives/input.tsx
|
|
1813
2109
|
var import_input = require("@base-ui/react/input");
|
|
1814
|
-
var
|
|
1815
|
-
var
|
|
2110
|
+
var import_cn7 = require("cn");
|
|
2111
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1816
2112
|
function Input({ className, type, ...props }) {
|
|
1817
|
-
return /* @__PURE__ */ (0,
|
|
2113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1818
2114
|
import_input.Input,
|
|
1819
2115
|
{
|
|
1820
2116
|
type,
|
|
1821
2117
|
"data-slot": "input",
|
|
1822
|
-
className: (0,
|
|
2118
|
+
className: (0, import_cn7.cn)(
|
|
1823
2119
|
"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",
|
|
1824
2120
|
className
|
|
1825
2121
|
),
|
|
@@ -1830,19 +2126,19 @@ function Input({ className, type, ...props }) {
|
|
|
1830
2126
|
|
|
1831
2127
|
// src/primitives/separator.tsx
|
|
1832
2128
|
var import_separator = require("@base-ui/react/separator");
|
|
1833
|
-
var
|
|
1834
|
-
var
|
|
2129
|
+
var import_cn8 = require("cn");
|
|
2130
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1835
2131
|
function Separator({
|
|
1836
2132
|
className,
|
|
1837
2133
|
orientation = "horizontal",
|
|
1838
2134
|
...props
|
|
1839
2135
|
}) {
|
|
1840
|
-
return /* @__PURE__ */ (0,
|
|
2136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1841
2137
|
import_separator.Separator,
|
|
1842
2138
|
{
|
|
1843
2139
|
"data-slot": "separator",
|
|
1844
2140
|
orientation,
|
|
1845
|
-
className: (0,
|
|
2141
|
+
className: (0, import_cn8.cn)(
|
|
1846
2142
|
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
1847
2143
|
className
|
|
1848
2144
|
),
|
|
@@ -1853,21 +2149,21 @@ function Separator({
|
|
|
1853
2149
|
|
|
1854
2150
|
// src/primitives/sheet.tsx
|
|
1855
2151
|
var import_dialog2 = require("@base-ui/react/dialog");
|
|
1856
|
-
var
|
|
2152
|
+
var import_cn9 = require("cn");
|
|
1857
2153
|
var import_lucide_react6 = require("lucide-react");
|
|
1858
|
-
var
|
|
2154
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1859
2155
|
function Sheet({ ...props }) {
|
|
1860
|
-
return /* @__PURE__ */ (0,
|
|
2156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_dialog2.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
1861
2157
|
}
|
|
1862
2158
|
function SheetPortal({ ...props }) {
|
|
1863
|
-
return /* @__PURE__ */ (0,
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_dialog2.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1864
2160
|
}
|
|
1865
2161
|
function SheetOverlay({ className, ...props }) {
|
|
1866
|
-
return /* @__PURE__ */ (0,
|
|
2162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1867
2163
|
import_dialog2.Dialog.Backdrop,
|
|
1868
2164
|
{
|
|
1869
2165
|
"data-slot": "sheet-overlay",
|
|
1870
|
-
className: (0,
|
|
2166
|
+
className: (0, import_cn9.cn)(
|
|
1871
2167
|
"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",
|
|
1872
2168
|
className
|
|
1873
2169
|
),
|
|
@@ -1882,25 +2178,25 @@ function SheetContent({
|
|
|
1882
2178
|
showCloseButton = true,
|
|
1883
2179
|
...props
|
|
1884
2180
|
}) {
|
|
1885
|
-
return /* @__PURE__ */ (0,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
2181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(SheetPortal, { children: [
|
|
2182
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SheetOverlay, {}),
|
|
2183
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1888
2184
|
import_dialog2.Dialog.Popup,
|
|
1889
2185
|
{
|
|
1890
2186
|
"data-slot": "sheet-content",
|
|
1891
2187
|
"data-side": side,
|
|
1892
|
-
className: (0,
|
|
2188
|
+
className: (0, import_cn9.cn)(
|
|
1893
2189
|
"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",
|
|
1894
2190
|
className
|
|
1895
2191
|
),
|
|
1896
2192
|
...props,
|
|
1897
2193
|
children: [
|
|
1898
2194
|
children,
|
|
1899
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
2195
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1900
2196
|
import_dialog2.Dialog.Close,
|
|
1901
2197
|
{
|
|
1902
2198
|
"data-slot": "sheet-close",
|
|
1903
|
-
render: /* @__PURE__ */ (0,
|
|
2199
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1904
2200
|
Button,
|
|
1905
2201
|
{
|
|
1906
2202
|
variant: "ghost",
|
|
@@ -1909,11 +2205,11 @@ function SheetContent({
|
|
|
1909
2205
|
}
|
|
1910
2206
|
),
|
|
1911
2207
|
children: [
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1913
2209
|
import_lucide_react6.XIcon,
|
|
1914
2210
|
{}
|
|
1915
2211
|
),
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1917
2213
|
]
|
|
1918
2214
|
}
|
|
1919
2215
|
)
|
|
@@ -1923,21 +2219,21 @@ function SheetContent({
|
|
|
1923
2219
|
] });
|
|
1924
2220
|
}
|
|
1925
2221
|
function SheetHeader({ className, ...props }) {
|
|
1926
|
-
return /* @__PURE__ */ (0,
|
|
2222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1927
2223
|
"div",
|
|
1928
2224
|
{
|
|
1929
2225
|
"data-slot": "sheet-header",
|
|
1930
|
-
className: (0,
|
|
2226
|
+
className: (0, import_cn9.cn)("flex flex-col gap-0.5 p-4", className),
|
|
1931
2227
|
...props
|
|
1932
2228
|
}
|
|
1933
2229
|
);
|
|
1934
2230
|
}
|
|
1935
2231
|
function SheetTitle({ className, ...props }) {
|
|
1936
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1937
2233
|
import_dialog2.Dialog.Title,
|
|
1938
2234
|
{
|
|
1939
2235
|
"data-slot": "sheet-title",
|
|
1940
|
-
className: (0,
|
|
2236
|
+
className: (0, import_cn9.cn)(
|
|
1941
2237
|
"text-base font-medium text-foreground",
|
|
1942
2238
|
className
|
|
1943
2239
|
),
|
|
@@ -1949,88 +2245,42 @@ function SheetDescription({
|
|
|
1949
2245
|
className,
|
|
1950
2246
|
...props
|
|
1951
2247
|
}) {
|
|
1952
|
-
return /* @__PURE__ */ (0,
|
|
1953
|
-
import_dialog2.Dialog.Description,
|
|
1954
|
-
{
|
|
1955
|
-
"data-slot": "sheet-description",
|
|
1956
|
-
className: (0,
|
|
1957
|
-
...props
|
|
1958
|
-
}
|
|
1959
|
-
);
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
// src/primitives/skeleton.tsx
|
|
1963
|
-
var import_cn8 = require("cn");
|
|
1964
|
-
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1965
|
-
function Skeleton({ className, ...props }) {
|
|
1966
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1967
|
-
"div",
|
|
1968
|
-
{
|
|
1969
|
-
"data-slot": "skeleton",
|
|
1970
|
-
className: (0, import_cn8.cn)("animate-pulse rounded-md bg-muted", className),
|
|
1971
|
-
...props
|
|
1972
|
-
}
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// src/primitives/tooltip.tsx
|
|
1977
|
-
var import_tooltip = require("@base-ui/react/tooltip");
|
|
1978
|
-
var import_cn9 = require("cn");
|
|
1979
|
-
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1980
|
-
function Tooltip({ ...props }) {
|
|
1981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
1982
|
-
}
|
|
1983
|
-
function TooltipTrigger({ ...props }) {
|
|
1984
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1985
|
-
}
|
|
1986
|
-
function TooltipContent({
|
|
1987
|
-
className,
|
|
1988
|
-
side = "top",
|
|
1989
|
-
sideOffset = 4,
|
|
1990
|
-
align = "center",
|
|
1991
|
-
alignOffset = 0,
|
|
1992
|
-
children,
|
|
1993
|
-
...props
|
|
1994
|
-
}) {
|
|
1995
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1996
|
-
import_tooltip.Tooltip.Positioner,
|
|
1997
|
-
{
|
|
1998
|
-
align,
|
|
1999
|
-
alignOffset,
|
|
2000
|
-
side,
|
|
2001
|
-
sideOffset,
|
|
2002
|
-
className: "isolate z-50",
|
|
2003
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2004
|
-
import_tooltip.Tooltip.Popup,
|
|
2005
|
-
{
|
|
2006
|
-
"data-slot": "tooltip-content",
|
|
2007
|
-
className: (0, import_cn9.cn)(
|
|
2008
|
-
"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",
|
|
2009
|
-
className
|
|
2010
|
-
),
|
|
2011
|
-
...props,
|
|
2012
|
-
children: [
|
|
2013
|
-
children,
|
|
2014
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tooltip.Tooltip.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" })
|
|
2015
|
-
]
|
|
2016
|
-
}
|
|
2017
|
-
)
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2249
|
+
import_dialog2.Dialog.Description,
|
|
2250
|
+
{
|
|
2251
|
+
"data-slot": "sheet-description",
|
|
2252
|
+
className: (0, import_cn9.cn)("text-sm text-muted-foreground", className),
|
|
2253
|
+
...props
|
|
2018
2254
|
}
|
|
2019
|
-
)
|
|
2255
|
+
);
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
// src/primitives/skeleton.tsx
|
|
2259
|
+
var import_cn10 = require("cn");
|
|
2260
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2261
|
+
function Skeleton({ className, ...props }) {
|
|
2262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2263
|
+
"div",
|
|
2264
|
+
{
|
|
2265
|
+
"data-slot": "skeleton",
|
|
2266
|
+
className: (0, import_cn10.cn)("animate-pulse rounded-md bg-muted", className),
|
|
2267
|
+
...props
|
|
2268
|
+
}
|
|
2269
|
+
);
|
|
2020
2270
|
}
|
|
2021
2271
|
|
|
2022
2272
|
// src/primitives/sidebar.tsx
|
|
2023
2273
|
var import_lucide_react7 = require("lucide-react");
|
|
2024
|
-
var
|
|
2274
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2025
2275
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
2026
2276
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2027
2277
|
var SIDEBAR_WIDTH = "16rem";
|
|
2028
2278
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2029
2279
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2030
2280
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2031
|
-
var SidebarContext =
|
|
2281
|
+
var SidebarContext = React16.createContext(null);
|
|
2032
2282
|
function useSidebar() {
|
|
2033
|
-
const context =
|
|
2283
|
+
const context = React16.useContext(SidebarContext);
|
|
2034
2284
|
if (!context) {
|
|
2035
2285
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2036
2286
|
}
|
|
@@ -2046,10 +2296,10 @@ function SidebarProvider({
|
|
|
2046
2296
|
...props
|
|
2047
2297
|
}) {
|
|
2048
2298
|
const isMobile = useIsMobile();
|
|
2049
|
-
const [openMobile, setOpenMobile] =
|
|
2050
|
-
const [_open, _setOpen] =
|
|
2299
|
+
const [openMobile, setOpenMobile] = React16.useState(false);
|
|
2300
|
+
const [_open, _setOpen] = React16.useState(defaultOpen);
|
|
2051
2301
|
const open = openProp ?? _open;
|
|
2052
|
-
const setOpen =
|
|
2302
|
+
const setOpen = React16.useCallback(
|
|
2053
2303
|
(value) => {
|
|
2054
2304
|
const openState = typeof value === "function" ? value(open) : value;
|
|
2055
2305
|
if (setOpenProp) {
|
|
@@ -2061,10 +2311,10 @@ function SidebarProvider({
|
|
|
2061
2311
|
},
|
|
2062
2312
|
[setOpenProp, open]
|
|
2063
2313
|
);
|
|
2064
|
-
const toggleSidebar =
|
|
2314
|
+
const toggleSidebar = React16.useCallback(() => {
|
|
2065
2315
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2066
2316
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
2067
|
-
|
|
2317
|
+
React16.useEffect(() => {
|
|
2068
2318
|
const handleKeyDown = (event) => {
|
|
2069
2319
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2070
2320
|
event.preventDefault();
|
|
@@ -2075,7 +2325,7 @@ function SidebarProvider({
|
|
|
2075
2325
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2076
2326
|
}, [toggleSidebar]);
|
|
2077
2327
|
const state = open ? "expanded" : "collapsed";
|
|
2078
|
-
const contextValue =
|
|
2328
|
+
const contextValue = React16.useMemo(
|
|
2079
2329
|
() => ({
|
|
2080
2330
|
state,
|
|
2081
2331
|
open,
|
|
@@ -2087,7 +2337,7 @@ function SidebarProvider({
|
|
|
2087
2337
|
}),
|
|
2088
2338
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
2089
2339
|
);
|
|
2090
|
-
return /* @__PURE__ */ (0,
|
|
2340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2091
2341
|
"div",
|
|
2092
2342
|
{
|
|
2093
2343
|
"data-slot": "sidebar-wrapper",
|
|
@@ -2096,7 +2346,7 @@ function SidebarProvider({
|
|
|
2096
2346
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2097
2347
|
...style
|
|
2098
2348
|
},
|
|
2099
|
-
className: (0,
|
|
2349
|
+
className: (0, import_cn11.cn)(
|
|
2100
2350
|
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
2101
2351
|
className
|
|
2102
2352
|
),
|
|
@@ -2116,11 +2366,11 @@ function Sidebar({
|
|
|
2116
2366
|
}) {
|
|
2117
2367
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
2118
2368
|
if (collapsible === "none") {
|
|
2119
|
-
return /* @__PURE__ */ (0,
|
|
2369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2120
2370
|
"div",
|
|
2121
2371
|
{
|
|
2122
2372
|
"data-slot": "sidebar",
|
|
2123
|
-
className: (0,
|
|
2373
|
+
className: (0, import_cn11.cn)(
|
|
2124
2374
|
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
2125
2375
|
className
|
|
2126
2376
|
),
|
|
@@ -2130,7 +2380,7 @@ function Sidebar({
|
|
|
2130
2380
|
);
|
|
2131
2381
|
}
|
|
2132
2382
|
if (isMobile) {
|
|
2133
|
-
return /* @__PURE__ */ (0,
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2134
2384
|
SheetContent,
|
|
2135
2385
|
{
|
|
2136
2386
|
dir,
|
|
@@ -2143,16 +2393,16 @@ function Sidebar({
|
|
|
2143
2393
|
},
|
|
2144
2394
|
side,
|
|
2145
2395
|
children: [
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
2149
2399
|
] }),
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
2151
2401
|
]
|
|
2152
2402
|
}
|
|
2153
2403
|
) });
|
|
2154
2404
|
}
|
|
2155
|
-
return /* @__PURE__ */ (0,
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2156
2406
|
"div",
|
|
2157
2407
|
{
|
|
2158
2408
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
@@ -2162,11 +2412,11 @@ function Sidebar({
|
|
|
2162
2412
|
"data-side": side,
|
|
2163
2413
|
"data-slot": "sidebar",
|
|
2164
2414
|
children: [
|
|
2165
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2166
2416
|
"div",
|
|
2167
2417
|
{
|
|
2168
2418
|
"data-slot": "sidebar-gap",
|
|
2169
|
-
className: (0,
|
|
2419
|
+
className: (0, import_cn11.cn)(
|
|
2170
2420
|
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
2171
2421
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
2172
2422
|
"group-data-[side=right]:rotate-180",
|
|
@@ -2174,19 +2424,19 @@ function Sidebar({
|
|
|
2174
2424
|
)
|
|
2175
2425
|
}
|
|
2176
2426
|
),
|
|
2177
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2178
2428
|
"div",
|
|
2179
2429
|
{
|
|
2180
2430
|
"data-slot": "sidebar-container",
|
|
2181
2431
|
"data-side": side,
|
|
2182
|
-
className: (0,
|
|
2432
|
+
className: (0, import_cn11.cn)(
|
|
2183
2433
|
"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",
|
|
2184
2434
|
// Adjust the padding for floating and inset variants.
|
|
2185
2435
|
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",
|
|
2186
2436
|
className
|
|
2187
2437
|
),
|
|
2188
2438
|
...props,
|
|
2189
|
-
children: /* @__PURE__ */ (0,
|
|
2439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2190
2440
|
"div",
|
|
2191
2441
|
{
|
|
2192
2442
|
"data-sidebar": "sidebar",
|
|
@@ -2207,29 +2457,29 @@ function SidebarTrigger({
|
|
|
2207
2457
|
...props
|
|
2208
2458
|
}) {
|
|
2209
2459
|
const { toggleSidebar } = useSidebar();
|
|
2210
|
-
return /* @__PURE__ */ (0,
|
|
2460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2211
2461
|
Button,
|
|
2212
2462
|
{
|
|
2213
2463
|
"data-sidebar": "trigger",
|
|
2214
2464
|
"data-slot": "sidebar-trigger",
|
|
2215
2465
|
variant: "ghost",
|
|
2216
2466
|
size: "icon-sm",
|
|
2217
|
-
className: (0,
|
|
2467
|
+
className: (0, import_cn11.cn)(className),
|
|
2218
2468
|
onClick: (event) => {
|
|
2219
2469
|
onClick?.(event);
|
|
2220
2470
|
toggleSidebar();
|
|
2221
2471
|
},
|
|
2222
2472
|
...props,
|
|
2223
2473
|
children: [
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2225
|
-
/* @__PURE__ */ (0,
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react7.PanelLeftIcon, {}),
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2226
2476
|
]
|
|
2227
2477
|
}
|
|
2228
2478
|
);
|
|
2229
2479
|
}
|
|
2230
2480
|
function SidebarRail({ className, ...props }) {
|
|
2231
2481
|
const { toggleSidebar } = useSidebar();
|
|
2232
|
-
return /* @__PURE__ */ (0,
|
|
2482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2233
2483
|
"button",
|
|
2234
2484
|
{
|
|
2235
2485
|
"data-sidebar": "rail",
|
|
@@ -2238,7 +2488,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
2238
2488
|
tabIndex: -1,
|
|
2239
2489
|
onClick: toggleSidebar,
|
|
2240
2490
|
title: "Toggle Sidebar",
|
|
2241
|
-
className: (0,
|
|
2491
|
+
className: (0, import_cn11.cn)(
|
|
2242
2492
|
"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",
|
|
2243
2493
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
2244
2494
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -2252,11 +2502,11 @@ function SidebarRail({ className, ...props }) {
|
|
|
2252
2502
|
);
|
|
2253
2503
|
}
|
|
2254
2504
|
function SidebarInset({ className, ...props }) {
|
|
2255
|
-
return /* @__PURE__ */ (0,
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2256
2506
|
"main",
|
|
2257
2507
|
{
|
|
2258
2508
|
"data-slot": "sidebar-inset",
|
|
2259
|
-
className: (0,
|
|
2509
|
+
className: (0, import_cn11.cn)(
|
|
2260
2510
|
"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",
|
|
2261
2511
|
className
|
|
2262
2512
|
),
|
|
@@ -2268,34 +2518,34 @@ function SidebarInput({
|
|
|
2268
2518
|
className,
|
|
2269
2519
|
...props
|
|
2270
2520
|
}) {
|
|
2271
|
-
return /* @__PURE__ */ (0,
|
|
2521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2272
2522
|
Input,
|
|
2273
2523
|
{
|
|
2274
2524
|
"data-slot": "sidebar-input",
|
|
2275
2525
|
"data-sidebar": "input",
|
|
2276
|
-
className: (0,
|
|
2526
|
+
className: (0, import_cn11.cn)("h-8 w-full bg-background shadow-none", className),
|
|
2277
2527
|
...props
|
|
2278
2528
|
}
|
|
2279
2529
|
);
|
|
2280
2530
|
}
|
|
2281
2531
|
function SidebarHeader({ className, ...props }) {
|
|
2282
|
-
return /* @__PURE__ */ (0,
|
|
2532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2283
2533
|
"div",
|
|
2284
2534
|
{
|
|
2285
2535
|
"data-slot": "sidebar-header",
|
|
2286
2536
|
"data-sidebar": "header",
|
|
2287
|
-
className: (0,
|
|
2537
|
+
className: (0, import_cn11.cn)("flex flex-col gap-2 p-2", className),
|
|
2288
2538
|
...props
|
|
2289
2539
|
}
|
|
2290
2540
|
);
|
|
2291
2541
|
}
|
|
2292
2542
|
function SidebarFooter({ className, ...props }) {
|
|
2293
|
-
return /* @__PURE__ */ (0,
|
|
2543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2294
2544
|
"div",
|
|
2295
2545
|
{
|
|
2296
2546
|
"data-slot": "sidebar-footer",
|
|
2297
2547
|
"data-sidebar": "footer",
|
|
2298
|
-
className: (0,
|
|
2548
|
+
className: (0, import_cn11.cn)("flex flex-col gap-2 p-2", className),
|
|
2299
2549
|
...props
|
|
2300
2550
|
}
|
|
2301
2551
|
);
|
|
@@ -2304,23 +2554,23 @@ function SidebarSeparator({
|
|
|
2304
2554
|
className,
|
|
2305
2555
|
...props
|
|
2306
2556
|
}) {
|
|
2307
|
-
return /* @__PURE__ */ (0,
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2308
2558
|
Separator,
|
|
2309
2559
|
{
|
|
2310
2560
|
"data-slot": "sidebar-separator",
|
|
2311
2561
|
"data-sidebar": "separator",
|
|
2312
|
-
className: (0,
|
|
2562
|
+
className: (0, import_cn11.cn)("mx-2 w-auto bg-sidebar-border", className),
|
|
2313
2563
|
...props
|
|
2314
2564
|
}
|
|
2315
2565
|
);
|
|
2316
2566
|
}
|
|
2317
2567
|
function SidebarContent({ className, ...props }) {
|
|
2318
|
-
return /* @__PURE__ */ (0,
|
|
2568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2319
2569
|
"div",
|
|
2320
2570
|
{
|
|
2321
2571
|
"data-slot": "sidebar-content",
|
|
2322
2572
|
"data-sidebar": "content",
|
|
2323
|
-
className: (0,
|
|
2573
|
+
className: (0, import_cn11.cn)(
|
|
2324
2574
|
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2325
2575
|
className
|
|
2326
2576
|
),
|
|
@@ -2329,12 +2579,12 @@ function SidebarContent({ className, ...props }) {
|
|
|
2329
2579
|
);
|
|
2330
2580
|
}
|
|
2331
2581
|
function SidebarGroup({ className, ...props }) {
|
|
2332
|
-
return /* @__PURE__ */ (0,
|
|
2582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2333
2583
|
"div",
|
|
2334
2584
|
{
|
|
2335
2585
|
"data-slot": "sidebar-group",
|
|
2336
2586
|
"data-sidebar": "group",
|
|
2337
|
-
className: (0,
|
|
2587
|
+
className: (0, import_cn11.cn)("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2338
2588
|
...props
|
|
2339
2589
|
}
|
|
2340
2590
|
);
|
|
@@ -2348,7 +2598,7 @@ function SidebarGroupLabel({
|
|
|
2348
2598
|
defaultTagName: "div",
|
|
2349
2599
|
props: (0, import_merge_props.mergeProps)(
|
|
2350
2600
|
{
|
|
2351
|
-
className: (0,
|
|
2601
|
+
className: (0, import_cn11.cn)(
|
|
2352
2602
|
"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",
|
|
2353
2603
|
className
|
|
2354
2604
|
)
|
|
@@ -2371,7 +2621,7 @@ function SidebarGroupAction({
|
|
|
2371
2621
|
defaultTagName: "button",
|
|
2372
2622
|
props: (0, import_merge_props.mergeProps)(
|
|
2373
2623
|
{
|
|
2374
|
-
className: (0,
|
|
2624
|
+
className: (0, import_cn11.cn)(
|
|
2375
2625
|
"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",
|
|
2376
2626
|
className
|
|
2377
2627
|
)
|
|
@@ -2389,34 +2639,34 @@ function SidebarGroupContent({
|
|
|
2389
2639
|
className,
|
|
2390
2640
|
...props
|
|
2391
2641
|
}) {
|
|
2392
|
-
return /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2393
2643
|
"div",
|
|
2394
2644
|
{
|
|
2395
2645
|
"data-slot": "sidebar-group-content",
|
|
2396
2646
|
"data-sidebar": "group-content",
|
|
2397
|
-
className: (0,
|
|
2647
|
+
className: (0, import_cn11.cn)("w-full text-sm", className),
|
|
2398
2648
|
...props
|
|
2399
2649
|
}
|
|
2400
2650
|
);
|
|
2401
2651
|
}
|
|
2402
2652
|
function SidebarMenu({ className, ...props }) {
|
|
2403
|
-
return /* @__PURE__ */ (0,
|
|
2653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2404
2654
|
"ul",
|
|
2405
2655
|
{
|
|
2406
2656
|
"data-slot": "sidebar-menu",
|
|
2407
2657
|
"data-sidebar": "menu",
|
|
2408
|
-
className: (0,
|
|
2658
|
+
className: (0, import_cn11.cn)("flex w-full min-w-0 flex-col gap-0", className),
|
|
2409
2659
|
...props
|
|
2410
2660
|
}
|
|
2411
2661
|
);
|
|
2412
2662
|
}
|
|
2413
2663
|
function SidebarMenuItem({ className, ...props }) {
|
|
2414
|
-
return /* @__PURE__ */ (0,
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2415
2665
|
"li",
|
|
2416
2666
|
{
|
|
2417
2667
|
"data-slot": "sidebar-menu-item",
|
|
2418
2668
|
"data-sidebar": "menu-item",
|
|
2419
|
-
className: (0,
|
|
2669
|
+
className: (0, import_cn11.cn)("group/menu-item relative", className),
|
|
2420
2670
|
...props
|
|
2421
2671
|
}
|
|
2422
2672
|
);
|
|
@@ -2455,11 +2705,11 @@ function SidebarMenuButton({
|
|
|
2455
2705
|
defaultTagName: "button",
|
|
2456
2706
|
props: (0, import_merge_props.mergeProps)(
|
|
2457
2707
|
{
|
|
2458
|
-
className: (0,
|
|
2708
|
+
className: (0, import_cn11.cn)(sidebarMenuButtonVariants({ variant, size }), className)
|
|
2459
2709
|
},
|
|
2460
2710
|
props
|
|
2461
2711
|
),
|
|
2462
|
-
render: !tooltip ? render : /* @__PURE__ */ (0,
|
|
2712
|
+
render: !tooltip ? render : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipTrigger, { render }),
|
|
2463
2713
|
state: {
|
|
2464
2714
|
slot: "sidebar-menu-button",
|
|
2465
2715
|
sidebar: "menu-button",
|
|
@@ -2475,9 +2725,9 @@ function SidebarMenuButton({
|
|
|
2475
2725
|
children: tooltip
|
|
2476
2726
|
};
|
|
2477
2727
|
}
|
|
2478
|
-
return /* @__PURE__ */ (0,
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Tooltip, { children: [
|
|
2479
2729
|
comp,
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2481
2731
|
TooltipContent,
|
|
2482
2732
|
{
|
|
2483
2733
|
side: "right",
|
|
@@ -2498,7 +2748,7 @@ function SidebarMenuAction({
|
|
|
2498
2748
|
defaultTagName: "button",
|
|
2499
2749
|
props: (0, import_merge_props.mergeProps)(
|
|
2500
2750
|
{
|
|
2501
|
-
className: (0,
|
|
2751
|
+
className: (0, import_cn11.cn)(
|
|
2502
2752
|
"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",
|
|
2503
2753
|
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",
|
|
2504
2754
|
className
|
|
@@ -2517,12 +2767,12 @@ function SidebarMenuBadge({
|
|
|
2517
2767
|
className,
|
|
2518
2768
|
...props
|
|
2519
2769
|
}) {
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
2770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2521
2771
|
"div",
|
|
2522
2772
|
{
|
|
2523
2773
|
"data-slot": "sidebar-menu-badge",
|
|
2524
2774
|
"data-sidebar": "menu-badge",
|
|
2525
|
-
className: (0,
|
|
2775
|
+
className: (0, import_cn11.cn)(
|
|
2526
2776
|
"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",
|
|
2527
2777
|
className
|
|
2528
2778
|
),
|
|
@@ -2535,25 +2785,25 @@ function SidebarMenuSkeleton({
|
|
|
2535
2785
|
showIcon = false,
|
|
2536
2786
|
...props
|
|
2537
2787
|
}) {
|
|
2538
|
-
const [width] =
|
|
2788
|
+
const [width] = React16.useState(() => {
|
|
2539
2789
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2540
2790
|
});
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
2791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2542
2792
|
"div",
|
|
2543
2793
|
{
|
|
2544
2794
|
"data-slot": "sidebar-menu-skeleton",
|
|
2545
2795
|
"data-sidebar": "menu-skeleton",
|
|
2546
|
-
className: (0,
|
|
2796
|
+
className: (0, import_cn11.cn)("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2547
2797
|
...props,
|
|
2548
2798
|
children: [
|
|
2549
|
-
showIcon && /* @__PURE__ */ (0,
|
|
2799
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2550
2800
|
Skeleton,
|
|
2551
2801
|
{
|
|
2552
2802
|
className: "size-4 rounded-md",
|
|
2553
2803
|
"data-sidebar": "menu-skeleton-icon"
|
|
2554
2804
|
}
|
|
2555
2805
|
),
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2557
2807
|
Skeleton,
|
|
2558
2808
|
{
|
|
2559
2809
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -2568,12 +2818,12 @@ function SidebarMenuSkeleton({
|
|
|
2568
2818
|
);
|
|
2569
2819
|
}
|
|
2570
2820
|
function SidebarMenuSub({ className, ...props }) {
|
|
2571
|
-
return /* @__PURE__ */ (0,
|
|
2821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2572
2822
|
"ul",
|
|
2573
2823
|
{
|
|
2574
2824
|
"data-slot": "sidebar-menu-sub",
|
|
2575
2825
|
"data-sidebar": "menu-sub",
|
|
2576
|
-
className: (0,
|
|
2826
|
+
className: (0, import_cn11.cn)(
|
|
2577
2827
|
"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",
|
|
2578
2828
|
className
|
|
2579
2829
|
),
|
|
@@ -2585,12 +2835,12 @@ function SidebarMenuSubItem({
|
|
|
2585
2835
|
className,
|
|
2586
2836
|
...props
|
|
2587
2837
|
}) {
|
|
2588
|
-
return /* @__PURE__ */ (0,
|
|
2838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2589
2839
|
"li",
|
|
2590
2840
|
{
|
|
2591
2841
|
"data-slot": "sidebar-menu-sub-item",
|
|
2592
2842
|
"data-sidebar": "menu-sub-item",
|
|
2593
|
-
className: (0,
|
|
2843
|
+
className: (0, import_cn11.cn)("group/menu-sub-item relative", className),
|
|
2594
2844
|
...props
|
|
2595
2845
|
}
|
|
2596
2846
|
);
|
|
@@ -2606,7 +2856,7 @@ function SidebarMenuSubButton({
|
|
|
2606
2856
|
defaultTagName: "a",
|
|
2607
2857
|
props: (0, import_merge_props.mergeProps)(
|
|
2608
2858
|
{
|
|
2609
|
-
className: (0,
|
|
2859
|
+
className: (0, import_cn11.cn)(
|
|
2610
2860
|
"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",
|
|
2611
2861
|
className
|
|
2612
2862
|
)
|
|
@@ -2624,7 +2874,7 @@ function SidebarMenuSubButton({
|
|
|
2624
2874
|
}
|
|
2625
2875
|
|
|
2626
2876
|
// src/components/sidebar/Sidebar.tsx
|
|
2627
|
-
var
|
|
2877
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2628
2878
|
var iconModeButtonClasses = "group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!";
|
|
2629
2879
|
var sizingMenuButtonClasses = "text-base px-3 py-2 h-auto";
|
|
2630
2880
|
var sizingSubButtonClasses = "data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto";
|
|
@@ -2632,7 +2882,7 @@ function SidebarGroupLabel2({
|
|
|
2632
2882
|
className,
|
|
2633
2883
|
...props
|
|
2634
2884
|
}) {
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2636
2886
|
SidebarGroupLabel,
|
|
2637
2887
|
{
|
|
2638
2888
|
className: cn("px-3 uppercase tracking-caption", className),
|
|
@@ -2645,7 +2895,7 @@ function SidebarProvider2({
|
|
|
2645
2895
|
style,
|
|
2646
2896
|
...props
|
|
2647
2897
|
}) {
|
|
2648
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2649
2899
|
SidebarProvider,
|
|
2650
2900
|
{
|
|
2651
2901
|
className,
|
|
@@ -2658,7 +2908,7 @@ function SidebarProvider2({
|
|
|
2658
2908
|
);
|
|
2659
2909
|
}
|
|
2660
2910
|
function SidebarGroup2({ className, ...props }) {
|
|
2661
|
-
return /* @__PURE__ */ (0,
|
|
2911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2662
2912
|
SidebarGroup,
|
|
2663
2913
|
{
|
|
2664
2914
|
className: cn("group-data-[collapsible=icon]:px-2.5", className),
|
|
@@ -2670,7 +2920,7 @@ function SidebarFooter2({
|
|
|
2670
2920
|
className,
|
|
2671
2921
|
...props
|
|
2672
2922
|
}) {
|
|
2673
|
-
return /* @__PURE__ */ (0,
|
|
2923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2674
2924
|
SidebarFooter,
|
|
2675
2925
|
{
|
|
2676
2926
|
className: cn(
|
|
@@ -2685,7 +2935,7 @@ function SidebarHeader2({
|
|
|
2685
2935
|
className,
|
|
2686
2936
|
...props
|
|
2687
2937
|
}) {
|
|
2688
|
-
return /* @__PURE__ */ (0,
|
|
2938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2689
2939
|
SidebarHeader,
|
|
2690
2940
|
{
|
|
2691
2941
|
className: cn(
|
|
@@ -2697,8 +2947,8 @@ function SidebarHeader2({
|
|
|
2697
2947
|
);
|
|
2698
2948
|
}
|
|
2699
2949
|
function SidebarLogo() {
|
|
2700
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
-
/* @__PURE__ */ (0,
|
|
2950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SidebarHeader, { className: "px-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative flex h-15 items-center overflow-hidden px-5", children: [
|
|
2951
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2702
2952
|
BergetLogo,
|
|
2703
2953
|
{
|
|
2704
2954
|
variant: "logotype",
|
|
@@ -2706,11 +2956,11 @@ function SidebarLogo() {
|
|
|
2706
2956
|
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"
|
|
2707
2957
|
}
|
|
2708
2958
|
),
|
|
2709
|
-
/* @__PURE__ */ (0,
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("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__ */ (0, import_jsx_runtime27.jsx)(BergetLogo, { variant: "symbol", size: 32 }) })
|
|
2710
2960
|
] }) });
|
|
2711
2961
|
}
|
|
2712
2962
|
function SidebarPageHeader({ className, ...props }) {
|
|
2713
|
-
return /* @__PURE__ */ (0,
|
|
2963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2714
2964
|
"header",
|
|
2715
2965
|
{
|
|
2716
2966
|
className: cn(
|
|
@@ -2722,7 +2972,7 @@ function SidebarPageHeader({ className, ...props }) {
|
|
|
2722
2972
|
);
|
|
2723
2973
|
}
|
|
2724
2974
|
function SidebarMenuButton2({ className, ...props }) {
|
|
2725
|
-
return /* @__PURE__ */ (0,
|
|
2975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2726
2976
|
SidebarMenuButton,
|
|
2727
2977
|
{
|
|
2728
2978
|
className: cn(sizingMenuButtonClasses, iconModeButtonClasses, className),
|
|
@@ -2731,7 +2981,7 @@ function SidebarMenuButton2({ className, ...props }) {
|
|
|
2731
2981
|
);
|
|
2732
2982
|
}
|
|
2733
2983
|
function SidebarMenuSubButton2({ className, ...props }) {
|
|
2734
|
-
return /* @__PURE__ */ (0,
|
|
2984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2735
2985
|
SidebarMenuSubButton,
|
|
2736
2986
|
{
|
|
2737
2987
|
className: cn(sizingSubButtonClasses, "[&>svg]:text-inherit", className),
|
|
@@ -2741,22 +2991,22 @@ function SidebarMenuSubButton2({ className, ...props }) {
|
|
|
2741
2991
|
}
|
|
2742
2992
|
|
|
2743
2993
|
// src/components/table/Table.tsx
|
|
2744
|
-
var
|
|
2994
|
+
var React17 = __toESM(require("react"), 1);
|
|
2745
2995
|
|
|
2746
2996
|
// src/primitives/table.tsx
|
|
2747
|
-
var
|
|
2748
|
-
var
|
|
2997
|
+
var import_cn12 = require("cn");
|
|
2998
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2749
2999
|
function Table({ className, ...props }) {
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
3000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2751
3001
|
"div",
|
|
2752
3002
|
{
|
|
2753
3003
|
"data-slot": "table-container",
|
|
2754
3004
|
className: "relative w-full overflow-x-auto",
|
|
2755
|
-
children: /* @__PURE__ */ (0,
|
|
3005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2756
3006
|
"table",
|
|
2757
3007
|
{
|
|
2758
3008
|
"data-slot": "table",
|
|
2759
|
-
className: (0,
|
|
3009
|
+
className: (0, import_cn12.cn)("w-full caption-bottom text-sm", className),
|
|
2760
3010
|
...props
|
|
2761
3011
|
}
|
|
2762
3012
|
)
|
|
@@ -2764,31 +3014,31 @@ function Table({ className, ...props }) {
|
|
|
2764
3014
|
);
|
|
2765
3015
|
}
|
|
2766
3016
|
function TableHeader({ className, ...props }) {
|
|
2767
|
-
return /* @__PURE__ */ (0,
|
|
3017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2768
3018
|
"thead",
|
|
2769
3019
|
{
|
|
2770
3020
|
"data-slot": "table-header",
|
|
2771
|
-
className: (0,
|
|
3021
|
+
className: (0, import_cn12.cn)("[&_tr]:border-b", className),
|
|
2772
3022
|
...props
|
|
2773
3023
|
}
|
|
2774
3024
|
);
|
|
2775
3025
|
}
|
|
2776
3026
|
function TableBody({ className, ...props }) {
|
|
2777
|
-
return /* @__PURE__ */ (0,
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2778
3028
|
"tbody",
|
|
2779
3029
|
{
|
|
2780
3030
|
"data-slot": "table-body",
|
|
2781
|
-
className: (0,
|
|
3031
|
+
className: (0, import_cn12.cn)("[&_tr:last-child]:border-0", className),
|
|
2782
3032
|
...props
|
|
2783
3033
|
}
|
|
2784
3034
|
);
|
|
2785
3035
|
}
|
|
2786
3036
|
function TableFooter({ className, ...props }) {
|
|
2787
|
-
return /* @__PURE__ */ (0,
|
|
3037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2788
3038
|
"tfoot",
|
|
2789
3039
|
{
|
|
2790
3040
|
"data-slot": "table-footer",
|
|
2791
|
-
className: (0,
|
|
3041
|
+
className: (0, import_cn12.cn)(
|
|
2792
3042
|
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
2793
3043
|
className
|
|
2794
3044
|
),
|
|
@@ -2797,11 +3047,11 @@ function TableFooter({ className, ...props }) {
|
|
|
2797
3047
|
);
|
|
2798
3048
|
}
|
|
2799
3049
|
function TableRow({ className, ...props }) {
|
|
2800
|
-
return /* @__PURE__ */ (0,
|
|
3050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2801
3051
|
"tr",
|
|
2802
3052
|
{
|
|
2803
3053
|
"data-slot": "table-row",
|
|
2804
|
-
className: (0,
|
|
3054
|
+
className: (0, import_cn12.cn)(
|
|
2805
3055
|
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
2806
3056
|
className
|
|
2807
3057
|
),
|
|
@@ -2810,11 +3060,11 @@ function TableRow({ className, ...props }) {
|
|
|
2810
3060
|
);
|
|
2811
3061
|
}
|
|
2812
3062
|
function TableHead({ className, ...props }) {
|
|
2813
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2814
3064
|
"th",
|
|
2815
3065
|
{
|
|
2816
3066
|
"data-slot": "table-head",
|
|
2817
|
-
className: (0,
|
|
3067
|
+
className: (0, import_cn12.cn)(
|
|
2818
3068
|
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
2819
3069
|
className
|
|
2820
3070
|
),
|
|
@@ -2823,11 +3073,11 @@ function TableHead({ className, ...props }) {
|
|
|
2823
3073
|
);
|
|
2824
3074
|
}
|
|
2825
3075
|
function TableCell({ className, ...props }) {
|
|
2826
|
-
return /* @__PURE__ */ (0,
|
|
3076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2827
3077
|
"td",
|
|
2828
3078
|
{
|
|
2829
3079
|
"data-slot": "table-cell",
|
|
2830
|
-
className: (0,
|
|
3080
|
+
className: (0, import_cn12.cn)(
|
|
2831
3081
|
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
2832
3082
|
className
|
|
2833
3083
|
),
|
|
@@ -2839,23 +3089,23 @@ function TableCaption({
|
|
|
2839
3089
|
className,
|
|
2840
3090
|
...props
|
|
2841
3091
|
}) {
|
|
2842
|
-
return /* @__PURE__ */ (0,
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2843
3093
|
"caption",
|
|
2844
3094
|
{
|
|
2845
3095
|
"data-slot": "table-caption",
|
|
2846
|
-
className: (0,
|
|
3096
|
+
className: (0, import_cn12.cn)("mt-4 text-sm text-muted-foreground", className),
|
|
2847
3097
|
...props
|
|
2848
3098
|
}
|
|
2849
3099
|
);
|
|
2850
3100
|
}
|
|
2851
3101
|
|
|
2852
3102
|
// src/components/table/Table.tsx
|
|
2853
|
-
var
|
|
2854
|
-
var Table2 =
|
|
2855
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3103
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3104
|
+
var Table2 = React17.forwardRef(
|
|
3105
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Table, { ref, className, ...props })
|
|
2856
3106
|
);
|
|
2857
3107
|
Table2.displayName = "Table";
|
|
2858
|
-
var TableHeader2 =
|
|
3108
|
+
var TableHeader2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2859
3109
|
TableHeader,
|
|
2860
3110
|
{
|
|
2861
3111
|
ref,
|
|
@@ -2864,7 +3114,7 @@ var TableHeader2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2864
3114
|
}
|
|
2865
3115
|
));
|
|
2866
3116
|
TableHeader2.displayName = "TableHeader";
|
|
2867
|
-
var TableBody2 =
|
|
3117
|
+
var TableBody2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2868
3118
|
TableBody,
|
|
2869
3119
|
{
|
|
2870
3120
|
ref,
|
|
@@ -2873,7 +3123,7 @@ var TableBody2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2873
3123
|
}
|
|
2874
3124
|
));
|
|
2875
3125
|
TableBody2.displayName = "TableBody";
|
|
2876
|
-
var TableFooter2 =
|
|
3126
|
+
var TableFooter2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2877
3127
|
TableFooter,
|
|
2878
3128
|
{
|
|
2879
3129
|
ref,
|
|
@@ -2885,8 +3135,8 @@ var TableFooter2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2885
3135
|
}
|
|
2886
3136
|
));
|
|
2887
3137
|
TableFooter2.displayName = "TableFooter";
|
|
2888
|
-
var TableRow2 =
|
|
2889
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3138
|
+
var TableRow2 = React17.forwardRef(
|
|
3139
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2890
3140
|
TableRow,
|
|
2891
3141
|
{
|
|
2892
3142
|
ref,
|
|
@@ -2899,7 +3149,7 @@ var TableRow2 = React16.forwardRef(
|
|
|
2899
3149
|
)
|
|
2900
3150
|
);
|
|
2901
3151
|
TableRow2.displayName = "TableRow";
|
|
2902
|
-
var TableHead2 =
|
|
3152
|
+
var TableHead2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2903
3153
|
TableHead,
|
|
2904
3154
|
{
|
|
2905
3155
|
ref,
|
|
@@ -2911,7 +3161,7 @@ var TableHead2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2911
3161
|
}
|
|
2912
3162
|
));
|
|
2913
3163
|
TableHead2.displayName = "TableHead";
|
|
2914
|
-
var TableCell2 =
|
|
3164
|
+
var TableCell2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2915
3165
|
TableCell,
|
|
2916
3166
|
{
|
|
2917
3167
|
ref,
|
|
@@ -2920,7 +3170,7 @@ var TableCell2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2920
3170
|
}
|
|
2921
3171
|
));
|
|
2922
3172
|
TableCell2.displayName = "TableCell";
|
|
2923
|
-
var TableCaption2 =
|
|
3173
|
+
var TableCaption2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2924
3174
|
TableCaption,
|
|
2925
3175
|
{
|
|
2926
3176
|
ref,
|
|
@@ -2931,21 +3181,21 @@ var TableCaption2 = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2931
3181
|
TableCaption2.displayName = "TableCaption";
|
|
2932
3182
|
|
|
2933
3183
|
// src/components/item/Item.tsx
|
|
2934
|
-
var
|
|
3184
|
+
var React18 = __toESM(require("react"), 1);
|
|
2935
3185
|
|
|
2936
3186
|
// src/primitives/item.tsx
|
|
2937
3187
|
var import_merge_props2 = require("@base-ui/react/merge-props");
|
|
2938
3188
|
var import_use_render2 = require("@base-ui/react/use-render");
|
|
2939
3189
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
2940
|
-
var
|
|
2941
|
-
var
|
|
3190
|
+
var import_cn13 = require("cn");
|
|
3191
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2942
3192
|
function ItemGroup({ className, ...props }) {
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2944
3194
|
"div",
|
|
2945
3195
|
{
|
|
2946
3196
|
role: "list",
|
|
2947
3197
|
"data-slot": "item-group",
|
|
2948
|
-
className: (0,
|
|
3198
|
+
className: (0, import_cn13.cn)(
|
|
2949
3199
|
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
2950
3200
|
className
|
|
2951
3201
|
),
|
|
@@ -2957,12 +3207,12 @@ function ItemSeparator({
|
|
|
2957
3207
|
className,
|
|
2958
3208
|
...props
|
|
2959
3209
|
}) {
|
|
2960
|
-
return /* @__PURE__ */ (0,
|
|
3210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2961
3211
|
Separator,
|
|
2962
3212
|
{
|
|
2963
3213
|
"data-slot": "item-separator",
|
|
2964
3214
|
orientation: "horizontal",
|
|
2965
|
-
className: (0,
|
|
3215
|
+
className: (0, import_cn13.cn)("my-2", className),
|
|
2966
3216
|
...props
|
|
2967
3217
|
}
|
|
2968
3218
|
);
|
|
@@ -2999,7 +3249,7 @@ function Item({
|
|
|
2999
3249
|
defaultTagName: "div",
|
|
3000
3250
|
props: (0, import_merge_props2.mergeProps)(
|
|
3001
3251
|
{
|
|
3002
|
-
className: (0,
|
|
3252
|
+
className: (0, import_cn13.cn)(itemVariants({ variant, size, className }))
|
|
3003
3253
|
},
|
|
3004
3254
|
props
|
|
3005
3255
|
),
|
|
@@ -3031,22 +3281,22 @@ function ItemMedia({
|
|
|
3031
3281
|
variant = "default",
|
|
3032
3282
|
...props
|
|
3033
3283
|
}) {
|
|
3034
|
-
return /* @__PURE__ */ (0,
|
|
3284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3035
3285
|
"div",
|
|
3036
3286
|
{
|
|
3037
3287
|
"data-slot": "item-media",
|
|
3038
3288
|
"data-variant": variant,
|
|
3039
|
-
className: (0,
|
|
3289
|
+
className: (0, import_cn13.cn)(itemMediaVariants({ variant, className })),
|
|
3040
3290
|
...props
|
|
3041
3291
|
}
|
|
3042
3292
|
);
|
|
3043
3293
|
}
|
|
3044
3294
|
function ItemContent({ className, ...props }) {
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3046
3296
|
"div",
|
|
3047
3297
|
{
|
|
3048
3298
|
"data-slot": "item-content",
|
|
3049
|
-
className: (0,
|
|
3299
|
+
className: (0, import_cn13.cn)(
|
|
3050
3300
|
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
3051
3301
|
className
|
|
3052
3302
|
),
|
|
@@ -3055,11 +3305,11 @@ function ItemContent({ className, ...props }) {
|
|
|
3055
3305
|
);
|
|
3056
3306
|
}
|
|
3057
3307
|
function ItemTitle({ className, ...props }) {
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
3308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3059
3309
|
"div",
|
|
3060
3310
|
{
|
|
3061
3311
|
"data-slot": "item-title",
|
|
3062
|
-
className: (0,
|
|
3312
|
+
className: (0, import_cn13.cn)(
|
|
3063
3313
|
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
3064
3314
|
className
|
|
3065
3315
|
),
|
|
@@ -3068,11 +3318,11 @@ function ItemTitle({ className, ...props }) {
|
|
|
3068
3318
|
);
|
|
3069
3319
|
}
|
|
3070
3320
|
function ItemDescription({ className, ...props }) {
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3072
3322
|
"p",
|
|
3073
3323
|
{
|
|
3074
3324
|
"data-slot": "item-description",
|
|
3075
|
-
className: (0,
|
|
3325
|
+
className: (0, import_cn13.cn)(
|
|
3076
3326
|
"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",
|
|
3077
3327
|
className
|
|
3078
3328
|
),
|
|
@@ -3081,21 +3331,21 @@ function ItemDescription({ className, ...props }) {
|
|
|
3081
3331
|
);
|
|
3082
3332
|
}
|
|
3083
3333
|
function ItemActions({ className, ...props }) {
|
|
3084
|
-
return /* @__PURE__ */ (0,
|
|
3334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3085
3335
|
"div",
|
|
3086
3336
|
{
|
|
3087
3337
|
"data-slot": "item-actions",
|
|
3088
|
-
className: (0,
|
|
3338
|
+
className: (0, import_cn13.cn)("flex items-center gap-2", className),
|
|
3089
3339
|
...props
|
|
3090
3340
|
}
|
|
3091
3341
|
);
|
|
3092
3342
|
}
|
|
3093
3343
|
function ItemHeader({ className, ...props }) {
|
|
3094
|
-
return /* @__PURE__ */ (0,
|
|
3344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3095
3345
|
"div",
|
|
3096
3346
|
{
|
|
3097
3347
|
"data-slot": "item-header",
|
|
3098
|
-
className: (0,
|
|
3348
|
+
className: (0, import_cn13.cn)(
|
|
3099
3349
|
"flex basis-full items-center justify-between gap-2",
|
|
3100
3350
|
className
|
|
3101
3351
|
),
|
|
@@ -3104,11 +3354,11 @@ function ItemHeader({ className, ...props }) {
|
|
|
3104
3354
|
);
|
|
3105
3355
|
}
|
|
3106
3356
|
function ItemFooter({ className, ...props }) {
|
|
3107
|
-
return /* @__PURE__ */ (0,
|
|
3357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3108
3358
|
"div",
|
|
3109
3359
|
{
|
|
3110
3360
|
"data-slot": "item-footer",
|
|
3111
|
-
className: (0,
|
|
3361
|
+
className: (0, import_cn13.cn)(
|
|
3112
3362
|
"flex basis-full items-center justify-between gap-2",
|
|
3113
3363
|
className
|
|
3114
3364
|
),
|
|
@@ -3118,9 +3368,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
3118
3368
|
}
|
|
3119
3369
|
|
|
3120
3370
|
// src/components/item/Item.tsx
|
|
3121
|
-
var
|
|
3371
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3122
3372
|
function Item2({ className, asChild, children, ...props }) {
|
|
3123
|
-
return /* @__PURE__ */ (0,
|
|
3373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3124
3374
|
Item,
|
|
3125
3375
|
{
|
|
3126
3376
|
render: asChild ? children : void 0,
|
|
@@ -3139,8 +3389,8 @@ function Item2({ className, asChild, children, ...props }) {
|
|
|
3139
3389
|
}
|
|
3140
3390
|
);
|
|
3141
3391
|
}
|
|
3142
|
-
var ItemMedia2 =
|
|
3143
|
-
return /* @__PURE__ */ (0,
|
|
3392
|
+
var ItemMedia2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3144
3394
|
ItemMedia,
|
|
3145
3395
|
{
|
|
3146
3396
|
ref,
|
|
@@ -3150,8 +3400,8 @@ var ItemMedia2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
3150
3400
|
);
|
|
3151
3401
|
});
|
|
3152
3402
|
ItemMedia2.displayName = "ItemMedia";
|
|
3153
|
-
var ItemTitle2 =
|
|
3154
|
-
return /* @__PURE__ */ (0,
|
|
3403
|
+
var ItemTitle2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3155
3405
|
ItemTitle,
|
|
3156
3406
|
{
|
|
3157
3407
|
ref,
|
|
@@ -3161,8 +3411,8 @@ var ItemTitle2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
3161
3411
|
);
|
|
3162
3412
|
});
|
|
3163
3413
|
ItemTitle2.displayName = "ItemTitle";
|
|
3164
|
-
var ItemDescription2 =
|
|
3165
|
-
return /* @__PURE__ */ (0,
|
|
3414
|
+
var ItemDescription2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3166
3416
|
ItemDescription,
|
|
3167
3417
|
{
|
|
3168
3418
|
ref,
|
|
@@ -3172,8 +3422,8 @@ var ItemDescription2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
3172
3422
|
);
|
|
3173
3423
|
});
|
|
3174
3424
|
ItemDescription2.displayName = "ItemDescription";
|
|
3175
|
-
var ItemSeparator2 =
|
|
3176
|
-
return /* @__PURE__ */ (0,
|
|
3425
|
+
var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3177
3427
|
ItemSeparator,
|
|
3178
3428
|
{
|
|
3179
3429
|
ref,
|
|
@@ -3186,22 +3436,22 @@ ItemSeparator2.displayName = "ItemSeparator";
|
|
|
3186
3436
|
|
|
3187
3437
|
// src/components/search-input/SearchInput.tsx
|
|
3188
3438
|
var import_lucide_react8 = require("lucide-react");
|
|
3189
|
-
var
|
|
3439
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3190
3440
|
var SearchInput = ({
|
|
3191
3441
|
type = "search",
|
|
3192
3442
|
placeholder = "Search...",
|
|
3193
3443
|
className,
|
|
3194
3444
|
ref,
|
|
3195
3445
|
...props
|
|
3196
|
-
}) => /* @__PURE__ */ (0,
|
|
3197
|
-
/* @__PURE__ */ (0,
|
|
3446
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative flex w-full items-center", "data-slot": "search-input", children: [
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3198
3448
|
import_lucide_react8.Search,
|
|
3199
3449
|
{
|
|
3200
3450
|
"aria-hidden": "true",
|
|
3201
3451
|
className: "pointer-events-none absolute left-2.5 size-4 text-berget-muted-foreground"
|
|
3202
3452
|
}
|
|
3203
3453
|
),
|
|
3204
|
-
/* @__PURE__ */ (0,
|
|
3454
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3205
3455
|
Input,
|
|
3206
3456
|
{
|
|
3207
3457
|
ref,
|
|
@@ -3215,32 +3465,32 @@ var SearchInput = ({
|
|
|
3215
3465
|
SearchInput.displayName = "SearchInput";
|
|
3216
3466
|
|
|
3217
3467
|
// src/components/checkbox/Checkbox.tsx
|
|
3218
|
-
var
|
|
3468
|
+
var React19 = __toESM(require("react"), 1);
|
|
3219
3469
|
var import_checkbox2 = require("@base-ui/react/checkbox");
|
|
3220
3470
|
var import_lucide_react10 = require("lucide-react");
|
|
3221
3471
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
3222
3472
|
|
|
3223
3473
|
// src/primitives/checkbox.tsx
|
|
3224
3474
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
3225
|
-
var
|
|
3475
|
+
var import_cn14 = require("cn");
|
|
3226
3476
|
var import_lucide_react9 = require("lucide-react");
|
|
3227
|
-
var
|
|
3477
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3228
3478
|
function Checkbox({ className, ...props }) {
|
|
3229
|
-
return /* @__PURE__ */ (0,
|
|
3479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3230
3480
|
import_checkbox.Checkbox.Root,
|
|
3231
3481
|
{
|
|
3232
3482
|
"data-slot": "checkbox",
|
|
3233
|
-
className: (0,
|
|
3483
|
+
className: (0, import_cn14.cn)(
|
|
3234
3484
|
"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",
|
|
3235
3485
|
className
|
|
3236
3486
|
),
|
|
3237
3487
|
...props,
|
|
3238
|
-
children: /* @__PURE__ */ (0,
|
|
3488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3239
3489
|
import_checkbox.Checkbox.Indicator,
|
|
3240
3490
|
{
|
|
3241
3491
|
"data-slot": "checkbox-indicator",
|
|
3242
3492
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
3243
|
-
children: /* @__PURE__ */ (0,
|
|
3493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3244
3494
|
import_lucide_react9.CheckIcon,
|
|
3245
3495
|
{}
|
|
3246
3496
|
)
|
|
@@ -3251,7 +3501,7 @@ function Checkbox({ className, ...props }) {
|
|
|
3251
3501
|
}
|
|
3252
3502
|
|
|
3253
3503
|
// src/components/checkbox/Checkbox.tsx
|
|
3254
|
-
var
|
|
3504
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3255
3505
|
var checkboxVariants = (0, import_class_variance_authority11.cva)(
|
|
3256
3506
|
"inline-flex items-center justify-center rounded-berget-xs transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3257
3507
|
{
|
|
@@ -3273,7 +3523,7 @@ var checkboxVariants = (0, import_class_variance_authority11.cva)(
|
|
|
3273
3523
|
}
|
|
3274
3524
|
}
|
|
3275
3525
|
);
|
|
3276
|
-
var Checkbox2 =
|
|
3526
|
+
var Checkbox2 = React19.forwardRef(
|
|
3277
3527
|
({
|
|
3278
3528
|
"aria-label": ariaLabel,
|
|
3279
3529
|
className,
|
|
@@ -3286,11 +3536,11 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3286
3536
|
disabled,
|
|
3287
3537
|
...props
|
|
3288
3538
|
}, ref) => {
|
|
3289
|
-
const generatedId =
|
|
3539
|
+
const generatedId = React19.useId();
|
|
3290
3540
|
const checkboxId = id || generatedId;
|
|
3291
3541
|
const errorId = `${checkboxId}-error`;
|
|
3292
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
-
/* @__PURE__ */ (0,
|
|
3542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3294
3544
|
Checkbox,
|
|
3295
3545
|
{
|
|
3296
3546
|
ref,
|
|
@@ -3306,7 +3556,7 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3306
3556
|
className
|
|
3307
3557
|
),
|
|
3308
3558
|
...props,
|
|
3309
|
-
children: /* @__PURE__ */ (0,
|
|
3559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_checkbox2.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3310
3560
|
import_lucide_react10.Check,
|
|
3311
3561
|
{
|
|
3312
3562
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -3315,8 +3565,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3315
3565
|
) })
|
|
3316
3566
|
}
|
|
3317
3567
|
) }),
|
|
3318
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
3319
|
-
label && /* @__PURE__ */ (0,
|
|
3568
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3569
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3320
3570
|
"label",
|
|
3321
3571
|
{
|
|
3322
3572
|
htmlFor: checkboxId,
|
|
@@ -3328,8 +3578,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3328
3578
|
children: label
|
|
3329
3579
|
}
|
|
3330
3580
|
),
|
|
3331
|
-
description && /* @__PURE__ */ (0,
|
|
3332
|
-
error && /* @__PURE__ */ (0,
|
|
3581
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3582
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3333
3583
|
] })
|
|
3334
3584
|
] });
|
|
3335
3585
|
}
|
|
@@ -3337,10 +3587,10 @@ var Checkbox2 = React18.forwardRef(
|
|
|
3337
3587
|
Checkbox2.displayName = "Checkbox";
|
|
3338
3588
|
|
|
3339
3589
|
// src/components/switch/Switch.tsx
|
|
3340
|
-
var
|
|
3590
|
+
var React20 = __toESM(require("react"), 1);
|
|
3341
3591
|
var import_switch = require("@base-ui/react/switch");
|
|
3342
3592
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
3343
|
-
var
|
|
3593
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3344
3594
|
var switchRootVariants = (0, import_class_variance_authority12.cva)(
|
|
3345
3595
|
"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",
|
|
3346
3596
|
{
|
|
@@ -3377,7 +3627,7 @@ var switchThumbVariants = (0, import_class_variance_authority12.cva)(
|
|
|
3377
3627
|
}
|
|
3378
3628
|
}
|
|
3379
3629
|
);
|
|
3380
|
-
var Switch =
|
|
3630
|
+
var Switch = React20.forwardRef(
|
|
3381
3631
|
({
|
|
3382
3632
|
"aria-label": ariaLabel,
|
|
3383
3633
|
className,
|
|
@@ -3390,11 +3640,11 @@ var Switch = React19.forwardRef(
|
|
|
3390
3640
|
disabled,
|
|
3391
3641
|
...props
|
|
3392
3642
|
}, ref) => {
|
|
3393
|
-
const generatedId =
|
|
3643
|
+
const generatedId = React20.useId();
|
|
3394
3644
|
const switchId = id || generatedId;
|
|
3395
3645
|
const errorId = `${switchId}-error`;
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
-
/* @__PURE__ */ (0,
|
|
3646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3398
3648
|
import_switch.Switch.Root,
|
|
3399
3649
|
{
|
|
3400
3650
|
ref,
|
|
@@ -3409,11 +3659,11 @@ var Switch = React19.forwardRef(
|
|
|
3409
3659
|
className
|
|
3410
3660
|
),
|
|
3411
3661
|
...props,
|
|
3412
|
-
children: /* @__PURE__ */ (0,
|
|
3662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_switch.Switch.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
3413
3663
|
}
|
|
3414
3664
|
),
|
|
3415
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
3416
|
-
label && /* @__PURE__ */ (0,
|
|
3665
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3666
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3417
3667
|
"label",
|
|
3418
3668
|
{
|
|
3419
3669
|
htmlFor: switchId,
|
|
@@ -3424,8 +3674,8 @@ var Switch = React19.forwardRef(
|
|
|
3424
3674
|
children: label
|
|
3425
3675
|
}
|
|
3426
3676
|
),
|
|
3427
|
-
description && /* @__PURE__ */ (0,
|
|
3428
|
-
error && /* @__PURE__ */ (0,
|
|
3677
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3678
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3429
3679
|
] })
|
|
3430
3680
|
] });
|
|
3431
3681
|
}
|
|
@@ -3434,26 +3684,26 @@ Switch.displayName = "Switch";
|
|
|
3434
3684
|
|
|
3435
3685
|
// src/primitives/select.tsx
|
|
3436
3686
|
var import_select = require("@base-ui/react/select");
|
|
3437
|
-
var
|
|
3687
|
+
var import_cn15 = require("cn");
|
|
3438
3688
|
var import_lucide_react11 = require("lucide-react");
|
|
3439
|
-
var
|
|
3689
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3440
3690
|
var Select = import_select.Select.Root;
|
|
3441
3691
|
function SelectGroup({ className, ...props }) {
|
|
3442
|
-
return /* @__PURE__ */ (0,
|
|
3692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3443
3693
|
import_select.Select.Group,
|
|
3444
3694
|
{
|
|
3445
3695
|
"data-slot": "select-group",
|
|
3446
|
-
className: (0,
|
|
3696
|
+
className: (0, import_cn15.cn)("scroll-my-1 p-1", className),
|
|
3447
3697
|
...props
|
|
3448
3698
|
}
|
|
3449
3699
|
);
|
|
3450
3700
|
}
|
|
3451
3701
|
function SelectValue({ className, ...props }) {
|
|
3452
|
-
return /* @__PURE__ */ (0,
|
|
3702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3453
3703
|
import_select.Select.Value,
|
|
3454
3704
|
{
|
|
3455
3705
|
"data-slot": "select-value",
|
|
3456
|
-
className: (0,
|
|
3706
|
+
className: (0, import_cn15.cn)("flex flex-1 text-left", className),
|
|
3457
3707
|
...props
|
|
3458
3708
|
}
|
|
3459
3709
|
);
|
|
@@ -3464,22 +3714,22 @@ function SelectTrigger({
|
|
|
3464
3714
|
children,
|
|
3465
3715
|
...props
|
|
3466
3716
|
}) {
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3468
3718
|
import_select.Select.Trigger,
|
|
3469
3719
|
{
|
|
3470
3720
|
"data-slot": "select-trigger",
|
|
3471
3721
|
"data-size": size,
|
|
3472
|
-
className: (0,
|
|
3722
|
+
className: (0, import_cn15.cn)(
|
|
3473
3723
|
"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",
|
|
3474
3724
|
className
|
|
3475
3725
|
),
|
|
3476
3726
|
...props,
|
|
3477
3727
|
children: [
|
|
3478
3728
|
children,
|
|
3479
|
-
/* @__PURE__ */ (0,
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3480
3730
|
import_select.Select.Icon,
|
|
3481
3731
|
{
|
|
3482
|
-
render: /* @__PURE__ */ (0,
|
|
3732
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
3483
3733
|
}
|
|
3484
3734
|
)
|
|
3485
3735
|
]
|
|
@@ -3496,7 +3746,7 @@ function SelectContent({
|
|
|
3496
3746
|
alignItemWithTrigger = true,
|
|
3497
3747
|
...props
|
|
3498
3748
|
}) {
|
|
3499
|
-
return /* @__PURE__ */ (0,
|
|
3749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3500
3750
|
import_select.Select.Positioner,
|
|
3501
3751
|
{
|
|
3502
3752
|
side,
|
|
@@ -3505,17 +3755,17 @@ function SelectContent({
|
|
|
3505
3755
|
alignOffset,
|
|
3506
3756
|
alignItemWithTrigger,
|
|
3507
3757
|
className: "isolate z-50",
|
|
3508
|
-
children: /* @__PURE__ */ (0,
|
|
3758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3509
3759
|
import_select.Select.Popup,
|
|
3510
3760
|
{
|
|
3511
3761
|
"data-slot": "select-content",
|
|
3512
3762
|
"data-align-trigger": alignItemWithTrigger,
|
|
3513
|
-
className: (0,
|
|
3763
|
+
className: (0, import_cn15.cn)("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),
|
|
3514
3764
|
...props,
|
|
3515
3765
|
children: [
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3517
|
-
/* @__PURE__ */ (0,
|
|
3518
|
-
/* @__PURE__ */ (0,
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectScrollUpButton, {}),
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_select.Select.List, { children }),
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectScrollDownButton, {})
|
|
3519
3769
|
]
|
|
3520
3770
|
}
|
|
3521
3771
|
)
|
|
@@ -3526,11 +3776,11 @@ function SelectLabel({
|
|
|
3526
3776
|
className,
|
|
3527
3777
|
...props
|
|
3528
3778
|
}) {
|
|
3529
|
-
return /* @__PURE__ */ (0,
|
|
3779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3530
3780
|
import_select.Select.GroupLabel,
|
|
3531
3781
|
{
|
|
3532
3782
|
"data-slot": "select-label",
|
|
3533
|
-
className: (0,
|
|
3783
|
+
className: (0, import_cn15.cn)("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
3534
3784
|
...props
|
|
3535
3785
|
}
|
|
3536
3786
|
);
|
|
@@ -3540,22 +3790,22 @@ function SelectItem({
|
|
|
3540
3790
|
children,
|
|
3541
3791
|
...props
|
|
3542
3792
|
}) {
|
|
3543
|
-
return /* @__PURE__ */ (0,
|
|
3793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3544
3794
|
import_select.Select.Item,
|
|
3545
3795
|
{
|
|
3546
3796
|
"data-slot": "select-item",
|
|
3547
|
-
className: (0,
|
|
3797
|
+
className: (0, import_cn15.cn)(
|
|
3548
3798
|
"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",
|
|
3549
3799
|
className
|
|
3550
3800
|
),
|
|
3551
3801
|
...props,
|
|
3552
3802
|
children: [
|
|
3553
|
-
/* @__PURE__ */ (0,
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3555
3805
|
import_select.Select.ItemIndicator,
|
|
3556
3806
|
{
|
|
3557
|
-
render: /* @__PURE__ */ (0,
|
|
3558
|
-
children: /* @__PURE__ */ (0,
|
|
3807
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
3808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.CheckIcon, { className: "pointer-events-none" })
|
|
3559
3809
|
}
|
|
3560
3810
|
)
|
|
3561
3811
|
]
|
|
@@ -3566,11 +3816,11 @@ function SelectSeparator({
|
|
|
3566
3816
|
className,
|
|
3567
3817
|
...props
|
|
3568
3818
|
}) {
|
|
3569
|
-
return /* @__PURE__ */ (0,
|
|
3819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3570
3820
|
import_select.Select.Separator,
|
|
3571
3821
|
{
|
|
3572
3822
|
"data-slot": "select-separator",
|
|
3573
|
-
className: (0,
|
|
3823
|
+
className: (0, import_cn15.cn)("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
3574
3824
|
...props
|
|
3575
3825
|
}
|
|
3576
3826
|
);
|
|
@@ -3579,16 +3829,16 @@ function SelectScrollUpButton({
|
|
|
3579
3829
|
className,
|
|
3580
3830
|
...props
|
|
3581
3831
|
}) {
|
|
3582
|
-
return /* @__PURE__ */ (0,
|
|
3832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3583
3833
|
import_select.Select.ScrollUpArrow,
|
|
3584
3834
|
{
|
|
3585
3835
|
"data-slot": "select-scroll-up-button",
|
|
3586
|
-
className: (0,
|
|
3836
|
+
className: (0, import_cn15.cn)(
|
|
3587
3837
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3588
3838
|
className
|
|
3589
3839
|
),
|
|
3590
3840
|
...props,
|
|
3591
|
-
children: /* @__PURE__ */ (0,
|
|
3841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3592
3842
|
import_lucide_react11.ChevronUpIcon,
|
|
3593
3843
|
{}
|
|
3594
3844
|
)
|
|
@@ -3599,16 +3849,16 @@ function SelectScrollDownButton({
|
|
|
3599
3849
|
className,
|
|
3600
3850
|
...props
|
|
3601
3851
|
}) {
|
|
3602
|
-
return /* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3603
3853
|
import_select.Select.ScrollDownArrow,
|
|
3604
3854
|
{
|
|
3605
3855
|
"data-slot": "select-scroll-down-button",
|
|
3606
|
-
className: (0,
|
|
3856
|
+
className: (0, import_cn15.cn)(
|
|
3607
3857
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3608
3858
|
className
|
|
3609
3859
|
),
|
|
3610
3860
|
...props,
|
|
3611
|
-
children: /* @__PURE__ */ (0,
|
|
3861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3612
3862
|
import_lucide_react11.ChevronDownIcon,
|
|
3613
3863
|
{}
|
|
3614
3864
|
)
|
|
@@ -3617,18 +3867,18 @@ function SelectScrollDownButton({
|
|
|
3617
3867
|
}
|
|
3618
3868
|
|
|
3619
3869
|
// src/components/country-select/CountrySelect.tsx
|
|
3620
|
-
var
|
|
3870
|
+
var React22 = __toESM(require("react"), 1);
|
|
3621
3871
|
var import_lucide_react14 = require("lucide-react");
|
|
3622
3872
|
|
|
3623
3873
|
// src/components/icon/Icon.tsx
|
|
3624
|
-
var
|
|
3625
|
-
var
|
|
3874
|
+
var React21 = __toESM(require("react"), 1);
|
|
3875
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3626
3876
|
var iconStrokeMap = {
|
|
3627
3877
|
16: 1.4,
|
|
3628
3878
|
24: 1.6,
|
|
3629
3879
|
32: 1.8
|
|
3630
3880
|
};
|
|
3631
|
-
var Icon =
|
|
3881
|
+
var Icon = React21.forwardRef(
|
|
3632
3882
|
({
|
|
3633
3883
|
icon: IconComponent,
|
|
3634
3884
|
size,
|
|
@@ -3640,7 +3890,7 @@ var Icon = React20.forwardRef(
|
|
|
3640
3890
|
const strokeWidth = iconStrokeMap[size];
|
|
3641
3891
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
3642
3892
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
3893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3644
3894
|
IconComponent,
|
|
3645
3895
|
{
|
|
3646
3896
|
ref,
|
|
@@ -3656,13 +3906,13 @@ Icon.displayName = "Icon";
|
|
|
3656
3906
|
|
|
3657
3907
|
// src/primitives/popover.tsx
|
|
3658
3908
|
var import_popover = require("@base-ui/react/popover");
|
|
3659
|
-
var
|
|
3660
|
-
var
|
|
3909
|
+
var import_cn16 = require("cn");
|
|
3910
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3661
3911
|
function Popover({ ...props }) {
|
|
3662
|
-
return /* @__PURE__ */ (0,
|
|
3912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
3663
3913
|
}
|
|
3664
3914
|
function PopoverTrigger({ ...props }) {
|
|
3665
|
-
return /* @__PURE__ */ (0,
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
3666
3916
|
}
|
|
3667
3917
|
function PopoverContent({
|
|
3668
3918
|
className,
|
|
@@ -3672,7 +3922,7 @@ function PopoverContent({
|
|
|
3672
3922
|
sideOffset = 4,
|
|
3673
3923
|
...props
|
|
3674
3924
|
}) {
|
|
3675
|
-
return /* @__PURE__ */ (0,
|
|
3925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3676
3926
|
import_popover.Popover.Positioner,
|
|
3677
3927
|
{
|
|
3678
3928
|
align,
|
|
@@ -3680,11 +3930,11 @@ function PopoverContent({
|
|
|
3680
3930
|
side,
|
|
3681
3931
|
sideOffset,
|
|
3682
3932
|
className: "isolate z-50",
|
|
3683
|
-
children: /* @__PURE__ */ (0,
|
|
3933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3684
3934
|
import_popover.Popover.Popup,
|
|
3685
3935
|
{
|
|
3686
3936
|
"data-slot": "popover-content",
|
|
3687
|
-
className: (0,
|
|
3937
|
+
className: (0, import_cn16.cn)(
|
|
3688
3938
|
"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",
|
|
3689
3939
|
className
|
|
3690
3940
|
),
|
|
@@ -3697,27 +3947,27 @@ function PopoverContent({
|
|
|
3697
3947
|
|
|
3698
3948
|
// src/primitives/command.tsx
|
|
3699
3949
|
var import_cmdk = require("cmdk");
|
|
3700
|
-
var
|
|
3950
|
+
var import_cn20 = require("cn");
|
|
3701
3951
|
|
|
3702
3952
|
// src/primitives/dialog.tsx
|
|
3703
3953
|
var import_dialog3 = require("@base-ui/react/dialog");
|
|
3704
|
-
var
|
|
3954
|
+
var import_cn17 = require("cn");
|
|
3705
3955
|
var import_lucide_react12 = require("lucide-react");
|
|
3706
|
-
var
|
|
3956
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3707
3957
|
|
|
3708
3958
|
// src/primitives/input-group.tsx
|
|
3709
3959
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
3710
|
-
var
|
|
3960
|
+
var import_cn19 = require("cn");
|
|
3711
3961
|
|
|
3712
3962
|
// src/primitives/textarea.tsx
|
|
3713
|
-
var
|
|
3714
|
-
var
|
|
3963
|
+
var import_cn18 = require("cn");
|
|
3964
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3715
3965
|
function Textarea({ className, ...props }) {
|
|
3716
|
-
return /* @__PURE__ */ (0,
|
|
3966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3717
3967
|
"textarea",
|
|
3718
3968
|
{
|
|
3719
3969
|
"data-slot": "textarea",
|
|
3720
|
-
className: (0,
|
|
3970
|
+
className: (0, import_cn18.cn)(
|
|
3721
3971
|
"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",
|
|
3722
3972
|
className
|
|
3723
3973
|
),
|
|
@@ -3727,14 +3977,14 @@ function Textarea({ className, ...props }) {
|
|
|
3727
3977
|
}
|
|
3728
3978
|
|
|
3729
3979
|
// src/primitives/input-group.tsx
|
|
3730
|
-
var
|
|
3980
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3731
3981
|
function InputGroup({ className, ...props }) {
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3733
3983
|
"div",
|
|
3734
3984
|
{
|
|
3735
3985
|
"data-slot": "input-group",
|
|
3736
3986
|
role: "group",
|
|
3737
|
-
className: (0,
|
|
3987
|
+
className: (0, import_cn19.cn)(
|
|
3738
3988
|
"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",
|
|
3739
3989
|
className
|
|
3740
3990
|
),
|
|
@@ -3763,13 +4013,13 @@ function InputGroupAddon({
|
|
|
3763
4013
|
align = "inline-start",
|
|
3764
4014
|
...props
|
|
3765
4015
|
}) {
|
|
3766
|
-
return /* @__PURE__ */ (0,
|
|
4016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3767
4017
|
"div",
|
|
3768
4018
|
{
|
|
3769
4019
|
role: "group",
|
|
3770
4020
|
"data-slot": "input-group-addon",
|
|
3771
4021
|
"data-align": align,
|
|
3772
|
-
className: (0,
|
|
4022
|
+
className: (0, import_cn19.cn)(inputGroupAddonVariants({ align }), className),
|
|
3773
4023
|
onClick: (e) => {
|
|
3774
4024
|
if (e.target.closest("button")) {
|
|
3775
4025
|
return;
|
|
@@ -3799,16 +4049,16 @@ var inputGroupButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
3799
4049
|
|
|
3800
4050
|
// src/primitives/command.tsx
|
|
3801
4051
|
var import_lucide_react13 = require("lucide-react");
|
|
3802
|
-
var
|
|
4052
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3803
4053
|
function Command({
|
|
3804
4054
|
className,
|
|
3805
4055
|
...props
|
|
3806
4056
|
}) {
|
|
3807
|
-
return /* @__PURE__ */ (0,
|
|
4057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3808
4058
|
import_cmdk.Command,
|
|
3809
4059
|
{
|
|
3810
4060
|
"data-slot": "command",
|
|
3811
|
-
className: (0,
|
|
4061
|
+
className: (0, import_cn20.cn)(
|
|
3812
4062
|
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
3813
4063
|
className
|
|
3814
4064
|
),
|
|
@@ -3820,30 +4070,30 @@ function CommandInput({
|
|
|
3820
4070
|
className,
|
|
3821
4071
|
...props
|
|
3822
4072
|
}) {
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
3824
|
-
/* @__PURE__ */ (0,
|
|
4073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3825
4075
|
import_cmdk.Command.Input,
|
|
3826
4076
|
{
|
|
3827
4077
|
"data-slot": "command-input",
|
|
3828
|
-
className: (0,
|
|
4078
|
+
className: (0, import_cn20.cn)(
|
|
3829
4079
|
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
3830
4080
|
className
|
|
3831
4081
|
),
|
|
3832
4082
|
...props
|
|
3833
4083
|
}
|
|
3834
4084
|
),
|
|
3835
|
-
/* @__PURE__ */ (0,
|
|
4085
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(InputGroupAddon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
3836
4086
|
] }) });
|
|
3837
4087
|
}
|
|
3838
4088
|
function CommandList({
|
|
3839
4089
|
className,
|
|
3840
4090
|
...props
|
|
3841
4091
|
}) {
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3843
4093
|
import_cmdk.Command.List,
|
|
3844
4094
|
{
|
|
3845
4095
|
"data-slot": "command-list",
|
|
3846
|
-
className: (0,
|
|
4096
|
+
className: (0, import_cn20.cn)(
|
|
3847
4097
|
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
3848
4098
|
className
|
|
3849
4099
|
),
|
|
@@ -3855,11 +4105,11 @@ function CommandEmpty({
|
|
|
3855
4105
|
className,
|
|
3856
4106
|
...props
|
|
3857
4107
|
}) {
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
4108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3859
4109
|
import_cmdk.Command.Empty,
|
|
3860
4110
|
{
|
|
3861
4111
|
"data-slot": "command-empty",
|
|
3862
|
-
className: (0,
|
|
4112
|
+
className: (0, import_cn20.cn)("py-6 text-center text-sm", className),
|
|
3863
4113
|
...props
|
|
3864
4114
|
}
|
|
3865
4115
|
);
|
|
@@ -3868,11 +4118,11 @@ function CommandGroup({
|
|
|
3868
4118
|
className,
|
|
3869
4119
|
...props
|
|
3870
4120
|
}) {
|
|
3871
|
-
return /* @__PURE__ */ (0,
|
|
4121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3872
4122
|
import_cmdk.Command.Group,
|
|
3873
4123
|
{
|
|
3874
4124
|
"data-slot": "command-group",
|
|
3875
|
-
className: (0,
|
|
4125
|
+
className: (0, import_cn20.cn)(
|
|
3876
4126
|
"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",
|
|
3877
4127
|
className
|
|
3878
4128
|
),
|
|
@@ -3885,18 +4135,18 @@ function CommandItem({
|
|
|
3885
4135
|
children,
|
|
3886
4136
|
...props
|
|
3887
4137
|
}) {
|
|
3888
|
-
return /* @__PURE__ */ (0,
|
|
4138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3889
4139
|
import_cmdk.Command.Item,
|
|
3890
4140
|
{
|
|
3891
4141
|
"data-slot": "command-item",
|
|
3892
|
-
className: (0,
|
|
4142
|
+
className: (0, import_cn20.cn)(
|
|
3893
4143
|
"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",
|
|
3894
4144
|
className
|
|
3895
4145
|
),
|
|
3896
4146
|
...props,
|
|
3897
4147
|
children: [
|
|
3898
4148
|
children,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
3900
4150
|
]
|
|
3901
4151
|
}
|
|
3902
4152
|
);
|
|
@@ -4044,8 +4294,8 @@ var isEUCountry = (countryCode) => {
|
|
|
4044
4294
|
};
|
|
4045
4295
|
|
|
4046
4296
|
// src/components/country-select/CountrySelect.tsx
|
|
4047
|
-
var
|
|
4048
|
-
var CountrySelect =
|
|
4297
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4298
|
+
var CountrySelect = React22.forwardRef(
|
|
4049
4299
|
({
|
|
4050
4300
|
value,
|
|
4051
4301
|
onValueChange,
|
|
@@ -4055,14 +4305,14 @@ var CountrySelect = React21.forwardRef(
|
|
|
4055
4305
|
align = "center",
|
|
4056
4306
|
sideOffset = 4
|
|
4057
4307
|
}, ref) => {
|
|
4058
|
-
const [open, setOpen] =
|
|
4059
|
-
const selectedCountry =
|
|
4060
|
-
return /* @__PURE__ */ (0,
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4308
|
+
const [open, setOpen] = React22.useState(false);
|
|
4309
|
+
const selectedCountry = React22.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
4310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
4311
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4062
4312
|
PopoverTrigger,
|
|
4063
4313
|
{
|
|
4064
4314
|
ref,
|
|
4065
|
-
render: /* @__PURE__ */ (0,
|
|
4315
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4066
4316
|
"button",
|
|
4067
4317
|
{
|
|
4068
4318
|
type: "button",
|
|
@@ -4084,16 +4334,16 @@ var CountrySelect = React21.forwardRef(
|
|
|
4084
4334
|
}
|
|
4085
4335
|
),
|
|
4086
4336
|
children: [
|
|
4087
|
-
/* @__PURE__ */ (0,
|
|
4088
|
-
/* @__PURE__ */ (0,
|
|
4089
|
-
/* @__PURE__ */ (0,
|
|
4090
|
-
/* @__PURE__ */ (0,
|
|
4337
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate", children: selectedCountry.name }),
|
|
4340
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
4091
4341
|
"(",
|
|
4092
4342
|
selectedCountry.code,
|
|
4093
4343
|
")"
|
|
4094
4344
|
] })
|
|
4095
|
-
] }) : /* @__PURE__ */ (0,
|
|
4096
|
-
/* @__PURE__ */ (0,
|
|
4345
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4346
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4097
4347
|
Icon,
|
|
4098
4348
|
{
|
|
4099
4349
|
icon: import_lucide_react14.Globe,
|
|
@@ -4101,9 +4351,9 @@ var CountrySelect = React21.forwardRef(
|
|
|
4101
4351
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
4102
4352
|
}
|
|
4103
4353
|
),
|
|
4104
|
-
/* @__PURE__ */ (0,
|
|
4354
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
4105
4355
|
] }) }),
|
|
4106
|
-
/* @__PURE__ */ (0,
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4107
4357
|
Icon,
|
|
4108
4358
|
{
|
|
4109
4359
|
icon: import_lucide_react14.ChevronDown,
|
|
@@ -4118,17 +4368,17 @@ var CountrySelect = React21.forwardRef(
|
|
|
4118
4368
|
]
|
|
4119
4369
|
}
|
|
4120
4370
|
),
|
|
4121
|
-
/* @__PURE__ */ (0,
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4122
4372
|
PopoverContent,
|
|
4123
4373
|
{
|
|
4124
4374
|
align,
|
|
4125
4375
|
sideOffset,
|
|
4126
4376
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
4127
|
-
children: /* @__PURE__ */ (0,
|
|
4128
|
-
/* @__PURE__ */ (0,
|
|
4129
|
-
/* @__PURE__ */ (0,
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4131
|
-
/* @__PURE__ */ (0,
|
|
4377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Command, { children: [
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommandInput, { placeholder: "Search country..." }),
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(CommandList, { children: [
|
|
4380
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommandEmpty, { children: "No countries found." }),
|
|
4381
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4132
4382
|
CommandItem,
|
|
4133
4383
|
{
|
|
4134
4384
|
value: `${country.name} ${country.code}`,
|
|
@@ -4142,12 +4392,12 @@ var CountrySelect = React21.forwardRef(
|
|
|
4142
4392
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
4143
4393
|
),
|
|
4144
4394
|
children: [
|
|
4145
|
-
/* @__PURE__ */ (0,
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4147
|
-
/* @__PURE__ */ (0,
|
|
4148
|
-
/* @__PURE__ */ (0,
|
|
4395
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
4396
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
4397
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "text-sm truncate", children: country.name }),
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
4149
4399
|
] }),
|
|
4150
|
-
value === country.code && /* @__PURE__ */ (0,
|
|
4400
|
+
value === country.code && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
4151
4401
|
]
|
|
4152
4402
|
},
|
|
4153
4403
|
country.code
|
|
@@ -4162,14 +4412,14 @@ var CountrySelect = React21.forwardRef(
|
|
|
4162
4412
|
CountrySelect.displayName = "CountrySelect";
|
|
4163
4413
|
|
|
4164
4414
|
// src/primitives/label.tsx
|
|
4165
|
-
var
|
|
4166
|
-
var
|
|
4415
|
+
var import_cn21 = require("cn");
|
|
4416
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4167
4417
|
function Label({ className, ...props }) {
|
|
4168
|
-
return /* @__PURE__ */ (0,
|
|
4418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4169
4419
|
"label",
|
|
4170
4420
|
{
|
|
4171
4421
|
"data-slot": "label",
|
|
4172
|
-
className: (0,
|
|
4422
|
+
className: (0, import_cn21.cn)(
|
|
4173
4423
|
"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",
|
|
4174
4424
|
className
|
|
4175
4425
|
),
|
|
@@ -4181,14 +4431,14 @@ function Label({ className, ...props }) {
|
|
|
4181
4431
|
// src/primitives/field.tsx
|
|
4182
4432
|
var import_react = require("react");
|
|
4183
4433
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
4184
|
-
var
|
|
4185
|
-
var
|
|
4434
|
+
var import_cn22 = require("cn");
|
|
4435
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4186
4436
|
function FieldSet({ className, ...props }) {
|
|
4187
|
-
return /* @__PURE__ */ (0,
|
|
4437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4188
4438
|
"fieldset",
|
|
4189
4439
|
{
|
|
4190
4440
|
"data-slot": "field-set",
|
|
4191
|
-
className: (0,
|
|
4441
|
+
className: (0, import_cn22.cn)(
|
|
4192
4442
|
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
4193
4443
|
className
|
|
4194
4444
|
),
|
|
@@ -4201,12 +4451,12 @@ function FieldLegend({
|
|
|
4201
4451
|
variant = "legend",
|
|
4202
4452
|
...props
|
|
4203
4453
|
}) {
|
|
4204
|
-
return /* @__PURE__ */ (0,
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4205
4455
|
"legend",
|
|
4206
4456
|
{
|
|
4207
4457
|
"data-slot": "field-legend",
|
|
4208
4458
|
"data-variant": variant,
|
|
4209
|
-
className: (0,
|
|
4459
|
+
className: (0, import_cn22.cn)(
|
|
4210
4460
|
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
4211
4461
|
className
|
|
4212
4462
|
),
|
|
@@ -4215,11 +4465,11 @@ function FieldLegend({
|
|
|
4215
4465
|
);
|
|
4216
4466
|
}
|
|
4217
4467
|
function FieldGroup({ className, ...props }) {
|
|
4218
|
-
return /* @__PURE__ */ (0,
|
|
4468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4219
4469
|
"div",
|
|
4220
4470
|
{
|
|
4221
4471
|
"data-slot": "field-group",
|
|
4222
|
-
className: (0,
|
|
4472
|
+
className: (0, import_cn22.cn)(
|
|
4223
4473
|
"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",
|
|
4224
4474
|
className
|
|
4225
4475
|
),
|
|
@@ -4247,23 +4497,23 @@ function Field({
|
|
|
4247
4497
|
orientation = "vertical",
|
|
4248
4498
|
...props
|
|
4249
4499
|
}) {
|
|
4250
|
-
return /* @__PURE__ */ (0,
|
|
4500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4251
4501
|
"div",
|
|
4252
4502
|
{
|
|
4253
4503
|
role: "group",
|
|
4254
4504
|
"data-slot": "field",
|
|
4255
4505
|
"data-orientation": orientation,
|
|
4256
|
-
className: (0,
|
|
4506
|
+
className: (0, import_cn22.cn)(fieldVariants({ orientation }), className),
|
|
4257
4507
|
...props
|
|
4258
4508
|
}
|
|
4259
4509
|
);
|
|
4260
4510
|
}
|
|
4261
4511
|
function FieldContent({ className, ...props }) {
|
|
4262
|
-
return /* @__PURE__ */ (0,
|
|
4512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4263
4513
|
"div",
|
|
4264
4514
|
{
|
|
4265
4515
|
"data-slot": "field-content",
|
|
4266
|
-
className: (0,
|
|
4516
|
+
className: (0, import_cn22.cn)(
|
|
4267
4517
|
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
4268
4518
|
className
|
|
4269
4519
|
),
|
|
@@ -4275,11 +4525,11 @@ function FieldLabel({
|
|
|
4275
4525
|
className,
|
|
4276
4526
|
...props
|
|
4277
4527
|
}) {
|
|
4278
|
-
return /* @__PURE__ */ (0,
|
|
4528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4279
4529
|
Label,
|
|
4280
4530
|
{
|
|
4281
4531
|
"data-slot": "field-label",
|
|
4282
|
-
className: (0,
|
|
4532
|
+
className: (0, import_cn22.cn)(
|
|
4283
4533
|
"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",
|
|
4284
4534
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
4285
4535
|
className
|
|
@@ -4289,11 +4539,11 @@ function FieldLabel({
|
|
|
4289
4539
|
);
|
|
4290
4540
|
}
|
|
4291
4541
|
function FieldTitle({ className, ...props }) {
|
|
4292
|
-
return /* @__PURE__ */ (0,
|
|
4542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4293
4543
|
"div",
|
|
4294
4544
|
{
|
|
4295
4545
|
"data-slot": "field-label",
|
|
4296
|
-
className: (0,
|
|
4546
|
+
className: (0, import_cn22.cn)(
|
|
4297
4547
|
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
4298
4548
|
className
|
|
4299
4549
|
),
|
|
@@ -4302,11 +4552,11 @@ function FieldTitle({ className, ...props }) {
|
|
|
4302
4552
|
);
|
|
4303
4553
|
}
|
|
4304
4554
|
function FieldDescription({ className, ...props }) {
|
|
4305
|
-
return /* @__PURE__ */ (0,
|
|
4555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4306
4556
|
"p",
|
|
4307
4557
|
{
|
|
4308
4558
|
"data-slot": "field-description",
|
|
4309
|
-
className: (0,
|
|
4559
|
+
className: (0, import_cn22.cn)(
|
|
4310
4560
|
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
4311
4561
|
"last:mt-0 nth-last-2:-mt-1",
|
|
4312
4562
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
@@ -4321,19 +4571,19 @@ function FieldSeparator({
|
|
|
4321
4571
|
className,
|
|
4322
4572
|
...props
|
|
4323
4573
|
}) {
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4325
4575
|
"div",
|
|
4326
4576
|
{
|
|
4327
4577
|
"data-slot": "field-separator",
|
|
4328
4578
|
"data-content": !!children,
|
|
4329
|
-
className: (0,
|
|
4579
|
+
className: (0, import_cn22.cn)(
|
|
4330
4580
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
4331
4581
|
className
|
|
4332
4582
|
),
|
|
4333
4583
|
...props,
|
|
4334
4584
|
children: [
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
4336
|
-
children && /* @__PURE__ */ (0,
|
|
4585
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
4586
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4337
4587
|
"span",
|
|
4338
4588
|
{
|
|
4339
4589
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
@@ -4364,19 +4614,19 @@ function FieldError({
|
|
|
4364
4614
|
if (uniqueErrors?.length == 1) {
|
|
4365
4615
|
return uniqueErrors[0]?.message;
|
|
4366
4616
|
}
|
|
4367
|
-
return /* @__PURE__ */ (0,
|
|
4368
|
-
(error, index) => error?.message && /* @__PURE__ */ (0,
|
|
4617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
4618
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: error.message }, index)
|
|
4369
4619
|
) });
|
|
4370
4620
|
}, [children, errors]);
|
|
4371
4621
|
if (!content) {
|
|
4372
4622
|
return null;
|
|
4373
4623
|
}
|
|
4374
|
-
return /* @__PURE__ */ (0,
|
|
4624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4375
4625
|
"div",
|
|
4376
4626
|
{
|
|
4377
4627
|
role: "alert",
|
|
4378
4628
|
"data-slot": "field-error",
|
|
4379
|
-
className: (0,
|
|
4629
|
+
className: (0, import_cn22.cn)("text-sm font-normal text-destructive", className),
|
|
4380
4630
|
...props,
|
|
4381
4631
|
children: content
|
|
4382
4632
|
}
|
|
@@ -4384,10 +4634,10 @@ function FieldError({
|
|
|
4384
4634
|
}
|
|
4385
4635
|
|
|
4386
4636
|
// src/components/link/Link.tsx
|
|
4387
|
-
var
|
|
4637
|
+
var React23 = __toESM(require("react"), 1);
|
|
4388
4638
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
4389
4639
|
var import_lucide_react15 = require("lucide-react");
|
|
4390
|
-
var
|
|
4640
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4391
4641
|
var linkVariants = (0, import_class_variance_authority15.cva)(
|
|
4392
4642
|
"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",
|
|
4393
4643
|
{
|
|
@@ -4412,7 +4662,7 @@ var linkVariants = (0, import_class_variance_authority15.cva)(
|
|
|
4412
4662
|
}
|
|
4413
4663
|
}
|
|
4414
4664
|
);
|
|
4415
|
-
var Link =
|
|
4665
|
+
var Link = React23.forwardRef(
|
|
4416
4666
|
({
|
|
4417
4667
|
className,
|
|
4418
4668
|
variant,
|
|
@@ -4425,7 +4675,7 @@ var Link = React22.forwardRef(
|
|
|
4425
4675
|
...props
|
|
4426
4676
|
}, ref) => {
|
|
4427
4677
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
4428
|
-
return /* @__PURE__ */ (0,
|
|
4678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4429
4679
|
"a",
|
|
4430
4680
|
{
|
|
4431
4681
|
ref,
|
|
@@ -4441,8 +4691,8 @@ var Link = React22.forwardRef(
|
|
|
4441
4691
|
},
|
|
4442
4692
|
children: [
|
|
4443
4693
|
children,
|
|
4444
|
-
icon && /* @__PURE__ */ (0,
|
|
4445
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0,
|
|
4694
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
4695
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon: import_lucide_react15.ExternalLink, size: 16 }) })
|
|
4446
4696
|
]
|
|
4447
4697
|
}
|
|
4448
4698
|
);
|
|
@@ -4451,7 +4701,7 @@ var Link = React22.forwardRef(
|
|
|
4451
4701
|
Link.displayName = "Link";
|
|
4452
4702
|
|
|
4453
4703
|
// src/components/container/Container.tsx
|
|
4454
|
-
var
|
|
4704
|
+
var React24 = __toESM(require("react"), 1);
|
|
4455
4705
|
var import_merge_props3 = require("@base-ui/react/merge-props");
|
|
4456
4706
|
var import_use_render3 = require("@base-ui/react/use-render");
|
|
4457
4707
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
@@ -4476,7 +4726,7 @@ var containerVariants = (0, import_class_variance_authority16.cva)("w-full mx-au
|
|
|
4476
4726
|
padding: "md"
|
|
4477
4727
|
}
|
|
4478
4728
|
});
|
|
4479
|
-
var Container =
|
|
4729
|
+
var Container = React24.forwardRef(
|
|
4480
4730
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
4481
4731
|
return (0, import_use_render3.useRender)({
|
|
4482
4732
|
ref,
|
|
@@ -4495,7 +4745,7 @@ var Container = React23.forwardRef(
|
|
|
4495
4745
|
Container.displayName = "Container";
|
|
4496
4746
|
|
|
4497
4747
|
// src/components/grid/Grid.tsx
|
|
4498
|
-
var
|
|
4748
|
+
var React25 = __toESM(require("react"), 1);
|
|
4499
4749
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
4500
4750
|
var import_merge_props4 = require("@base-ui/react/merge-props");
|
|
4501
4751
|
var import_use_render4 = require("@base-ui/react/use-render");
|
|
@@ -4521,7 +4771,7 @@ var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
|
4521
4771
|
justify: "start"
|
|
4522
4772
|
}
|
|
4523
4773
|
});
|
|
4524
|
-
var Grid =
|
|
4774
|
+
var Grid = React25.forwardRef(
|
|
4525
4775
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
4526
4776
|
return (0, import_use_render4.useRender)({
|
|
4527
4777
|
ref,
|
|
@@ -4548,7 +4798,7 @@ var Grid = React24.forwardRef(
|
|
|
4548
4798
|
Grid.displayName = "Grid";
|
|
4549
4799
|
|
|
4550
4800
|
// src/components/box/Box.tsx
|
|
4551
|
-
var
|
|
4801
|
+
var React26 = __toESM(require("react"), 1);
|
|
4552
4802
|
var import_class_variance_authority18 = require("class-variance-authority");
|
|
4553
4803
|
var import_merge_props5 = require("@base-ui/react/merge-props");
|
|
4554
4804
|
var import_use_render5 = require("@base-ui/react/use-render");
|
|
@@ -4588,7 +4838,7 @@ var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
|
4588
4838
|
wrap: "nowrap"
|
|
4589
4839
|
}
|
|
4590
4840
|
});
|
|
4591
|
-
var Box =
|
|
4841
|
+
var Box = React26.forwardRef(
|
|
4592
4842
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
4593
4843
|
return (0, import_use_render5.useRender)({
|
|
4594
4844
|
ref,
|
|
@@ -4611,23 +4861,23 @@ var Box = React25.forwardRef(
|
|
|
4611
4861
|
Box.displayName = "Box";
|
|
4612
4862
|
|
|
4613
4863
|
// src/components/language-select/LanguageSelect.tsx
|
|
4614
|
-
var
|
|
4864
|
+
var React27 = __toESM(require("react"), 1);
|
|
4615
4865
|
var import_lucide_react16 = require("lucide-react");
|
|
4616
|
-
var
|
|
4617
|
-
var LanguageSelect =
|
|
4866
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4867
|
+
var LanguageSelect = React27.forwardRef(
|
|
4618
4868
|
({ className, options, value, onValueChange }, ref) => {
|
|
4619
|
-
return /* @__PURE__ */ (0,
|
|
4620
|
-
/* @__PURE__ */ (0,
|
|
4621
|
-
/* @__PURE__ */ (0,
|
|
4622
|
-
/* @__PURE__ */ (0,
|
|
4869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DropdownMenu, { children: [
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DropdownMenuTrigger2, { ref, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Button2, { variant: "outline", size: "icon", className, "aria-label": "Select language", children: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "sr-only", children: "Select language" }),
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { icon: import_lucide_react16.Globe, size: 16, "aria-hidden": true })
|
|
4623
4873
|
] }) }),
|
|
4624
|
-
/* @__PURE__ */ (0,
|
|
4874
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DropdownMenuContent2, { align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4625
4875
|
DropdownMenuRadioGroup,
|
|
4626
4876
|
{
|
|
4627
4877
|
value,
|
|
4628
4878
|
onValueChange: onValueChange ? (v) => onValueChange(v) : void 0,
|
|
4629
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
4630
|
-
|
|
4879
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4880
|
+
DropdownMenuRadioItem2,
|
|
4631
4881
|
{
|
|
4632
4882
|
value: option.value,
|
|
4633
4883
|
disabled: option.disabled,
|
|
@@ -4644,12 +4894,12 @@ var LanguageSelect = React26.forwardRef(
|
|
|
4644
4894
|
LanguageSelect.displayName = "LanguageSelect";
|
|
4645
4895
|
|
|
4646
4896
|
// src/components/list/List.tsx
|
|
4647
|
-
var
|
|
4897
|
+
var React29 = __toESM(require("react"), 1);
|
|
4648
4898
|
|
|
4649
4899
|
// src/components/divider/Divider.tsx
|
|
4650
|
-
var
|
|
4900
|
+
var React28 = __toESM(require("react"), 1);
|
|
4651
4901
|
var import_class_variance_authority19 = require("class-variance-authority");
|
|
4652
|
-
var
|
|
4902
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4653
4903
|
var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
4654
4904
|
variants: {
|
|
4655
4905
|
variant: {
|
|
@@ -4670,7 +4920,7 @@ var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
|
4670
4920
|
size: "thin"
|
|
4671
4921
|
}
|
|
4672
4922
|
});
|
|
4673
|
-
var Divider =
|
|
4923
|
+
var Divider = React28.forwardRef(
|
|
4674
4924
|
({
|
|
4675
4925
|
className,
|
|
4676
4926
|
orientation = "horizontal",
|
|
@@ -4681,16 +4931,16 @@ var Divider = React27.forwardRef(
|
|
|
4681
4931
|
...props
|
|
4682
4932
|
}, ref) => {
|
|
4683
4933
|
if (label) {
|
|
4684
|
-
return /* @__PURE__ */ (0,
|
|
4685
|
-
labelPosition !== "right" && /* @__PURE__ */ (0,
|
|
4934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
4935
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4686
4936
|
Separator,
|
|
4687
4937
|
{
|
|
4688
4938
|
orientation: "horizontal",
|
|
4689
4939
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
4690
4940
|
}
|
|
4691
4941
|
),
|
|
4692
|
-
/* @__PURE__ */ (0,
|
|
4693
|
-
labelPosition !== "left" && /* @__PURE__ */ (0,
|
|
4942
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
4943
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4694
4944
|
Separator,
|
|
4695
4945
|
{
|
|
4696
4946
|
orientation: "horizontal",
|
|
@@ -4699,7 +4949,7 @@ var Divider = React27.forwardRef(
|
|
|
4699
4949
|
)
|
|
4700
4950
|
] });
|
|
4701
4951
|
}
|
|
4702
|
-
return /* @__PURE__ */ (0,
|
|
4952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4703
4953
|
Separator,
|
|
4704
4954
|
{
|
|
4705
4955
|
ref,
|
|
@@ -4717,19 +4967,19 @@ Divider.displayName = "Divider";
|
|
|
4717
4967
|
|
|
4718
4968
|
// src/components/list/List.tsx
|
|
4719
4969
|
var import_lucide_react17 = require("lucide-react");
|
|
4720
|
-
var
|
|
4721
|
-
var List =
|
|
4970
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4971
|
+
var List = React29.forwardRef(
|
|
4722
4972
|
({ className, children, ...props }, ref) => {
|
|
4723
|
-
const childrenArray =
|
|
4724
|
-
return /* @__PURE__ */ (0,
|
|
4973
|
+
const childrenArray = React29.Children.toArray(children);
|
|
4974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(React29.Fragment, { children: [
|
|
4725
4975
|
child,
|
|
4726
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
4976
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, { variant: "subtle" })
|
|
4727
4977
|
] }, index)) });
|
|
4728
4978
|
}
|
|
4729
4979
|
);
|
|
4730
4980
|
List.displayName = "List";
|
|
4731
|
-
var ListItem =
|
|
4732
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4981
|
+
var ListItem = React29.forwardRef(
|
|
4982
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4733
4983
|
"div",
|
|
4734
4984
|
{
|
|
4735
4985
|
ref,
|
|
@@ -4740,15 +4990,15 @@ var ListItem = React28.forwardRef(
|
|
|
4740
4990
|
),
|
|
4741
4991
|
...props,
|
|
4742
4992
|
children: [
|
|
4743
|
-
icon && /* @__PURE__ */ (0,
|
|
4744
|
-
/* @__PURE__ */ (0,
|
|
4993
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-1 min-w-0", children })
|
|
4745
4995
|
]
|
|
4746
4996
|
}
|
|
4747
4997
|
)
|
|
4748
4998
|
);
|
|
4749
4999
|
ListItem.displayName = "ListItem";
|
|
4750
|
-
var ListHeader =
|
|
4751
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5000
|
+
var ListHeader = React29.forwardRef(
|
|
5001
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4752
5002
|
"div",
|
|
4753
5003
|
{
|
|
4754
5004
|
ref,
|
|
@@ -4759,11 +5009,11 @@ var ListHeader = React28.forwardRef(
|
|
|
4759
5009
|
)
|
|
4760
5010
|
);
|
|
4761
5011
|
ListHeader.displayName = "ListHeader";
|
|
4762
|
-
var FeatureList =
|
|
5012
|
+
var FeatureList = React29.forwardRef(
|
|
4763
5013
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
4764
|
-
return /* @__PURE__ */ (0,
|
|
4765
|
-
variant === "bullet" ? /* @__PURE__ */ (0,
|
|
4766
|
-
/* @__PURE__ */ (0,
|
|
5014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
5015
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: import_lucide_react17.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
5016
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
4767
5017
|
] }, index)) });
|
|
4768
5018
|
}
|
|
4769
5019
|
);
|
|
@@ -4812,7 +5062,7 @@ function getHighlighter() {
|
|
|
4812
5062
|
}
|
|
4813
5063
|
|
|
4814
5064
|
// src/components/code-block/CodeBlock.tsx
|
|
4815
|
-
var
|
|
5065
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4816
5066
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
4817
5067
|
const [html, setHtml] = (0, import_react2.useState)(null);
|
|
4818
5068
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
@@ -4828,16 +5078,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
4828
5078
|
setCopied(true);
|
|
4829
5079
|
setTimeout(() => setCopied(false), 2e3);
|
|
4830
5080
|
}, [code]);
|
|
4831
|
-
const copyButton = /* @__PURE__ */ (0,
|
|
5081
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4832
5082
|
"button",
|
|
4833
5083
|
{
|
|
4834
5084
|
onClick: handleCopy,
|
|
4835
5085
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
4836
5086
|
"aria-label": "Copy code",
|
|
4837
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
5087
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react18.Check, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react18.Copy, { className: "w-3.5 h-3.5" })
|
|
4838
5088
|
}
|
|
4839
5089
|
);
|
|
4840
|
-
return /* @__PURE__ */ (0,
|
|
5090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4841
5091
|
"div",
|
|
4842
5092
|
{
|
|
4843
5093
|
className: cn(
|
|
@@ -4845,25 +5095,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
4845
5095
|
className
|
|
4846
5096
|
),
|
|
4847
5097
|
children: [
|
|
4848
|
-
title && /* @__PURE__ */ (0,
|
|
4849
|
-
/* @__PURE__ */ (0,
|
|
4850
|
-
html ? /* @__PURE__ */ (0,
|
|
5098
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("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__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
5100
|
+
html ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4851
5101
|
"div",
|
|
4852
5102
|
{
|
|
4853
5103
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
4854
5104
|
dangerouslySetInnerHTML: { __html: html }
|
|
4855
5105
|
}
|
|
4856
|
-
) : /* @__PURE__ */ (0,
|
|
5106
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("code", { children: code }) })
|
|
4857
5107
|
]
|
|
4858
5108
|
}
|
|
4859
5109
|
);
|
|
4860
5110
|
}
|
|
4861
5111
|
|
|
4862
5112
|
// src/components/window-frame/WindowFrame.tsx
|
|
4863
|
-
var
|
|
5113
|
+
var React30 = __toESM(require("react"), 1);
|
|
4864
5114
|
var import_react3 = require("react");
|
|
4865
|
-
var
|
|
4866
|
-
var WindowFrame =
|
|
5115
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5116
|
+
var WindowFrame = React30.forwardRef(
|
|
4867
5117
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
4868
5118
|
const [internalActive, setInternalActive] = (0, import_react3.useState)(tabs?.[0]?.id ?? "");
|
|
4869
5119
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -4874,7 +5124,7 @@ var WindowFrame = React29.forwardRef(
|
|
|
4874
5124
|
setInternalActive(id);
|
|
4875
5125
|
}
|
|
4876
5126
|
};
|
|
4877
|
-
return /* @__PURE__ */ (0,
|
|
5127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4878
5128
|
"div",
|
|
4879
5129
|
{
|
|
4880
5130
|
ref,
|
|
@@ -4884,13 +5134,13 @@ var WindowFrame = React29.forwardRef(
|
|
|
4884
5134
|
),
|
|
4885
5135
|
...props,
|
|
4886
5136
|
children: [
|
|
4887
|
-
/* @__PURE__ */ (0,
|
|
4888
|
-
/* @__PURE__ */ (0,
|
|
4889
|
-
/* @__PURE__ */ (0,
|
|
4890
|
-
/* @__PURE__ */ (0,
|
|
4891
|
-
/* @__PURE__ */ (0,
|
|
5137
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
5138
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
5139
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-muscaria-400" }),
|
|
5140
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-chanterelle-200" }),
|
|
5141
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-moss-400" })
|
|
4892
5142
|
] }),
|
|
4893
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */ (0,
|
|
5143
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4894
5144
|
"button",
|
|
4895
5145
|
{
|
|
4896
5146
|
type: "button",
|
|
@@ -4902,9 +5152,9 @@ var WindowFrame = React29.forwardRef(
|
|
|
4902
5152
|
children: tab.label
|
|
4903
5153
|
},
|
|
4904
5154
|
tab.id
|
|
4905
|
-
)) }) : /* @__PURE__ */ (0,
|
|
5155
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
4906
5156
|
] }),
|
|
4907
|
-
/* @__PURE__ */ (0,
|
|
5157
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children })
|
|
4908
5158
|
]
|
|
4909
5159
|
}
|
|
4910
5160
|
);
|
|
@@ -4914,7 +5164,7 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
4914
5164
|
|
|
4915
5165
|
// src/components/fog-illustration/FogIllustration.tsx
|
|
4916
5166
|
var import_react4 = require("react");
|
|
4917
|
-
var
|
|
5167
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4918
5168
|
var FOG_BRAND_PALETTE = {
|
|
4919
5169
|
ink: "#171a1a",
|
|
4920
5170
|
milk: "#f7f5ed",
|
|
@@ -5227,7 +5477,7 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
5227
5477
|
gl.deleteFramebuffer(fbo);
|
|
5228
5478
|
};
|
|
5229
5479
|
}, []);
|
|
5230
|
-
return /* @__PURE__ */ (0,
|
|
5480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("canvas", { ref, "aria-hidden": "true", className: cn("size-full", className) });
|
|
5231
5481
|
};
|
|
5232
5482
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5233
5483
|
0 && (module.exports = {
|
|
@@ -5377,6 +5627,10 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
5377
5627
|
Textarea,
|
|
5378
5628
|
ThemeProvider,
|
|
5379
5629
|
ThemeToggle,
|
|
5630
|
+
Tooltip,
|
|
5631
|
+
TooltipContent,
|
|
5632
|
+
TooltipProvider,
|
|
5633
|
+
TooltipTrigger,
|
|
5380
5634
|
Typography,
|
|
5381
5635
|
WindowFrame,
|
|
5382
5636
|
alertVariants,
|