@ai-matrx/design-system 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +217 -0
- package/README.md +16 -0
- package/dist/index.cjs +489 -383
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +184 -9
- package/dist/index.d.ts +184 -9
- package/dist/index.js +454 -348
- package/dist/index.js.map +1 -1
- package/dist/styles.css +474 -0
- package/dist/tokens.css +25 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/index.ts
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
|
+
ALL_MOTION_CLASSES: () => ALL_MOTION_CLASSES,
|
|
34
35
|
Accordion: () => Accordion,
|
|
35
36
|
AccordionContent: () => AccordionContent,
|
|
36
37
|
AccordionItem: () => AccordionItem,
|
|
@@ -138,6 +139,7 @@ __export(src_exports, {
|
|
|
138
139
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
139
140
|
EditableLabel: () => EditableLabel,
|
|
140
141
|
EnterInput: () => EnterInput,
|
|
142
|
+
FORBIDDEN_HOST_MOTION_UTILITIES: () => FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
141
143
|
HoverCard: () => HoverCard,
|
|
142
144
|
HoverCardContent: () => HoverCardContent,
|
|
143
145
|
HoverCardTrigger: () => HoverCardTrigger,
|
|
@@ -145,6 +147,13 @@ __export(src_exports, {
|
|
|
145
147
|
InputWithPrefix: () => InputWithPrefix,
|
|
146
148
|
Label: () => Label3,
|
|
147
149
|
MOBILE_BREAKPOINT: () => MOBILE_BREAKPOINT,
|
|
150
|
+
MOTION_BOTTOM_SHEET: () => MOTION_BOTTOM_SHEET,
|
|
151
|
+
MOTION_DIALOG: () => MOTION_DIALOG,
|
|
152
|
+
MOTION_OVERLAY: () => MOTION_OVERLAY,
|
|
153
|
+
MOTION_POPPER: () => MOTION_POPPER,
|
|
154
|
+
MOTION_PULSE: () => MOTION_PULSE,
|
|
155
|
+
MOTION_SHEET: () => MOTION_SHEET,
|
|
156
|
+
MOTION_SPIN: () => MOTION_SPIN,
|
|
148
157
|
OverflowToolbar: () => OverflowToolbar,
|
|
149
158
|
Popover: () => Popover,
|
|
150
159
|
PopoverAnchor: () => PopoverAnchor,
|
|
@@ -938,6 +947,45 @@ var Button = React5.forwardRef(
|
|
|
938
947
|
);
|
|
939
948
|
Button.displayName = "Button";
|
|
940
949
|
|
|
950
|
+
// src/motion.ts
|
|
951
|
+
var MOTION_OVERLAY = "matrx-motion-overlay";
|
|
952
|
+
var MOTION_DIALOG = "matrx-motion-dialog";
|
|
953
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
954
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
955
|
+
var MOTION_SHEET = {
|
|
956
|
+
top: "matrx-motion-sheet-top",
|
|
957
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
958
|
+
left: "matrx-motion-sheet-left",
|
|
959
|
+
right: "matrx-motion-sheet-right",
|
|
960
|
+
center: "matrx-motion-sheet-center"
|
|
961
|
+
};
|
|
962
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
963
|
+
var MOTION_SPIN = "matrx-spin";
|
|
964
|
+
var ALL_MOTION_CLASSES = [
|
|
965
|
+
MOTION_OVERLAY,
|
|
966
|
+
MOTION_DIALOG,
|
|
967
|
+
MOTION_BOTTOM_SHEET,
|
|
968
|
+
MOTION_POPPER,
|
|
969
|
+
...Object.values(MOTION_SHEET),
|
|
970
|
+
MOTION_PULSE,
|
|
971
|
+
MOTION_SPIN
|
|
972
|
+
];
|
|
973
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
974
|
+
"animate-in",
|
|
975
|
+
"animate-out",
|
|
976
|
+
"fade-in",
|
|
977
|
+
"fade-out",
|
|
978
|
+
"zoom-in",
|
|
979
|
+
"zoom-out",
|
|
980
|
+
"slide-in-from",
|
|
981
|
+
"slide-out-to",
|
|
982
|
+
"animate-accordion",
|
|
983
|
+
"animate-slide-down",
|
|
984
|
+
"animate-slide-up",
|
|
985
|
+
"animate-pulse",
|
|
986
|
+
"animate-spin"
|
|
987
|
+
];
|
|
988
|
+
|
|
941
989
|
// src/portal-container.tsx
|
|
942
990
|
var React6 = __toESM(require("react"), 1);
|
|
943
991
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
@@ -976,7 +1024,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
976
1024
|
ref,
|
|
977
1025
|
"data-slot": "alert-dialog-overlay",
|
|
978
1026
|
className: cn(
|
|
979
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
1027
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
1028
|
+
MOTION_OVERLAY,
|
|
980
1029
|
className
|
|
981
1030
|
),
|
|
982
1031
|
...props
|
|
@@ -995,7 +1044,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
995
1044
|
}
|
|
996
1045
|
));
|
|
997
1046
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
998
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1047
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
999
1048
|
const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, AlertDialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, AlertDialogPrimitive.Description);
|
|
1000
1049
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(AlertDialogPortal, { container, children: [
|
|
1001
1050
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialogOverlay, {}),
|
|
@@ -1005,11 +1054,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
1005
1054
|
ref,
|
|
1006
1055
|
"data-slot": "alert-dialog-content",
|
|
1007
1056
|
className: cn(
|
|
1008
|
-
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg
|
|
1057
|
+
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
|
|
1009
1058
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
1010
1059
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
1011
1060
|
"max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
|
|
1012
|
-
"
|
|
1061
|
+
"sm:rounded-lg",
|
|
1062
|
+
animated && MOTION_DIALOG,
|
|
1013
1063
|
className
|
|
1014
1064
|
),
|
|
1015
1065
|
...props,
|
|
@@ -1283,22 +1333,36 @@ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
|
1283
1333
|
|
|
1284
1334
|
// src/collapsible.tsx
|
|
1285
1335
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"), 1);
|
|
1336
|
+
var React11 = __toESM(require("react"), 1);
|
|
1337
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1286
1338
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
1287
1339
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
1288
|
-
var CollapsibleContent2 =
|
|
1340
|
+
var CollapsibleContent2 = React11.forwardRef(({ className, animated = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1341
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
1342
|
+
{
|
|
1343
|
+
ref,
|
|
1344
|
+
"data-slot": "collapsible-content",
|
|
1345
|
+
className: cn(
|
|
1346
|
+
animated && "matrx-collapsible-content overflow-hidden",
|
|
1347
|
+
className
|
|
1348
|
+
),
|
|
1349
|
+
...props
|
|
1350
|
+
}
|
|
1351
|
+
));
|
|
1352
|
+
CollapsibleContent2.displayName = "CollapsibleContent";
|
|
1289
1353
|
|
|
1290
1354
|
// src/command.tsx
|
|
1291
1355
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1292
1356
|
var import_cmdk = require("cmdk");
|
|
1293
|
-
var
|
|
1357
|
+
var React13 = __toESM(require("react"), 1);
|
|
1294
1358
|
|
|
1295
1359
|
// src/use-is-mobile.ts
|
|
1296
|
-
var
|
|
1360
|
+
var React12 = __toESM(require("react"), 1);
|
|
1297
1361
|
var MOBILE_BREAKPOINT = 768;
|
|
1298
1362
|
function useIsMobile() {
|
|
1299
|
-
const [isMobile, setIsMobile] =
|
|
1300
|
-
const [hasMounted, setHasMounted] =
|
|
1301
|
-
|
|
1363
|
+
const [isMobile, setIsMobile] = React12.useState(false);
|
|
1364
|
+
const [hasMounted, setHasMounted] = React12.useState(false);
|
|
1365
|
+
React12.useEffect(() => {
|
|
1302
1366
|
setHasMounted(true);
|
|
1303
1367
|
const onChange = () => {
|
|
1304
1368
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1318,8 +1382,8 @@ function useIsMobile() {
|
|
|
1318
1382
|
}
|
|
1319
1383
|
|
|
1320
1384
|
// src/command.tsx
|
|
1321
|
-
var
|
|
1322
|
-
var Command =
|
|
1385
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1386
|
+
var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1323
1387
|
import_cmdk.Command,
|
|
1324
1388
|
{
|
|
1325
1389
|
ref,
|
|
@@ -1331,21 +1395,24 @@ var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1331
1395
|
}
|
|
1332
1396
|
));
|
|
1333
1397
|
Command.displayName = import_cmdk.Command.displayName;
|
|
1334
|
-
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1335
|
-
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1398
|
+
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
1399
|
+
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1336
1400
|
var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1337
|
-
var CommandDialogContent =
|
|
1401
|
+
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1338
1402
|
const isMobile = useIsMobile();
|
|
1339
1403
|
const isModal = useRadixDialogModal();
|
|
1340
1404
|
const portalContainer = usePortalContainer(container);
|
|
1341
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Portal, { container: portalContainer, children: [
|
|
1406
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1343
1407
|
DialogPrimitive.Overlay,
|
|
1344
1408
|
{
|
|
1345
|
-
className:
|
|
1409
|
+
className: cn(
|
|
1410
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1411
|
+
MOTION_OVERLAY
|
|
1412
|
+
)
|
|
1346
1413
|
}
|
|
1347
1414
|
) : null,
|
|
1348
|
-
/* @__PURE__ */ (0,
|
|
1415
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1349
1416
|
DialogPrimitive.Content,
|
|
1350
1417
|
{
|
|
1351
1418
|
ref,
|
|
@@ -1353,6 +1420,7 @@ var CommandDialogContent = React12.forwardRef(({ className, children, container,
|
|
|
1353
1420
|
"aria-describedby": void 0,
|
|
1354
1421
|
className: cn(
|
|
1355
1422
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1423
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1356
1424
|
className,
|
|
1357
1425
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1358
1426
|
!isModal && "z-[900]"
|
|
@@ -1360,9 +1428,9 @@ var CommandDialogContent = React12.forwardRef(({ className, children, container,
|
|
|
1360
1428
|
...props,
|
|
1361
1429
|
children: [
|
|
1362
1430
|
children,
|
|
1363
|
-
/* @__PURE__ */ (0,
|
|
1364
|
-
/* @__PURE__ */ (0,
|
|
1365
|
-
/* @__PURE__ */ (0,
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(XIcon, { className: "h-4 w-4" }),
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1366
1434
|
] })
|
|
1367
1435
|
]
|
|
1368
1436
|
}
|
|
@@ -1376,21 +1444,21 @@ var CommandDialog = ({
|
|
|
1376
1444
|
...props
|
|
1377
1445
|
}) => {
|
|
1378
1446
|
const modal = props.modal ?? true;
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPrimitive.Root, { ...props, modal, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1380
1448
|
CommandDialogContent,
|
|
1381
1449
|
{
|
|
1382
1450
|
className: "overflow-hidden p-0",
|
|
1383
1451
|
...container !== void 0 ? { container } : {},
|
|
1384
1452
|
children: [
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1453
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPrimitive.Title, { className: "sr-only" }),
|
|
1454
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
1387
1455
|
]
|
|
1388
1456
|
}
|
|
1389
1457
|
) }) });
|
|
1390
1458
|
};
|
|
1391
|
-
var CommandInput =
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1459
|
+
var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1394
1462
|
import_cmdk.Command.Input,
|
|
1395
1463
|
{
|
|
1396
1464
|
ref,
|
|
@@ -1403,7 +1471,7 @@ var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1403
1471
|
)
|
|
1404
1472
|
] }));
|
|
1405
1473
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
1406
|
-
var CommandList =
|
|
1474
|
+
var CommandList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1407
1475
|
import_cmdk.Command.List,
|
|
1408
1476
|
{
|
|
1409
1477
|
ref,
|
|
@@ -1412,7 +1480,7 @@ var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1412
1480
|
}
|
|
1413
1481
|
));
|
|
1414
1482
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
1415
|
-
var CommandEmpty =
|
|
1483
|
+
var CommandEmpty = React13.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1416
1484
|
import_cmdk.Command.Empty,
|
|
1417
1485
|
{
|
|
1418
1486
|
ref,
|
|
@@ -1421,7 +1489,7 @@ var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ (0, import
|
|
|
1421
1489
|
}
|
|
1422
1490
|
));
|
|
1423
1491
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
1424
|
-
var CommandGroup =
|
|
1492
|
+
var CommandGroup = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1425
1493
|
import_cmdk.Command.Group,
|
|
1426
1494
|
{
|
|
1427
1495
|
ref,
|
|
@@ -1433,7 +1501,7 @@ var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1433
1501
|
}
|
|
1434
1502
|
));
|
|
1435
1503
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
1436
|
-
var CommandSeparator =
|
|
1504
|
+
var CommandSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1437
1505
|
import_cmdk.Command.Separator,
|
|
1438
1506
|
{
|
|
1439
1507
|
ref,
|
|
@@ -1442,7 +1510,7 @@ var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1442
1510
|
}
|
|
1443
1511
|
));
|
|
1444
1512
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
1445
|
-
var CommandItem =
|
|
1513
|
+
var CommandItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1446
1514
|
import_cmdk.Command.Item,
|
|
1447
1515
|
{
|
|
1448
1516
|
ref,
|
|
@@ -1458,7 +1526,7 @@ var CommandShortcut = ({
|
|
|
1458
1526
|
className,
|
|
1459
1527
|
...props
|
|
1460
1528
|
}) => {
|
|
1461
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1462
1530
|
"span",
|
|
1463
1531
|
{
|
|
1464
1532
|
className: cn(
|
|
@@ -1473,8 +1541,8 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
1473
1541
|
|
|
1474
1542
|
// src/context-menu.tsx
|
|
1475
1543
|
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
1476
|
-
var
|
|
1477
|
-
var
|
|
1544
|
+
var React14 = __toESM(require("react"), 1);
|
|
1545
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1478
1546
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1479
1547
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1480
1548
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -1482,10 +1550,9 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1482
1550
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1483
1551
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1484
1552
|
var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1485
|
-
var MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
1486
1553
|
var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1487
1554
|
var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1488
|
-
var ContextMenuSubTrigger =
|
|
1555
|
+
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1489
1556
|
ContextMenuPrimitive.SubTrigger,
|
|
1490
1557
|
{
|
|
1491
1558
|
ref,
|
|
@@ -1498,35 +1565,35 @@ var ContextMenuSubTrigger = React13.forwardRef(({ className, inset, children, ..
|
|
|
1498
1565
|
...props,
|
|
1499
1566
|
children: [
|
|
1500
1567
|
children,
|
|
1501
|
-
/* @__PURE__ */ (0,
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1502
1569
|
]
|
|
1503
1570
|
}
|
|
1504
1571
|
));
|
|
1505
1572
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1506
|
-
var ContextMenuSubContent =
|
|
1573
|
+
var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1507
1574
|
ContextMenuPrimitive.SubContent,
|
|
1508
1575
|
{
|
|
1509
1576
|
ref,
|
|
1510
1577
|
"data-slot": "context-menu-sub-content",
|
|
1511
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1578
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1512
1579
|
...props
|
|
1513
1580
|
}
|
|
1514
1581
|
));
|
|
1515
1582
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1516
|
-
var ContextMenuContent =
|
|
1583
|
+
var ContextMenuContent = React14.forwardRef(({ className, container, ...props }, ref) => {
|
|
1517
1584
|
const portalContainer = usePortalContainer(container);
|
|
1518
|
-
return /* @__PURE__ */ (0,
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1519
1586
|
ContextMenuPrimitive.Content,
|
|
1520
1587
|
{
|
|
1521
1588
|
ref,
|
|
1522
1589
|
"data-slot": "context-menu-content",
|
|
1523
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1590
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1524
1591
|
...props
|
|
1525
1592
|
}
|
|
1526
1593
|
) });
|
|
1527
1594
|
});
|
|
1528
1595
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1529
|
-
var ContextMenuItem =
|
|
1596
|
+
var ContextMenuItem = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1530
1597
|
ContextMenuPrimitive.Item,
|
|
1531
1598
|
{
|
|
1532
1599
|
ref,
|
|
@@ -1541,7 +1608,7 @@ var ContextMenuItem = React13.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1541
1608
|
}
|
|
1542
1609
|
));
|
|
1543
1610
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1544
|
-
var ContextMenuCheckboxItem =
|
|
1611
|
+
var ContextMenuCheckboxItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1545
1612
|
ContextMenuPrimitive.CheckboxItem,
|
|
1546
1613
|
{
|
|
1547
1614
|
ref,
|
|
@@ -1549,13 +1616,13 @@ var ContextMenuCheckboxItem = React13.forwardRef(({ className, children, ...prop
|
|
|
1549
1616
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1550
1617
|
...props,
|
|
1551
1618
|
children: [
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1553
1620
|
children
|
|
1554
1621
|
]
|
|
1555
1622
|
}
|
|
1556
1623
|
));
|
|
1557
1624
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1558
|
-
var ContextMenuRadioItem =
|
|
1625
|
+
var ContextMenuRadioItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1559
1626
|
ContextMenuPrimitive.RadioItem,
|
|
1560
1627
|
{
|
|
1561
1628
|
ref,
|
|
@@ -1563,13 +1630,13 @@ var ContextMenuRadioItem = React13.forwardRef(({ className, children, ...props }
|
|
|
1563
1630
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1564
1631
|
...props,
|
|
1565
1632
|
children: [
|
|
1566
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1567
1634
|
children
|
|
1568
1635
|
]
|
|
1569
1636
|
}
|
|
1570
1637
|
));
|
|
1571
1638
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1572
|
-
var ContextMenuLabel =
|
|
1639
|
+
var ContextMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1573
1640
|
ContextMenuPrimitive.Label,
|
|
1574
1641
|
{
|
|
1575
1642
|
ref,
|
|
@@ -1583,7 +1650,7 @@ var ContextMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1583
1650
|
}
|
|
1584
1651
|
));
|
|
1585
1652
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1586
|
-
var ContextMenuSeparator =
|
|
1653
|
+
var ContextMenuSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1587
1654
|
ContextMenuPrimitive.Separator,
|
|
1588
1655
|
{
|
|
1589
1656
|
ref,
|
|
@@ -1596,7 +1663,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
|
1596
1663
|
var ContextMenuShortcut = ({
|
|
1597
1664
|
className,
|
|
1598
1665
|
...props
|
|
1599
|
-
}) => /* @__PURE__ */ (0,
|
|
1666
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1600
1667
|
"span",
|
|
1601
1668
|
{
|
|
1602
1669
|
"data-slot": "context-menu-shortcut",
|
|
@@ -1611,15 +1678,22 @@ var import_react = require("react");
|
|
|
1611
1678
|
|
|
1612
1679
|
// src/popover.tsx
|
|
1613
1680
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1614
|
-
var
|
|
1615
|
-
var
|
|
1681
|
+
var React15 = __toESM(require("react"), 1);
|
|
1682
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1616
1683
|
var Popover = PopoverPrimitive.Root;
|
|
1617
1684
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1618
1685
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1619
|
-
var PopoverContent =
|
|
1620
|
-
({
|
|
1686
|
+
var PopoverContent = React15.forwardRef(
|
|
1687
|
+
({
|
|
1688
|
+
className,
|
|
1689
|
+
align = "center",
|
|
1690
|
+
sideOffset = 4,
|
|
1691
|
+
container,
|
|
1692
|
+
animated = true,
|
|
1693
|
+
...props
|
|
1694
|
+
}, ref) => {
|
|
1621
1695
|
const portalContainer = usePortalContainer(container);
|
|
1622
|
-
return /* @__PURE__ */ (0,
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1623
1697
|
PopoverPrimitive.Content,
|
|
1624
1698
|
{
|
|
1625
1699
|
ref,
|
|
@@ -1632,7 +1706,8 @@ var PopoverContent = React14.forwardRef(
|
|
|
1632
1706
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1633
1707
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1634
1708
|
// dialog. z-[10001] buried dialogs behind fullscreen popovers.
|
|
1635
|
-
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
1709
|
+
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
1710
|
+
animated && MOTION_POPPER,
|
|
1636
1711
|
className
|
|
1637
1712
|
),
|
|
1638
1713
|
...props
|
|
@@ -1643,7 +1718,7 @@ var PopoverContent = React14.forwardRef(
|
|
|
1643
1718
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1644
1719
|
|
|
1645
1720
|
// src/creatable-picker.tsx
|
|
1646
|
-
var
|
|
1721
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1647
1722
|
function article(noun) {
|
|
1648
1723
|
return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
|
|
1649
1724
|
}
|
|
@@ -1718,8 +1793,8 @@ function CreatablePicker({
|
|
|
1718
1793
|
setBusy(false);
|
|
1719
1794
|
}
|
|
1720
1795
|
};
|
|
1721
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
-
/* @__PURE__ */ (0,
|
|
1796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1723
1798
|
"button",
|
|
1724
1799
|
{
|
|
1725
1800
|
type: "button",
|
|
@@ -1733,12 +1808,12 @@ function CreatablePicker({
|
|
|
1733
1808
|
triggerClassName
|
|
1734
1809
|
),
|
|
1735
1810
|
children: [
|
|
1736
|
-
/* @__PURE__ */ (0,
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
|
|
1738
1813
|
]
|
|
1739
1814
|
}
|
|
1740
1815
|
) }),
|
|
1741
|
-
/* @__PURE__ */ (0,
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1742
1817
|
Command,
|
|
1743
1818
|
{
|
|
1744
1819
|
filter: (itemValue, search, keywords) => {
|
|
@@ -1746,7 +1821,7 @@ function CreatablePicker({
|
|
|
1746
1821
|
return haystack.includes(search.toLowerCase()) ? 1 : 0;
|
|
1747
1822
|
},
|
|
1748
1823
|
children: [
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
1824
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1750
1825
|
CommandInput,
|
|
1751
1826
|
{
|
|
1752
1827
|
ref: inputRef,
|
|
@@ -1758,13 +1833,13 @@ function CreatablePicker({
|
|
|
1758
1833
|
placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
|
|
1759
1834
|
}
|
|
1760
1835
|
),
|
|
1761
|
-
/* @__PURE__ */ (0,
|
|
1762
|
-
/* @__PURE__ */ (0,
|
|
1763
|
-
groups.map((group) => /* @__PURE__ */ (0,
|
|
1836
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(CommandList, { children: [
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CommandEmpty, { children: emptyLabel }),
|
|
1838
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1764
1839
|
CommandGroup,
|
|
1765
1840
|
{
|
|
1766
1841
|
...group.heading === void 0 ? {} : { heading: group.heading },
|
|
1767
|
-
children: group.options.map((option) => /* @__PURE__ */ (0,
|
|
1842
|
+
children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1768
1843
|
CommandItem,
|
|
1769
1844
|
{
|
|
1770
1845
|
value: option.label,
|
|
@@ -1775,7 +1850,7 @@ function CreatablePicker({
|
|
|
1775
1850
|
},
|
|
1776
1851
|
className: "gap-2 text-xs",
|
|
1777
1852
|
children: [
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1779
1854
|
LucideCheckIcon,
|
|
1780
1855
|
{
|
|
1781
1856
|
className: cn(
|
|
@@ -1784,8 +1859,8 @@ function CreatablePicker({
|
|
|
1784
1859
|
)
|
|
1785
1860
|
}
|
|
1786
1861
|
),
|
|
1787
|
-
/* @__PURE__ */ (0,
|
|
1788
|
-
option.hint ? /* @__PURE__ */ (0,
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
|
|
1863
|
+
option.hint ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
|
|
1789
1864
|
]
|
|
1790
1865
|
},
|
|
1791
1866
|
option.value
|
|
@@ -1794,9 +1869,9 @@ function CreatablePicker({
|
|
|
1794
1869
|
group.heading ?? "__ungrouped__"
|
|
1795
1870
|
))
|
|
1796
1871
|
] }),
|
|
1797
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1798
|
-
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0,
|
|
1799
|
-
/* @__PURE__ */ (0,
|
|
1872
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1 border-t border-border p-1", children: [
|
|
1873
|
+
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1800
1875
|
"button",
|
|
1801
1876
|
{
|
|
1802
1877
|
type: "button",
|
|
@@ -1804,22 +1879,22 @@ function CreatablePicker({
|
|
|
1804
1879
|
onClick: () => void create(typed),
|
|
1805
1880
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
1806
1881
|
children: [
|
|
1807
|
-
busy ? /* @__PURE__ */ (0,
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
1882
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1809
1884
|
]
|
|
1810
1885
|
}
|
|
1811
1886
|
),
|
|
1812
|
-
needsName ? /* @__PURE__ */ (0,
|
|
1887
|
+
needsName ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1813
1888
|
"Type the name of the ",
|
|
1814
1889
|
noun,
|
|
1815
1890
|
" you want to add \u2014 then this creates it."
|
|
1816
1891
|
] }) : null
|
|
1817
1892
|
] }) : null,
|
|
1818
|
-
footerActions?.length || manageAction ? /* @__PURE__ */ (0,
|
|
1893
|
+
footerActions?.length || manageAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-0.5 border-t border-border p-1", children: [
|
|
1819
1894
|
footerActions?.map((action) => {
|
|
1820
1895
|
const Icon2 = action.icon;
|
|
1821
|
-
return /* @__PURE__ */ (0,
|
|
1822
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1897
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1823
1898
|
"button",
|
|
1824
1899
|
{
|
|
1825
1900
|
type: "button",
|
|
@@ -1829,15 +1904,15 @@ function CreatablePicker({
|
|
|
1829
1904
|
},
|
|
1830
1905
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1831
1906
|
children: [
|
|
1832
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
1833
|
-
/* @__PURE__ */ (0,
|
|
1907
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { className: "size-3.5 shrink-0" }) : null,
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: action.label })
|
|
1834
1909
|
]
|
|
1835
1910
|
}
|
|
1836
1911
|
),
|
|
1837
|
-
action.note ? /* @__PURE__ */ (0,
|
|
1912
|
+
action.note ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
|
|
1838
1913
|
] }, action.label);
|
|
1839
1914
|
}),
|
|
1840
|
-
manageAction ? /* @__PURE__ */ (0,
|
|
1915
|
+
manageAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1841
1916
|
"a",
|
|
1842
1917
|
{
|
|
1843
1918
|
href: manageAction.href,
|
|
@@ -1846,18 +1921,18 @@ function CreatablePicker({
|
|
|
1846
1921
|
onClick: close,
|
|
1847
1922
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1848
1923
|
children: [
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: manageAction.label })
|
|
1851
1926
|
]
|
|
1852
1927
|
}
|
|
1853
1928
|
) : null
|
|
1854
1929
|
] }) : null,
|
|
1855
|
-
lockedNote ? /* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1858
|
-
/* @__PURE__ */ (0,
|
|
1930
|
+
lockedNote ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1 border-t border-border p-2", children: [
|
|
1931
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LockIcon, { className: "mt-px size-3 shrink-0" }),
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: lockedNote })
|
|
1859
1934
|
] }),
|
|
1860
|
-
lockedAction ? /* @__PURE__ */ (0,
|
|
1935
|
+
lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1861
1936
|
"button",
|
|
1862
1937
|
{
|
|
1863
1938
|
type: "button",
|
|
@@ -1867,8 +1942,8 @@ function CreatablePicker({
|
|
|
1867
1942
|
},
|
|
1868
1943
|
className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
|
|
1869
1944
|
children: [
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
1871
|
-
/* @__PURE__ */ (0,
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: lockedAction.label })
|
|
1872
1947
|
]
|
|
1873
1948
|
}
|
|
1874
1949
|
) : null
|
|
@@ -1883,14 +1958,14 @@ function CreatablePicker({
|
|
|
1883
1958
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1884
1959
|
var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
|
|
1885
1960
|
var import_react_tree3 = require("@ai-matrx/kit/react-tree");
|
|
1886
|
-
var
|
|
1887
|
-
var
|
|
1961
|
+
var React16 = __toESM(require("react"), 1);
|
|
1962
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1888
1963
|
var Dialog = ({
|
|
1889
1964
|
children,
|
|
1890
1965
|
...props
|
|
1891
1966
|
}) => {
|
|
1892
1967
|
const modal = props.modal ?? true;
|
|
1893
|
-
return /* @__PURE__ */ (0,
|
|
1968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) });
|
|
1894
1969
|
};
|
|
1895
1970
|
Dialog.displayName = "Dialog";
|
|
1896
1971
|
var DialogTrigger = DialogPrimitive2.Trigger;
|
|
@@ -1900,12 +1975,12 @@ var DialogPortal = ({
|
|
|
1900
1975
|
...props
|
|
1901
1976
|
}) => {
|
|
1902
1977
|
const resolved = usePortalContainer(container);
|
|
1903
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
|
|
1904
1979
|
};
|
|
1905
1980
|
DialogPortal.displayName = "DialogPortal";
|
|
1906
|
-
var DialogContainerContext =
|
|
1907
|
-
var useDialogContainer = () =>
|
|
1908
|
-
var DialogOverlay =
|
|
1981
|
+
var DialogContainerContext = React16.createContext(null);
|
|
1982
|
+
var useDialogContainer = () => React16.useContext(DialogContainerContext);
|
|
1983
|
+
var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1909
1984
|
DialogPrimitive2.Overlay,
|
|
1910
1985
|
{
|
|
1911
1986
|
ref,
|
|
@@ -1913,16 +1988,17 @@ var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1913
1988
|
className: cn(
|
|
1914
1989
|
// Page context behind the modal stays readable; separation comes from a
|
|
1915
1990
|
// light token scrim, not a blur.
|
|
1916
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1991
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1992
|
+
MOTION_OVERLAY,
|
|
1917
1993
|
className
|
|
1918
1994
|
),
|
|
1919
1995
|
...props
|
|
1920
1996
|
}
|
|
1921
1997
|
));
|
|
1922
1998
|
DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1923
|
-
var DialogContentPrimitive =
|
|
1999
|
+
var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
1924
2000
|
const isModal = useRadixDialogModal();
|
|
1925
|
-
return /* @__PURE__ */ (0,
|
|
2001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1926
2002
|
DialogPrimitive2.Content,
|
|
1927
2003
|
{
|
|
1928
2004
|
...props,
|
|
@@ -1932,14 +2008,15 @@ var DialogContentPrimitive = React15.forwardRef((props, ref) => {
|
|
|
1932
2008
|
);
|
|
1933
2009
|
});
|
|
1934
2010
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1935
|
-
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1936
|
-
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
2011
|
+
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
2012
|
+
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1937
2013
|
var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1938
|
-
var DialogContent =
|
|
2014
|
+
var DialogContent = React16.forwardRef(
|
|
1939
2015
|
({
|
|
1940
2016
|
className,
|
|
1941
2017
|
children,
|
|
1942
2018
|
mobileSheet = true,
|
|
2019
|
+
animated = true,
|
|
1943
2020
|
showCloseButton = true,
|
|
1944
2021
|
container,
|
|
1945
2022
|
...props
|
|
@@ -1948,10 +2025,10 @@ var DialogContent = React15.forwardRef(
|
|
|
1948
2025
|
const isModal = useRadixDialogModal();
|
|
1949
2026
|
const injectedContainer = usePortalContainer(container);
|
|
1950
2027
|
const asSheet = mobileSheet && isMobile;
|
|
1951
|
-
const [containerEl, setContainerEl] =
|
|
2028
|
+
const [containerEl, setContainerEl] = React16.useState(
|
|
1952
2029
|
null
|
|
1953
2030
|
);
|
|
1954
|
-
const mergedRef =
|
|
2031
|
+
const mergedRef = React16.useCallback(
|
|
1955
2032
|
(node) => {
|
|
1956
2033
|
setContainerEl(node);
|
|
1957
2034
|
if (typeof ref === "function") ref(node);
|
|
@@ -1962,15 +2039,16 @@ var DialogContent = React15.forwardRef(
|
|
|
1962
2039
|
);
|
|
1963
2040
|
const hasTitle = (0, import_react_tree3.treeContainsComponent)(children, DialogTitle) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Title);
|
|
1964
2041
|
const hasDescription = (0, import_react_tree3.treeContainsComponent)(children, DialogDescription) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Description);
|
|
1965
|
-
return /* @__PURE__ */ (0,
|
|
1966
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1967
|
-
/* @__PURE__ */ (0,
|
|
2042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DialogPortal, { container, children: [
|
|
2043
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogOverlay, {}) : null,
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1968
2045
|
DialogContentPrimitive,
|
|
1969
2046
|
{
|
|
1970
2047
|
ref: mergedRef,
|
|
1971
2048
|
"data-slot": "dialog-content",
|
|
1972
2049
|
className: cn(
|
|
1973
2050
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
2051
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1974
2052
|
className,
|
|
1975
2053
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1976
2054
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -1982,23 +2060,23 @@ var DialogContent = React15.forwardRef(
|
|
|
1982
2060
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
1983
2061
|
...props,
|
|
1984
2062
|
children: [
|
|
1985
|
-
hasTitle ? null : /* @__PURE__ */ (0,
|
|
1986
|
-
/* @__PURE__ */ (0,
|
|
2063
|
+
hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VisuallyHidden2.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1987
2065
|
PortalContainerProvider,
|
|
1988
2066
|
{
|
|
1989
2067
|
container: containerEl ?? injectedContainer ?? null,
|
|
1990
2068
|
children
|
|
1991
2069
|
}
|
|
1992
2070
|
) }),
|
|
1993
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
2071
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1994
2072
|
DialogPrimitive2.Close,
|
|
1995
2073
|
{
|
|
1996
2074
|
"data-slot": "dialog-close",
|
|
1997
2075
|
"aria-label": "Close",
|
|
1998
2076
|
className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
|
|
1999
2077
|
children: [
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
2078
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(XIcon, { className: "h-4 w-4" }),
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2002
2080
|
]
|
|
2003
2081
|
}
|
|
2004
2082
|
) : null
|
|
@@ -2012,7 +2090,7 @@ DialogContent.displayName = DialogPrimitive2.Content.displayName;
|
|
|
2012
2090
|
var DialogHeader = ({
|
|
2013
2091
|
className,
|
|
2014
2092
|
...props
|
|
2015
|
-
}) => /* @__PURE__ */ (0,
|
|
2093
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2016
2094
|
"div",
|
|
2017
2095
|
{
|
|
2018
2096
|
"data-slot": "dialog-header",
|
|
@@ -2029,7 +2107,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
2029
2107
|
var DialogFooter = ({
|
|
2030
2108
|
className,
|
|
2031
2109
|
...props
|
|
2032
|
-
}) => /* @__PURE__ */ (0,
|
|
2110
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2033
2111
|
"div",
|
|
2034
2112
|
{
|
|
2035
2113
|
"data-slot": "dialog-footer",
|
|
@@ -2043,7 +2121,7 @@ var DialogFooter = ({
|
|
|
2043
2121
|
}
|
|
2044
2122
|
);
|
|
2045
2123
|
DialogFooter.displayName = "DialogFooter";
|
|
2046
|
-
var DialogTitle =
|
|
2124
|
+
var DialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2047
2125
|
DialogPrimitive2.Title,
|
|
2048
2126
|
{
|
|
2049
2127
|
ref,
|
|
@@ -2053,7 +2131,7 @@ var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2053
2131
|
}
|
|
2054
2132
|
));
|
|
2055
2133
|
DialogTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
2056
|
-
var DialogDescription =
|
|
2134
|
+
var DialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2057
2135
|
DialogPrimitive2.Description,
|
|
2058
2136
|
{
|
|
2059
2137
|
ref,
|
|
@@ -2066,8 +2144,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
|
2066
2144
|
|
|
2067
2145
|
// src/dropdown-menu.tsx
|
|
2068
2146
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
2069
|
-
var
|
|
2070
|
-
var
|
|
2147
|
+
var React17 = __toESM(require("react"), 1);
|
|
2148
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2071
2149
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2072
2150
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2073
2151
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -2075,10 +2153,9 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
2075
2153
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2076
2154
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2077
2155
|
var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
2078
|
-
var MENU_MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
2079
2156
|
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2080
2157
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2081
|
-
var DropdownMenuSubTrigger =
|
|
2158
|
+
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2082
2159
|
DropdownMenuPrimitive.SubTrigger,
|
|
2083
2160
|
{
|
|
2084
2161
|
ref,
|
|
@@ -2091,24 +2168,24 @@ var DropdownMenuSubTrigger = React16.forwardRef(({ className, inset, children, .
|
|
|
2091
2168
|
...props,
|
|
2092
2169
|
children: [
|
|
2093
2170
|
children,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
2095
2172
|
]
|
|
2096
2173
|
}
|
|
2097
2174
|
));
|
|
2098
2175
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2099
|
-
var DropdownMenuSubContent =
|
|
2176
|
+
var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2100
2177
|
DropdownMenuPrimitive.SubContent,
|
|
2101
2178
|
{
|
|
2102
2179
|
ref,
|
|
2103
2180
|
"data-slot": "dropdown-menu-sub-content",
|
|
2104
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
2181
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
2105
2182
|
...props
|
|
2106
2183
|
}
|
|
2107
2184
|
));
|
|
2108
2185
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2109
|
-
var DropdownMenuContent =
|
|
2186
|
+
var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
2110
2187
|
const portalContainer = usePortalContainer(container);
|
|
2111
|
-
return /* @__PURE__ */ (0,
|
|
2188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2112
2189
|
DropdownMenuPrimitive.Content,
|
|
2113
2190
|
{
|
|
2114
2191
|
ref,
|
|
@@ -2117,7 +2194,7 @@ var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, conta
|
|
|
2117
2194
|
className: cn(
|
|
2118
2195
|
MENU_SURFACE_CLASS,
|
|
2119
2196
|
"shadow-md",
|
|
2120
|
-
|
|
2197
|
+
MOTION_POPPER,
|
|
2121
2198
|
className
|
|
2122
2199
|
),
|
|
2123
2200
|
...props
|
|
@@ -2125,7 +2202,7 @@ var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, conta
|
|
|
2125
2202
|
) });
|
|
2126
2203
|
});
|
|
2127
2204
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2128
|
-
var DropdownMenuItem =
|
|
2205
|
+
var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2129
2206
|
DropdownMenuPrimitive.Item,
|
|
2130
2207
|
{
|
|
2131
2208
|
ref,
|
|
@@ -2135,7 +2212,7 @@ var DropdownMenuItem = React16.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2135
2212
|
}
|
|
2136
2213
|
));
|
|
2137
2214
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2138
|
-
var DropdownMenuCheckboxItem =
|
|
2215
|
+
var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2139
2216
|
DropdownMenuPrimitive.CheckboxItem,
|
|
2140
2217
|
{
|
|
2141
2218
|
ref,
|
|
@@ -2143,13 +2220,13 @@ var DropdownMenuCheckboxItem = React16.forwardRef(({ className, children, ...pro
|
|
|
2143
2220
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
2144
2221
|
...props,
|
|
2145
2222
|
children: [
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
2147
2224
|
children
|
|
2148
2225
|
]
|
|
2149
2226
|
}
|
|
2150
2227
|
));
|
|
2151
2228
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2152
|
-
var DropdownMenuRadioItem =
|
|
2229
|
+
var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2153
2230
|
DropdownMenuPrimitive.RadioItem,
|
|
2154
2231
|
{
|
|
2155
2232
|
ref,
|
|
@@ -2157,13 +2234,13 @@ var DropdownMenuRadioItem = React16.forwardRef(({ className, children, ...props
|
|
|
2157
2234
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
2158
2235
|
...props,
|
|
2159
2236
|
children: [
|
|
2160
|
-
/* @__PURE__ */ (0,
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2161
2238
|
children
|
|
2162
2239
|
]
|
|
2163
2240
|
}
|
|
2164
2241
|
));
|
|
2165
2242
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2166
|
-
var DropdownMenuLabel =
|
|
2243
|
+
var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2167
2244
|
DropdownMenuPrimitive.Label,
|
|
2168
2245
|
{
|
|
2169
2246
|
ref,
|
|
@@ -2173,7 +2250,7 @@ var DropdownMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2173
2250
|
}
|
|
2174
2251
|
));
|
|
2175
2252
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2176
|
-
var DropdownMenuSeparator =
|
|
2253
|
+
var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2177
2254
|
DropdownMenuPrimitive.Separator,
|
|
2178
2255
|
{
|
|
2179
2256
|
ref,
|
|
@@ -2186,7 +2263,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
|
2186
2263
|
var DropdownMenuShortcut = ({
|
|
2187
2264
|
className,
|
|
2188
2265
|
...props
|
|
2189
|
-
}) => /* @__PURE__ */ (0,
|
|
2266
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2190
2267
|
"span",
|
|
2191
2268
|
{
|
|
2192
2269
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -2198,7 +2275,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
2198
2275
|
|
|
2199
2276
|
// src/editable-label.tsx
|
|
2200
2277
|
var import_react2 = require("react");
|
|
2201
|
-
var
|
|
2278
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2202
2279
|
function EditableLabel({
|
|
2203
2280
|
value,
|
|
2204
2281
|
onCommit,
|
|
@@ -2305,8 +2382,8 @@ function EditableLabel({
|
|
|
2305
2382
|
setEditing
|
|
2306
2383
|
]);
|
|
2307
2384
|
if (editing) {
|
|
2308
|
-
return /* @__PURE__ */ (0,
|
|
2309
|
-
/* @__PURE__ */ (0,
|
|
2385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2310
2387
|
"input",
|
|
2311
2388
|
{
|
|
2312
2389
|
ref: inputRef,
|
|
@@ -2346,12 +2423,12 @@ function EditableLabel({
|
|
|
2346
2423
|
)
|
|
2347
2424
|
}
|
|
2348
2425
|
),
|
|
2349
|
-
busy && /* @__PURE__ */ (0,
|
|
2350
|
-
error && /* @__PURE__ */ (0,
|
|
2426
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2427
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2351
2428
|
] });
|
|
2352
2429
|
}
|
|
2353
2430
|
if (controlled) return null;
|
|
2354
|
-
return /* @__PURE__ */ (0,
|
|
2431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2355
2432
|
"button",
|
|
2356
2433
|
{
|
|
2357
2434
|
type: "button",
|
|
@@ -2385,8 +2462,8 @@ function EditableLabel({
|
|
|
2385
2462
|
}
|
|
2386
2463
|
|
|
2387
2464
|
// src/input.tsx
|
|
2388
|
-
var
|
|
2389
|
-
var
|
|
2465
|
+
var React18 = __toESM(require("react"), 1);
|
|
2466
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2390
2467
|
var getVariantStyles = (variant = "default") => {
|
|
2391
2468
|
const baseStyles = `flex h-10 w-full border border-border bg-background text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
|
|
2392
2469
|
file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
|
|
@@ -2414,9 +2491,9 @@ var getVariantStyles = (variant = "default") => {
|
|
|
2414
2491
|
return baseStyles;
|
|
2415
2492
|
}
|
|
2416
2493
|
};
|
|
2417
|
-
var Input =
|
|
2494
|
+
var Input = React18.forwardRef(
|
|
2418
2495
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
2419
|
-
return /* @__PURE__ */ (0,
|
|
2496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2420
2497
|
"input",
|
|
2421
2498
|
{
|
|
2422
2499
|
type,
|
|
@@ -2428,7 +2505,7 @@ var Input = React17.forwardRef(
|
|
|
2428
2505
|
}
|
|
2429
2506
|
);
|
|
2430
2507
|
Input.displayName = "Input";
|
|
2431
|
-
var EnterInput =
|
|
2508
|
+
var EnterInput = React18.forwardRef(
|
|
2432
2509
|
({ onEnter, ...props }, ref) => {
|
|
2433
2510
|
const handleKeyDown = (e) => {
|
|
2434
2511
|
if (e.key === "Enter" && onEnter) {
|
|
@@ -2436,7 +2513,7 @@ var EnterInput = React17.forwardRef(
|
|
|
2436
2513
|
onEnter();
|
|
2437
2514
|
}
|
|
2438
2515
|
};
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2440
2517
|
Input,
|
|
2441
2518
|
{
|
|
2442
2519
|
...props,
|
|
@@ -2452,11 +2529,11 @@ var EnterInput = React17.forwardRef(
|
|
|
2452
2529
|
}
|
|
2453
2530
|
);
|
|
2454
2531
|
EnterInput.displayName = "EnterInput";
|
|
2455
|
-
var BasicInput =
|
|
2532
|
+
var BasicInput = React18.forwardRef(
|
|
2456
2533
|
// `variant` is accepted (prop-compatible with Input) but intentionally
|
|
2457
2534
|
// unused — and destructured so it never leaks onto the DOM element.
|
|
2458
2535
|
({ className, type, variant: _variant = "default", ...props }, ref) => {
|
|
2459
|
-
return /* @__PURE__ */ (0,
|
|
2536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2460
2537
|
"input",
|
|
2461
2538
|
{
|
|
2462
2539
|
type,
|
|
@@ -2471,10 +2548,10 @@ var BasicInput = React17.forwardRef(
|
|
|
2471
2548
|
}
|
|
2472
2549
|
);
|
|
2473
2550
|
BasicInput.displayName = "BasicInput";
|
|
2474
|
-
var InputWithPrefix =
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2476
|
-
prefix && /* @__PURE__ */ (0,
|
|
2477
|
-
/* @__PURE__ */ (0,
|
|
2551
|
+
var InputWithPrefix = React18.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
|
|
2552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2553
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
|
|
2554
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2478
2555
|
Input,
|
|
2479
2556
|
{
|
|
2480
2557
|
ref,
|
|
@@ -2488,9 +2565,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
|
|
|
2488
2565
|
|
|
2489
2566
|
// src/label.tsx
|
|
2490
2567
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
2491
|
-
var
|
|
2492
|
-
var
|
|
2493
|
-
var Label3 =
|
|
2568
|
+
var React19 = __toESM(require("react"), 1);
|
|
2569
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2570
|
+
var Label3 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2494
2571
|
LabelPrimitive.Root,
|
|
2495
2572
|
{
|
|
2496
2573
|
ref,
|
|
@@ -2505,7 +2582,7 @@ Label3.displayName = LabelPrimitive.Root.displayName;
|
|
|
2505
2582
|
|
|
2506
2583
|
// src/overflow-toolbar.tsx
|
|
2507
2584
|
var import_react3 = require("react");
|
|
2508
|
-
var
|
|
2585
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2509
2586
|
var GAP_PX = 6;
|
|
2510
2587
|
var TONE = {
|
|
2511
2588
|
default: "border border-border bg-background hover:bg-accent text-foreground",
|
|
@@ -2527,16 +2604,16 @@ function ToolbarButton({
|
|
|
2527
2604
|
action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
|
|
2528
2605
|
TONE[tone]
|
|
2529
2606
|
);
|
|
2530
|
-
const inner = /* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2607
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2532
2609
|
Icon2,
|
|
2533
2610
|
{
|
|
2534
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2611
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2535
2612
|
}
|
|
2536
2613
|
),
|
|
2537
|
-
showLabel && /* @__PURE__ */ (0,
|
|
2614
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: text })
|
|
2538
2615
|
] });
|
|
2539
|
-
const control = action.href && !action.disabled ? /* @__PURE__ */ (0,
|
|
2616
|
+
const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2540
2617
|
"a",
|
|
2541
2618
|
{
|
|
2542
2619
|
href: action.href,
|
|
@@ -2546,7 +2623,7 @@ function ToolbarButton({
|
|
|
2546
2623
|
"aria-label": action.label,
|
|
2547
2624
|
children: inner
|
|
2548
2625
|
}
|
|
2549
|
-
) : /* @__PURE__ */ (0,
|
|
2626
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2550
2627
|
"button",
|
|
2551
2628
|
{
|
|
2552
2629
|
type: "button",
|
|
@@ -2558,12 +2635,12 @@ function ToolbarButton({
|
|
|
2558
2635
|
}
|
|
2559
2636
|
);
|
|
2560
2637
|
if (enableTooltip && action.hideLabel && renderTooltip) {
|
|
2561
|
-
return /* @__PURE__ */ (0,
|
|
2638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: renderTooltip(control, action.label) });
|
|
2562
2639
|
}
|
|
2563
2640
|
return control;
|
|
2564
2641
|
}
|
|
2565
2642
|
function OverflowTrigger({ ariaLabel }) {
|
|
2566
|
-
return /* @__PURE__ */ (0,
|
|
2643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2567
2644
|
"button",
|
|
2568
2645
|
{
|
|
2569
2646
|
type: "button",
|
|
@@ -2574,7 +2651,7 @@ function OverflowTrigger({ ariaLabel }) {
|
|
|
2574
2651
|
"inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
|
|
2575
2652
|
"border border-border bg-background hover:bg-accent text-foreground"
|
|
2576
2653
|
),
|
|
2577
|
-
children: /* @__PURE__ */ (0,
|
|
2654
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
|
|
2578
2655
|
}
|
|
2579
2656
|
);
|
|
2580
2657
|
}
|
|
@@ -2634,22 +2711,22 @@ function OverflowToolbar({
|
|
|
2634
2711
|
}, [signature, leading != null]);
|
|
2635
2712
|
const shown = visibleActions.slice(0, visibleCount);
|
|
2636
2713
|
const hidden = visibleActions.slice(visibleCount);
|
|
2637
|
-
return /* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2639
2716
|
"div",
|
|
2640
2717
|
{
|
|
2641
2718
|
ref: ghostRef,
|
|
2642
2719
|
"aria-hidden": true,
|
|
2643
2720
|
className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
|
|
2644
2721
|
children: [
|
|
2645
|
-
visibleActions.map((a) => /* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2722
|
+
visibleActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarButton, { action: a }, a.id)),
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2647
2724
|
]
|
|
2648
2725
|
}
|
|
2649
2726
|
),
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2651
|
-
leading != null && /* @__PURE__ */ (0,
|
|
2652
|
-
shown.map((a) => /* @__PURE__ */ (0,
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
2728
|
+
leading != null && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { ref: leadingRef, className: "shrink-0", children: leading }),
|
|
2729
|
+
shown.map((a) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2653
2730
|
ToolbarButton,
|
|
2654
2731
|
{
|
|
2655
2732
|
action: a,
|
|
@@ -2660,7 +2737,7 @@ function OverflowToolbar({
|
|
|
2660
2737
|
)),
|
|
2661
2738
|
hidden.length > 0 && renderOverflowMenu({
|
|
2662
2739
|
actions: hidden,
|
|
2663
|
-
trigger: /* @__PURE__ */ (0,
|
|
2740
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2664
2741
|
})
|
|
2665
2742
|
] })
|
|
2666
2743
|
] });
|
|
@@ -2668,20 +2745,20 @@ function OverflowToolbar({
|
|
|
2668
2745
|
|
|
2669
2746
|
// src/progress.tsx
|
|
2670
2747
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2671
|
-
var
|
|
2672
|
-
var
|
|
2748
|
+
var React21 = __toESM(require("react"), 1);
|
|
2749
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2673
2750
|
var PROGRESS_TONES = {
|
|
2674
2751
|
default: "bg-primary",
|
|
2675
2752
|
success: "bg-success",
|
|
2676
2753
|
warning: "bg-warning",
|
|
2677
2754
|
destructive: "bg-destructive"
|
|
2678
2755
|
};
|
|
2679
|
-
var Progress =
|
|
2756
|
+
var Progress = React21.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
|
|
2680
2757
|
const { value, max } = props;
|
|
2681
2758
|
const ceiling = max ?? 100;
|
|
2682
2759
|
const isIndeterminate = value === null || value === void 0;
|
|
2683
2760
|
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
|
|
2684
|
-
return /* @__PURE__ */ (0,
|
|
2761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2685
2762
|
ProgressPrimitive.Root,
|
|
2686
2763
|
{
|
|
2687
2764
|
ref,
|
|
@@ -2691,7 +2768,7 @@ var Progress = React20.forwardRef(({ className, tone = "default", indicatorClass
|
|
|
2691
2768
|
className
|
|
2692
2769
|
),
|
|
2693
2770
|
...props,
|
|
2694
|
-
children: /* @__PURE__ */ (0,
|
|
2771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2695
2772
|
ProgressPrimitive.Indicator,
|
|
2696
2773
|
{
|
|
2697
2774
|
"data-slot": "progress-indicator",
|
|
@@ -2711,9 +2788,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
2711
2788
|
|
|
2712
2789
|
// src/scroll-area.tsx
|
|
2713
2790
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2714
|
-
var
|
|
2715
|
-
var
|
|
2716
|
-
var ScrollArea =
|
|
2791
|
+
var React22 = __toESM(require("react"), 1);
|
|
2792
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2793
|
+
var ScrollArea = React22.forwardRef(
|
|
2717
2794
|
({
|
|
2718
2795
|
className,
|
|
2719
2796
|
children,
|
|
@@ -2722,7 +2799,7 @@ var ScrollArea = React21.forwardRef(
|
|
|
2722
2799
|
scrollBarClassName,
|
|
2723
2800
|
orientation = "vertical",
|
|
2724
2801
|
...props
|
|
2725
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
2802
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2726
2803
|
ScrollAreaPrimitive.Root,
|
|
2727
2804
|
{
|
|
2728
2805
|
ref,
|
|
@@ -2730,7 +2807,7 @@ var ScrollArea = React21.forwardRef(
|
|
|
2730
2807
|
className: cn("relative overflow-hidden", className),
|
|
2731
2808
|
...props,
|
|
2732
2809
|
children: [
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2734
2811
|
ScrollAreaPrimitive.Viewport,
|
|
2735
2812
|
{
|
|
2736
2813
|
ref: viewportRef,
|
|
@@ -2739,14 +2816,14 @@ var ScrollArea = React21.forwardRef(
|
|
|
2739
2816
|
children
|
|
2740
2817
|
}
|
|
2741
2818
|
),
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2743
|
-
/* @__PURE__ */ (0,
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2744
2821
|
]
|
|
2745
2822
|
}
|
|
2746
2823
|
)
|
|
2747
2824
|
);
|
|
2748
2825
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2749
|
-
var ScrollBar =
|
|
2826
|
+
var ScrollBar = React22.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2750
2827
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2751
2828
|
{
|
|
2752
2829
|
ref,
|
|
@@ -2759,7 +2836,7 @@ var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2759
2836
|
className
|
|
2760
2837
|
),
|
|
2761
2838
|
...props,
|
|
2762
|
-
children: /* @__PURE__ */ (0,
|
|
2839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2763
2840
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2764
2841
|
{
|
|
2765
2842
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2771,7 +2848,7 @@ var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2771
2848
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2772
2849
|
|
|
2773
2850
|
// src/score-ring.tsx
|
|
2774
|
-
var
|
|
2851
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2775
2852
|
var DEFAULT_SCORE_THRESHOLDS = {
|
|
2776
2853
|
good: 75,
|
|
2777
2854
|
warning: 50
|
|
@@ -2802,7 +2879,7 @@ function ScoreRing({
|
|
|
2802
2879
|
const circumference = 2 * Math.PI * radius;
|
|
2803
2880
|
const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
|
|
2804
2881
|
const dashOffset = circumference * (1 - boundedPct / 100);
|
|
2805
|
-
return /* @__PURE__ */ (0,
|
|
2882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2806
2883
|
"div",
|
|
2807
2884
|
{
|
|
2808
2885
|
className: cn(
|
|
@@ -2813,8 +2890,8 @@ function ScoreRing({
|
|
|
2813
2890
|
role: "img",
|
|
2814
2891
|
"aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
|
|
2815
2892
|
children: [
|
|
2816
|
-
/* @__PURE__ */ (0,
|
|
2817
|
-
/* @__PURE__ */ (0,
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2818
2895
|
"circle",
|
|
2819
2896
|
{
|
|
2820
2897
|
cx: "50",
|
|
@@ -2825,7 +2902,7 @@ function ScoreRing({
|
|
|
2825
2902
|
fill: "none"
|
|
2826
2903
|
}
|
|
2827
2904
|
),
|
|
2828
|
-
pct !== null ? /* @__PURE__ */ (0,
|
|
2905
|
+
pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2829
2906
|
"circle",
|
|
2830
2907
|
{
|
|
2831
2908
|
cx: "50",
|
|
@@ -2844,8 +2921,8 @@ function ScoreRing({
|
|
|
2844
2921
|
}
|
|
2845
2922
|
) : null
|
|
2846
2923
|
] }),
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
2848
|
-
/* @__PURE__ */ (0,
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "absolute flex flex-col items-center justify-center", children: [
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2849
2926
|
"span",
|
|
2850
2927
|
{
|
|
2851
2928
|
className: cn(
|
|
@@ -2855,7 +2932,7 @@ function ScoreRing({
|
|
|
2855
2932
|
children: pct === null ? "\u2014" : `${pct}${suffix}`
|
|
2856
2933
|
}
|
|
2857
2934
|
),
|
|
2858
|
-
label ? /* @__PURE__ */ (0,
|
|
2935
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
|
|
2859
2936
|
] })
|
|
2860
2937
|
]
|
|
2861
2938
|
}
|
|
@@ -2863,7 +2940,7 @@ function ScoreRing({
|
|
|
2863
2940
|
}
|
|
2864
2941
|
|
|
2865
2942
|
// src/segmented-control.tsx
|
|
2866
|
-
var
|
|
2943
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2867
2944
|
function SegmentedControl({
|
|
2868
2945
|
value,
|
|
2869
2946
|
onValueChange,
|
|
@@ -2878,7 +2955,7 @@ function SegmentedControl({
|
|
|
2878
2955
|
md: "h-9 text-sm",
|
|
2879
2956
|
lg: "h-10 text-base"
|
|
2880
2957
|
};
|
|
2881
|
-
return /* @__PURE__ */ (0,
|
|
2958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2882
2959
|
"div",
|
|
2883
2960
|
{
|
|
2884
2961
|
className: cn(
|
|
@@ -2889,7 +2966,7 @@ function SegmentedControl({
|
|
|
2889
2966
|
role: "tablist",
|
|
2890
2967
|
children: data.map((option) => {
|
|
2891
2968
|
const isActive = value === option.value;
|
|
2892
|
-
return /* @__PURE__ */ (0,
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2893
2970
|
"button",
|
|
2894
2971
|
{
|
|
2895
2972
|
type: "button",
|
|
@@ -2916,8 +2993,8 @@ function SegmentedControl({
|
|
|
2916
2993
|
// src/select.tsx
|
|
2917
2994
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2918
2995
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2919
|
-
var
|
|
2920
|
-
var
|
|
2996
|
+
var React23 = __toESM(require("react"), 1);
|
|
2997
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2921
2998
|
var Select = SelectPrimitive.Root;
|
|
2922
2999
|
var SelectGroup = SelectPrimitive.Group;
|
|
2923
3000
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -2936,7 +3013,7 @@ var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
|
|
|
2936
3013
|
}
|
|
2937
3014
|
}
|
|
2938
3015
|
);
|
|
2939
|
-
var SelectTrigger =
|
|
3016
|
+
var SelectTrigger = React23.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2940
3017
|
SelectPrimitive.Trigger,
|
|
2941
3018
|
{
|
|
2942
3019
|
ref,
|
|
@@ -2944,12 +3021,12 @@ var SelectTrigger = React22.forwardRef(({ className, children, hideArrow = false
|
|
|
2944
3021
|
...props,
|
|
2945
3022
|
children: [
|
|
2946
3023
|
children,
|
|
2947
|
-
!hideArrow && /* @__PURE__ */ (0,
|
|
3024
|
+
!hideArrow && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
2948
3025
|
]
|
|
2949
3026
|
}
|
|
2950
3027
|
));
|
|
2951
3028
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2952
|
-
var SelectScrollUpButton =
|
|
3029
|
+
var SelectScrollUpButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2953
3030
|
SelectPrimitive.ScrollUpButton,
|
|
2954
3031
|
{
|
|
2955
3032
|
ref,
|
|
@@ -2958,11 +3035,11 @@ var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) =>
|
|
|
2958
3035
|
className
|
|
2959
3036
|
),
|
|
2960
3037
|
...props,
|
|
2961
|
-
children: /* @__PURE__ */ (0,
|
|
3038
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixChevronUpIcon, {})
|
|
2962
3039
|
}
|
|
2963
3040
|
));
|
|
2964
3041
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2965
|
-
var SelectScrollDownButton =
|
|
3042
|
+
var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2966
3043
|
SelectPrimitive.ScrollDownButton,
|
|
2967
3044
|
{
|
|
2968
3045
|
ref,
|
|
@@ -2971,42 +3048,52 @@ var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) =
|
|
|
2971
3048
|
className
|
|
2972
3049
|
),
|
|
2973
3050
|
...props,
|
|
2974
|
-
children: /* @__PURE__ */ (0,
|
|
3051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixChevronDownIcon, {})
|
|
2975
3052
|
}
|
|
2976
3053
|
));
|
|
2977
3054
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2978
|
-
var SelectContent =
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
"p-0.5 overflow-y-auto",
|
|
2998
|
-
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2999
|
-
),
|
|
3000
|
-
children
|
|
3001
|
-
}
|
|
3055
|
+
var SelectContent = React23.forwardRef(
|
|
3056
|
+
({
|
|
3057
|
+
className,
|
|
3058
|
+
children,
|
|
3059
|
+
position = "popper",
|
|
3060
|
+
container,
|
|
3061
|
+
animated = true,
|
|
3062
|
+
...props
|
|
3063
|
+
}, ref) => {
|
|
3064
|
+
const portalContainer = usePortalContainer(container);
|
|
3065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3066
|
+
SelectPrimitive.Content,
|
|
3067
|
+
{
|
|
3068
|
+
ref,
|
|
3069
|
+
className: cn(
|
|
3070
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
3071
|
+
animated && MOTION_POPPER,
|
|
3072
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
3073
|
+
className
|
|
3002
3074
|
),
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3075
|
+
position,
|
|
3076
|
+
...props,
|
|
3077
|
+
children: [
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollUpButton, {}),
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3080
|
+
SelectPrimitive.Viewport,
|
|
3081
|
+
{
|
|
3082
|
+
className: cn(
|
|
3083
|
+
"p-0.5 overflow-y-auto",
|
|
3084
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
3085
|
+
),
|
|
3086
|
+
children
|
|
3087
|
+
}
|
|
3088
|
+
),
|
|
3089
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollDownButton, {})
|
|
3090
|
+
]
|
|
3091
|
+
}
|
|
3092
|
+
) });
|
|
3093
|
+
}
|
|
3094
|
+
);
|
|
3008
3095
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3009
|
-
var SelectLabel =
|
|
3096
|
+
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3010
3097
|
SelectPrimitive.Label,
|
|
3011
3098
|
{
|
|
3012
3099
|
ref,
|
|
@@ -3015,7 +3102,7 @@ var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3015
3102
|
}
|
|
3016
3103
|
));
|
|
3017
3104
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3018
|
-
var SelectItem =
|
|
3105
|
+
var SelectItem = React23.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3019
3106
|
SelectPrimitive.Item,
|
|
3020
3107
|
{
|
|
3021
3108
|
ref,
|
|
@@ -3026,14 +3113,14 @@ var SelectItem = React22.forwardRef(({ className, children, description, ...prop
|
|
|
3026
3113
|
),
|
|
3027
3114
|
...props,
|
|
3028
3115
|
children: [
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3030
|
-
/* @__PURE__ */ (0,
|
|
3031
|
-
description ? /* @__PURE__ */ (0,
|
|
3116
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.ItemText, { children }),
|
|
3118
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
|
|
3032
3119
|
]
|
|
3033
3120
|
}
|
|
3034
3121
|
));
|
|
3035
3122
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3036
|
-
var SelectSeparator =
|
|
3123
|
+
var SelectSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3037
3124
|
SelectPrimitive.Separator,
|
|
3038
3125
|
{
|
|
3039
3126
|
ref,
|
|
@@ -3045,9 +3132,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
3045
3132
|
|
|
3046
3133
|
// src/separator.tsx
|
|
3047
3134
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
3048
|
-
var
|
|
3049
|
-
var
|
|
3050
|
-
var Separator4 =
|
|
3135
|
+
var React24 = __toESM(require("react"), 1);
|
|
3136
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3137
|
+
var Separator4 = React24.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3051
3138
|
SeparatorPrimitive.Root,
|
|
3052
3139
|
{
|
|
3053
3140
|
ref,
|
|
@@ -3067,11 +3154,11 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
3067
3154
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3068
3155
|
var import_react_tree4 = require("@ai-matrx/kit/react-tree");
|
|
3069
3156
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3070
|
-
var
|
|
3071
|
-
var
|
|
3072
|
-
var SheetContentBase =
|
|
3157
|
+
var React25 = __toESM(require("react"), 1);
|
|
3158
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3159
|
+
var SheetContentBase = React25.forwardRef(({ ...props }, ref) => {
|
|
3073
3160
|
const isModal = useRadixDialogModal();
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3075
3162
|
SheetPrimitive.Content,
|
|
3076
3163
|
{
|
|
3077
3164
|
...props,
|
|
@@ -3081,19 +3168,20 @@ var SheetContentBase = React24.forwardRef(({ ...props }, ref) => {
|
|
|
3081
3168
|
);
|
|
3082
3169
|
});
|
|
3083
3170
|
SheetContentBase.displayName = "SheetContentBase";
|
|
3084
|
-
var Sheet =
|
|
3171
|
+
var Sheet = React25.forwardRef(({ children, ...props }, _ref) => {
|
|
3085
3172
|
const modal = props.modal ?? true;
|
|
3086
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SheetPrimitive.Root, { ...props, modal, children }) });
|
|
3087
3174
|
});
|
|
3088
3175
|
Sheet.displayName = "Sheet";
|
|
3089
3176
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3090
3177
|
var SheetClose = SheetPrimitive.Close;
|
|
3091
3178
|
var SheetPortal = SheetPrimitive.Portal;
|
|
3092
|
-
var SheetOverlay =
|
|
3179
|
+
var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3093
3180
|
SheetPrimitive.Overlay,
|
|
3094
3181
|
{
|
|
3095
3182
|
className: cn(
|
|
3096
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
3183
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
3184
|
+
MOTION_OVERLAY,
|
|
3097
3185
|
className
|
|
3098
3186
|
),
|
|
3099
3187
|
...props,
|
|
@@ -3102,15 +3190,22 @@ var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3102
3190
|
));
|
|
3103
3191
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
3104
3192
|
var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
3105
|
-
|
|
3193
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
3194
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
3195
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
3196
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
3197
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
3198
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
3199
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
3200
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
3106
3201
|
{
|
|
3107
3202
|
variants: {
|
|
3108
3203
|
side: {
|
|
3109
|
-
top: "inset-x-0 top-0 border-b
|
|
3110
|
-
bottom: "inset-x-0 bottom-0 border-t
|
|
3111
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r
|
|
3112
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l
|
|
3113
|
-
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg
|
|
3204
|
+
top: "inset-x-0 top-0 border-b",
|
|
3205
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
3206
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
3207
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
3208
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
3114
3209
|
}
|
|
3115
3210
|
},
|
|
3116
3211
|
defaultVariants: {
|
|
@@ -3118,7 +3213,7 @@ var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
|
3118
3213
|
}
|
|
3119
3214
|
}
|
|
3120
3215
|
);
|
|
3121
|
-
var SheetDescription =
|
|
3216
|
+
var SheetDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3122
3217
|
SheetPrimitive.Description,
|
|
3123
3218
|
{
|
|
3124
3219
|
ref,
|
|
@@ -3127,7 +3222,7 @@ var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3127
3222
|
}
|
|
3128
3223
|
));
|
|
3129
3224
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
3130
|
-
var SheetContent =
|
|
3225
|
+
var SheetContent = React25.forwardRef(
|
|
3131
3226
|
({
|
|
3132
3227
|
side = "right",
|
|
3133
3228
|
className,
|
|
@@ -3135,22 +3230,27 @@ var SheetContent = React24.forwardRef(
|
|
|
3135
3230
|
hideCloseButton = false,
|
|
3136
3231
|
hideOverlay = false,
|
|
3137
3232
|
overlayClassName,
|
|
3233
|
+
animated = true,
|
|
3138
3234
|
...props
|
|
3139
3235
|
}, ref) => {
|
|
3140
3236
|
const hasDescription = (0, import_react_tree4.treeContainsComponent)(children, SheetDescription) || (0, import_react_tree4.treeContainsComponent)(children, SheetPrimitive.Description);
|
|
3141
|
-
return /* @__PURE__ */ (0,
|
|
3142
|
-
!hideOverlay && /* @__PURE__ */ (0,
|
|
3143
|
-
/* @__PURE__ */ (0,
|
|
3237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(SheetPortal, { children: [
|
|
3238
|
+
!hideOverlay && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SheetOverlay, { className: overlayClassName }),
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3144
3240
|
SheetContentBase,
|
|
3145
3241
|
{
|
|
3146
3242
|
ref,
|
|
3147
|
-
className: cn(
|
|
3243
|
+
className: cn(
|
|
3244
|
+
sheetVariants({ side }),
|
|
3245
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3246
|
+
className
|
|
3247
|
+
),
|
|
3148
3248
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
3149
3249
|
...props,
|
|
3150
3250
|
children: [
|
|
3151
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
3152
|
-
/* @__PURE__ */ (0,
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3251
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Cross2Icon, { className: "h-4 w-4" }),
|
|
3253
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3154
3254
|
] }),
|
|
3155
3255
|
children
|
|
3156
3256
|
]
|
|
@@ -3163,7 +3263,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
3163
3263
|
var SheetHeader = ({
|
|
3164
3264
|
className,
|
|
3165
3265
|
...props
|
|
3166
|
-
}) => /* @__PURE__ */ (0,
|
|
3266
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3167
3267
|
"div",
|
|
3168
3268
|
{
|
|
3169
3269
|
className: cn(
|
|
@@ -3177,7 +3277,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
3177
3277
|
var SheetFooter = ({
|
|
3178
3278
|
className,
|
|
3179
3279
|
...props
|
|
3180
|
-
}) => /* @__PURE__ */ (0,
|
|
3280
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3181
3281
|
"div",
|
|
3182
3282
|
{
|
|
3183
3283
|
className: cn(
|
|
@@ -3188,7 +3288,7 @@ var SheetFooter = ({
|
|
|
3188
3288
|
}
|
|
3189
3289
|
);
|
|
3190
3290
|
SheetFooter.displayName = "SheetFooter";
|
|
3191
|
-
var SheetTitle =
|
|
3291
|
+
var SheetTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3192
3292
|
SheetPrimitive.Title,
|
|
3193
3293
|
{
|
|
3194
3294
|
ref,
|
|
@@ -3199,15 +3299,17 @@ var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3199
3299
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
3200
3300
|
|
|
3201
3301
|
// src/skeleton.tsx
|
|
3202
|
-
var
|
|
3203
|
-
function Skeleton({
|
|
3204
|
-
|
|
3205
|
-
...props
|
|
3206
|
-
}) {
|
|
3207
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3302
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3303
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
3304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3208
3305
|
"div",
|
|
3209
3306
|
{
|
|
3210
|
-
|
|
3307
|
+
"data-slot": "skeleton",
|
|
3308
|
+
className: cn(
|
|
3309
|
+
"rounded-md bg-primary/10",
|
|
3310
|
+
animated && MOTION_PULSE,
|
|
3311
|
+
className
|
|
3312
|
+
),
|
|
3211
3313
|
...props
|
|
3212
3314
|
}
|
|
3213
3315
|
);
|
|
@@ -3215,8 +3317,8 @@ function Skeleton({
|
|
|
3215
3317
|
|
|
3216
3318
|
// src/switch.tsx
|
|
3217
3319
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
3218
|
-
var
|
|
3219
|
-
var
|
|
3320
|
+
var React26 = __toESM(require("react"), 1);
|
|
3321
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3220
3322
|
var SWITCH_SIZES = {
|
|
3221
3323
|
sm: {
|
|
3222
3324
|
root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
|
|
@@ -3227,7 +3329,7 @@ var SWITCH_SIZES = {
|
|
|
3227
3329
|
thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
3228
3330
|
}
|
|
3229
3331
|
};
|
|
3230
|
-
var Switch =
|
|
3332
|
+
var Switch = React26.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3231
3333
|
SwitchPrimitives.Root,
|
|
3232
3334
|
{
|
|
3233
3335
|
ref,
|
|
@@ -3238,7 +3340,7 @@ var Switch = React25.forwardRef(({ className, size = "md", ...props }, ref) => /
|
|
|
3238
3340
|
className
|
|
3239
3341
|
),
|
|
3240
3342
|
...props,
|
|
3241
|
-
children: /* @__PURE__ */ (0,
|
|
3343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3242
3344
|
SwitchPrimitives.Thumb,
|
|
3243
3345
|
{
|
|
3244
3346
|
"data-slot": "switch-thumb",
|
|
@@ -3254,7 +3356,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
3254
3356
|
|
|
3255
3357
|
// src/tabbed-bottom-sheet.tsx
|
|
3256
3358
|
var import_react4 = require("react");
|
|
3257
|
-
var
|
|
3359
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3258
3360
|
function TabbedBottomSheet({
|
|
3259
3361
|
open,
|
|
3260
3362
|
onOpenChange,
|
|
@@ -3268,15 +3370,15 @@ function TabbedBottomSheet({
|
|
|
3268
3370
|
if (open) setSelectedTabId(null);
|
|
3269
3371
|
}
|
|
3270
3372
|
const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3272
3374
|
BottomSheet,
|
|
3273
3375
|
{
|
|
3274
3376
|
open,
|
|
3275
3377
|
onOpenChange,
|
|
3276
3378
|
title,
|
|
3277
3379
|
size: "full",
|
|
3278
|
-
children: /* @__PURE__ */ (0,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3280
3382
|
BottomSheetHeader,
|
|
3281
3383
|
{
|
|
3282
3384
|
title: selectedTab ? selectedTab.label : title,
|
|
@@ -3284,19 +3386,19 @@ function TabbedBottomSheet({
|
|
|
3284
3386
|
onBack: () => setSelectedTabId(null)
|
|
3285
3387
|
}
|
|
3286
3388
|
),
|
|
3287
|
-
selectedTab ? /* @__PURE__ */ (0,
|
|
3389
|
+
selectedTab ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(BottomSheetBody, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
|
|
3288
3390
|
const Icon2 = tab.icon;
|
|
3289
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3290
3392
|
"button",
|
|
3291
3393
|
{
|
|
3292
3394
|
type: "button",
|
|
3293
3395
|
onClick: () => setSelectedTabId(tab.id),
|
|
3294
3396
|
className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
|
|
3295
3397
|
children: [
|
|
3296
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
3297
|
-
/* @__PURE__ */ (0,
|
|
3398
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
|
|
3298
3400
|
tab.trailing,
|
|
3299
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
|
|
3300
3402
|
]
|
|
3301
3403
|
}
|
|
3302
3404
|
) }, tab.id);
|
|
@@ -3307,19 +3409,19 @@ function TabbedBottomSheet({
|
|
|
3307
3409
|
}
|
|
3308
3410
|
|
|
3309
3411
|
// src/table.tsx
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3412
|
+
var React27 = __toESM(require("react"), 1);
|
|
3413
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3312
3414
|
var TABLE_SIZES = {
|
|
3313
3415
|
sm: { head: "px-2", cell: "p-2" },
|
|
3314
3416
|
md: { head: "px-3", cell: "p-3" }
|
|
3315
3417
|
};
|
|
3316
|
-
var TableSizeContext =
|
|
3418
|
+
var TableSizeContext = React27.createContext("md");
|
|
3317
3419
|
function useTableSize() {
|
|
3318
|
-
return
|
|
3420
|
+
return React27.useContext(TableSizeContext);
|
|
3319
3421
|
}
|
|
3320
|
-
var Table =
|
|
3422
|
+
var Table = React27.forwardRef(
|
|
3321
3423
|
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
3322
|
-
const table = /* @__PURE__ */ (0,
|
|
3424
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3323
3425
|
"table",
|
|
3324
3426
|
{
|
|
3325
3427
|
ref,
|
|
@@ -3329,7 +3431,7 @@ var Table = React26.forwardRef(
|
|
|
3329
3431
|
...props
|
|
3330
3432
|
}
|
|
3331
3433
|
);
|
|
3332
|
-
return /* @__PURE__ */ (0,
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3333
3435
|
"div",
|
|
3334
3436
|
{
|
|
3335
3437
|
"data-slot": "table-wrapper",
|
|
@@ -3340,7 +3442,7 @@ var Table = React26.forwardRef(
|
|
|
3340
3442
|
}
|
|
3341
3443
|
);
|
|
3342
3444
|
Table.displayName = "Table";
|
|
3343
|
-
var TableHeader =
|
|
3445
|
+
var TableHeader = React27.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3344
3446
|
"thead",
|
|
3345
3447
|
{
|
|
3346
3448
|
ref,
|
|
@@ -3354,7 +3456,7 @@ var TableHeader = React26.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
3354
3456
|
}
|
|
3355
3457
|
));
|
|
3356
3458
|
TableHeader.displayName = "TableHeader";
|
|
3357
|
-
var TableBody =
|
|
3459
|
+
var TableBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3358
3460
|
"tbody",
|
|
3359
3461
|
{
|
|
3360
3462
|
ref,
|
|
@@ -3364,7 +3466,7 @@ var TableBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3364
3466
|
}
|
|
3365
3467
|
));
|
|
3366
3468
|
TableBody.displayName = "TableBody";
|
|
3367
|
-
var TableFooter =
|
|
3469
|
+
var TableFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3368
3470
|
"tfoot",
|
|
3369
3471
|
{
|
|
3370
3472
|
ref,
|
|
@@ -3377,7 +3479,7 @@ var TableFooter = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3377
3479
|
}
|
|
3378
3480
|
));
|
|
3379
3481
|
TableFooter.displayName = "TableFooter";
|
|
3380
|
-
var TableRow =
|
|
3482
|
+
var TableRow = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3381
3483
|
"tr",
|
|
3382
3484
|
{
|
|
3383
3485
|
ref,
|
|
@@ -3390,9 +3492,9 @@ var TableRow = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3390
3492
|
}
|
|
3391
3493
|
));
|
|
3392
3494
|
TableRow.displayName = "TableRow";
|
|
3393
|
-
var TableHead =
|
|
3495
|
+
var TableHead = React27.forwardRef(({ className, ...props }, ref) => {
|
|
3394
3496
|
const size = useTableSize();
|
|
3395
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3396
3498
|
"th",
|
|
3397
3499
|
{
|
|
3398
3500
|
ref,
|
|
@@ -3407,9 +3509,9 @@ var TableHead = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
3407
3509
|
);
|
|
3408
3510
|
});
|
|
3409
3511
|
TableHead.displayName = "TableHead";
|
|
3410
|
-
var TableCell =
|
|
3512
|
+
var TableCell = React27.forwardRef(({ className, ...props }, ref) => {
|
|
3411
3513
|
const size = useTableSize();
|
|
3412
|
-
return /* @__PURE__ */ (0,
|
|
3514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3413
3515
|
"td",
|
|
3414
3516
|
{
|
|
3415
3517
|
ref,
|
|
@@ -3424,7 +3526,7 @@ var TableCell = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
3424
3526
|
);
|
|
3425
3527
|
});
|
|
3426
3528
|
TableCell.displayName = "TableCell";
|
|
3427
|
-
var TableCaption =
|
|
3529
|
+
var TableCaption = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3428
3530
|
"caption",
|
|
3429
3531
|
{
|
|
3430
3532
|
ref,
|
|
@@ -3437,11 +3539,11 @@ TableCaption.displayName = "TableCaption";
|
|
|
3437
3539
|
|
|
3438
3540
|
// src/tabs.tsx
|
|
3439
3541
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
3440
|
-
var
|
|
3441
|
-
var
|
|
3542
|
+
var React28 = __toESM(require("react"), 1);
|
|
3543
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3442
3544
|
var Tabs = TabsPrimitive.Root;
|
|
3443
3545
|
var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
|
|
3444
|
-
var TabsList =
|
|
3546
|
+
var TabsList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3445
3547
|
TabsPrimitive.List,
|
|
3446
3548
|
{
|
|
3447
3549
|
ref,
|
|
@@ -3454,7 +3556,7 @@ var TabsList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3454
3556
|
}
|
|
3455
3557
|
));
|
|
3456
3558
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3457
|
-
var TabsTrigger =
|
|
3559
|
+
var TabsTrigger = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3458
3560
|
TabsPrimitive.Trigger,
|
|
3459
3561
|
{
|
|
3460
3562
|
ref,
|
|
@@ -3468,7 +3570,7 @@ var TabsTrigger = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3468
3570
|
}
|
|
3469
3571
|
));
|
|
3470
3572
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3471
|
-
var TabsTriggerCore =
|
|
3573
|
+
var TabsTriggerCore = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3472
3574
|
TabsPrimitive.Trigger,
|
|
3473
3575
|
{
|
|
3474
3576
|
ref,
|
|
@@ -3478,7 +3580,7 @@ var TabsTriggerCore = React27.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3478
3580
|
}
|
|
3479
3581
|
));
|
|
3480
3582
|
TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
|
|
3481
|
-
var TabsContent =
|
|
3583
|
+
var TabsContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3482
3584
|
TabsPrimitive.Content,
|
|
3483
3585
|
{
|
|
3484
3586
|
ref,
|
|
@@ -3494,8 +3596,8 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3494
3596
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3495
3597
|
|
|
3496
3598
|
// src/textarea.tsx
|
|
3497
|
-
var
|
|
3498
|
-
var
|
|
3599
|
+
var React29 = __toESM(require("react"), 1);
|
|
3600
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3499
3601
|
var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
|
|
3500
3602
|
var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
|
|
3501
3603
|
function getStretchClasses(className) {
|
|
@@ -3508,7 +3610,7 @@ function getStretchClasses(className) {
|
|
|
3508
3610
|
var TEXTAREA_ELEVATED_CLASS = "flex h-auto w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3509
3611
|
var TEXTAREA_CONTROL_CLASS = "flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3510
3612
|
function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
3511
|
-
|
|
3613
|
+
React29.useEffect(() => {
|
|
3512
3614
|
if (!autoGrow || !ref.current) return;
|
|
3513
3615
|
const textarea = ref.current;
|
|
3514
3616
|
textarea.style.height = "auto";
|
|
@@ -3524,8 +3626,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
|
3524
3626
|
}, [value, autoGrow, minHeight, maxHeight, ref]);
|
|
3525
3627
|
}
|
|
3526
3628
|
function useMergedTextareaRef(forwarded) {
|
|
3527
|
-
const internal =
|
|
3528
|
-
const callback =
|
|
3629
|
+
const internal = React29.useRef(null);
|
|
3630
|
+
const callback = React29.useCallback(
|
|
3529
3631
|
(node) => {
|
|
3530
3632
|
internal.current = node;
|
|
3531
3633
|
if (typeof forwarded === "function") forwarded(node);
|
|
@@ -3542,13 +3644,13 @@ function boxStyle(minHeight, maxHeight) {
|
|
|
3542
3644
|
maxHeight: maxHeight ? `${maxHeight}px` : void 0
|
|
3543
3645
|
};
|
|
3544
3646
|
}
|
|
3545
|
-
var Textarea =
|
|
3647
|
+
var Textarea = React29.forwardRef(
|
|
3546
3648
|
({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
|
|
3547
3649
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3548
3650
|
const stretchClasses = getStretchClasses(className);
|
|
3549
3651
|
const needsWrapper = Boolean(wrapperClassName || stretchClasses);
|
|
3550
3652
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3551
|
-
const textarea = /* @__PURE__ */ (0,
|
|
3653
|
+
const textarea = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3552
3654
|
"textarea",
|
|
3553
3655
|
{
|
|
3554
3656
|
ref: callback,
|
|
@@ -3564,15 +3666,15 @@ var Textarea = React28.forwardRef(
|
|
|
3564
3666
|
}
|
|
3565
3667
|
);
|
|
3566
3668
|
if (!needsWrapper) return textarea;
|
|
3567
|
-
return /* @__PURE__ */ (0,
|
|
3669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
|
|
3568
3670
|
}
|
|
3569
3671
|
);
|
|
3570
3672
|
Textarea.displayName = "Textarea";
|
|
3571
|
-
var BasicTextarea =
|
|
3673
|
+
var BasicTextarea = React29.forwardRef(
|
|
3572
3674
|
({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
|
|
3573
3675
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3574
3676
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3575
|
-
return /* @__PURE__ */ (0,
|
|
3677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3576
3678
|
"textarea",
|
|
3577
3679
|
{
|
|
3578
3680
|
ref: callback,
|
|
@@ -3590,7 +3692,7 @@ var BasicTextarea = React28.forwardRef(
|
|
|
3590
3692
|
}
|
|
3591
3693
|
);
|
|
3592
3694
|
BasicTextarea.displayName = "BasicTextarea";
|
|
3593
|
-
var TextareaWithPrefix =
|
|
3695
|
+
var TextareaWithPrefix = React29.forwardRef(
|
|
3594
3696
|
({
|
|
3595
3697
|
prefix,
|
|
3596
3698
|
className,
|
|
@@ -3602,13 +3704,13 @@ var TextareaWithPrefix = React28.forwardRef(
|
|
|
3602
3704
|
}, forwarded) => {
|
|
3603
3705
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3604
3706
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3605
|
-
return /* @__PURE__ */ (0,
|
|
3707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3606
3708
|
"div",
|
|
3607
3709
|
{
|
|
3608
3710
|
className: cn("relative", getStretchClasses(className), wrapperClassName),
|
|
3609
3711
|
children: [
|
|
3610
|
-
prefix ? /* @__PURE__ */ (0,
|
|
3611
|
-
/* @__PURE__ */ (0,
|
|
3712
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
|
|
3713
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3612
3714
|
"textarea",
|
|
3613
3715
|
{
|
|
3614
3716
|
ref: callback,
|
|
@@ -3687,34 +3789,37 @@ function useScrollFade() {
|
|
|
3687
3789
|
|
|
3688
3790
|
// src/hover-card.tsx
|
|
3689
3791
|
var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
|
|
3690
|
-
var
|
|
3691
|
-
var
|
|
3792
|
+
var React30 = __toESM(require("react"), 1);
|
|
3793
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3692
3794
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3693
3795
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3694
|
-
var HoverCardContent =
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
HoverCardPrimitive.
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
}
|
|
3796
|
+
var HoverCardContent = React30.forwardRef(
|
|
3797
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3798
|
+
const resolved = usePortalContainer(container);
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3800
|
+
HoverCardPrimitive.Content,
|
|
3801
|
+
{
|
|
3802
|
+
ref,
|
|
3803
|
+
"data-slot": "hover-card-content",
|
|
3804
|
+
align,
|
|
3805
|
+
sideOffset,
|
|
3806
|
+
className: cn(
|
|
3807
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3808
|
+
animated && MOTION_POPPER,
|
|
3809
|
+
className
|
|
3810
|
+
),
|
|
3811
|
+
...props
|
|
3812
|
+
}
|
|
3813
|
+
) });
|
|
3814
|
+
}
|
|
3815
|
+
);
|
|
3711
3816
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3712
3817
|
|
|
3713
3818
|
// src/radio-group.tsx
|
|
3714
3819
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
3715
|
-
var
|
|
3716
|
-
var
|
|
3717
|
-
var RadioGroupSizeContext =
|
|
3820
|
+
var React31 = __toESM(require("react"), 1);
|
|
3821
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3822
|
+
var RadioGroupSizeContext = React31.createContext("md");
|
|
3718
3823
|
var CONTROL_CLASSES = {
|
|
3719
3824
|
sm: "h-3.5 w-3.5",
|
|
3720
3825
|
md: "h-4 w-4",
|
|
@@ -3725,7 +3830,7 @@ var DOT_CLASSES = {
|
|
|
3725
3830
|
md: "h-1.5 w-1.5",
|
|
3726
3831
|
lg: "h-2 w-2"
|
|
3727
3832
|
};
|
|
3728
|
-
var RadioGroup3 =
|
|
3833
|
+
var RadioGroup3 = React31.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3729
3834
|
RadioGroupPrimitive.Root,
|
|
3730
3835
|
{
|
|
3731
3836
|
ref,
|
|
@@ -3735,10 +3840,10 @@ var RadioGroup3 = React30.forwardRef(({ className, size = "md", ...props }, ref)
|
|
|
3735
3840
|
}
|
|
3736
3841
|
) }));
|
|
3737
3842
|
RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3738
|
-
var RadioGroupItem =
|
|
3739
|
-
const groupSize =
|
|
3843
|
+
var RadioGroupItem = React31.forwardRef(({ className, size, ...props }, ref) => {
|
|
3844
|
+
const groupSize = React31.useContext(RadioGroupSizeContext);
|
|
3740
3845
|
const resolved = size ?? groupSize;
|
|
3741
|
-
return /* @__PURE__ */ (0,
|
|
3846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3742
3847
|
RadioGroupPrimitive.Item,
|
|
3743
3848
|
{
|
|
3744
3849
|
ref,
|
|
@@ -3755,7 +3860,7 @@ var RadioGroupItem = React30.forwardRef(({ className, size, ...props }, ref) =>
|
|
|
3755
3860
|
className
|
|
3756
3861
|
),
|
|
3757
3862
|
...props,
|
|
3758
|
-
children: /* @__PURE__ */ (0,
|
|
3863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3759
3864
|
"div",
|
|
3760
3865
|
{
|
|
3761
3866
|
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
@@ -3768,7 +3873,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
3768
3873
|
|
|
3769
3874
|
// src/resizable.tsx
|
|
3770
3875
|
var import_react_resizable_panels = require("react-resizable-panels");
|
|
3771
|
-
var
|
|
3876
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3772
3877
|
var HANDLE_SIZES = {
|
|
3773
3878
|
xs: "w-0.5 [&[aria-orientation=horizontal]]:h-0.5 [&[aria-orientation=horizontal]]:w-full",
|
|
3774
3879
|
sm: "w-1 [&[aria-orientation=horizontal]]:h-1 [&[aria-orientation=horizontal]]:w-full",
|
|
@@ -3782,7 +3887,7 @@ var HANDLE_SIZES = {
|
|
|
3782
3887
|
var ResizablePanelGroup = ({
|
|
3783
3888
|
className,
|
|
3784
3889
|
...props
|
|
3785
|
-
}) => /* @__PURE__ */ (0,
|
|
3890
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3786
3891
|
import_react_resizable_panels.Group,
|
|
3787
3892
|
{
|
|
3788
3893
|
"data-slot": "resizable-group",
|
|
@@ -3797,7 +3902,7 @@ var ResizableHandle = ({
|
|
|
3797
3902
|
size = "xs",
|
|
3798
3903
|
className,
|
|
3799
3904
|
...props
|
|
3800
|
-
}) => /* @__PURE__ */ (0,
|
|
3905
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3801
3906
|
import_react_resizable_panels.Separator,
|
|
3802
3907
|
{
|
|
3803
3908
|
"data-slot": "resizable-handle",
|
|
@@ -3817,15 +3922,15 @@ var ResizableHandle = ({
|
|
|
3817
3922
|
className
|
|
3818
3923
|
),
|
|
3819
3924
|
...props,
|
|
3820
|
-
children: withHandle ? /* @__PURE__ */ (0,
|
|
3925
|
+
children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
|
|
3821
3926
|
}
|
|
3822
3927
|
);
|
|
3823
3928
|
ResizableHandle.displayName = "ResizableHandle";
|
|
3824
3929
|
|
|
3825
3930
|
// src/slider.tsx
|
|
3826
3931
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3827
|
-
var
|
|
3828
|
-
var
|
|
3932
|
+
var React32 = __toESM(require("react"), 1);
|
|
3933
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3829
3934
|
var TRACK_CLASSES = {
|
|
3830
3935
|
sm: "h-1",
|
|
3831
3936
|
md: "h-1.5",
|
|
@@ -3836,12 +3941,12 @@ var THUMB_CLASSES = {
|
|
|
3836
3941
|
md: "h-4 w-4",
|
|
3837
3942
|
lg: "h-5 w-5"
|
|
3838
3943
|
};
|
|
3839
|
-
var Slider =
|
|
3944
|
+
var Slider = React32.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
3840
3945
|
const thumbCount = Math.max(
|
|
3841
3946
|
1,
|
|
3842
3947
|
(props.value ?? props.defaultValue ?? [0]).length
|
|
3843
3948
|
);
|
|
3844
|
-
return /* @__PURE__ */ (0,
|
|
3949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3845
3950
|
SliderPrimitive.Root,
|
|
3846
3951
|
{
|
|
3847
3952
|
ref,
|
|
@@ -3853,7 +3958,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3853
3958
|
),
|
|
3854
3959
|
...props,
|
|
3855
3960
|
children: [
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3857
3962
|
SliderPrimitive.Track,
|
|
3858
3963
|
{
|
|
3859
3964
|
"data-slot": "slider-track",
|
|
@@ -3862,7 +3967,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3862
3967
|
TRACK_CLASSES[size],
|
|
3863
3968
|
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
3864
3969
|
),
|
|
3865
|
-
children: /* @__PURE__ */ (0,
|
|
3970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3866
3971
|
SliderPrimitive.Range,
|
|
3867
3972
|
{
|
|
3868
3973
|
"data-slot": "slider-range",
|
|
@@ -3871,7 +3976,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3871
3976
|
)
|
|
3872
3977
|
}
|
|
3873
3978
|
),
|
|
3874
|
-
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0,
|
|
3979
|
+
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3875
3980
|
SliderPrimitive.Thumb,
|
|
3876
3981
|
{
|
|
3877
3982
|
"data-slot": "slider-thumb",
|
|
@@ -3898,8 +4003,8 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
3898
4003
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
3899
4004
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
3900
4005
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3901
|
-
var
|
|
3902
|
-
var
|
|
4006
|
+
var React33 = __toESM(require("react"), 1);
|
|
4007
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3903
4008
|
var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
3904
4009
|
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3905
4010
|
{
|
|
@@ -3920,7 +4025,7 @@ var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
|
3920
4025
|
}
|
|
3921
4026
|
}
|
|
3922
4027
|
);
|
|
3923
|
-
var Toggle =
|
|
4028
|
+
var Toggle = React33.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3924
4029
|
TogglePrimitive.Root,
|
|
3925
4030
|
{
|
|
3926
4031
|
ref,
|
|
@@ -3930,21 +4035,21 @@ var Toggle = React32.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
3930
4035
|
}
|
|
3931
4036
|
));
|
|
3932
4037
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3933
|
-
var ToggleGroupContext =
|
|
3934
|
-
var ToggleGroup =
|
|
4038
|
+
var ToggleGroupContext = React33.createContext({ size: "default", variant: "default" });
|
|
4039
|
+
var ToggleGroup = React33.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3935
4040
|
ToggleGroupPrimitive.Root,
|
|
3936
4041
|
{
|
|
3937
4042
|
ref,
|
|
3938
4043
|
"data-slot": "toggle-group",
|
|
3939
4044
|
className: cn("flex items-center justify-center gap-1", className),
|
|
3940
4045
|
...props,
|
|
3941
|
-
children: /* @__PURE__ */ (0,
|
|
4046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3942
4047
|
}
|
|
3943
4048
|
));
|
|
3944
4049
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3945
|
-
var ToggleGroupItem =
|
|
3946
|
-
const context =
|
|
3947
|
-
return /* @__PURE__ */ (0,
|
|
4050
|
+
var ToggleGroupItem = React33.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
4051
|
+
const context = React33.useContext(ToggleGroupContext);
|
|
4052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3948
4053
|
ToggleGroupPrimitive.Item,
|
|
3949
4054
|
{
|
|
3950
4055
|
ref,
|
|
@@ -3965,21 +4070,22 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
3965
4070
|
|
|
3966
4071
|
// src/tooltip.tsx
|
|
3967
4072
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3968
|
-
var
|
|
3969
|
-
var
|
|
4073
|
+
var React34 = __toESM(require("react"), 1);
|
|
4074
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3970
4075
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3971
4076
|
var Tooltip = TooltipPrimitive.Root;
|
|
3972
4077
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3973
|
-
var TooltipContent =
|
|
4078
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3974
4079
|
const resolved = usePortalContainer(container);
|
|
3975
|
-
return /* @__PURE__ */ (0,
|
|
4080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3976
4081
|
TooltipPrimitive.Content,
|
|
3977
4082
|
{
|
|
3978
4083
|
ref,
|
|
3979
4084
|
"data-slot": "tooltip-content",
|
|
3980
4085
|
sideOffset,
|
|
3981
4086
|
className: cn(
|
|
3982
|
-
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md
|
|
4087
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
4088
|
+
animated && MOTION_POPPER,
|
|
3983
4089
|
className
|
|
3984
4090
|
),
|
|
3985
4091
|
...props
|