@mondrianai/runyourai-design-system 0.0.19 → 0.0.21
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.d.mts +54 -26
- package/dist/index.d.ts +54 -26
- package/dist/index.js +752 -804
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +738 -776
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -133,20 +133,6 @@ __export(components_exports, {
|
|
|
133
133
|
Drawer: () => Drawer,
|
|
134
134
|
DriveIcon: () => DriveIcon,
|
|
135
135
|
DropdownMenu: () => DropdownMenu,
|
|
136
|
-
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
137
|
-
DropdownMenuContent: () => DropdownMenuContent,
|
|
138
|
-
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
139
|
-
DropdownMenuItem: () => DropdownMenuItem,
|
|
140
|
-
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
141
|
-
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
142
|
-
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
143
|
-
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
144
|
-
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
145
|
-
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
146
|
-
DropdownMenuSub: () => DropdownMenuSub,
|
|
147
|
-
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
148
|
-
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
149
|
-
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
150
136
|
Empty: () => Empty,
|
|
151
137
|
EmptyTrayIcon: () => EmptyTrayIcon,
|
|
152
138
|
Field: () => Field,
|
|
@@ -1455,237 +1441,260 @@ function Drawer({
|
|
|
1455
1441
|
}
|
|
1456
1442
|
|
|
1457
1443
|
// src/components/ui/dropdown-menu.tsx
|
|
1444
|
+
var React7 = __toESM(require("react"));
|
|
1458
1445
|
var import_lucide_react2 = require("lucide-react");
|
|
1446
|
+
var import_radix_ui6 = require("radix-ui");
|
|
1447
|
+
|
|
1448
|
+
// src/components/ui/tooltip.tsx
|
|
1449
|
+
var React6 = __toESM(require("react"));
|
|
1459
1450
|
var import_radix_ui5 = require("radix-ui");
|
|
1460
1451
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
function DropdownMenuTrigger(_a) {
|
|
1470
|
-
var props = __objRest(_a, []);
|
|
1471
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1472
|
-
import_radix_ui5.DropdownMenu.Trigger,
|
|
1473
|
-
__spreadValues({
|
|
1474
|
-
"data-slot": "dropdown-menu-trigger"
|
|
1475
|
-
}, props)
|
|
1476
|
-
);
|
|
1477
|
-
}
|
|
1478
|
-
function DropdownMenuContent(_a) {
|
|
1479
|
-
var _b = _a, {
|
|
1480
|
-
className,
|
|
1481
|
-
sideOffset = 4
|
|
1482
|
-
} = _b, props = __objRest(_b, [
|
|
1483
|
-
"className",
|
|
1484
|
-
"sideOffset"
|
|
1485
|
-
]);
|
|
1486
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1487
|
-
import_radix_ui5.DropdownMenu.Content,
|
|
1488
|
-
__spreadValues({
|
|
1489
|
-
"data-slot": "dropdown-menu-content",
|
|
1452
|
+
var TooltipProvider = import_radix_ui5.Tooltip.Provider;
|
|
1453
|
+
var TooltipContent = React6.forwardRef((_a, ref) => {
|
|
1454
|
+
var _b = _a, { className, side = "top", sideOffset = 4, children } = _b, props = __objRest(_b, ["className", "side", "sideOffset", "children"]);
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1456
|
+
import_radix_ui5.Tooltip.Content,
|
|
1457
|
+
__spreadProps(__spreadValues({
|
|
1458
|
+
ref,
|
|
1459
|
+
side,
|
|
1490
1460
|
sideOffset,
|
|
1491
1461
|
className: cn(
|
|
1492
|
-
"z-50 max
|
|
1462
|
+
"z-50 w-max max-w-[200px]",
|
|
1463
|
+
"bg-primary rounded-md px-2.5 py-1.5",
|
|
1464
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
1465
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1466
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1467
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1493
1468
|
className
|
|
1494
1469
|
)
|
|
1495
|
-
}, props)
|
|
1470
|
+
}, props), {
|
|
1471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
|
|
1472
|
+
})
|
|
1496
1473
|
) });
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.DropdownMenu.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
1501
|
-
}
|
|
1502
|
-
function DropdownMenuItem(_a) {
|
|
1503
|
-
var _b = _a, {
|
|
1504
|
-
className,
|
|
1505
|
-
inset,
|
|
1506
|
-
variant = "default"
|
|
1507
|
-
} = _b, props = __objRest(_b, [
|
|
1508
|
-
"className",
|
|
1509
|
-
"inset",
|
|
1510
|
-
"variant"
|
|
1511
|
-
]);
|
|
1512
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1513
|
-
import_radix_ui5.DropdownMenu.Item,
|
|
1514
|
-
__spreadValues({
|
|
1515
|
-
"data-slot": "dropdown-menu-item",
|
|
1516
|
-
"data-inset": inset,
|
|
1517
|
-
"data-variant": variant,
|
|
1518
|
-
className: cn(
|
|
1519
|
-
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
1520
|
-
className
|
|
1521
|
-
)
|
|
1522
|
-
}, props)
|
|
1523
|
-
);
|
|
1524
|
-
}
|
|
1525
|
-
function DropdownMenuCheckboxItem(_a) {
|
|
1474
|
+
});
|
|
1475
|
+
TooltipContent.displayName = "TooltipContent";
|
|
1476
|
+
function Tooltip(_a) {
|
|
1526
1477
|
var _b = _a, {
|
|
1527
|
-
|
|
1478
|
+
content,
|
|
1528
1479
|
children,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1480
|
+
open,
|
|
1481
|
+
defaultOpen,
|
|
1482
|
+
onOpenChange,
|
|
1483
|
+
delayDuration
|
|
1484
|
+
} = _b, contentProps = __objRest(_b, [
|
|
1485
|
+
"content",
|
|
1532
1486
|
"children",
|
|
1533
|
-
"
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
__spreadProps(__spreadValues({
|
|
1538
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
1539
|
-
className: cn(
|
|
1540
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent 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",
|
|
1541
|
-
className
|
|
1542
|
-
),
|
|
1543
|
-
checked
|
|
1544
|
-
}, props), {
|
|
1545
|
-
children: [
|
|
1546
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react2.CheckIcon, { className: "size-4" }) }) }),
|
|
1547
|
-
children
|
|
1548
|
-
]
|
|
1549
|
-
})
|
|
1550
|
-
);
|
|
1551
|
-
}
|
|
1552
|
-
function DropdownMenuRadioGroup(_a) {
|
|
1553
|
-
var props = __objRest(_a, []);
|
|
1554
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1555
|
-
import_radix_ui5.DropdownMenu.RadioGroup,
|
|
1556
|
-
__spreadValues({
|
|
1557
|
-
"data-slot": "dropdown-menu-radio-group"
|
|
1558
|
-
}, props)
|
|
1559
|
-
);
|
|
1560
|
-
}
|
|
1561
|
-
function DropdownMenuRadioItem(_a) {
|
|
1562
|
-
var _b = _a, {
|
|
1563
|
-
className,
|
|
1564
|
-
children
|
|
1565
|
-
} = _b, props = __objRest(_b, [
|
|
1566
|
-
"className",
|
|
1567
|
-
"children"
|
|
1487
|
+
"open",
|
|
1488
|
+
"defaultOpen",
|
|
1489
|
+
"onOpenChange",
|
|
1490
|
+
"delayDuration"
|
|
1568
1491
|
]);
|
|
1492
|
+
if (!content) return children;
|
|
1569
1493
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1570
|
-
import_radix_ui5.
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
)
|
|
1577
|
-
}, props), {
|
|
1494
|
+
import_radix_ui5.Tooltip.Root,
|
|
1495
|
+
{
|
|
1496
|
+
open,
|
|
1497
|
+
defaultOpen,
|
|
1498
|
+
onOpenChange,
|
|
1499
|
+
delayDuration,
|
|
1578
1500
|
children: [
|
|
1579
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1580
|
-
children
|
|
1501
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.Tooltip.Trigger, { asChild: true, children }),
|
|
1502
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipContent, __spreadProps(__spreadValues({}, contentProps), { children: content }))
|
|
1581
1503
|
]
|
|
1582
|
-
}
|
|
1583
|
-
);
|
|
1584
|
-
}
|
|
1585
|
-
function DropdownMenuLabel(_a) {
|
|
1586
|
-
var _b = _a, {
|
|
1587
|
-
className,
|
|
1588
|
-
inset
|
|
1589
|
-
} = _b, props = __objRest(_b, [
|
|
1590
|
-
"className",
|
|
1591
|
-
"inset"
|
|
1592
|
-
]);
|
|
1593
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1594
|
-
import_radix_ui5.DropdownMenu.Label,
|
|
1595
|
-
__spreadValues({
|
|
1596
|
-
"data-slot": "dropdown-menu-label",
|
|
1597
|
-
"data-inset": inset,
|
|
1598
|
-
className: cn(
|
|
1599
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1600
|
-
className
|
|
1601
|
-
)
|
|
1602
|
-
}, props)
|
|
1504
|
+
}
|
|
1603
1505
|
);
|
|
1604
1506
|
}
|
|
1605
|
-
function
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
className: cn("-
|
|
1616
|
-
}
|
|
1617
|
-
);
|
|
1507
|
+
function TooltipWithIcon({
|
|
1508
|
+
content,
|
|
1509
|
+
iconName = "info",
|
|
1510
|
+
className
|
|
1511
|
+
}) {
|
|
1512
|
+
if (!content) return null;
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Tooltip, { content, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1514
|
+
Icon,
|
|
1515
|
+
{
|
|
1516
|
+
name: iconName,
|
|
1517
|
+
className: cn("size-4 text-muted-foreground cursor-help", className)
|
|
1518
|
+
}
|
|
1519
|
+
) });
|
|
1618
1520
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1521
|
+
|
|
1522
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1523
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1524
|
+
var baseItemClass = cn(
|
|
1525
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm outline-none",
|
|
1526
|
+
"transition-colors duration-100",
|
|
1527
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1528
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1529
|
+
'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',
|
|
1530
|
+
'[&_svg:not([class*="text-"])]:text-muted-foreground'
|
|
1531
|
+
);
|
|
1532
|
+
var destructiveItemClass = cn(
|
|
1533
|
+
"text-destructive focus:bg-destructive/10 focus:text-destructive dark:focus:bg-destructive/20",
|
|
1534
|
+
'[&_svg:not([class*="text-"])]:text-destructive!'
|
|
1535
|
+
);
|
|
1536
|
+
var indentItemClass = cn(
|
|
1537
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm py-1.5 my-0.5 pr-2 pl-8 text-sm outline-none",
|
|
1538
|
+
"transition-colors duration-100",
|
|
1539
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1540
|
+
"data-[state=checked]:bg-accent data-[state=checked]:text-accent-foreground",
|
|
1541
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
1542
|
+
);
|
|
1543
|
+
var subTriggerClass = cn(
|
|
1544
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm outline-none",
|
|
1545
|
+
"transition-colors duration-100",
|
|
1546
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1547
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1548
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1549
|
+
'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',
|
|
1550
|
+
'[&_svg:not([class*="text-"])]:text-muted-foreground'
|
|
1551
|
+
);
|
|
1552
|
+
var contentClass = cn(
|
|
1553
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-44",
|
|
1554
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
1555
|
+
"overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1556
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1557
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1558
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1559
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
1560
|
+
);
|
|
1561
|
+
var labelClass = "px-2 py-1.5 text-sm font-medium";
|
|
1562
|
+
var separatorClass = "-mx-1 my-1 h-px bg-border";
|
|
1563
|
+
function withTooltip(tooltip, node, key) {
|
|
1564
|
+
if (!tooltip) return React7.cloneElement(node, { key });
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tooltip, { content: tooltip, side: "right", children: node }, key);
|
|
1566
|
+
}
|
|
1567
|
+
function renderItem(item) {
|
|
1568
|
+
if (item.subGroups) {
|
|
1569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui6.DropdownMenu.Sub, { children: [
|
|
1570
|
+
withTooltip(
|
|
1571
|
+
item.tooltip,
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui6.DropdownMenu.SubTrigger, { disabled: item.disabled, className: subTriggerClass, children: [
|
|
1573
|
+
item.icon,
|
|
1574
|
+
item.label,
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
1576
|
+
] }),
|
|
1577
|
+
item.label
|
|
1578
|
+
),
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.SubContent, { className: contentClass, children: renderGroups(item.subGroups) }) })
|
|
1580
|
+
] }, item.label);
|
|
1581
|
+
}
|
|
1582
|
+
if (item.type === "checkbox") {
|
|
1583
|
+
return withTooltip(
|
|
1584
|
+
item.tooltip,
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1586
|
+
import_radix_ui6.DropdownMenu.CheckboxItem,
|
|
1587
|
+
{
|
|
1588
|
+
checked: item.checked,
|
|
1589
|
+
onCheckedChange: item.onCheckedChange,
|
|
1590
|
+
disabled: item.disabled,
|
|
1591
|
+
onSelect: (e) => e.preventDefault(),
|
|
1592
|
+
className: indentItemClass,
|
|
1593
|
+
children: [
|
|
1594
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: [
|
|
1595
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.CheckIcon, { className: "size-4 text-foreground/20" }),
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.ItemIndicator, { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.CheckIcon, { className: "size-4" }) })
|
|
1597
|
+
] }),
|
|
1598
|
+
item.label
|
|
1599
|
+
]
|
|
1600
|
+
}
|
|
1601
|
+
),
|
|
1602
|
+
item.label
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
return withTooltip(
|
|
1606
|
+
item.tooltip,
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1608
|
+
import_radix_ui6.DropdownMenu.Item,
|
|
1609
|
+
{
|
|
1610
|
+
disabled: item.disabled,
|
|
1611
|
+
onSelect: item.onClick,
|
|
1612
|
+
className: cn(baseItemClass, item.variant === "destructive" && destructiveItemClass),
|
|
1613
|
+
children: [
|
|
1614
|
+
item.icon,
|
|
1615
|
+
item.label,
|
|
1616
|
+
item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ml-auto text-xs tracking-widest text-muted-foreground", children: item.shortcut })
|
|
1617
|
+
]
|
|
1618
|
+
}
|
|
1619
|
+
),
|
|
1620
|
+
item.label
|
|
1634
1621
|
);
|
|
1635
1622
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1623
|
+
function renderGroups(groups) {
|
|
1624
|
+
return groups.map((group, i) => {
|
|
1625
|
+
var _a;
|
|
1626
|
+
const isRadioGroup = group.radioValue !== void 0 || group.onRadioValueChange !== void 0 || group.items.some((item) => item.type === "radio");
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(React7.Fragment, { children: [
|
|
1628
|
+
group.separator && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Separator, { className: separatorClass }),
|
|
1629
|
+
isRadioGroup ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1630
|
+
import_radix_ui6.DropdownMenu.RadioGroup,
|
|
1631
|
+
{
|
|
1632
|
+
value: group.radioValue,
|
|
1633
|
+
onValueChange: group.onRadioValueChange,
|
|
1634
|
+
children: [
|
|
1635
|
+
group.label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Label, { className: labelClass, children: group.label }),
|
|
1636
|
+
group.items.map(
|
|
1637
|
+
(item) => {
|
|
1638
|
+
var _a2;
|
|
1639
|
+
return withTooltip(
|
|
1640
|
+
item.tooltip,
|
|
1641
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1642
|
+
import_radix_ui6.DropdownMenu.RadioItem,
|
|
1643
|
+
{
|
|
1644
|
+
value: (_a2 = item.value) != null ? _a2 : item.label,
|
|
1645
|
+
disabled: item.disabled,
|
|
1646
|
+
onSelect: (e) => e.preventDefault(),
|
|
1647
|
+
className: indentItemClass,
|
|
1648
|
+
children: [
|
|
1649
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: [
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "size-2 rounded-full bg-foreground/20" }),
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.ItemIndicator, { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "size-2 rounded-full bg-current" }) })
|
|
1652
|
+
] }),
|
|
1653
|
+
item.label
|
|
1654
|
+
]
|
|
1655
|
+
}
|
|
1656
|
+
),
|
|
1657
|
+
item.label
|
|
1658
|
+
);
|
|
1659
|
+
}
|
|
1660
|
+
)
|
|
1661
|
+
]
|
|
1662
|
+
}
|
|
1663
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui6.DropdownMenu.Group, { children: [
|
|
1664
|
+
group.label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Label, { className: labelClass, children: group.label }),
|
|
1665
|
+
group.items.map(renderItem)
|
|
1666
|
+
] })
|
|
1667
|
+
] }, (_a = group.label) != null ? _a : String(i));
|
|
1668
|
+
});
|
|
1666
1669
|
}
|
|
1667
|
-
function
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1670
|
+
function DropdownMenu({
|
|
1671
|
+
trigger,
|
|
1672
|
+
groups,
|
|
1673
|
+
open,
|
|
1674
|
+
onOpenChange,
|
|
1675
|
+
side,
|
|
1676
|
+
align,
|
|
1677
|
+
className
|
|
1678
|
+
}) {
|
|
1679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui6.DropdownMenu.Root, { open, onOpenChange, children: [
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Trigger, { asChild: true, children: trigger }),
|
|
1681
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui6.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1682
|
+
import_radix_ui6.DropdownMenu.Content,
|
|
1683
|
+
{
|
|
1684
|
+
side,
|
|
1685
|
+
align,
|
|
1686
|
+
sideOffset: 4,
|
|
1687
|
+
className: cn(contentClass, className),
|
|
1688
|
+
children: renderGroups(groups)
|
|
1689
|
+
}
|
|
1690
|
+
) })
|
|
1691
|
+
] });
|
|
1683
1692
|
}
|
|
1684
1693
|
|
|
1685
1694
|
// src/components/icons/custom/empty-tray.tsx
|
|
1686
|
-
var
|
|
1695
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1687
1696
|
function EmptyTrayIcon({ className }) {
|
|
1688
|
-
return /* @__PURE__ */ (0,
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1689
1698
|
"svg",
|
|
1690
1699
|
{
|
|
1691
1700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1696,22 +1705,22 @@ function EmptyTrayIcon({ className }) {
|
|
|
1696
1705
|
"aria-hidden": true,
|
|
1697
1706
|
className: cn("shrink-0", className),
|
|
1698
1707
|
children: [
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1700
|
-
/* @__PURE__ */ (0,
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("g", { clipPath: "url(#clip0_19425_37257)", children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1701
1710
|
"path",
|
|
1702
1711
|
{
|
|
1703
1712
|
d: "M32 41C49.6731 41 64 37.866 64 34C64 30.134 49.6731 27 32 27C14.3269 27 0 30.134 0 34C0 37.866 14.3269 41 32 41Z",
|
|
1704
1713
|
fill: "#F5F5F5"
|
|
1705
1714
|
}
|
|
1706
1715
|
),
|
|
1707
|
-
/* @__PURE__ */ (0,
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1708
1717
|
"path",
|
|
1709
1718
|
{
|
|
1710
1719
|
d: "M55 13.76L44.854 2.258C44.367 1.474 43.656 1 42.907 1H21.093C20.344 1 19.633 1.474 19.146 2.257L9 13.761V23H55V13.76Z",
|
|
1711
1720
|
stroke: "#D9D9D9"
|
|
1712
1721
|
}
|
|
1713
1722
|
),
|
|
1714
|
-
/* @__PURE__ */ (0,
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1715
1724
|
"path",
|
|
1716
1725
|
{
|
|
1717
1726
|
d: "M41.613 16.931C41.613 15.326 42.607 14.001 43.84 14H55V32.137C55 34.26 53.68 36 52.05 36H11.95C10.32 36 9 34.259 9 32.137V14H20.16C21.393 14 22.387 15.323 22.387 16.928V16.95C22.387 18.555 23.392 19.851 24.624 19.851H39.376C40.608 19.851 41.613 18.543 41.613 16.938V16.931Z",
|
|
@@ -1720,16 +1729,16 @@ function EmptyTrayIcon({ className }) {
|
|
|
1720
1729
|
}
|
|
1721
1730
|
)
|
|
1722
1731
|
] }),
|
|
1723
|
-
/* @__PURE__ */ (0,
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("clipPath", { id: "clip0_19425_37257", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("rect", { width: "64", height: "41", fill: "white" }) }) })
|
|
1724
1733
|
]
|
|
1725
1734
|
}
|
|
1726
1735
|
);
|
|
1727
1736
|
}
|
|
1728
1737
|
|
|
1729
1738
|
// src/components/ui/empty.tsx
|
|
1730
|
-
var
|
|
1739
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1731
1740
|
function Empty({ image, description, children, className }) {
|
|
1732
|
-
return /* @__PURE__ */ (0,
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1733
1742
|
"div",
|
|
1734
1743
|
{
|
|
1735
1744
|
className: cn(
|
|
@@ -1737,20 +1746,20 @@ function Empty({ image, description, children, className }) {
|
|
|
1737
1746
|
className
|
|
1738
1747
|
),
|
|
1739
1748
|
children: [
|
|
1740
|
-
image !== void 0 ? image : /* @__PURE__ */ (0,
|
|
1741
|
-
description && /* @__PURE__ */ (0,
|
|
1742
|
-
children && /* @__PURE__ */ (0,
|
|
1749
|
+
image !== void 0 ? image : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(EmptyTrayIcon, {}),
|
|
1750
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-center text-sm leading-xs text-muted-foreground whitespace-pre-line", children: description }),
|
|
1751
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center gap-2", children })
|
|
1743
1752
|
]
|
|
1744
1753
|
}
|
|
1745
1754
|
);
|
|
1746
1755
|
}
|
|
1747
1756
|
|
|
1748
1757
|
// src/components/ui/checkbox.tsx
|
|
1749
|
-
var
|
|
1750
|
-
var
|
|
1751
|
-
var
|
|
1758
|
+
var React8 = __toESM(require("react"));
|
|
1759
|
+
var import_radix_ui7 = require("radix-ui");
|
|
1760
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1752
1761
|
function FilledSquareMinus({ className }) {
|
|
1753
|
-
return /* @__PURE__ */ (0,
|
|
1762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1754
1763
|
"svg",
|
|
1755
1764
|
{
|
|
1756
1765
|
viewBox: "0 0 20 20",
|
|
@@ -1759,7 +1768,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1759
1768
|
className: cn(className),
|
|
1760
1769
|
"aria-hidden": true,
|
|
1761
1770
|
children: [
|
|
1762
|
-
/* @__PURE__ */ (0,
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1763
1772
|
"rect",
|
|
1764
1773
|
{
|
|
1765
1774
|
x: "2.5",
|
|
@@ -1772,7 +1781,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1772
1781
|
strokeWidth: "1.5"
|
|
1773
1782
|
}
|
|
1774
1783
|
),
|
|
1775
|
-
/* @__PURE__ */ (0,
|
|
1784
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1776
1785
|
"path",
|
|
1777
1786
|
{
|
|
1778
1787
|
d: "M7 10H13",
|
|
@@ -1786,7 +1795,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1786
1795
|
);
|
|
1787
1796
|
}
|
|
1788
1797
|
function FilledSquareCheck({ className }) {
|
|
1789
|
-
return /* @__PURE__ */ (0,
|
|
1798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1790
1799
|
"svg",
|
|
1791
1800
|
{
|
|
1792
1801
|
viewBox: "0 0 20 20",
|
|
@@ -1795,7 +1804,7 @@ function FilledSquareCheck({ className }) {
|
|
|
1795
1804
|
className: cn(className),
|
|
1796
1805
|
"aria-hidden": true,
|
|
1797
1806
|
children: [
|
|
1798
|
-
/* @__PURE__ */ (0,
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1799
1808
|
"rect",
|
|
1800
1809
|
{
|
|
1801
1810
|
x: "2.5",
|
|
@@ -1808,7 +1817,7 @@ function FilledSquareCheck({ className }) {
|
|
|
1808
1817
|
strokeWidth: "1.5"
|
|
1809
1818
|
}
|
|
1810
1819
|
),
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1812
1821
|
"path",
|
|
1813
1822
|
{
|
|
1814
1823
|
d: "M7.5 10L9.16667 11.66667L12.5 8.33333",
|
|
@@ -1826,10 +1835,10 @@ function FilledSquareCheck({ className }) {
|
|
|
1826
1835
|
}
|
|
1827
1836
|
);
|
|
1828
1837
|
}
|
|
1829
|
-
var Checkbox =
|
|
1838
|
+
var Checkbox = React8.forwardRef((_a, ref) => {
|
|
1830
1839
|
var _b = _a, { className, id, label, description, disabled } = _b, props = __objRest(_b, ["className", "id", "label", "description", "disabled"]);
|
|
1831
|
-
const checkboxRoot = /* @__PURE__ */ (0,
|
|
1832
|
-
|
|
1840
|
+
const checkboxRoot = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1841
|
+
import_radix_ui7.Checkbox.Root,
|
|
1833
1842
|
__spreadProps(__spreadValues({
|
|
1834
1843
|
ref,
|
|
1835
1844
|
id,
|
|
@@ -1846,19 +1855,19 @@ var Checkbox = React6.forwardRef((_a, ref) => {
|
|
|
1846
1855
|
)
|
|
1847
1856
|
}, props), {
|
|
1848
1857
|
children: [
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1850
1859
|
Icon,
|
|
1851
1860
|
{
|
|
1852
1861
|
name: "square",
|
|
1853
1862
|
className: "size-5 text-border group-data-[state=checked]:hidden"
|
|
1854
1863
|
}
|
|
1855
1864
|
),
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_radix_ui7.Checkbox.Indicator, { className: "absolute inset-0 flex items-center justify-center animate-checkbox-in", children: props.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FilledSquareMinus, { className: "size-5 text-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FilledSquareCheck, { className: "size-5 text-foreground" }) })
|
|
1857
1866
|
]
|
|
1858
1867
|
})
|
|
1859
1868
|
);
|
|
1860
1869
|
if (!label) return checkboxRoot;
|
|
1861
|
-
return /* @__PURE__ */ (0,
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1862
1871
|
"label",
|
|
1863
1872
|
{
|
|
1864
1873
|
className: cn(
|
|
@@ -1869,18 +1878,18 @@ var Checkbox = React6.forwardRef((_a, ref) => {
|
|
|
1869
1878
|
),
|
|
1870
1879
|
children: [
|
|
1871
1880
|
checkboxRoot,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
1874
|
-
description && /* @__PURE__ */ (0,
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium leading-5 tracking-tight text-foreground select-none", children: label }),
|
|
1883
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm font-normal leading-5 tracking-tight text-muted-foreground", children: description })
|
|
1875
1884
|
] })
|
|
1876
1885
|
]
|
|
1877
1886
|
}
|
|
1878
1887
|
);
|
|
1879
1888
|
});
|
|
1880
|
-
Checkbox.displayName =
|
|
1881
|
-
var CheckboxCard =
|
|
1889
|
+
Checkbox.displayName = import_radix_ui7.Checkbox.Root.displayName;
|
|
1890
|
+
var CheckboxCard = React8.forwardRef((_a, ref) => {
|
|
1882
1891
|
var _b = _a, { className, id, label, description, disabled } = _b, props = __objRest(_b, ["className", "id", "label", "description", "disabled"]);
|
|
1883
|
-
return /* @__PURE__ */ (0,
|
|
1892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1884
1893
|
"label",
|
|
1885
1894
|
{
|
|
1886
1895
|
htmlFor: id,
|
|
@@ -1893,7 +1902,7 @@ var CheckboxCard = React6.forwardRef((_a, ref) => {
|
|
|
1893
1902
|
className
|
|
1894
1903
|
),
|
|
1895
1904
|
children: [
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1897
1906
|
Checkbox,
|
|
1898
1907
|
__spreadValues({
|
|
1899
1908
|
ref,
|
|
@@ -1902,9 +1911,9 @@ var CheckboxCard = React6.forwardRef((_a, ref) => {
|
|
|
1902
1911
|
className: "mt-0.5"
|
|
1903
1912
|
}, props)
|
|
1904
1913
|
),
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1906
|
-
/* @__PURE__ */ (0,
|
|
1907
|
-
description && /* @__PURE__ */ (0,
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium leading-5 tracking-tight text-foreground", children: label }),
|
|
1916
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-normal leading-5 tracking-tight text-muted-foreground", children: description })
|
|
1908
1917
|
] })
|
|
1909
1918
|
]
|
|
1910
1919
|
}
|
|
@@ -1914,7 +1923,7 @@ CheckboxCard.displayName = "CheckboxCard";
|
|
|
1914
1923
|
|
|
1915
1924
|
// src/components/ui/choice-card.tsx
|
|
1916
1925
|
var import_react2 = require("react");
|
|
1917
|
-
var
|
|
1926
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1918
1927
|
var ChoiceCardGroupContext = (0, import_react2.createContext)({
|
|
1919
1928
|
value: "",
|
|
1920
1929
|
onChange: () => {
|
|
@@ -1934,7 +1943,7 @@ function ChoiceCardGroup({
|
|
|
1934
1943
|
if (!isControlled) setInternalValue(v);
|
|
1935
1944
|
onValueChange == null ? void 0 : onValueChange(v);
|
|
1936
1945
|
};
|
|
1937
|
-
return /* @__PURE__ */ (0,
|
|
1946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChoiceCardGroupContext.Provider, { value: { value, onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cn("flex flex-col gap-3", className), role: "radiogroup", children }) });
|
|
1938
1947
|
}
|
|
1939
1948
|
function ChoiceCardItem({
|
|
1940
1949
|
value,
|
|
@@ -1944,7 +1953,7 @@ function ChoiceCardItem({
|
|
|
1944
1953
|
}) {
|
|
1945
1954
|
const { value: groupValue, onChange } = (0, import_react2.useContext)(ChoiceCardGroupContext);
|
|
1946
1955
|
const isSelected = groupValue === value;
|
|
1947
|
-
return /* @__PURE__ */ (0,
|
|
1956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1948
1957
|
"button",
|
|
1949
1958
|
{
|
|
1950
1959
|
type: "button",
|
|
@@ -1956,18 +1965,18 @@ function ChoiceCardItem({
|
|
|
1956
1965
|
isSelected ? "border-primary bg-background" : "border-border bg-background hover:bg-secondary"
|
|
1957
1966
|
),
|
|
1958
1967
|
children: [
|
|
1959
|
-
/* @__PURE__ */ (0,
|
|
1960
|
-
/* @__PURE__ */ (0,
|
|
1961
|
-
description && /* @__PURE__ */ (0,
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-1 flex-col gap-1.5 min-w-0", children: [
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm font-medium tracking-tight text-foreground", children: title }),
|
|
1970
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs tracking-tight text-muted-foreground", children: description })
|
|
1962
1971
|
] }),
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1964
1973
|
"div",
|
|
1965
1974
|
{
|
|
1966
1975
|
className: cn(
|
|
1967
1976
|
"mt-px size-4 shrink-0 self-start rounded-full border shadow-button transition-colors",
|
|
1968
1977
|
isSelected ? "border-ring" : "border-border bg-background"
|
|
1969
1978
|
),
|
|
1970
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
1979
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1971
1980
|
"div",
|
|
1972
1981
|
{
|
|
1973
1982
|
className: "mx-auto size-2 rounded-full bg-foreground",
|
|
@@ -1982,9 +1991,9 @@ function ChoiceCardItem({
|
|
|
1982
1991
|
}
|
|
1983
1992
|
|
|
1984
1993
|
// src/components/ui/collapsible.tsx
|
|
1985
|
-
var
|
|
1986
|
-
var
|
|
1987
|
-
var
|
|
1994
|
+
var React10 = __toESM(require("react"));
|
|
1995
|
+
var import_radix_ui8 = require("radix-ui");
|
|
1996
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1988
1997
|
function CollapsibleAvatar({
|
|
1989
1998
|
workspace,
|
|
1990
1999
|
size = "lg"
|
|
@@ -1992,7 +2001,7 @@ function CollapsibleAvatar({
|
|
|
1992
2001
|
var _a;
|
|
1993
2002
|
const sizeClass = size === "lg" ? "size-9 rounded-lg" : "size-8 rounded-md";
|
|
1994
2003
|
const bgClass = workspace.avatarColor === "chart-1" ? "bg-chart-1" : "bg-sidebar-ring";
|
|
1995
|
-
return /* @__PURE__ */ (0,
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1996
2005
|
"div",
|
|
1997
2006
|
{
|
|
1998
2007
|
className: cn(
|
|
@@ -2000,22 +2009,22 @@ function CollapsibleAvatar({
|
|
|
2000
2009
|
sizeClass,
|
|
2001
2010
|
bgClass
|
|
2002
2011
|
),
|
|
2003
|
-
children: workspace.avatarSrc ? /* @__PURE__ */ (0,
|
|
2012
|
+
children: workspace.avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2004
2013
|
"img",
|
|
2005
2014
|
{
|
|
2006
2015
|
src: workspace.avatarSrc,
|
|
2007
2016
|
alt: workspace.name,
|
|
2008
2017
|
className: "absolute inset-0 size-full object-cover"
|
|
2009
2018
|
}
|
|
2010
|
-
) : /* @__PURE__ */ (0,
|
|
2019
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute inset-0 flex items-center justify-center text-base font-medium leading-6 text-center text-white tracking-tight whitespace-nowrap", children: (_a = workspace.avatarText) != null ? _a : workspace.name[0] })
|
|
2011
2020
|
}
|
|
2012
2021
|
);
|
|
2013
2022
|
}
|
|
2014
2023
|
function CollapsibleBadge({ children }) {
|
|
2015
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-background border border-border flex gap-1 h-5.5 items-center justify-center px-2.5 py-0.5 rounded-lg shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs font-medium leading-xs text-foreground text-center tracking-tight whitespace-nowrap", children }) });
|
|
2016
2025
|
}
|
|
2017
2026
|
function ChevronsUpDownIcon({ className }) {
|
|
2018
|
-
return /* @__PURE__ */ (0,
|
|
2027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn("overflow-hidden relative shrink-0 size-4", className), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute", style: { inset: "16.67% 29.17%" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute", style: { inset: "-4.69% -7.5%" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { alt: "", "aria-hidden": true, src: "/icons/chevrons-up-down.svg", className: "block max-w-none size-full" }) }) }) });
|
|
2019
2028
|
}
|
|
2020
2029
|
function Collapsible({
|
|
2021
2030
|
activeWorkspace,
|
|
@@ -2027,27 +2036,27 @@ function Collapsible({
|
|
|
2027
2036
|
onSelectWorkspace,
|
|
2028
2037
|
className
|
|
2029
2038
|
}) {
|
|
2030
|
-
const [internalOpen, setInternalOpen] =
|
|
2039
|
+
const [internalOpen, setInternalOpen] = React10.useState(defaultOpen);
|
|
2031
2040
|
const isOpen = open !== void 0 ? open : internalOpen;
|
|
2032
2041
|
function handleOpenChange(next) {
|
|
2033
2042
|
setInternalOpen(next);
|
|
2034
2043
|
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
2035
2044
|
}
|
|
2036
|
-
return /* @__PURE__ */ (0,
|
|
2037
|
-
|
|
2045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2046
|
+
import_radix_ui8.Collapsible.Root,
|
|
2038
2047
|
{
|
|
2039
2048
|
open: isOpen,
|
|
2040
2049
|
onOpenChange: handleOpenChange,
|
|
2041
2050
|
className: cn("relative flex flex-col w-full", className),
|
|
2042
2051
|
children: [
|
|
2043
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2052
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2044
2053
|
"div",
|
|
2045
2054
|
{
|
|
2046
2055
|
className: "fixed inset-0 z-10",
|
|
2047
2056
|
onClick: () => handleOpenChange(false)
|
|
2048
2057
|
}
|
|
2049
2058
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_radix_ui8.Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2051
2060
|
"button",
|
|
2052
2061
|
{
|
|
2053
2062
|
className: cn(
|
|
@@ -2056,54 +2065,54 @@ function Collapsible({
|
|
|
2056
2065
|
"data-[state=open]:bg-sidebar-accent"
|
|
2057
2066
|
),
|
|
2058
2067
|
children: [
|
|
2059
|
-
/* @__PURE__ */ (0,
|
|
2060
|
-
/* @__PURE__ */ (0,
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2062
|
-
/* @__PURE__ */ (0,
|
|
2063
|
-
/* @__PURE__ */ (0,
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-1 gap-2 items-center min-w-0", children: [
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleAvatar, { workspace: activeWorkspace, size: "lg" }),
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-1 items-center min-w-0 shrink-0", children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-base font-medium leading-6 text-foreground tracking-tight whitespace-nowrap", children: activeWorkspace.name }),
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleBadge, { children: activeWorkspace.badge })
|
|
2064
2073
|
] })
|
|
2065
2074
|
] }),
|
|
2066
|
-
/* @__PURE__ */ (0,
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center rounded-lg shrink-0 size-8", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronsUpDownIcon, {}) })
|
|
2067
2076
|
]
|
|
2068
2077
|
}
|
|
2069
2078
|
) }),
|
|
2070
|
-
/* @__PURE__ */ (0,
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_radix_ui8.Collapsible.Content, { className: cn(
|
|
2071
2080
|
"absolute left-0 top-full z-20 pt-1 w-80",
|
|
2072
2081
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 duration-200",
|
|
2073
2082
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150"
|
|
2074
|
-
), children: /* @__PURE__ */ (0,
|
|
2083
|
+
), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "bg-background border border-border rounded-xl shadow-sm px-2 py-2 flex flex-col gap-1", children: [
|
|
2075
2084
|
workspaces.map(
|
|
2076
2085
|
(ws) => ws.isActive ? (
|
|
2077
2086
|
/* ── 활성 워크스페이스 (강조 + Check 아이콘) ── */
|
|
2078
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2079
2088
|
"div",
|
|
2080
2089
|
{
|
|
2081
2090
|
className: "flex items-center justify-between h-12 px-2 py-2 rounded-md bg-accent",
|
|
2082
2091
|
children: [
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2084
|
-
/* @__PURE__ */ (0,
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2086
|
-
/* @__PURE__ */ (0,
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleAvatar, { workspace: ws, size: "md" }),
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-1 items-center", children: [
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm text-foreground leading-5 tracking-tight whitespace-nowrap", children: ws.name }),
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleBadge, { children: ws.badge })
|
|
2088
2097
|
] })
|
|
2089
2098
|
] }),
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center size-9 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "check", className: "size-4 text-foreground" }) })
|
|
2091
2100
|
]
|
|
2092
2101
|
},
|
|
2093
2102
|
ws.id
|
|
2094
2103
|
)
|
|
2095
2104
|
) : (
|
|
2096
2105
|
/* ── 비활성 워크스페이스 (클릭 가능) ── */
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2098
2107
|
"button",
|
|
2099
2108
|
{
|
|
2100
2109
|
className: "flex items-center w-full h-12 px-2 py-2 rounded-md hover:bg-accent transition-colors cursor-pointer",
|
|
2101
2110
|
onClick: () => onSelectWorkspace == null ? void 0 : onSelectWorkspace(ws),
|
|
2102
|
-
children: /* @__PURE__ */ (0,
|
|
2103
|
-
/* @__PURE__ */ (0,
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2105
|
-
/* @__PURE__ */ (0,
|
|
2106
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleAvatar, { workspace: ws, size: "md" }),
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-1 items-center", children: [
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm text-foreground leading-5 tracking-tight whitespace-nowrap", children: ws.name }),
|
|
2115
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CollapsibleBadge, { children: ws.badge })
|
|
2107
2116
|
] })
|
|
2108
2117
|
] })
|
|
2109
2118
|
},
|
|
@@ -2111,14 +2120,14 @@ function Collapsible({
|
|
|
2111
2120
|
)
|
|
2112
2121
|
)
|
|
2113
2122
|
),
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2115
2124
|
"button",
|
|
2116
2125
|
{
|
|
2117
2126
|
className: "flex items-center justify-center gap-2 w-full h-12 px-2 py-2 rounded-md hover:bg-accent transition-colors cursor-pointer",
|
|
2118
2127
|
onClick: onCreateTeam,
|
|
2119
2128
|
children: [
|
|
2120
|
-
/* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "plus", className: "size-4 text-muted-foreground" }),
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm text-muted-foreground leading-5 tracking-tight whitespace-nowrap", children: "\uD300 \uC0DD\uC131\uD558\uAE30" })
|
|
2122
2131
|
]
|
|
2123
2132
|
}
|
|
2124
2133
|
)
|
|
@@ -2127,18 +2136,18 @@ function Collapsible({
|
|
|
2127
2136
|
}
|
|
2128
2137
|
);
|
|
2129
2138
|
}
|
|
2130
|
-
var CollapsibleRoot =
|
|
2131
|
-
var CollapsibleTrigger =
|
|
2132
|
-
var CollapsibleContent =
|
|
2139
|
+
var CollapsibleRoot = import_radix_ui8.Collapsible.Root;
|
|
2140
|
+
var CollapsibleTrigger = import_radix_ui8.Collapsible.CollapsibleTrigger;
|
|
2141
|
+
var CollapsibleContent = import_radix_ui8.Collapsible.CollapsibleContent;
|
|
2133
2142
|
|
|
2134
2143
|
// src/components/ui/combobox.tsx
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
2144
|
+
var React11 = __toESM(require("react"));
|
|
2145
|
+
var import_radix_ui9 = require("radix-ui");
|
|
2137
2146
|
|
|
2138
2147
|
// src/components/icons/custom/chevrons-up-down.tsx
|
|
2139
|
-
var
|
|
2148
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2140
2149
|
function ChevronsUpDownIcon2({ className }) {
|
|
2141
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2142
2151
|
"svg",
|
|
2143
2152
|
{
|
|
2144
2153
|
viewBox: "-6.25 -3.25 24 24",
|
|
@@ -2149,13 +2158,13 @@ function ChevronsUpDownIcon2({ className }) {
|
|
|
2149
2158
|
strokeWidth: 1.5,
|
|
2150
2159
|
"aria-hidden": true,
|
|
2151
2160
|
className: cn("shrink-0", className),
|
|
2152
|
-
children: /* @__PURE__ */ (0,
|
|
2161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M0.75 11.75L5.75 16.75L10.75 11.75M0.75 5.75L5.75 0.75L10.75 5.75" })
|
|
2153
2162
|
}
|
|
2154
2163
|
);
|
|
2155
2164
|
}
|
|
2156
2165
|
|
|
2157
2166
|
// src/components/ui/combobox.tsx
|
|
2158
|
-
var
|
|
2167
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2159
2168
|
function Combobox({
|
|
2160
2169
|
options,
|
|
2161
2170
|
value,
|
|
@@ -2167,10 +2176,10 @@ function Combobox({
|
|
|
2167
2176
|
className,
|
|
2168
2177
|
disabled = false
|
|
2169
2178
|
}) {
|
|
2170
|
-
const [open, setOpen] =
|
|
2171
|
-
const [search, setSearch] =
|
|
2172
|
-
const inputRef =
|
|
2173
|
-
const filtered =
|
|
2179
|
+
const [open, setOpen] = React11.useState(false);
|
|
2180
|
+
const [search, setSearch] = React11.useState("");
|
|
2181
|
+
const inputRef = React11.useRef(null);
|
|
2182
|
+
const filtered = React11.useMemo(
|
|
2174
2183
|
() => showSearch && search.trim() ? options.filter(
|
|
2175
2184
|
(opt) => opt.label.toLowerCase().includes(search.toLowerCase())
|
|
2176
2185
|
) : options,
|
|
@@ -2181,7 +2190,7 @@ function Combobox({
|
|
|
2181
2190
|
setOpen(next);
|
|
2182
2191
|
if (!next) setSearch("");
|
|
2183
2192
|
}
|
|
2184
|
-
|
|
2193
|
+
React11.useEffect(() => {
|
|
2185
2194
|
if (open && showSearch) {
|
|
2186
2195
|
requestAnimationFrame(() => {
|
|
2187
2196
|
var _a;
|
|
@@ -2194,8 +2203,8 @@ function Combobox({
|
|
|
2194
2203
|
setOpen(false);
|
|
2195
2204
|
setSearch("");
|
|
2196
2205
|
}
|
|
2197
|
-
return /* @__PURE__ */ (0,
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_radix_ui9.Popover.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
2207
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui9.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2199
2208
|
"button",
|
|
2200
2209
|
{
|
|
2201
2210
|
type: "button",
|
|
@@ -2210,9 +2219,9 @@ function Combobox({
|
|
|
2210
2219
|
className
|
|
2211
2220
|
),
|
|
2212
2221
|
children: [
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2214
|
-
(selectedOption == null ? void 0 : selectedOption.icon) && /* @__PURE__ */ (0,
|
|
2215
|
-
/* @__PURE__ */ (0,
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex flex-1 min-w-0 items-center gap-1.5", children: [
|
|
2223
|
+
(selectedOption == null ? void 0 : selectedOption.icon) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "shrink-0 flex items-center", children: selectedOption.icon }),
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2216
2225
|
"span",
|
|
2217
2226
|
{
|
|
2218
2227
|
className: cn(
|
|
@@ -2223,12 +2232,12 @@ function Combobox({
|
|
|
2223
2232
|
}
|
|
2224
2233
|
)
|
|
2225
2234
|
] }),
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronsUpDownIcon2, { className: "size-4 text-muted-foreground" })
|
|
2227
2236
|
]
|
|
2228
2237
|
}
|
|
2229
2238
|
) }),
|
|
2230
|
-
/* @__PURE__ */ (0,
|
|
2231
|
-
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui9.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2240
|
+
import_radix_ui9.Popover.Content,
|
|
2232
2241
|
{
|
|
2233
2242
|
align: "start",
|
|
2234
2243
|
sideOffset: 4,
|
|
@@ -2242,9 +2251,9 @@ function Combobox({
|
|
|
2242
2251
|
"duration-200 data-[state=closed]:duration-150"
|
|
2243
2252
|
),
|
|
2244
2253
|
children: [
|
|
2245
|
-
showSearch && /* @__PURE__ */ (0,
|
|
2246
|
-
/* @__PURE__ */ (0,
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2254
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 border-b border-border px-3", children: [
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "search", className: "size-4 text-muted-foreground" }),
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2248
2257
|
"input",
|
|
2249
2258
|
{
|
|
2250
2259
|
ref: inputRef,
|
|
@@ -2255,10 +2264,10 @@ function Combobox({
|
|
|
2255
2264
|
}
|
|
2256
2265
|
)
|
|
2257
2266
|
] }),
|
|
2258
|
-
/* @__PURE__ */ (0,
|
|
2259
|
-
filtered.length === 0 ? /* @__PURE__ */ (0,
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "p-1 flex flex-col overflow-y-auto", style: { maxHeight: 384 }, children: [
|
|
2268
|
+
filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "px-2 py-1.5 text-sm text-muted-foreground text-center", children: "\uACB0\uACFC \uC5C6\uC74C" }) : filtered.map((opt) => {
|
|
2260
2269
|
const isSelected = opt.value === value;
|
|
2261
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2262
2271
|
"button",
|
|
2263
2272
|
{
|
|
2264
2273
|
type: "button",
|
|
@@ -2270,15 +2279,15 @@ function Combobox({
|
|
|
2270
2279
|
isSelected ? "bg-accent text-accent-foreground" : "text-popover-foreground hover:bg-accent hover:text-accent-foreground"
|
|
2271
2280
|
),
|
|
2272
2281
|
children: [
|
|
2273
|
-
opt.icon && /* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2275
|
-
isSelected && /* @__PURE__ */ (0,
|
|
2282
|
+
opt.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "shrink-0 flex items-center", children: opt.icon }),
|
|
2283
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex-1 min-w-0 truncate text-left", children: opt.label }),
|
|
2284
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "check", className: "size-4 text-foreground" })
|
|
2276
2285
|
]
|
|
2277
2286
|
},
|
|
2278
2287
|
opt.value
|
|
2279
2288
|
);
|
|
2280
2289
|
}),
|
|
2281
|
-
footer && /* @__PURE__ */ (0,
|
|
2290
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2282
2291
|
"button",
|
|
2283
2292
|
{
|
|
2284
2293
|
type: "button",
|
|
@@ -2288,8 +2297,8 @@ function Combobox({
|
|
|
2288
2297
|
},
|
|
2289
2298
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-normal leading-5 tracking-tight text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors",
|
|
2290
2299
|
children: [
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2300
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "plus", className: "size-4 text-muted-foreground" }),
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex-1 min-w-0 truncate text-left", children: footer.label })
|
|
2293
2302
|
]
|
|
2294
2303
|
}
|
|
2295
2304
|
)
|
|
@@ -2301,9 +2310,9 @@ function Combobox({
|
|
|
2301
2310
|
}
|
|
2302
2311
|
|
|
2303
2312
|
// src/components/ui/date-picker.tsx
|
|
2304
|
-
var
|
|
2305
|
-
var
|
|
2306
|
-
var
|
|
2313
|
+
var React12 = __toESM(require("react"));
|
|
2314
|
+
var import_radix_ui10 = require("radix-ui");
|
|
2315
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2307
2316
|
var EN_MONTHS = [
|
|
2308
2317
|
"January",
|
|
2309
2318
|
"February",
|
|
@@ -2449,9 +2458,9 @@ function CalendarGrid({
|
|
|
2449
2458
|
const rangeStartTime = rangeStart ? startOfDay(rangeStart).getTime() : null;
|
|
2450
2459
|
const rangeEndTime = rangeEnd ? startOfDay(rangeEnd).getTime() : null;
|
|
2451
2460
|
const visualEndTime = rangeEndTime != null ? rangeEndTime : rangeStartTime !== null && hoverDate ? startOfDay(hoverDate).getTime() : null;
|
|
2452
|
-
return /* @__PURE__ */ (0,
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "px-5 pt-3 pb-4", children: [
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2455
2464
|
"button",
|
|
2456
2465
|
{
|
|
2457
2466
|
type: "button",
|
|
@@ -2461,21 +2470,21 @@ function CalendarGrid({
|
|
|
2461
2470
|
"flex size-8 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2462
2471
|
isPrevDisabled ? "text-muted-foreground opacity-30 cursor-not-allowed" : "text-foreground hover:bg-accent active:bg-accent cursor-pointer"
|
|
2463
2472
|
),
|
|
2464
|
-
children: /* @__PURE__ */ (0,
|
|
2473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "chevron-left", className: "size-4" })
|
|
2465
2474
|
}
|
|
2466
2475
|
),
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2470
2479
|
"select",
|
|
2471
2480
|
{
|
|
2472
2481
|
value: year,
|
|
2473
2482
|
onChange: (e) => onYearChange(Number(e.target.value)),
|
|
2474
2483
|
className: "h-8 appearance-none rounded-lg border border-border bg-background pl-3 pr-6 text-sm font-medium text-foreground transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer",
|
|
2475
|
-
children: years.map((y) => /* @__PURE__ */ (0,
|
|
2484
|
+
children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: y, children: config.formatYear(y) }, y))
|
|
2476
2485
|
}
|
|
2477
2486
|
),
|
|
2478
|
-
/* @__PURE__ */ (0,
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2479
2488
|
Icon,
|
|
2480
2489
|
{
|
|
2481
2490
|
name: "chevron-down",
|
|
@@ -2483,17 +2492,17 @@ function CalendarGrid({
|
|
|
2483
2492
|
}
|
|
2484
2493
|
)
|
|
2485
2494
|
] }),
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2488
2497
|
"select",
|
|
2489
2498
|
{
|
|
2490
2499
|
value: month,
|
|
2491
2500
|
onChange: (e) => onMonthChange(Number(e.target.value)),
|
|
2492
2501
|
className: "h-8 appearance-none rounded-lg border border-border bg-background pl-3 pr-6 text-sm font-medium text-foreground transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer",
|
|
2493
|
-
children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ (0,
|
|
2502
|
+
children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: i, children: config.formatMonth(i) }, i))
|
|
2494
2503
|
}
|
|
2495
2504
|
),
|
|
2496
|
-
/* @__PURE__ */ (0,
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2497
2506
|
Icon,
|
|
2498
2507
|
{
|
|
2499
2508
|
name: "chevron-down",
|
|
@@ -2502,7 +2511,7 @@ function CalendarGrid({
|
|
|
2502
2511
|
)
|
|
2503
2512
|
] })
|
|
2504
2513
|
] }),
|
|
2505
|
-
/* @__PURE__ */ (0,
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2506
2515
|
"button",
|
|
2507
2516
|
{
|
|
2508
2517
|
type: "button",
|
|
@@ -2512,11 +2521,11 @@ function CalendarGrid({
|
|
|
2512
2521
|
"flex size-8 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2513
2522
|
isNextDisabled ? "text-muted-foreground opacity-30 cursor-not-allowed" : "text-foreground hover:bg-accent active:bg-accent cursor-pointer"
|
|
2514
2523
|
),
|
|
2515
|
-
children: /* @__PURE__ */ (0,
|
|
2524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "chevron-right", className: "size-4" })
|
|
2516
2525
|
}
|
|
2517
2526
|
)
|
|
2518
2527
|
] }),
|
|
2519
|
-
/* @__PURE__ */ (0,
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-1 grid grid-cols-7 gap-1", children: config.dayHeaders.map((d) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2520
2529
|
"div",
|
|
2521
2530
|
{
|
|
2522
2531
|
className: "flex h-10 items-center justify-center text-sm font-normal leading-xs text-muted-foreground",
|
|
@@ -2524,7 +2533,7 @@ function CalendarGrid({
|
|
|
2524
2533
|
},
|
|
2525
2534
|
d
|
|
2526
2535
|
)) }),
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2528
2537
|
"div",
|
|
2529
2538
|
{
|
|
2530
2539
|
className: "grid grid-cols-7 gap-1",
|
|
@@ -2538,7 +2547,7 @@ function CalendarGrid({
|
|
|
2538
2547
|
const isRangeEnd = isRangeMode && rangeEndTime !== null && t === rangeEndTime;
|
|
2539
2548
|
const isInRange = isRangeMode && rangeStartTime !== null && visualEndTime !== null && !isRangeStart && !isRangeEnd && t > Math.min(rangeStartTime, visualEndTime) && t < Math.max(rangeStartTime, visualEndTime);
|
|
2540
2549
|
const isSelected = isRangeMode ? isRangeStart || isRangeEnd : (selectedStart == null ? void 0 : selectedStart.getTime()) === t;
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
2550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2542
2551
|
"button",
|
|
2543
2552
|
{
|
|
2544
2553
|
type: "button",
|
|
@@ -2577,34 +2586,34 @@ function DatePicker({
|
|
|
2577
2586
|
disabled = false
|
|
2578
2587
|
}) {
|
|
2579
2588
|
var _a;
|
|
2580
|
-
const today =
|
|
2589
|
+
const today = React12.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
2581
2590
|
const config = LOCALE_CONFIG[locale];
|
|
2582
|
-
const disabledRules =
|
|
2591
|
+
const disabledRules = React12.useMemo(() => {
|
|
2583
2592
|
const rules = disabledDates ? Array.isArray(disabledDates) ? disabledDates : [disabledDates] : [];
|
|
2584
2593
|
if (disablePast && !rules.includes("past")) return [...rules, "past"];
|
|
2585
2594
|
return rules;
|
|
2586
2595
|
}, [disabledDates, disablePast]);
|
|
2587
|
-
const [open, setOpen] =
|
|
2588
|
-
const [selected, setSelected] =
|
|
2596
|
+
const [open, setOpen] = React12.useState(false);
|
|
2597
|
+
const [selected, setSelected] = React12.useState(defaultValue);
|
|
2589
2598
|
const activeDate = value !== void 0 ? value : selected;
|
|
2590
|
-
const [internalRange, setInternalRange] =
|
|
2599
|
+
const [internalRange, setInternalRange] = React12.useState(
|
|
2591
2600
|
defaultRange != null ? defaultRange : {}
|
|
2592
2601
|
);
|
|
2593
2602
|
const activeRange = range !== void 0 ? range : internalRange;
|
|
2594
|
-
const [pickingStage, setPickingStage] =
|
|
2595
|
-
const [hoverDate, setHoverDate] =
|
|
2603
|
+
const [pickingStage, setPickingStage] = React12.useState("start");
|
|
2604
|
+
const [hoverDate, setHoverDate] = React12.useState();
|
|
2596
2605
|
const initialViewDate = mode === "range" ? (_a = activeRange.start) != null ? _a : today : activeDate != null ? activeDate : today;
|
|
2597
|
-
const [viewYear, setViewYear] =
|
|
2598
|
-
const [viewMonth, setViewMonth] =
|
|
2599
|
-
const activeDateRef =
|
|
2606
|
+
const [viewYear, setViewYear] = React12.useState(() => initialViewDate.getFullYear());
|
|
2607
|
+
const [viewMonth, setViewMonth] = React12.useState(() => initialViewDate.getMonth());
|
|
2608
|
+
const activeDateRef = React12.useRef(activeDate);
|
|
2600
2609
|
activeDateRef.current = activeDate;
|
|
2601
|
-
const activeRangeRef =
|
|
2610
|
+
const activeRangeRef = React12.useRef(activeRange);
|
|
2602
2611
|
activeRangeRef.current = activeRange;
|
|
2603
|
-
const todayRef =
|
|
2612
|
+
const todayRef = React12.useRef(today);
|
|
2604
2613
|
todayRef.current = today;
|
|
2605
|
-
const modeRef =
|
|
2614
|
+
const modeRef = React12.useRef(mode);
|
|
2606
2615
|
modeRef.current = mode;
|
|
2607
|
-
|
|
2616
|
+
React12.useEffect(() => {
|
|
2608
2617
|
var _a2, _b;
|
|
2609
2618
|
if (!open) {
|
|
2610
2619
|
setHoverDate(void 0);
|
|
@@ -2616,7 +2625,7 @@ function DatePicker({
|
|
|
2616
2625
|
setViewYear(d.getFullYear());
|
|
2617
2626
|
setViewMonth(d.getMonth());
|
|
2618
2627
|
}, [open]);
|
|
2619
|
-
const effectiveYearRange =
|
|
2628
|
+
const effectiveYearRange = React12.useMemo(
|
|
2620
2629
|
() => yearRange != null ? yearRange : [today.getFullYear() - 10, today.getFullYear() + 10],
|
|
2621
2630
|
[yearRange, today]
|
|
2622
2631
|
);
|
|
@@ -2677,13 +2686,13 @@ function DatePicker({
|
|
|
2677
2686
|
triggerText = config.formatTriggerDate(activeDate);
|
|
2678
2687
|
showCalendarIcon = true;
|
|
2679
2688
|
}
|
|
2680
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
-
|
|
2689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn(className), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2690
|
+
import_radix_ui10.Popover.Root,
|
|
2682
2691
|
{
|
|
2683
2692
|
open,
|
|
2684
2693
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
2685
2694
|
children: [
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_radix_ui10.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2687
2696
|
"button",
|
|
2688
2697
|
{
|
|
2689
2698
|
type: "button",
|
|
@@ -2695,14 +2704,14 @@ function DatePicker({
|
|
|
2695
2704
|
mode === "range" ? !activeRange.start && "text-muted-foreground" : !activeDate && "text-muted-foreground"
|
|
2696
2705
|
),
|
|
2697
2706
|
children: [
|
|
2698
|
-
/* @__PURE__ */ (0,
|
|
2699
|
-
showCalendarIcon ? /* @__PURE__ */ (0,
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate text-left", children: triggerText }),
|
|
2708
|
+
showCalendarIcon ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2700
2709
|
Icon,
|
|
2701
2710
|
{
|
|
2702
2711
|
name: "calendar",
|
|
2703
2712
|
className: "size-4 shrink-0 text-foreground"
|
|
2704
2713
|
}
|
|
2705
|
-
) : /* @__PURE__ */ (0,
|
|
2714
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2706
2715
|
Icon,
|
|
2707
2716
|
{
|
|
2708
2717
|
name: "chevron-down",
|
|
@@ -2715,8 +2724,8 @@ function DatePicker({
|
|
|
2715
2724
|
]
|
|
2716
2725
|
}
|
|
2717
2726
|
) }),
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2719
|
-
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_radix_ui10.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2728
|
+
import_radix_ui10.Popover.Content,
|
|
2720
2729
|
{
|
|
2721
2730
|
align: "start",
|
|
2722
2731
|
sideOffset: 4,
|
|
@@ -2728,7 +2737,7 @@ function DatePicker({
|
|
|
2728
2737
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2729
2738
|
"duration-200 data-[state=closed]:duration-150"
|
|
2730
2739
|
),
|
|
2731
|
-
children: /* @__PURE__ */ (0,
|
|
2740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2732
2741
|
CalendarGrid,
|
|
2733
2742
|
{
|
|
2734
2743
|
year: viewYear,
|
|
@@ -2756,14 +2765,14 @@ function DatePicker({
|
|
|
2756
2765
|
}
|
|
2757
2766
|
|
|
2758
2767
|
// src/components/ui/field.tsx
|
|
2759
|
-
var
|
|
2768
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2760
2769
|
function FieldLabel(_a) {
|
|
2761
2770
|
var _b = _a, {
|
|
2762
2771
|
className
|
|
2763
2772
|
} = _b, props = __objRest(_b, [
|
|
2764
2773
|
"className"
|
|
2765
2774
|
]);
|
|
2766
|
-
return /* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2767
2776
|
"label",
|
|
2768
2777
|
__spreadValues({
|
|
2769
2778
|
className: cn(
|
|
@@ -2779,7 +2788,7 @@ function FieldDescription(_a) {
|
|
|
2779
2788
|
} = _b, props = __objRest(_b, [
|
|
2780
2789
|
"className"
|
|
2781
2790
|
]);
|
|
2782
|
-
return /* @__PURE__ */ (0,
|
|
2791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2783
2792
|
"p",
|
|
2784
2793
|
__spreadValues({
|
|
2785
2794
|
className: cn(
|
|
@@ -2798,14 +2807,14 @@ function Field({
|
|
|
2798
2807
|
className,
|
|
2799
2808
|
children
|
|
2800
2809
|
}) {
|
|
2801
|
-
return /* @__PURE__ */ (0,
|
|
2802
|
-
label && /* @__PURE__ */ (0,
|
|
2810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
2811
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FieldLabel, { htmlFor, children: [
|
|
2803
2812
|
label,
|
|
2804
|
-
required && /* @__PURE__ */ (0,
|
|
2813
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "ml-0.5 text-destructive", "aria-hidden": true, children: "*" })
|
|
2805
2814
|
] }),
|
|
2806
|
-
hint && /* @__PURE__ */ (0,
|
|
2815
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDescription, { children: hint }),
|
|
2807
2816
|
children,
|
|
2808
|
-
description && /* @__PURE__ */ (0,
|
|
2817
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDescription, { children: description })
|
|
2809
2818
|
] });
|
|
2810
2819
|
}
|
|
2811
2820
|
function FieldSection({
|
|
@@ -2816,9 +2825,9 @@ function FieldSection({
|
|
|
2816
2825
|
className,
|
|
2817
2826
|
children
|
|
2818
2827
|
}) {
|
|
2819
|
-
return /* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
2829
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col", children: [
|
|
2830
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2822
2831
|
"p",
|
|
2823
2832
|
{
|
|
2824
2833
|
className: cn(
|
|
@@ -2828,34 +2837,34 @@ function FieldSection({
|
|
|
2828
2837
|
children: title
|
|
2829
2838
|
}
|
|
2830
2839
|
),
|
|
2831
|
-
description && /* @__PURE__ */ (0,
|
|
2840
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDescription, { children: description })
|
|
2832
2841
|
] }),
|
|
2833
|
-
children && /* @__PURE__ */ (0,
|
|
2834
|
-
showDivider && /* @__PURE__ */ (0,
|
|
2835
|
-
/* @__PURE__ */ (0,
|
|
2842
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2843
|
+
showDivider && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDivider, {}),
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex flex-col gap-7", children })
|
|
2836
2845
|
] })
|
|
2837
2846
|
] });
|
|
2838
2847
|
}
|
|
2839
2848
|
function FieldRow({ label, description, className, children }) {
|
|
2840
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
2843
|
-
description && /* @__PURE__ */ (0,
|
|
2849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("flex items-start gap-3", className), children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-1 flex-col gap-1.5", children: [
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium tracking-tight text-foreground", children: label }),
|
|
2852
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDescription, { children: description })
|
|
2844
2853
|
] }),
|
|
2845
|
-
/* @__PURE__ */ (0,
|
|
2854
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "shrink-0", children })
|
|
2846
2855
|
] });
|
|
2847
2856
|
}
|
|
2848
2857
|
function FieldDivider({ className }) {
|
|
2849
|
-
return /* @__PURE__ */ (0,
|
|
2858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("flex h-5 items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-px w-full border-t border-border" }) });
|
|
2850
2859
|
}
|
|
2851
2860
|
|
|
2852
2861
|
// src/components/ui/header.tsx
|
|
2853
|
-
var
|
|
2854
|
-
var
|
|
2855
|
-
var
|
|
2862
|
+
var React13 = __toESM(require("react"));
|
|
2863
|
+
var import_radix_ui11 = require("radix-ui");
|
|
2864
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2856
2865
|
var PANEL_CLS = "z-50 overflow-hidden rounded-md border border-border bg-popover shadow-dropdown animate-in fade-in-0 zoom-in-95 duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150";
|
|
2857
2866
|
function DropdownSectionLabel({ children }) {
|
|
2858
|
-
return /* @__PURE__ */ (0,
|
|
2867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-8 items-center px-2 py-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium tracking-tight text-popover-foreground", children }) });
|
|
2859
2868
|
}
|
|
2860
2869
|
function DropdownMenuRow({
|
|
2861
2870
|
icon,
|
|
@@ -2872,14 +2881,14 @@ function DropdownMenuRow({
|
|
|
2872
2881
|
variant === "destructive" ? "text-destructive" : "text-popover-foreground",
|
|
2873
2882
|
className
|
|
2874
2883
|
);
|
|
2875
|
-
const content = /* @__PURE__ */ (0,
|
|
2876
|
-
icon && /* @__PURE__ */ (0,
|
|
2884
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
2885
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: icon, className: "size-4 text-foreground" }),
|
|
2877
2886
|
children
|
|
2878
2887
|
] });
|
|
2879
2888
|
if (href) {
|
|
2880
|
-
return /* @__PURE__ */ (0,
|
|
2889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Item, { asChild: true, onSelect, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href, target: "_blank", rel: "noopener noreferrer", className: itemClassName, children: content }) });
|
|
2881
2890
|
}
|
|
2882
|
-
return /* @__PURE__ */ (0,
|
|
2891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Item, { onSelect, className: itemClassName, children: content });
|
|
2883
2892
|
}
|
|
2884
2893
|
function Header({
|
|
2885
2894
|
logo,
|
|
@@ -2897,7 +2906,7 @@ function Header({
|
|
|
2897
2906
|
onLanguageChange,
|
|
2898
2907
|
className
|
|
2899
2908
|
}) {
|
|
2900
|
-
return /* @__PURE__ */ (0,
|
|
2909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2901
2910
|
"header",
|
|
2902
2911
|
{
|
|
2903
2912
|
className: cn(
|
|
@@ -2906,19 +2915,19 @@ function Header({
|
|
|
2906
2915
|
className
|
|
2907
2916
|
),
|
|
2908
2917
|
children: [
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
2910
|
-
(logo || brandName) && /* @__PURE__ */ (0,
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
2919
|
+
(logo || brandName) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2.5 shrink-0", children: [
|
|
2911
2920
|
logo,
|
|
2912
|
-
brandName && /* @__PURE__ */ (0,
|
|
2921
|
+
brandName && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-xl font-bold tracking-tight text-foreground whitespace-nowrap", children: brandName })
|
|
2913
2922
|
] }),
|
|
2914
|
-
/* @__PURE__ */ (0,
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("nav", { className: "flex items-center gap-2", "aria-label": "\uC8FC\uC694 \uBA54\uB274", children: navItems.map(
|
|
2915
2924
|
(item) => {
|
|
2916
2925
|
var _a;
|
|
2917
2926
|
return ((_a = item.dropdownItems) == null ? void 0 : _a.length) ? (
|
|
2918
2927
|
// 드롭다운이 있는 nav 아이템 (예: 스토어)
|
|
2919
|
-
/* @__PURE__ */ (0,
|
|
2920
|
-
/* @__PURE__ */ (0,
|
|
2921
|
-
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_radix_ui11.DropdownMenu.Root, { children: [
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2930
|
+
import_radix_ui11.DropdownMenu.Trigger,
|
|
2922
2931
|
{
|
|
2923
2932
|
className: cn(
|
|
2924
2933
|
"flex h-9 items-center justify-center rounded-lg px-3 py-2 outline-none",
|
|
@@ -2930,16 +2939,16 @@ function Header({
|
|
|
2930
2939
|
children: item.label
|
|
2931
2940
|
}
|
|
2932
2941
|
),
|
|
2933
|
-
/* @__PURE__ */ (0,
|
|
2934
|
-
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2943
|
+
import_radix_ui11.DropdownMenu.Content,
|
|
2935
2944
|
{
|
|
2936
2945
|
align: "start",
|
|
2937
2946
|
sideOffset: 4,
|
|
2938
2947
|
className: cn(PANEL_CLS, "w-50 py-1 px-1"),
|
|
2939
2948
|
style: { maxHeight: "416px" },
|
|
2940
2949
|
children: [
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
2942
|
-
item.dropdownItems.map((di) => /* @__PURE__ */ (0,
|
|
2950
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownSectionLabel, { children: item.label }) }),
|
|
2951
|
+
item.dropdownItems.map((di) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2943
2952
|
DropdownMenuRow,
|
|
2944
2953
|
{
|
|
2945
2954
|
icon: di.icon,
|
|
@@ -2955,7 +2964,7 @@ function Header({
|
|
|
2955
2964
|
] }, item.label)
|
|
2956
2965
|
) : (
|
|
2957
2966
|
// 일반 nav 아이템
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2959
2968
|
"button",
|
|
2960
2969
|
{
|
|
2961
2970
|
type: "button",
|
|
@@ -2973,8 +2982,8 @@ function Header({
|
|
|
2973
2982
|
}
|
|
2974
2983
|
) })
|
|
2975
2984
|
] }),
|
|
2976
|
-
/* @__PURE__ */ (0,
|
|
2977
|
-
/* @__PURE__ */ (0,
|
|
2985
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2978
2987
|
"button",
|
|
2979
2988
|
{
|
|
2980
2989
|
type: "button",
|
|
@@ -2986,14 +2995,14 @@ function Header({
|
|
|
2986
2995
|
"transition-opacity hover:opacity-90 active:opacity-80"
|
|
2987
2996
|
),
|
|
2988
2997
|
children: [
|
|
2989
|
-
/* @__PURE__ */ (0,
|
|
2998
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "circle-arrow-up", className: "size-4 text-primary-foreground" }),
|
|
2990
2999
|
upgradeLabel
|
|
2991
3000
|
]
|
|
2992
3001
|
}
|
|
2993
3002
|
),
|
|
2994
|
-
/* @__PURE__ */ (0,
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
2996
|
-
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_radix_ui11.DropdownMenu.Root, { children: [
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3005
|
+
import_radix_ui11.DropdownMenu.Trigger,
|
|
2997
3006
|
{
|
|
2998
3007
|
className: cn(
|
|
2999
3008
|
"flex h-9 items-center gap-1.5 rounded-lg border border-border bg-background",
|
|
@@ -3003,14 +3012,14 @@ function Header({
|
|
|
3003
3012
|
"data-[state=open]:bg-accent"
|
|
3004
3013
|
),
|
|
3005
3014
|
children: [
|
|
3006
|
-
/* @__PURE__ */ (0,
|
|
3007
|
-
/* @__PURE__ */ (0,
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "user", className: "size-4 text-foreground" }),
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: userEmail }),
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "chevron-down", className: "size-4 text-foreground" })
|
|
3009
3018
|
]
|
|
3010
3019
|
}
|
|
3011
3020
|
),
|
|
3012
|
-
/* @__PURE__ */ (0,
|
|
3013
|
-
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3022
|
+
import_radix_ui11.DropdownMenu.Content,
|
|
3014
3023
|
{
|
|
3015
3024
|
align: "end",
|
|
3016
3025
|
sideOffset: 4,
|
|
@@ -3018,11 +3027,11 @@ function Header({
|
|
|
3018
3027
|
PANEL_CLS
|
|
3019
3028
|
),
|
|
3020
3029
|
style: { minWidth: "var(--radix-dropdown-menu-trigger-width)", maxHeight: "416px" },
|
|
3021
|
-
children: userMenuSections.map((section, si) => /* @__PURE__ */ (0,
|
|
3022
|
-
si > 0 && /* @__PURE__ */ (0,
|
|
3023
|
-
/* @__PURE__ */ (0,
|
|
3024
|
-
section.label && /* @__PURE__ */ (0,
|
|
3025
|
-
section.items.map((item) => /* @__PURE__ */ (0,
|
|
3030
|
+
children: userMenuSections.map((section, si) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(React13.Fragment, { children: [
|
|
3031
|
+
si > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Separator, { className: "my-1 h-px bg-border mx-1" }),
|
|
3032
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_radix_ui11.DropdownMenu.Group, { className: "py-1 px-1", children: [
|
|
3033
|
+
section.label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownSectionLabel, { children: section.label }) }),
|
|
3034
|
+
section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3026
3035
|
DropdownMenuRow,
|
|
3027
3036
|
{
|
|
3028
3037
|
icon: item.icon,
|
|
@@ -3037,8 +3046,8 @@ function Header({
|
|
|
3037
3046
|
}
|
|
3038
3047
|
) })
|
|
3039
3048
|
] }),
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_radix_ui11.Popover.Root, { children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3042
3051
|
"button",
|
|
3043
3052
|
{
|
|
3044
3053
|
type: "button",
|
|
@@ -3051,8 +3060,8 @@ function Header({
|
|
|
3051
3060
|
"data-[state=open]:bg-accent"
|
|
3052
3061
|
),
|
|
3053
3062
|
children: [
|
|
3054
|
-
/* @__PURE__ */ (0,
|
|
3055
|
-
hasNotification && /* @__PURE__ */ (0,
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "bell", className: "size-4 text-foreground" }),
|
|
3064
|
+
hasNotification && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3056
3065
|
"span",
|
|
3057
3066
|
{
|
|
3058
3067
|
"aria-hidden": true,
|
|
@@ -3063,8 +3072,8 @@ function Header({
|
|
|
3063
3072
|
]
|
|
3064
3073
|
}
|
|
3065
3074
|
) }),
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3076
|
+
import_radix_ui11.Popover.Content,
|
|
3068
3077
|
{
|
|
3069
3078
|
align: "end",
|
|
3070
3079
|
sideOffset: 4,
|
|
@@ -3075,37 +3084,37 @@ function Header({
|
|
|
3075
3084
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150"
|
|
3076
3085
|
),
|
|
3077
3086
|
children: [
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
3079
|
-
/* @__PURE__ */ (0,
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3081
|
-
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3088
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: "text-lg font-semibold tracking-tight text-foreground", children: "\uC11C\uBE44\uC2A4 \uC5C5\uB370\uC774\uD2B8" }),
|
|
3089
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3090
|
+
import_radix_ui11.Popover.Close,
|
|
3082
3091
|
{
|
|
3083
3092
|
"aria-label": "\uB2EB\uAE30",
|
|
3084
3093
|
className: "opacity-70 hover:opacity-100 transition-opacity",
|
|
3085
|
-
children: /* @__PURE__ */ (0,
|
|
3094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "x", className: "size-4 text-foreground" })
|
|
3086
3095
|
}
|
|
3087
3096
|
)
|
|
3088
3097
|
] }),
|
|
3089
|
-
/* @__PURE__ */ (0,
|
|
3090
|
-
i > 0 && /* @__PURE__ */ (0,
|
|
3091
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col", children: notifications.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(React13.Fragment, { children: [
|
|
3099
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("hr", { className: "w-full border-border" }) }),
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3092
3101
|
"div",
|
|
3093
3102
|
{
|
|
3094
3103
|
className: "flex flex-col gap-4 rounded-md p-3 cursor-pointer transition-colors hover:bg-secondary",
|
|
3095
3104
|
children: [
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3097
|
-
n.badge && /* @__PURE__ */ (0,
|
|
3098
|
-
n.date && /* @__PURE__ */ (0,
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
3106
|
+
n.badge && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "inline-flex h-5.5 items-center rounded-lg bg-amber-50 px-2.5 py-0.5 text-xs font-medium tracking-tight text-amber-700 whitespace-nowrap", children: n.badge }),
|
|
3107
|
+
n.date && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-normal tracking-tight text-muted-foreground", children: n.date })
|
|
3099
3108
|
] }),
|
|
3100
|
-
/* @__PURE__ */ (0,
|
|
3101
|
-
/* @__PURE__ */ (0,
|
|
3102
|
-
/* @__PURE__ */ (0,
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-base font-medium tracking-tight text-foreground whitespace-nowrap", children: n.title }),
|
|
3111
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "line-clamp-2 text-sm font-normal tracking-tight text-muted-foreground", children: n.description })
|
|
3103
3112
|
] })
|
|
3104
3113
|
]
|
|
3105
3114
|
}
|
|
3106
3115
|
)
|
|
3107
3116
|
] }, n.id)) }),
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3109
3118
|
"button",
|
|
3110
3119
|
{
|
|
3111
3120
|
type: "button",
|
|
@@ -3118,7 +3127,7 @@ function Header({
|
|
|
3118
3127
|
),
|
|
3119
3128
|
children: [
|
|
3120
3129
|
"\uC804\uCCB4 \uB0B4\uC5ED \uBCF4\uAE30",
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "chevron-right", className: "size-4 text-foreground" })
|
|
3122
3131
|
]
|
|
3123
3132
|
}
|
|
3124
3133
|
)
|
|
@@ -3126,9 +3135,9 @@ function Header({
|
|
|
3126
3135
|
}
|
|
3127
3136
|
) })
|
|
3128
3137
|
] }),
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3130
|
-
/* @__PURE__ */ (0,
|
|
3131
|
-
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_radix_ui11.DropdownMenu.Root, { children: [
|
|
3139
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3140
|
+
import_radix_ui11.DropdownMenu.Trigger,
|
|
3132
3141
|
{
|
|
3133
3142
|
"aria-label": "\uC5B8\uC5B4 \uC120\uD0DD",
|
|
3134
3143
|
className: cn(
|
|
@@ -3137,20 +3146,20 @@ function Header({
|
|
|
3137
3146
|
"transition-colors hover:bg-muted/60",
|
|
3138
3147
|
"data-[state=open]:bg-accent"
|
|
3139
3148
|
),
|
|
3140
|
-
children: /* @__PURE__ */ (0,
|
|
3149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "globe", className: "size-4 text-foreground" })
|
|
3141
3150
|
}
|
|
3142
3151
|
),
|
|
3143
|
-
/* @__PURE__ */ (0,
|
|
3144
|
-
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3153
|
+
import_radix_ui11.DropdownMenu.Content,
|
|
3145
3154
|
{
|
|
3146
3155
|
align: "end",
|
|
3147
3156
|
sideOffset: 4,
|
|
3148
3157
|
className: cn(PANEL_CLS, "w-50 py-1 px-1"),
|
|
3149
3158
|
style: { maxHeight: "416px" },
|
|
3150
3159
|
children: [
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3152
|
-
languages.map((lang) => /* @__PURE__ */ (0,
|
|
3153
|
-
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_radix_ui11.DropdownMenu.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownSectionLabel, { children: "\uC5B8\uC5B4" }) }),
|
|
3161
|
+
languages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3162
|
+
import_radix_ui11.DropdownMenu.Item,
|
|
3154
3163
|
{
|
|
3155
3164
|
onSelect: () => onLanguageChange == null ? void 0 : onLanguageChange(lang.code),
|
|
3156
3165
|
className: cn(
|
|
@@ -3160,7 +3169,7 @@ function Header({
|
|
|
3160
3169
|
lang.code === currentLanguage && "bg-accent/50"
|
|
3161
3170
|
),
|
|
3162
3171
|
children: [
|
|
3163
|
-
/* @__PURE__ */ (0,
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3164
3173
|
"span",
|
|
3165
3174
|
{
|
|
3166
3175
|
className: "flex size-4 shrink-0 items-center justify-center overflow-hidden text-sm leading-none",
|
|
@@ -3184,10 +3193,10 @@ function Header({
|
|
|
3184
3193
|
}
|
|
3185
3194
|
|
|
3186
3195
|
// src/components/ui/input.tsx
|
|
3187
|
-
var
|
|
3196
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3188
3197
|
function Input(_a) {
|
|
3189
3198
|
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
3190
|
-
return /* @__PURE__ */ (0,
|
|
3199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3191
3200
|
"input",
|
|
3192
3201
|
__spreadValues({
|
|
3193
3202
|
type,
|
|
@@ -3206,10 +3215,10 @@ function Input(_a) {
|
|
|
3206
3215
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
3207
3216
|
|
|
3208
3217
|
// src/components/ui/textarea.tsx
|
|
3209
|
-
var
|
|
3218
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3210
3219
|
function Textarea(_a) {
|
|
3211
3220
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3212
|
-
return /* @__PURE__ */ (0,
|
|
3221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3213
3222
|
"textarea",
|
|
3214
3223
|
__spreadValues({
|
|
3215
3224
|
"data-slot": "textarea",
|
|
@@ -3222,10 +3231,10 @@ function Textarea(_a) {
|
|
|
3222
3231
|
}
|
|
3223
3232
|
|
|
3224
3233
|
// src/components/ui/input-group.tsx
|
|
3225
|
-
var
|
|
3234
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3226
3235
|
function InputGroup(_a) {
|
|
3227
3236
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3228
|
-
return /* @__PURE__ */ (0,
|
|
3237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3229
3238
|
"div",
|
|
3230
3239
|
__spreadValues({
|
|
3231
3240
|
"data-slot": "input-group",
|
|
@@ -3271,7 +3280,7 @@ function InputGroupAddon(_a) {
|
|
|
3271
3280
|
"className",
|
|
3272
3281
|
"align"
|
|
3273
3282
|
]);
|
|
3274
|
-
return /* @__PURE__ */ (0,
|
|
3283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3275
3284
|
"div",
|
|
3276
3285
|
__spreadValues({
|
|
3277
3286
|
role: "group",
|
|
@@ -3316,7 +3325,7 @@ function InputGroupButton(_a) {
|
|
|
3316
3325
|
"variant",
|
|
3317
3326
|
"size"
|
|
3318
3327
|
]);
|
|
3319
|
-
return /* @__PURE__ */ (0,
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3320
3329
|
Button,
|
|
3321
3330
|
__spreadValues({
|
|
3322
3331
|
type,
|
|
@@ -3328,7 +3337,7 @@ function InputGroupButton(_a) {
|
|
|
3328
3337
|
}
|
|
3329
3338
|
function InputGroupText(_a) {
|
|
3330
3339
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3331
|
-
return /* @__PURE__ */ (0,
|
|
3340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3332
3341
|
"span",
|
|
3333
3342
|
__spreadValues({
|
|
3334
3343
|
className: cn(
|
|
@@ -3344,7 +3353,7 @@ function InputGroupInput(_a) {
|
|
|
3344
3353
|
} = _b, props = __objRest(_b, [
|
|
3345
3354
|
"className"
|
|
3346
3355
|
]);
|
|
3347
|
-
return /* @__PURE__ */ (0,
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3348
3357
|
Input,
|
|
3349
3358
|
__spreadValues({
|
|
3350
3359
|
"data-slot": "input-group-control",
|
|
@@ -3361,7 +3370,7 @@ function InputGroupTextarea(_a) {
|
|
|
3361
3370
|
} = _b, props = __objRest(_b, [
|
|
3362
3371
|
"className"
|
|
3363
3372
|
]);
|
|
3364
|
-
return /* @__PURE__ */ (0,
|
|
3373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3365
3374
|
Textarea,
|
|
3366
3375
|
__spreadValues({
|
|
3367
3376
|
"data-slot": "input-group-control",
|
|
@@ -3374,10 +3383,10 @@ function InputGroupTextarea(_a) {
|
|
|
3374
3383
|
}
|
|
3375
3384
|
|
|
3376
3385
|
// src/components/ui/input-otp.tsx
|
|
3377
|
-
var
|
|
3386
|
+
var React14 = __toESM(require("react"));
|
|
3378
3387
|
var import_input_otp = require("input-otp");
|
|
3379
3388
|
var import_lucide_react3 = require("lucide-react");
|
|
3380
|
-
var
|
|
3389
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3381
3390
|
function InputOTP(_a) {
|
|
3382
3391
|
var _b = _a, {
|
|
3383
3392
|
className,
|
|
@@ -3386,7 +3395,7 @@ function InputOTP(_a) {
|
|
|
3386
3395
|
"className",
|
|
3387
3396
|
"containerClassName"
|
|
3388
3397
|
]);
|
|
3389
|
-
return /* @__PURE__ */ (0,
|
|
3398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3390
3399
|
import_input_otp.OTPInput,
|
|
3391
3400
|
__spreadValues({
|
|
3392
3401
|
"data-slot": "input-otp",
|
|
@@ -3400,7 +3409,7 @@ function InputOTP(_a) {
|
|
|
3400
3409
|
}
|
|
3401
3410
|
function InputOTPGroup(_a) {
|
|
3402
3411
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3403
|
-
return /* @__PURE__ */ (0,
|
|
3412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3404
3413
|
"div",
|
|
3405
3414
|
__spreadValues({
|
|
3406
3415
|
"data-slot": "input-otp-group",
|
|
@@ -3417,9 +3426,9 @@ function InputOTPSlot(_a) {
|
|
|
3417
3426
|
"className"
|
|
3418
3427
|
]);
|
|
3419
3428
|
var _a2;
|
|
3420
|
-
const inputOTPContext =
|
|
3429
|
+
const inputOTPContext = React14.useContext(import_input_otp.OTPInputContext);
|
|
3421
3430
|
const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) != null ? _a2 : {};
|
|
3422
|
-
return /* @__PURE__ */ (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3423
3432
|
"div",
|
|
3424
3433
|
__spreadProps(__spreadValues({
|
|
3425
3434
|
"data-slot": "input-otp-slot",
|
|
@@ -3431,22 +3440,22 @@ function InputOTPSlot(_a) {
|
|
|
3431
3440
|
}, props), {
|
|
3432
3441
|
children: [
|
|
3433
3442
|
char,
|
|
3434
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
3443
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
3435
3444
|
]
|
|
3436
3445
|
})
|
|
3437
3446
|
);
|
|
3438
3447
|
}
|
|
3439
3448
|
function InputOTPSeparator(_a) {
|
|
3440
3449
|
var props = __objRest(_a, []);
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react3.MinusIcon, {}) }));
|
|
3442
3451
|
}
|
|
3443
3452
|
|
|
3444
3453
|
// src/components/ui/kb-card.tsx
|
|
3445
|
-
var
|
|
3454
|
+
var React15 = __toESM(require("react"));
|
|
3446
3455
|
|
|
3447
3456
|
// src/components/icons/custom/folder-amber.tsx
|
|
3448
3457
|
var import_react3 = require("react");
|
|
3449
|
-
var
|
|
3458
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3450
3459
|
function FolderAmberIcon({ className }) {
|
|
3451
3460
|
const id = (0, import_react3.useId)().replace(/:/g, "");
|
|
3452
3461
|
const clip = `clip_${id}`;
|
|
@@ -3455,7 +3464,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3455
3464
|
const f2 = `f2_${id}`;
|
|
3456
3465
|
const p0 = `p0_${id}`;
|
|
3457
3466
|
const p1 = `p1_${id}`;
|
|
3458
|
-
return /* @__PURE__ */ (0,
|
|
3467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3459
3468
|
"svg",
|
|
3460
3469
|
{
|
|
3461
3470
|
width: "20",
|
|
@@ -3466,15 +3475,15 @@ function FolderAmberIcon({ className }) {
|
|
|
3466
3475
|
"aria-hidden": true,
|
|
3467
3476
|
className: cn("shrink-0", className),
|
|
3468
3477
|
children: [
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3470
|
-
/* @__PURE__ */ (0,
|
|
3478
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("g", { clipPath: `url(#${clip})`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { filter: `url(#${f0})`, children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("g", { filter: `url(#${f1})`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3471
3480
|
"path",
|
|
3472
3481
|
{
|
|
3473
3482
|
d: "M6.9896 2C7.47943 2 7.95223 2.17976 8.31833 2.50518L9.43167 3.49482C9.79777 3.82024 10.2706 4 10.7604 4H17C18.1046 4 19 4.89543 19 6V15C19 16.6569 17.6569 18 16 18H4C2.34315 18 1 16.6569 1 15V4C1 2.89543 1.89543 2 3 2H6.9896Z",
|
|
3474
3483
|
fill: `url(#${p0})`
|
|
3475
3484
|
}
|
|
3476
3485
|
) }),
|
|
3477
|
-
/* @__PURE__ */ (0,
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3478
3487
|
"path",
|
|
3479
3488
|
{
|
|
3480
3489
|
d: "M3 2.25H6.98926C7.41786 2.25 7.832 2.40764 8.15234 2.69238L9.26562 3.68164C9.67749 4.04774 10.2097 4.25 10.7607 4.25H17C17.9665 4.25 18.75 5.0335 18.75 6V15C18.75 16.5188 17.5188 17.75 16 17.75H4C2.48122 17.75 1.25 16.5188 1.25 15V4C1.25 3.0335 2.0335 2.25 3 2.25Z",
|
|
@@ -3483,15 +3492,15 @@ function FolderAmberIcon({ className }) {
|
|
|
3483
3492
|
strokeWidth: "0.5"
|
|
3484
3493
|
}
|
|
3485
3494
|
),
|
|
3486
|
-
/* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("rect", { x: "3", y: "6", width: "14", height: "9", rx: "0.75", fill: "white" }),
|
|
3496
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("g", { filter: `url(#${f2})`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3488
3497
|
"path",
|
|
3489
3498
|
{
|
|
3490
3499
|
d: "M1 10C1 8.89543 1.89543 8 3 8H17C18.1046 8 19 8.89543 19 10V15.75C19 16.9927 17.9926 18 16.75 18H3.25C2.00736 18 1 16.9927 1 15.75V10Z",
|
|
3491
3500
|
fill: `url(#${p1})`
|
|
3492
3501
|
}
|
|
3493
3502
|
) }),
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3503
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3495
3504
|
"path",
|
|
3496
3505
|
{
|
|
3497
3506
|
d: "M3 8.25H17C17.9665 8.25 18.75 9.0335 18.75 10V15.75C18.75 16.8546 17.8546 17.75 16.75 17.75H3.25C2.14543 17.75 1.25 16.8546 1.25 15.75V10C1.25 9.0335 2.0335 8.25 3 8.25Z",
|
|
@@ -3501,8 +3510,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3501
3510
|
}
|
|
3502
3511
|
)
|
|
3503
3512
|
] }) }),
|
|
3504
|
-
/* @__PURE__ */ (0,
|
|
3505
|
-
/* @__PURE__ */ (0,
|
|
3513
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("defs", { children: [
|
|
3514
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3506
3515
|
"filter",
|
|
3507
3516
|
{
|
|
3508
3517
|
id: f0,
|
|
@@ -3513,8 +3522,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3513
3522
|
filterUnits: "userSpaceOnUse",
|
|
3514
3523
|
colorInterpolationFilters: "sRGB",
|
|
3515
3524
|
children: [
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3517
|
-
/* @__PURE__ */ (0,
|
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3518
3527
|
"feColorMatrix",
|
|
3519
3528
|
{
|
|
3520
3529
|
in: "SourceAlpha",
|
|
@@ -3523,17 +3532,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3523
3532
|
result: "hardAlpha"
|
|
3524
3533
|
}
|
|
3525
3534
|
),
|
|
3526
|
-
/* @__PURE__ */ (0,
|
|
3527
|
-
/* @__PURE__ */ (0,
|
|
3528
|
-
/* @__PURE__ */ (0,
|
|
3529
|
-
/* @__PURE__ */ (0,
|
|
3535
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feOffset", { dy: "0.75" }),
|
|
3536
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feGaussianBlur", { stdDeviation: "1.125" }),
|
|
3537
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
3538
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3530
3539
|
"feColorMatrix",
|
|
3531
3540
|
{
|
|
3532
3541
|
type: "matrix",
|
|
3533
3542
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"
|
|
3534
3543
|
}
|
|
3535
3544
|
),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
3545
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3537
3546
|
"feBlend",
|
|
3538
3547
|
{
|
|
3539
3548
|
mode: "normal",
|
|
@@ -3541,7 +3550,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3541
3550
|
result: `effect1_dropShadow_${id}`
|
|
3542
3551
|
}
|
|
3543
3552
|
),
|
|
3544
|
-
/* @__PURE__ */ (0,
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3545
3554
|
"feBlend",
|
|
3546
3555
|
{
|
|
3547
3556
|
mode: "normal",
|
|
@@ -3553,7 +3562,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3553
3562
|
]
|
|
3554
3563
|
}
|
|
3555
3564
|
),
|
|
3556
|
-
/* @__PURE__ */ (0,
|
|
3565
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3557
3566
|
"filter",
|
|
3558
3567
|
{
|
|
3559
3568
|
id: f1,
|
|
@@ -3564,8 +3573,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3564
3573
|
filterUnits: "userSpaceOnUse",
|
|
3565
3574
|
colorInterpolationFilters: "sRGB",
|
|
3566
3575
|
children: [
|
|
3567
|
-
/* @__PURE__ */ (0,
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3569
3578
|
"feBlend",
|
|
3570
3579
|
{
|
|
3571
3580
|
mode: "normal",
|
|
@@ -3574,7 +3583,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3574
3583
|
result: "shape"
|
|
3575
3584
|
}
|
|
3576
3585
|
),
|
|
3577
|
-
/* @__PURE__ */ (0,
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3578
3587
|
"feColorMatrix",
|
|
3579
3588
|
{
|
|
3580
3589
|
in: "SourceAlpha",
|
|
@@ -3583,17 +3592,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3583
3592
|
result: "hardAlpha"
|
|
3584
3593
|
}
|
|
3585
3594
|
),
|
|
3586
|
-
/* @__PURE__ */ (0,
|
|
3587
|
-
/* @__PURE__ */ (0,
|
|
3588
|
-
/* @__PURE__ */ (0,
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feOffset", {}),
|
|
3596
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feGaussianBlur", { stdDeviation: "0.375" }),
|
|
3597
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3590
3599
|
"feColorMatrix",
|
|
3591
3600
|
{
|
|
3592
3601
|
type: "matrix",
|
|
3593
3602
|
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
|
|
3594
3603
|
}
|
|
3595
3604
|
),
|
|
3596
|
-
/* @__PURE__ */ (0,
|
|
3605
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3597
3606
|
"feBlend",
|
|
3598
3607
|
{
|
|
3599
3608
|
mode: "normal",
|
|
@@ -3604,7 +3613,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3604
3613
|
]
|
|
3605
3614
|
}
|
|
3606
3615
|
),
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3608
3617
|
"filter",
|
|
3609
3618
|
{
|
|
3610
3619
|
id: f2,
|
|
@@ -3615,8 +3624,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3615
3624
|
filterUnits: "userSpaceOnUse",
|
|
3616
3625
|
colorInterpolationFilters: "sRGB",
|
|
3617
3626
|
children: [
|
|
3618
|
-
/* @__PURE__ */ (0,
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3627
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3620
3629
|
"feBlend",
|
|
3621
3630
|
{
|
|
3622
3631
|
mode: "normal",
|
|
@@ -3625,7 +3634,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3625
3634
|
result: "shape"
|
|
3626
3635
|
}
|
|
3627
3636
|
),
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3637
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3629
3638
|
"feColorMatrix",
|
|
3630
3639
|
{
|
|
3631
3640
|
in: "SourceAlpha",
|
|
@@ -3634,17 +3643,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3634
3643
|
result: "hardAlpha"
|
|
3635
3644
|
}
|
|
3636
3645
|
),
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3646
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feOffset", {}),
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feGaussianBlur", { stdDeviation: "0.375" }),
|
|
3648
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3641
3650
|
"feColorMatrix",
|
|
3642
3651
|
{
|
|
3643
3652
|
type: "matrix",
|
|
3644
3653
|
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0"
|
|
3645
3654
|
}
|
|
3646
3655
|
),
|
|
3647
|
-
/* @__PURE__ */ (0,
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3648
3657
|
"feBlend",
|
|
3649
3658
|
{
|
|
3650
3659
|
mode: "normal",
|
|
@@ -3655,7 +3664,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3655
3664
|
]
|
|
3656
3665
|
}
|
|
3657
3666
|
),
|
|
3658
|
-
/* @__PURE__ */ (0,
|
|
3667
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3659
3668
|
"linearGradient",
|
|
3660
3669
|
{
|
|
3661
3670
|
id: p0,
|
|
@@ -3665,12 +3674,12 @@ function FolderAmberIcon({ className }) {
|
|
|
3665
3674
|
y2: "7.875",
|
|
3666
3675
|
gradientUnits: "userSpaceOnUse",
|
|
3667
3676
|
children: [
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3669
|
-
/* @__PURE__ */ (0,
|
|
3677
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("stop", { stopColor: "#FFE386" }),
|
|
3678
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("stop", { offset: "1", stopColor: "#EAC448" })
|
|
3670
3679
|
]
|
|
3671
3680
|
}
|
|
3672
3681
|
),
|
|
3673
|
-
/* @__PURE__ */ (0,
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3674
3683
|
"linearGradient",
|
|
3675
3684
|
{
|
|
3676
3685
|
id: p1,
|
|
@@ -3680,12 +3689,12 @@ function FolderAmberIcon({ className }) {
|
|
|
3680
3689
|
y2: "18",
|
|
3681
3690
|
gradientUnits: "userSpaceOnUse",
|
|
3682
3691
|
children: [
|
|
3683
|
-
/* @__PURE__ */ (0,
|
|
3684
|
-
/* @__PURE__ */ (0,
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("stop", { stopColor: "#FFE693" }),
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("stop", { offset: "1", stopColor: "#FCC24D" })
|
|
3685
3694
|
]
|
|
3686
3695
|
}
|
|
3687
3696
|
),
|
|
3688
|
-
/* @__PURE__ */ (0,
|
|
3697
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("clipPath", { id: clip, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("rect", { width: "20", height: "20", fill: "white" }) })
|
|
3689
3698
|
] })
|
|
3690
3699
|
]
|
|
3691
3700
|
}
|
|
@@ -3693,7 +3702,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3693
3702
|
}
|
|
3694
3703
|
|
|
3695
3704
|
// src/components/ui/kb-card.tsx
|
|
3696
|
-
var
|
|
3705
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3697
3706
|
function KbCard({
|
|
3698
3707
|
name,
|
|
3699
3708
|
metadata = [],
|
|
@@ -3706,16 +3715,16 @@ function KbCard({
|
|
|
3706
3715
|
className,
|
|
3707
3716
|
variant = "grid"
|
|
3708
3717
|
}) {
|
|
3709
|
-
const id =
|
|
3710
|
-
const iconNode = icon != null ? icon : /* @__PURE__ */ (0,
|
|
3718
|
+
const id = React15.useId();
|
|
3719
|
+
const iconNode = icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FolderAmberIcon, { className: "size-6" });
|
|
3711
3720
|
if (variant === "list") {
|
|
3712
|
-
const listContent = /* @__PURE__ */ (0,
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3714
|
-
/* @__PURE__ */ (0,
|
|
3715
|
-
/* @__PURE__ */ (0,
|
|
3716
|
-
metadata.length > 0 && /* @__PURE__ */ (0,
|
|
3721
|
+
const listContent = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-white shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.1),inset_0_2px_4px_rgba(0,0,0,0.1)]", children: iconNode }),
|
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
|
|
3724
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm font-semibold leading-5 text-foreground line-clamp-1", children: name }),
|
|
3725
|
+
metadata.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm text-muted-foreground truncate", children: metadata.map((item) => item.value).join(" \xB7 ") })
|
|
3717
3726
|
] }),
|
|
3718
|
-
selectable && /* @__PURE__ */ (0,
|
|
3727
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3719
3728
|
Checkbox,
|
|
3720
3729
|
{
|
|
3721
3730
|
id,
|
|
@@ -3727,7 +3736,7 @@ function KbCard({
|
|
|
3727
3736
|
)
|
|
3728
3737
|
] });
|
|
3729
3738
|
if (selectable) {
|
|
3730
|
-
return /* @__PURE__ */ (0,
|
|
3739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3731
3740
|
"label",
|
|
3732
3741
|
{
|
|
3733
3742
|
htmlFor: id,
|
|
@@ -3741,7 +3750,7 @@ function KbCard({
|
|
|
3741
3750
|
}
|
|
3742
3751
|
);
|
|
3743
3752
|
}
|
|
3744
|
-
return /* @__PURE__ */ (0,
|
|
3753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3745
3754
|
"div",
|
|
3746
3755
|
{
|
|
3747
3756
|
onClick,
|
|
@@ -3755,11 +3764,11 @@ function KbCard({
|
|
|
3755
3764
|
}
|
|
3756
3765
|
);
|
|
3757
3766
|
}
|
|
3758
|
-
const cardBody = /* @__PURE__ */ (0,
|
|
3759
|
-
/* @__PURE__ */ (0,
|
|
3760
|
-
/* @__PURE__ */ (0,
|
|
3761
|
-
/* @__PURE__ */ (0,
|
|
3762
|
-
selectable ? /* @__PURE__ */ (0,
|
|
3767
|
+
const cardBody = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col justify-between", children: [
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex size-10 items-center justify-center rounded-xl bg-white shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.1),inset_0_2px_4px_rgba(0,0,0,0.1)]", children: iconNode }),
|
|
3771
|
+
selectable ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3763
3772
|
Checkbox,
|
|
3764
3773
|
{
|
|
3765
3774
|
id,
|
|
@@ -3769,22 +3778,22 @@ function KbCard({
|
|
|
3769
3778
|
}
|
|
3770
3779
|
) : topRight ? topRight : null
|
|
3771
3780
|
] }),
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm font-semibold leading-5 text-foreground line-clamp-1 mt-2", children: name })
|
|
3773
3782
|
] }),
|
|
3774
|
-
metadata.length > 0 && /* @__PURE__ */ (0,
|
|
3783
|
+
metadata.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-2", children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3775
3784
|
"div",
|
|
3776
3785
|
{
|
|
3777
3786
|
className: "flex items-center justify-between gap-4",
|
|
3778
3787
|
children: [
|
|
3779
|
-
/* @__PURE__ */ (0,
|
|
3780
|
-
/* @__PURE__ */ (0,
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm text-muted-foreground", children: item.label }),
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm text-foreground", children: item.value })
|
|
3781
3790
|
]
|
|
3782
3791
|
},
|
|
3783
3792
|
item.label
|
|
3784
3793
|
)) })
|
|
3785
3794
|
] });
|
|
3786
3795
|
if (selectable) {
|
|
3787
|
-
return /* @__PURE__ */ (0,
|
|
3796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3788
3797
|
"label",
|
|
3789
3798
|
{
|
|
3790
3799
|
htmlFor: id,
|
|
@@ -3798,7 +3807,7 @@ function KbCard({
|
|
|
3798
3807
|
}
|
|
3799
3808
|
);
|
|
3800
3809
|
}
|
|
3801
|
-
return /* @__PURE__ */ (0,
|
|
3810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3802
3811
|
"div",
|
|
3803
3812
|
{
|
|
3804
3813
|
onClick,
|
|
@@ -3814,91 +3823,15 @@ function KbCard({
|
|
|
3814
3823
|
}
|
|
3815
3824
|
|
|
3816
3825
|
// src/components/ui/markdown-message.tsx
|
|
3817
|
-
var
|
|
3826
|
+
var React17 = __toESM(require("react"));
|
|
3818
3827
|
var import_react_syntax_highlighter = require("react-syntax-highlighter");
|
|
3819
3828
|
|
|
3820
3829
|
// src/components/ui/message-footer.tsx
|
|
3821
|
-
var
|
|
3822
|
-
|
|
3823
|
-
// src/components/ui/tooltip.tsx
|
|
3824
|
-
var React14 = __toESM(require("react"));
|
|
3825
|
-
var import_radix_ui11 = require("radix-ui");
|
|
3826
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3827
|
-
var TooltipProvider = import_radix_ui11.Tooltip.Provider;
|
|
3828
|
-
var TooltipContent = React14.forwardRef((_a, ref) => {
|
|
3829
|
-
var _b = _a, { className, side = "top", sideOffset = 4, children } = _b, props = __objRest(_b, ["className", "side", "sideOffset", "children"]);
|
|
3830
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_radix_ui11.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3831
|
-
import_radix_ui11.Tooltip.Content,
|
|
3832
|
-
__spreadProps(__spreadValues({
|
|
3833
|
-
ref,
|
|
3834
|
-
side,
|
|
3835
|
-
sideOffset,
|
|
3836
|
-
className: cn(
|
|
3837
|
-
"z-50 w-max max-w-[200px]",
|
|
3838
|
-
"bg-primary rounded-md px-2.5 py-1.5",
|
|
3839
|
-
"animate-in fade-in-0 zoom-in-95",
|
|
3840
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3841
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
3842
|
-
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3843
|
-
className
|
|
3844
|
-
)
|
|
3845
|
-
}, props), {
|
|
3846
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
|
|
3847
|
-
})
|
|
3848
|
-
) });
|
|
3849
|
-
});
|
|
3850
|
-
TooltipContent.displayName = "TooltipContent";
|
|
3851
|
-
function Tooltip(_a) {
|
|
3852
|
-
var _b = _a, {
|
|
3853
|
-
content,
|
|
3854
|
-
children,
|
|
3855
|
-
open,
|
|
3856
|
-
defaultOpen,
|
|
3857
|
-
onOpenChange,
|
|
3858
|
-
delayDuration
|
|
3859
|
-
} = _b, contentProps = __objRest(_b, [
|
|
3860
|
-
"content",
|
|
3861
|
-
"children",
|
|
3862
|
-
"open",
|
|
3863
|
-
"defaultOpen",
|
|
3864
|
-
"onOpenChange",
|
|
3865
|
-
"delayDuration"
|
|
3866
|
-
]);
|
|
3867
|
-
if (!content) return children;
|
|
3868
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3869
|
-
import_radix_ui11.Tooltip.Root,
|
|
3870
|
-
{
|
|
3871
|
-
open,
|
|
3872
|
-
defaultOpen,
|
|
3873
|
-
onOpenChange,
|
|
3874
|
-
delayDuration,
|
|
3875
|
-
children: [
|
|
3876
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_radix_ui11.Tooltip.Trigger, { asChild: true, children }),
|
|
3877
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, __spreadProps(__spreadValues({}, contentProps), { children: content }))
|
|
3878
|
-
]
|
|
3879
|
-
}
|
|
3880
|
-
);
|
|
3881
|
-
}
|
|
3882
|
-
function TooltipWithIcon({
|
|
3883
|
-
content,
|
|
3884
|
-
iconName = "info",
|
|
3885
|
-
className
|
|
3886
|
-
}) {
|
|
3887
|
-
if (!content) return null;
|
|
3888
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Tooltip, { content, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3889
|
-
Icon,
|
|
3890
|
-
{
|
|
3891
|
-
name: iconName,
|
|
3892
|
-
className: cn("size-4 text-muted-foreground cursor-help", className)
|
|
3893
|
-
}
|
|
3894
|
-
) });
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
|
-
// src/components/ui/message-footer.tsx
|
|
3830
|
+
var React16 = __toESM(require("react"));
|
|
3898
3831
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3899
3832
|
function MessageFooter({ content, meta }) {
|
|
3900
|
-
const [copied, setCopied] =
|
|
3901
|
-
const timerRef =
|
|
3833
|
+
const [copied, setCopied] = React16.useState(false);
|
|
3834
|
+
const timerRef = React16.useRef(null);
|
|
3902
3835
|
const handleCopy = async () => {
|
|
3903
3836
|
try {
|
|
3904
3837
|
await navigator.clipboard.writeText(content);
|
|
@@ -3908,7 +3841,7 @@ function MessageFooter({ content, meta }) {
|
|
|
3908
3841
|
} catch (e) {
|
|
3909
3842
|
}
|
|
3910
3843
|
};
|
|
3911
|
-
|
|
3844
|
+
React16.useEffect(() => {
|
|
3912
3845
|
return () => {
|
|
3913
3846
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
3914
3847
|
};
|
|
@@ -4018,7 +3951,7 @@ var codeTheme = {
|
|
|
4018
3951
|
italic: { fontStyle: "italic" }
|
|
4019
3952
|
};
|
|
4020
3953
|
function CodeBlock({ lang, code }) {
|
|
4021
|
-
const [copied, setCopied] =
|
|
3954
|
+
const [copied, setCopied] = React17.useState(false);
|
|
4022
3955
|
const handleCopy = () => {
|
|
4023
3956
|
navigator.clipboard.writeText(code).then(() => {
|
|
4024
3957
|
setCopied(true);
|
|
@@ -4086,7 +4019,7 @@ function renderInline(text) {
|
|
|
4086
4019
|
const pushText = (raw) => {
|
|
4087
4020
|
if (!raw) return;
|
|
4088
4021
|
raw.split("\n").forEach((line, i, arr) => {
|
|
4089
|
-
result.push(/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4022
|
+
result.push(/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(React17.Fragment, { children: line }, k++));
|
|
4090
4023
|
if (i < arr.length - 1) result.push(/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("br", {}, k++));
|
|
4091
4024
|
});
|
|
4092
4025
|
};
|
|
@@ -4378,7 +4311,7 @@ function MarkdownMessage({
|
|
|
4378
4311
|
}
|
|
4379
4312
|
|
|
4380
4313
|
// src/components/ui/modal.tsx
|
|
4381
|
-
var
|
|
4314
|
+
var React18 = __toESM(require("react"));
|
|
4382
4315
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4383
4316
|
function Modal({
|
|
4384
4317
|
id,
|
|
@@ -4388,7 +4321,7 @@ function Modal({
|
|
|
4388
4321
|
variant = "confirm",
|
|
4389
4322
|
title,
|
|
4390
4323
|
description,
|
|
4391
|
-
showCloseButton =
|
|
4324
|
+
showCloseButton = true,
|
|
4392
4325
|
children,
|
|
4393
4326
|
cancelLabel = "\uCDE8\uC18C",
|
|
4394
4327
|
confirmLabel = "\uD655\uC778",
|
|
@@ -4400,11 +4333,11 @@ function Modal({
|
|
|
4400
4333
|
isLoading
|
|
4401
4334
|
}) {
|
|
4402
4335
|
const isControlled = openProp !== void 0;
|
|
4403
|
-
const [openState, setOpenState] =
|
|
4336
|
+
const [openState, setOpenState] = React18.useState(false);
|
|
4404
4337
|
const open = isControlled ? openProp : openState;
|
|
4405
|
-
const [loading, setLoading] =
|
|
4406
|
-
const overlayRef =
|
|
4407
|
-
const setOpen =
|
|
4338
|
+
const [loading, setLoading] = React18.useState(false);
|
|
4339
|
+
const overlayRef = React18.useRef(null);
|
|
4340
|
+
const setOpen = React18.useCallback(
|
|
4408
4341
|
(next) => {
|
|
4409
4342
|
if (!isControlled) setOpenState(next);
|
|
4410
4343
|
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
@@ -4412,9 +4345,9 @@ function Modal({
|
|
|
4412
4345
|
[isControlled, onOpenChange]
|
|
4413
4346
|
);
|
|
4414
4347
|
const isLoadingCombined = loading || !!isLoading;
|
|
4415
|
-
const loadingRef =
|
|
4348
|
+
const loadingRef = React18.useRef(isLoadingCombined);
|
|
4416
4349
|
loadingRef.current = isLoadingCombined;
|
|
4417
|
-
const handleClose =
|
|
4350
|
+
const handleClose = React18.useCallback(() => {
|
|
4418
4351
|
if (loadingRef.current) return;
|
|
4419
4352
|
setOpen(false);
|
|
4420
4353
|
onCancel == null ? void 0 : onCancel();
|
|
@@ -4437,7 +4370,7 @@ function Modal({
|
|
|
4437
4370
|
setOpen(false);
|
|
4438
4371
|
}
|
|
4439
4372
|
}
|
|
4440
|
-
|
|
4373
|
+
React18.useEffect(() => {
|
|
4441
4374
|
if (!open) return;
|
|
4442
4375
|
function handleKeyDown(e) {
|
|
4443
4376
|
if (e.key === "Escape") handleClose();
|
|
@@ -4521,10 +4454,10 @@ function Modal({
|
|
|
4521
4454
|
}
|
|
4522
4455
|
|
|
4523
4456
|
// src/components/ui/menubar.tsx
|
|
4524
|
-
var
|
|
4457
|
+
var React19 = __toESM(require("react"));
|
|
4525
4458
|
var import_radix_ui12 = require("radix-ui");
|
|
4526
4459
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4527
|
-
var Menubar =
|
|
4460
|
+
var Menubar = React19.forwardRef((_a, ref) => {
|
|
4528
4461
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4529
4462
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4530
4463
|
import_radix_ui12.Menubar.Root,
|
|
@@ -4540,7 +4473,7 @@ var Menubar = React18.forwardRef((_a, ref) => {
|
|
|
4540
4473
|
});
|
|
4541
4474
|
Menubar.displayName = import_radix_ui12.Menubar.Root.displayName;
|
|
4542
4475
|
var MenubarMenu = import_radix_ui12.Menubar.Menu;
|
|
4543
|
-
var MenubarTrigger =
|
|
4476
|
+
var MenubarTrigger = React19.forwardRef((_a, ref) => {
|
|
4544
4477
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4545
4478
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4546
4479
|
import_radix_ui12.Menubar.Trigger,
|
|
@@ -4558,7 +4491,7 @@ var MenubarTrigger = React18.forwardRef((_a, ref) => {
|
|
|
4558
4491
|
);
|
|
4559
4492
|
});
|
|
4560
4493
|
MenubarTrigger.displayName = import_radix_ui12.Menubar.Trigger.displayName;
|
|
4561
|
-
var MenubarContent =
|
|
4494
|
+
var MenubarContent = React19.forwardRef((_a, ref) => {
|
|
4562
4495
|
var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
|
|
4563
4496
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_radix_ui12.Menubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4564
4497
|
import_radix_ui12.Menubar.Content,
|
|
@@ -4584,7 +4517,7 @@ var MenubarContent = React18.forwardRef((_a, ref) => {
|
|
|
4584
4517
|
});
|
|
4585
4518
|
MenubarContent.displayName = import_radix_ui12.Menubar.Content.displayName;
|
|
4586
4519
|
var MenubarGroup = import_radix_ui12.Menubar.Group;
|
|
4587
|
-
var MenubarItem =
|
|
4520
|
+
var MenubarItem = React19.forwardRef((_a, ref) => {
|
|
4588
4521
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
4589
4522
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4590
4523
|
import_radix_ui12.Menubar.Item,
|
|
@@ -4605,7 +4538,7 @@ var MenubarItem = React18.forwardRef((_a, ref) => {
|
|
|
4605
4538
|
});
|
|
4606
4539
|
MenubarItem.displayName = import_radix_ui12.Menubar.Item.displayName;
|
|
4607
4540
|
var MenubarSub = import_radix_ui12.Menubar.Sub;
|
|
4608
|
-
var MenubarSubTrigger =
|
|
4541
|
+
var MenubarSubTrigger = React19.forwardRef((_a, ref) => {
|
|
4609
4542
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
4610
4543
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4611
4544
|
import_radix_ui12.Menubar.SubTrigger,
|
|
@@ -4630,7 +4563,7 @@ var MenubarSubTrigger = React18.forwardRef((_a, ref) => {
|
|
|
4630
4563
|
);
|
|
4631
4564
|
});
|
|
4632
4565
|
MenubarSubTrigger.displayName = import_radix_ui12.Menubar.SubTrigger.displayName;
|
|
4633
|
-
var MenubarSubContent =
|
|
4566
|
+
var MenubarSubContent = React19.forwardRef((_a, ref) => {
|
|
4634
4567
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4635
4568
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4636
4569
|
import_radix_ui12.Menubar.SubContent,
|
|
@@ -4669,7 +4602,7 @@ var MenubarShortcut = (_a) => {
|
|
|
4669
4602
|
);
|
|
4670
4603
|
};
|
|
4671
4604
|
MenubarShortcut.displayName = "MenubarShortcut";
|
|
4672
|
-
var MenubarSeparator =
|
|
4605
|
+
var MenubarSeparator = React19.forwardRef((_a, ref) => {
|
|
4673
4606
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4674
4607
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4675
4608
|
import_radix_ui12.Menubar.Separator,
|
|
@@ -4773,7 +4706,7 @@ function SegmentedControl({
|
|
|
4773
4706
|
}
|
|
4774
4707
|
|
|
4775
4708
|
// src/components/ui/search-input.tsx
|
|
4776
|
-
var
|
|
4709
|
+
var React20 = __toESM(require("react"));
|
|
4777
4710
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4778
4711
|
function SearchInput(_a) {
|
|
4779
4712
|
var _b = _a, {
|
|
@@ -4789,13 +4722,13 @@ function SearchInput(_a) {
|
|
|
4789
4722
|
"className",
|
|
4790
4723
|
"debounce"
|
|
4791
4724
|
]);
|
|
4792
|
-
const [displayValue, setDisplayValue] =
|
|
4793
|
-
const isComposingRef =
|
|
4794
|
-
const pendingRef =
|
|
4795
|
-
const latestDisplayRef =
|
|
4796
|
-
const onChangeRef =
|
|
4725
|
+
const [displayValue, setDisplayValue] = React20.useState(value);
|
|
4726
|
+
const isComposingRef = React20.useRef(false);
|
|
4727
|
+
const pendingRef = React20.useRef(null);
|
|
4728
|
+
const latestDisplayRef = React20.useRef(value);
|
|
4729
|
+
const onChangeRef = React20.useRef(onChange);
|
|
4797
4730
|
onChangeRef.current = onChange;
|
|
4798
|
-
|
|
4731
|
+
React20.useEffect(() => {
|
|
4799
4732
|
if (isComposingRef.current) return;
|
|
4800
4733
|
if (debounceMs !== void 0) {
|
|
4801
4734
|
const pending = pendingRef.current;
|
|
@@ -4807,7 +4740,7 @@ function SearchInput(_a) {
|
|
|
4807
4740
|
latestDisplayRef.current = value;
|
|
4808
4741
|
setDisplayValue(value);
|
|
4809
4742
|
}, [value, debounceMs]);
|
|
4810
|
-
|
|
4743
|
+
React20.useEffect(() => {
|
|
4811
4744
|
if (debounceMs === void 0) return;
|
|
4812
4745
|
const timer = window.setTimeout(() => {
|
|
4813
4746
|
const next = latestDisplayRef.current;
|
|
@@ -4862,12 +4795,12 @@ function SearchInput(_a) {
|
|
|
4862
4795
|
}
|
|
4863
4796
|
|
|
4864
4797
|
// src/components/ui/select.tsx
|
|
4865
|
-
var
|
|
4798
|
+
var React21 = __toESM(require("react"));
|
|
4866
4799
|
var import_radix_ui13 = require("radix-ui");
|
|
4867
4800
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4868
4801
|
function TruncatedText({ text, className }) {
|
|
4869
|
-
const ref =
|
|
4870
|
-
const [open, setOpen] =
|
|
4802
|
+
const ref = React21.useRef(null);
|
|
4803
|
+
const [open, setOpen] = React21.useState(false);
|
|
4871
4804
|
const handleOpenChange = (nextOpen) => {
|
|
4872
4805
|
if (!nextOpen) {
|
|
4873
4806
|
setOpen(false);
|
|
@@ -4881,8 +4814,8 @@ function TruncatedText({ text, className }) {
|
|
|
4881
4814
|
function Select(props) {
|
|
4882
4815
|
var _a, _b, _c, _d;
|
|
4883
4816
|
const { placeholder = "\uC120\uD0DD\uD574 \uC8FC\uC138\uC694", className, disabled = false } = props;
|
|
4884
|
-
const [open, setOpen] =
|
|
4885
|
-
const [selected, setSelected] =
|
|
4817
|
+
const [open, setOpen] = React21.useState(false);
|
|
4818
|
+
const [selected, setSelected] = React21.useState(() => {
|
|
4886
4819
|
var _a2;
|
|
4887
4820
|
if (props.multiple) return new Set((_a2 = props.defaultValue) != null ? _a2 : []);
|
|
4888
4821
|
const dv = props.defaultValue;
|
|
@@ -4892,13 +4825,13 @@ function Select(props) {
|
|
|
4892
4825
|
const groupsProp = props.groups;
|
|
4893
4826
|
const valueProp = props.value;
|
|
4894
4827
|
const { multiple } = props;
|
|
4895
|
-
const groups =
|
|
4828
|
+
const groups = React21.useMemo(() => {
|
|
4896
4829
|
if (groupsProp) return groupsProp;
|
|
4897
4830
|
if (optionsProp) return [{ options: optionsProp }];
|
|
4898
4831
|
return [];
|
|
4899
4832
|
}, [groupsProp, optionsProp]);
|
|
4900
|
-
const options =
|
|
4901
|
-
const activeSet =
|
|
4833
|
+
const options = React21.useMemo(() => groups.flatMap((g) => g.options), [groups]);
|
|
4834
|
+
const activeSet = React21.useMemo(() => {
|
|
4902
4835
|
if (valueProp !== void 0) {
|
|
4903
4836
|
return multiple ? new Set(valueProp) : /* @__PURE__ */ new Set([valueProp]);
|
|
4904
4837
|
}
|
|
@@ -5117,7 +5050,7 @@ function Sheet({
|
|
|
5117
5050
|
}
|
|
5118
5051
|
|
|
5119
5052
|
// src/components/ui/sidebar.tsx
|
|
5120
|
-
var
|
|
5053
|
+
var React22 = __toESM(require("react"));
|
|
5121
5054
|
var import_lucide_react4 = require("lucide-react");
|
|
5122
5055
|
|
|
5123
5056
|
// src/components/icons/custom/panel-left.tsx
|
|
@@ -5147,22 +5080,22 @@ var defaultSidebarLinkRender = ({
|
|
|
5147
5080
|
onClick,
|
|
5148
5081
|
children
|
|
5149
5082
|
}) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("a", { href, className: cn(className), style, onClick, children });
|
|
5150
|
-
var SidebarLinkContext =
|
|
5083
|
+
var SidebarLinkContext = React22.createContext(
|
|
5151
5084
|
defaultSidebarLinkRender
|
|
5152
5085
|
);
|
|
5153
5086
|
function SidebarLinkProvider({
|
|
5154
5087
|
LinkComponent,
|
|
5155
5088
|
children
|
|
5156
5089
|
}) {
|
|
5157
|
-
const linkRef =
|
|
5158
|
-
|
|
5090
|
+
const linkRef = React22.useRef(LinkComponent);
|
|
5091
|
+
React22.useLayoutEffect(() => {
|
|
5159
5092
|
linkRef.current = LinkComponent;
|
|
5160
5093
|
});
|
|
5161
5094
|
function sidebarLinkRender(props) {
|
|
5162
5095
|
if (!linkRef.current) return defaultSidebarLinkRender(props);
|
|
5163
|
-
return
|
|
5096
|
+
return React22.createElement(linkRef.current, props);
|
|
5164
5097
|
}
|
|
5165
|
-
const [stableRender] =
|
|
5098
|
+
const [stableRender] = React22.useState(
|
|
5166
5099
|
() => sidebarLinkRender
|
|
5167
5100
|
);
|
|
5168
5101
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SidebarLinkContext.Provider, { value: stableRender, children });
|
|
@@ -5174,7 +5107,7 @@ function SidebarLink({
|
|
|
5174
5107
|
onClick,
|
|
5175
5108
|
children
|
|
5176
5109
|
}) {
|
|
5177
|
-
const renderLink =
|
|
5110
|
+
const renderLink = React22.useContext(SidebarLinkContext);
|
|
5178
5111
|
return renderLink({ href, className, style, onClick, children });
|
|
5179
5112
|
}
|
|
5180
5113
|
function Sidebar({
|
|
@@ -5193,9 +5126,9 @@ function Sidebar({
|
|
|
5193
5126
|
}) {
|
|
5194
5127
|
var _a, _b, _c;
|
|
5195
5128
|
const isControlled = isPanelOpenProp !== void 0;
|
|
5196
|
-
const [internalIsPanelOpen, setInternalIsPanelOpen] =
|
|
5129
|
+
const [internalIsPanelOpen, setInternalIsPanelOpen] = React22.useState(true);
|
|
5197
5130
|
const resolvedIsPanelOpen = isControlled ? isPanelOpenProp : internalIsPanelOpen;
|
|
5198
|
-
const activeMenu =
|
|
5131
|
+
const activeMenu = React22.useMemo(
|
|
5199
5132
|
() => {
|
|
5200
5133
|
var _a2;
|
|
5201
5134
|
return (_a2 = menus.filter((m) => m.type !== "divider").find((m) => m.isActive)) != null ? _a2 : null;
|
|
@@ -5204,15 +5137,15 @@ function Sidebar({
|
|
|
5204
5137
|
);
|
|
5205
5138
|
const subMenus = (_a = activeMenu == null ? void 0 : activeMenu.subMenus) != null ? _a : [];
|
|
5206
5139
|
const panelVisible = isControlled ? resolvedIsPanelOpen : resolvedIsPanelOpen && subMenus.length > 0;
|
|
5207
|
-
const handleSetPanelOpen =
|
|
5140
|
+
const handleSetPanelOpen = React22.useCallback(
|
|
5208
5141
|
(open) => {
|
|
5209
5142
|
if (!isControlled) setInternalIsPanelOpen(open);
|
|
5210
5143
|
onPanelOpenChange == null ? void 0 : onPanelOpenChange(open);
|
|
5211
5144
|
},
|
|
5212
5145
|
[isControlled, onPanelOpenChange]
|
|
5213
5146
|
);
|
|
5214
|
-
const prevPanelVisibleRef =
|
|
5215
|
-
|
|
5147
|
+
const prevPanelVisibleRef = React22.useRef(null);
|
|
5148
|
+
React22.useEffect(() => {
|
|
5216
5149
|
if (prevPanelVisibleRef.current !== panelVisible) {
|
|
5217
5150
|
prevPanelVisibleRef.current = panelVisible;
|
|
5218
5151
|
onPanelOpenChange == null ? void 0 : onPanelOpenChange(panelVisible);
|
|
@@ -5256,9 +5189,29 @@ function Sidebar({
|
|
|
5256
5189
|
className: "flex flex-col items-center",
|
|
5257
5190
|
onMouseEnter: (e) => {
|
|
5258
5191
|
var _a2;
|
|
5259
|
-
return (_a2 = item.onHover) == null ? void 0 : _a2.call(item, e);
|
|
5192
|
+
return !item.disabled && ((_a2 = item.onHover) == null ? void 0 : _a2.call(item, e));
|
|
5260
5193
|
},
|
|
5261
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5194
|
+
children: item.disabled ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5195
|
+
"div",
|
|
5196
|
+
{
|
|
5197
|
+
className: "flex flex-col items-center cursor-not-allowed opacity-40",
|
|
5198
|
+
style: { gap: "4px" },
|
|
5199
|
+
"aria-disabled": "true",
|
|
5200
|
+
children: [
|
|
5201
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5202
|
+
"div",
|
|
5203
|
+
{
|
|
5204
|
+
className: cn(
|
|
5205
|
+
"relative flex items-center justify-center rounded-md",
|
|
5206
|
+
iconContainerClass
|
|
5207
|
+
),
|
|
5208
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex items-center justify-center size-5 shrink-0 [&_svg]:size-full", children: item.icon })
|
|
5209
|
+
}
|
|
5210
|
+
),
|
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-2xs leading-xs text-foreground text-center tracking-tight whitespace-nowrap", children: item.title })
|
|
5212
|
+
]
|
|
5213
|
+
}
|
|
5214
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5262
5215
|
SidebarLink,
|
|
5263
5216
|
{
|
|
5264
5217
|
href: item.href,
|
|
@@ -5300,7 +5253,7 @@ function Sidebar({
|
|
|
5300
5253
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex flex-col flex-1 items-center justify-end min-h-0 min-w-0 px-4 py-3 gap-3 w-full", children: utilities == null ? void 0 : utilities.map((util) => {
|
|
5301
5254
|
var _a2, _b2;
|
|
5302
5255
|
if (util.popover) {
|
|
5303
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(React22.Fragment, { children: util.popover }, util.id);
|
|
5304
5257
|
}
|
|
5305
5258
|
return util.href ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5306
5259
|
Tooltip,
|
|
@@ -5459,10 +5412,10 @@ function Skeleton(_a) {
|
|
|
5459
5412
|
}
|
|
5460
5413
|
|
|
5461
5414
|
// src/components/ui/slider.tsx
|
|
5462
|
-
var
|
|
5415
|
+
var React23 = __toESM(require("react"));
|
|
5463
5416
|
var import_radix_ui15 = require("radix-ui");
|
|
5464
5417
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5465
|
-
var Slider =
|
|
5418
|
+
var Slider = React23.forwardRef(
|
|
5466
5419
|
(_a, ref) => {
|
|
5467
5420
|
var _b = _a, {
|
|
5468
5421
|
className,
|
|
@@ -5482,15 +5435,15 @@ var Slider = React22.forwardRef(
|
|
|
5482
5435
|
"onValueCommit"
|
|
5483
5436
|
]);
|
|
5484
5437
|
var _a2;
|
|
5485
|
-
const [displayValues, setDisplayValues] =
|
|
5438
|
+
const [displayValues, setDisplayValues] = React23.useState(
|
|
5486
5439
|
(_a2 = valueProp != null ? valueProp : defaultValue) != null ? _a2 : [0]
|
|
5487
5440
|
);
|
|
5488
|
-
const [visibleSet, setVisibleSet] =
|
|
5489
|
-
const hideTimers =
|
|
5490
|
-
|
|
5441
|
+
const [visibleSet, setVisibleSet] = React23.useState(/* @__PURE__ */ new Set());
|
|
5442
|
+
const hideTimers = React23.useRef(/* @__PURE__ */ new Map());
|
|
5443
|
+
React23.useEffect(() => {
|
|
5491
5444
|
if (valueProp !== void 0) setDisplayValues(valueProp);
|
|
5492
5445
|
}, [valueProp]);
|
|
5493
|
-
|
|
5446
|
+
React23.useEffect(
|
|
5494
5447
|
() => () => hideTimers.current.forEach((t) => clearTimeout(t)),
|
|
5495
5448
|
[]
|
|
5496
5449
|
);
|
|
@@ -5510,7 +5463,7 @@ var Slider = React22.forwardRef(
|
|
|
5510
5463
|
}, delay);
|
|
5511
5464
|
hideTimers.current.set(i, t);
|
|
5512
5465
|
};
|
|
5513
|
-
const prevValuesRef =
|
|
5466
|
+
const prevValuesRef = React23.useRef(displayValues);
|
|
5514
5467
|
const handleValueChange = (newVals) => {
|
|
5515
5468
|
newVals.forEach((v, i) => {
|
|
5516
5469
|
if (v !== prevValuesRef.current[i]) showThumb(i);
|
|
@@ -5762,10 +5715,7 @@ function Tabs({
|
|
|
5762
5715
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5763
5716
|
"div",
|
|
5764
5717
|
{
|
|
5765
|
-
className: cn(
|
|
5766
|
-
"flex w-full items-center border-b border-border",
|
|
5767
|
-
className
|
|
5768
|
-
),
|
|
5718
|
+
className: cn("flex w-full items-end", className),
|
|
5769
5719
|
children: [
|
|
5770
5720
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("flex items-center", block && "flex-1"), children: allTabs.map((tab) => {
|
|
5771
5721
|
const isActive = tab.value === current;
|
|
@@ -5775,16 +5725,16 @@ function Tabs({
|
|
|
5775
5725
|
type: "button",
|
|
5776
5726
|
onClick: () => onTabChange(tab.value),
|
|
5777
5727
|
className: cn(
|
|
5778
|
-
"cursor-pointer
|
|
5728
|
+
"cursor-pointer px-3 py-2 text-sm tracking-tight transition-colors",
|
|
5779
5729
|
block && "flex-1",
|
|
5780
|
-
isActive ? "border-b-2 border-foreground font-semibold text-foreground" : "font-medium text-muted-foreground hover:text-foreground"
|
|
5730
|
+
isActive ? "border-b-2 border-foreground font-semibold text-foreground" : "border-b border-border font-medium text-muted-foreground hover:text-foreground"
|
|
5781
5731
|
),
|
|
5782
5732
|
children: tab.label
|
|
5783
5733
|
},
|
|
5784
5734
|
tab.value
|
|
5785
5735
|
);
|
|
5786
5736
|
}) }),
|
|
5787
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "ml-auto flex items-center
|
|
5737
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "ml-auto flex items-center", children: activeRightContents })
|
|
5788
5738
|
]
|
|
5789
5739
|
}
|
|
5790
5740
|
);
|
|
@@ -6039,11 +5989,11 @@ function SwitchField(_a) {
|
|
|
6039
5989
|
}
|
|
6040
5990
|
|
|
6041
5991
|
// src/components/ui/table.tsx
|
|
6042
|
-
var
|
|
5992
|
+
var React27 = __toESM(require("react"));
|
|
6043
5993
|
var import_react_table = require("@tanstack/react-table");
|
|
6044
5994
|
|
|
6045
5995
|
// src/components/ui/pagination.tsx
|
|
6046
|
-
var
|
|
5996
|
+
var React26 = __toESM(require("react"));
|
|
6047
5997
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6048
5998
|
function getVisiblePageItems(currentPage, totalPages) {
|
|
6049
5999
|
if (totalPages <= 5) {
|
|
@@ -6083,7 +6033,7 @@ function PaginationRoot(_a) {
|
|
|
6083
6033
|
}, props)
|
|
6084
6034
|
);
|
|
6085
6035
|
}
|
|
6086
|
-
var PaginationContent =
|
|
6036
|
+
var PaginationContent = React26.forwardRef((_a, ref) => {
|
|
6087
6037
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6088
6038
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6089
6039
|
"ul",
|
|
@@ -6094,7 +6044,7 @@ var PaginationContent = React25.forwardRef((_a, ref) => {
|
|
|
6094
6044
|
);
|
|
6095
6045
|
});
|
|
6096
6046
|
PaginationContent.displayName = "PaginationContent";
|
|
6097
|
-
var PaginationItem =
|
|
6047
|
+
var PaginationItem = React26.forwardRef((_a, ref) => {
|
|
6098
6048
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6099
6049
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("li", __spreadValues({ ref, className: cn("", className) }, props));
|
|
6100
6050
|
});
|
|
@@ -6257,13 +6207,13 @@ function Pagination({
|
|
|
6257
6207
|
// src/components/ui/table.tsx
|
|
6258
6208
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6259
6209
|
function EllipsisCell({ rendered, tooltip }) {
|
|
6260
|
-
const [el, setEl] =
|
|
6261
|
-
const [overflowing, setOverflowing] =
|
|
6210
|
+
const [el, setEl] = React27.useState(null);
|
|
6211
|
+
const [overflowing, setOverflowing] = React27.useState(false);
|
|
6262
6212
|
const isPrimitiveText = typeof rendered === "string" || typeof rendered === "number";
|
|
6263
|
-
const refCallback =
|
|
6213
|
+
const refCallback = React27.useCallback((node) => {
|
|
6264
6214
|
setEl(node);
|
|
6265
6215
|
}, []);
|
|
6266
|
-
|
|
6216
|
+
React27.useLayoutEffect(() => {
|
|
6267
6217
|
if (!el) return;
|
|
6268
6218
|
const check = () => {
|
|
6269
6219
|
const selfOverflow = el.scrollWidth > el.clientWidth;
|
|
@@ -6319,6 +6269,9 @@ function SortIcon({ direction }) {
|
|
|
6319
6269
|
}
|
|
6320
6270
|
);
|
|
6321
6271
|
}
|
|
6272
|
+
function isEmptyConfig(value) {
|
|
6273
|
+
return typeof value === "object" && value !== null && !React27.isValidElement(value) && "description" in value;
|
|
6274
|
+
}
|
|
6322
6275
|
function Table({
|
|
6323
6276
|
columns,
|
|
6324
6277
|
data,
|
|
@@ -6326,21 +6279,23 @@ function Table({
|
|
|
6326
6279
|
pagination,
|
|
6327
6280
|
defaultSorting,
|
|
6328
6281
|
loading = false,
|
|
6282
|
+
empty,
|
|
6329
6283
|
enableRowSelection,
|
|
6330
6284
|
rowSelection: rowSelectionProp,
|
|
6331
6285
|
onRowSelectionChange,
|
|
6332
6286
|
rowActions,
|
|
6333
6287
|
onRowClick,
|
|
6288
|
+
isRowDisabled,
|
|
6334
6289
|
onSortingChange,
|
|
6335
6290
|
className,
|
|
6336
6291
|
maxHeight
|
|
6337
6292
|
}) {
|
|
6338
6293
|
var _a, _b, _c;
|
|
6339
|
-
const getRowKey =
|
|
6294
|
+
const getRowKey = React27.useCallback(
|
|
6340
6295
|
(row) => typeof rowKey === "function" ? rowKey(row) : String(row[rowKey]),
|
|
6341
6296
|
[rowKey]
|
|
6342
6297
|
);
|
|
6343
|
-
const [internalRowSelection, setInternalRowSelection] =
|
|
6298
|
+
const [internalRowSelection, setInternalRowSelection] = React27.useState({});
|
|
6344
6299
|
const isControlledSelection = rowSelectionProp !== void 0;
|
|
6345
6300
|
const effectiveRowSelection = isControlledSelection ? rowSelectionProp : internalRowSelection;
|
|
6346
6301
|
const handleRowSelectionChange = (updater) => {
|
|
@@ -6351,7 +6306,7 @@ function Table({
|
|
|
6351
6306
|
}
|
|
6352
6307
|
onRowSelectionChange == null ? void 0 : onRowSelectionChange(updater);
|
|
6353
6308
|
};
|
|
6354
|
-
const [sorting, setSorting] =
|
|
6309
|
+
const [sorting, setSorting] = React27.useState(
|
|
6355
6310
|
() => {
|
|
6356
6311
|
var _a2;
|
|
6357
6312
|
return (_a2 = defaultSorting == null ? void 0 : defaultSorting.map(({ key, desc }) => ({
|
|
@@ -6360,7 +6315,7 @@ function Table({
|
|
|
6360
6315
|
}))) != null ? _a2 : [];
|
|
6361
6316
|
}
|
|
6362
6317
|
);
|
|
6363
|
-
const handleSortingChange =
|
|
6318
|
+
const handleSortingChange = React27.useCallback(
|
|
6364
6319
|
(updater) => {
|
|
6365
6320
|
setSorting((prev) => {
|
|
6366
6321
|
const next = typeof updater === "function" ? updater(prev) : updater;
|
|
@@ -6370,11 +6325,11 @@ function Table({
|
|
|
6370
6325
|
},
|
|
6371
6326
|
[onSortingChange]
|
|
6372
6327
|
);
|
|
6373
|
-
const [internalPagination, setInternalPagination] =
|
|
6328
|
+
const [internalPagination, setInternalPagination] = React27.useState({
|
|
6374
6329
|
pageIndex: ((_a = pagination == null ? void 0 : pagination.currentPage) != null ? _a : 1) - 1,
|
|
6375
6330
|
pageSize: (_b = pagination == null ? void 0 : pagination.pageSize) != null ? _b : 10
|
|
6376
6331
|
});
|
|
6377
|
-
|
|
6332
|
+
React27.useEffect(() => {
|
|
6378
6333
|
if ((pagination == null ? void 0 : pagination.currentPage) !== void 0) {
|
|
6379
6334
|
setInternalPagination((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6380
6335
|
pageIndex: pagination.currentPage - 1
|
|
@@ -6388,7 +6343,7 @@ function Table({
|
|
|
6388
6343
|
(_a2 = pagination == null ? void 0 : pagination.onPageChange) == null ? void 0 : _a2.call(pagination, next.pageIndex + 1);
|
|
6389
6344
|
};
|
|
6390
6345
|
const isSelectionActive = enableRowSelection === true;
|
|
6391
|
-
const selectionColumn =
|
|
6346
|
+
const selectionColumn = React27.useMemo(
|
|
6392
6347
|
() => ({
|
|
6393
6348
|
id: "__select__",
|
|
6394
6349
|
header: "__select_header__",
|
|
@@ -6397,6 +6352,7 @@ function Table({
|
|
|
6397
6352
|
Checkbox,
|
|
6398
6353
|
{
|
|
6399
6354
|
checked: row.getIsSelected(),
|
|
6355
|
+
disabled: !row.getCanSelect(),
|
|
6400
6356
|
onCheckedChange: (checked) => row.toggleSelected(!!checked),
|
|
6401
6357
|
"aria-label": "\uD589 \uC120\uD0DD",
|
|
6402
6358
|
onClick: (e) => e.stopPropagation()
|
|
@@ -6406,7 +6362,7 @@ function Table({
|
|
|
6406
6362
|
}),
|
|
6407
6363
|
[]
|
|
6408
6364
|
);
|
|
6409
|
-
const rowActionsColumn =
|
|
6365
|
+
const rowActionsColumn = React27.useMemo(
|
|
6410
6366
|
() => ({
|
|
6411
6367
|
id: "__row_actions__",
|
|
6412
6368
|
header: "",
|
|
@@ -6415,7 +6371,7 @@ function Table({
|
|
|
6415
6371
|
}),
|
|
6416
6372
|
[rowActions]
|
|
6417
6373
|
);
|
|
6418
|
-
const tanstackColumns =
|
|
6374
|
+
const tanstackColumns = React27.useMemo(
|
|
6419
6375
|
() => [
|
|
6420
6376
|
...isSelectionActive ? [selectionColumn] : [],
|
|
6421
6377
|
...columns.map((col) => {
|
|
@@ -6442,7 +6398,7 @@ function Table({
|
|
|
6442
6398
|
getRowId: (row) => getRowKey(row),
|
|
6443
6399
|
onSortingChange: handleSortingChange
|
|
6444
6400
|
}, hasPagination && { onPaginationChange: handlePaginationChange }), isSelectionActive && {
|
|
6445
|
-
enableRowSelection: true,
|
|
6401
|
+
enableRowSelection: isRowDisabled ? (row) => !isRowDisabled(row.original) : true,
|
|
6446
6402
|
onRowSelectionChange: handleRowSelectionChange
|
|
6447
6403
|
}), {
|
|
6448
6404
|
getCoreRowModel: (0, import_react_table.getCoreRowModel)(),
|
|
@@ -6454,7 +6410,7 @@ function Table({
|
|
|
6454
6410
|
}), (pagination == null ? void 0 : pagination.rowCount) !== void 0 && {
|
|
6455
6411
|
rowCount: pagination.rowCount
|
|
6456
6412
|
}));
|
|
6457
|
-
const colMap =
|
|
6413
|
+
const colMap = React27.useMemo(
|
|
6458
6414
|
() => Object.fromEntries(
|
|
6459
6415
|
columns.map((c) => {
|
|
6460
6416
|
var _a2, _b2, _c2, _d;
|
|
@@ -6551,81 +6507,87 @@ function Table({
|
|
|
6551
6507
|
name: "loader-2",
|
|
6552
6508
|
className: "mx-auto size-6 animate-spin text-muted-foreground"
|
|
6553
6509
|
}
|
|
6554
|
-
) }) }) : table.getRowModel().rows.
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
isSelectionActive && row.
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6510
|
+
) }) }) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { colSpan: colCount, children: empty === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: "No Data" }) : isEmptyConfig(empty) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: empty.description }) : empty }) }) : table.getRowModel().rows.map((row) => {
|
|
6511
|
+
var _a2;
|
|
6512
|
+
const rowDisabled = (_a2 = isRowDisabled == null ? void 0 : isRowDisabled(row.original)) != null ? _a2 : false;
|
|
6513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6514
|
+
"tr",
|
|
6515
|
+
{
|
|
6516
|
+
"aria-disabled": rowDisabled || void 0,
|
|
6517
|
+
onClick: !isSelectionActive && onRowClick && !rowDisabled ? () => onRowClick(row.original) : void 0,
|
|
6518
|
+
className: cn(
|
|
6519
|
+
"group border-b border-border transition-colors hover:bg-accent/50 last:border-b-0",
|
|
6520
|
+
!isSelectionActive && onRowClick && !rowDisabled && "cursor-pointer",
|
|
6521
|
+
isSelectionActive && row.getIsSelected() && "bg-accent/30",
|
|
6522
|
+
rowDisabled && "cursor-not-allowed [&_td]:text-muted-foreground"
|
|
6523
|
+
),
|
|
6524
|
+
children: row.getVisibleCells().map((cell) => {
|
|
6525
|
+
var _a3;
|
|
6526
|
+
if (cell.column.id === "__select__") {
|
|
6527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: (0, import_react_table.flexRender)(
|
|
6528
|
+
cell.column.columnDef.cell,
|
|
6529
|
+
cell.getContext()
|
|
6530
|
+
) }) }, cell.id);
|
|
6531
|
+
}
|
|
6532
|
+
if (cell.column.id === "__row_actions__") {
|
|
6533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6534
|
+
"td",
|
|
6535
|
+
{
|
|
6536
|
+
className: "w-12 px-2 py-4 align-middle text-right",
|
|
6537
|
+
children: (0, import_react_table.flexRender)(
|
|
6538
|
+
cell.column.columnDef.cell,
|
|
6539
|
+
cell.getContext()
|
|
6540
|
+
)
|
|
6541
|
+
},
|
|
6542
|
+
cell.id
|
|
6543
|
+
);
|
|
6544
|
+
}
|
|
6545
|
+
const {
|
|
6546
|
+
align,
|
|
6547
|
+
cellCls,
|
|
6548
|
+
ellipsis,
|
|
6549
|
+
ellipsisTooltip,
|
|
6550
|
+
cellFn
|
|
6551
|
+
} = (_a3 = colMap[cell.column.id]) != null ? _a3 : {
|
|
6552
|
+
align: "left",
|
|
6553
|
+
cellCls: "",
|
|
6554
|
+
ellipsis: false,
|
|
6555
|
+
ellipsisTooltip: void 0,
|
|
6556
|
+
cellFn: () => null
|
|
6557
|
+
};
|
|
6558
|
+
const rendered = (0, import_react_table.flexRender)(
|
|
6567
6559
|
cell.column.columnDef.cell,
|
|
6568
6560
|
cell.getContext()
|
|
6569
|
-
)
|
|
6570
|
-
|
|
6571
|
-
|
|
6561
|
+
);
|
|
6562
|
+
const rawContent = ellipsis ? cellFn(row.original) : null;
|
|
6563
|
+
const cellContent = ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6564
|
+
EllipsisCell,
|
|
6565
|
+
{
|
|
6566
|
+
rendered: rawContent,
|
|
6567
|
+
tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
|
|
6568
|
+
}
|
|
6569
|
+
) : rendered;
|
|
6572
6570
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6573
6571
|
"td",
|
|
6574
6572
|
{
|
|
6575
|
-
className:
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6573
|
+
className: cn(
|
|
6574
|
+
"px-2 py-4 text-sm leading-none text-foreground align-middle",
|
|
6575
|
+
align === "center" && "text-center",
|
|
6576
|
+
align === "right" && "text-right",
|
|
6577
|
+
// ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
|
|
6578
|
+
// overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
|
|
6579
|
+
ellipsis && "max-w-0 overflow-hidden",
|
|
6580
|
+
cellCls
|
|
6581
|
+
),
|
|
6582
|
+
children: cellContent
|
|
6580
6583
|
},
|
|
6581
6584
|
cell.id
|
|
6582
6585
|
);
|
|
6583
|
-
}
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
ellipsisTooltip,
|
|
6589
|
-
cellFn
|
|
6590
|
-
} = (_a2 = colMap[cell.column.id]) != null ? _a2 : {
|
|
6591
|
-
align: "left",
|
|
6592
|
-
cellCls: "",
|
|
6593
|
-
ellipsis: false,
|
|
6594
|
-
ellipsisTooltip: void 0,
|
|
6595
|
-
cellFn: () => null
|
|
6596
|
-
};
|
|
6597
|
-
const rendered = (0, import_react_table.flexRender)(
|
|
6598
|
-
cell.column.columnDef.cell,
|
|
6599
|
-
cell.getContext()
|
|
6600
|
-
);
|
|
6601
|
-
const rawContent = ellipsis ? cellFn(row.original) : null;
|
|
6602
|
-
const cellContent = ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6603
|
-
EllipsisCell,
|
|
6604
|
-
{
|
|
6605
|
-
rendered: rawContent,
|
|
6606
|
-
tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
|
|
6607
|
-
}
|
|
6608
|
-
) : rendered;
|
|
6609
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6610
|
-
"td",
|
|
6611
|
-
{
|
|
6612
|
-
className: cn(
|
|
6613
|
-
"px-2 py-4 text-sm leading-none text-foreground align-middle",
|
|
6614
|
-
align === "center" && "text-center",
|
|
6615
|
-
align === "right" && "text-right",
|
|
6616
|
-
// ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
|
|
6617
|
-
// overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
|
|
6618
|
-
ellipsis && "max-w-0 overflow-hidden",
|
|
6619
|
-
cellCls
|
|
6620
|
-
),
|
|
6621
|
-
children: cellContent
|
|
6622
|
-
},
|
|
6623
|
-
cell.id
|
|
6624
|
-
);
|
|
6625
|
-
})
|
|
6626
|
-
},
|
|
6627
|
-
getRowKey(row.original)
|
|
6628
|
-
)) })
|
|
6586
|
+
})
|
|
6587
|
+
},
|
|
6588
|
+
getRowKey(row.original)
|
|
6589
|
+
);
|
|
6590
|
+
}) })
|
|
6629
6591
|
] })
|
|
6630
6592
|
}
|
|
6631
6593
|
),
|
|
@@ -6641,12 +6603,12 @@ function Table({
|
|
|
6641
6603
|
}
|
|
6642
6604
|
|
|
6643
6605
|
// src/components/ui/user-message-bubble.tsx
|
|
6644
|
-
var
|
|
6606
|
+
var React28 = __toESM(require("react"));
|
|
6645
6607
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6646
6608
|
function UserMessageBubble({ content }) {
|
|
6647
|
-
const textRef =
|
|
6648
|
-
const [multiLine, setMultiLine] =
|
|
6649
|
-
|
|
6609
|
+
const textRef = React28.useRef(null);
|
|
6610
|
+
const [multiLine, setMultiLine] = React28.useState(false);
|
|
6611
|
+
React28.useEffect(() => {
|
|
6650
6612
|
const el = textRef.current;
|
|
6651
6613
|
if (!el) return;
|
|
6652
6614
|
const check = () => setMultiLine(el.offsetHeight > 28);
|
|
@@ -9966,20 +9928,6 @@ function WordFileIcon({ className }) {
|
|
|
9966
9928
|
Drawer,
|
|
9967
9929
|
DriveIcon,
|
|
9968
9930
|
DropdownMenu,
|
|
9969
|
-
DropdownMenuCheckboxItem,
|
|
9970
|
-
DropdownMenuContent,
|
|
9971
|
-
DropdownMenuGroup,
|
|
9972
|
-
DropdownMenuItem,
|
|
9973
|
-
DropdownMenuLabel,
|
|
9974
|
-
DropdownMenuPortal,
|
|
9975
|
-
DropdownMenuRadioGroup,
|
|
9976
|
-
DropdownMenuRadioItem,
|
|
9977
|
-
DropdownMenuSeparator,
|
|
9978
|
-
DropdownMenuShortcut,
|
|
9979
|
-
DropdownMenuSub,
|
|
9980
|
-
DropdownMenuSubContent,
|
|
9981
|
-
DropdownMenuSubTrigger,
|
|
9982
|
-
DropdownMenuTrigger,
|
|
9983
9931
|
Empty,
|
|
9984
9932
|
EmptyTrayIcon,
|
|
9985
9933
|
Field,
|