@pactor-app/ui 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PECP7DJB.js → chunk-2B5YV2HR.js} +1 -1
- package/dist/{chunk-HW6M3BEF.js → chunk-3KCE7ROX.js} +22 -6
- package/dist/{chunk-VM4FESQB.js → chunk-AUSWAD26.js} +79 -79
- package/dist/{chunk-TAJXMOEX.js → chunk-CWUY7LXF.js} +2 -2
- package/dist/{chunk-NVORKHWX.js → chunk-XEK5NQJA.js} +1 -1
- package/dist/components/index.cjs +461 -443
- package/dist/components/index.d.cts +11 -4
- package/dist/components/index.d.ts +11 -4
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +464 -446
- package/dist/index.js +5 -5
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
|
@@ -982,7 +982,69 @@ function Breadcrumb2({ items = [], className, style }) {
|
|
|
982
982
|
|
|
983
983
|
// src/components/components/Button/index.tsx
|
|
984
984
|
var import_lucide_react4 = require("lucide-react");
|
|
985
|
+
|
|
986
|
+
// src/ui/tooltip.tsx
|
|
987
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
985
988
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
989
|
+
function TooltipProvider({
|
|
990
|
+
delay = 0,
|
|
991
|
+
...props
|
|
992
|
+
}) {
|
|
993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
994
|
+
import_tooltip.Tooltip.Provider,
|
|
995
|
+
{
|
|
996
|
+
"data-slot": "tooltip-provider",
|
|
997
|
+
delay,
|
|
998
|
+
...props
|
|
999
|
+
}
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
function Tooltip({
|
|
1003
|
+
...props
|
|
1004
|
+
}) {
|
|
1005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
1006
|
+
}
|
|
1007
|
+
function TooltipTrigger({
|
|
1008
|
+
...props
|
|
1009
|
+
}) {
|
|
1010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1011
|
+
}
|
|
1012
|
+
function TooltipContent({
|
|
1013
|
+
className,
|
|
1014
|
+
side = "top",
|
|
1015
|
+
sideOffset = 4,
|
|
1016
|
+
align = "center",
|
|
1017
|
+
children,
|
|
1018
|
+
...props
|
|
1019
|
+
}) {
|
|
1020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1021
|
+
import_tooltip.Tooltip.Positioner,
|
|
1022
|
+
{
|
|
1023
|
+
align,
|
|
1024
|
+
side,
|
|
1025
|
+
sideOffset,
|
|
1026
|
+
className: "isolate z-50",
|
|
1027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1028
|
+
import_tooltip.Tooltip.Popup,
|
|
1029
|
+
{
|
|
1030
|
+
"data-slot": "tooltip-content",
|
|
1031
|
+
className: cn(
|
|
1032
|
+
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1033
|
+
className
|
|
1034
|
+
),
|
|
1035
|
+
...props,
|
|
1036
|
+
children: [
|
|
1037
|
+
children,
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
1039
|
+
]
|
|
1040
|
+
}
|
|
1041
|
+
)
|
|
1042
|
+
}
|
|
1043
|
+
) });
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
// src/components/components/Button/index.tsx
|
|
1047
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
986
1048
|
var variantMap2 = {
|
|
987
1049
|
default: "outline",
|
|
988
1050
|
primary: "default",
|
|
@@ -998,6 +1060,7 @@ var sizeMap = {
|
|
|
998
1060
|
function Button2({
|
|
999
1061
|
text,
|
|
1000
1062
|
icon,
|
|
1063
|
+
tooltip,
|
|
1001
1064
|
variant = "default",
|
|
1002
1065
|
danger,
|
|
1003
1066
|
size = "middle",
|
|
@@ -1010,7 +1073,7 @@ function Button2({
|
|
|
1010
1073
|
children
|
|
1011
1074
|
}) {
|
|
1012
1075
|
const textual = variant === "link" || variant === "text";
|
|
1013
|
-
|
|
1076
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1014
1077
|
Button,
|
|
1015
1078
|
{
|
|
1016
1079
|
type: submit ? "submit" : "button",
|
|
@@ -1026,17 +1089,24 @@ function Button2({
|
|
|
1026
1089
|
className
|
|
1027
1090
|
),
|
|
1028
1091
|
children: [
|
|
1029
|
-
loading ? /* @__PURE__ */ (0,
|
|
1092
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react4.Loader2, { "aria-hidden": true, className: "animate-spin" }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: icon, size: "sm" }) : null,
|
|
1030
1093
|
text ?? children
|
|
1031
1094
|
]
|
|
1032
1095
|
}
|
|
1033
1096
|
);
|
|
1097
|
+
if (tooltip) {
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipTrigger, { render: button }),
|
|
1100
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: tooltip })
|
|
1101
|
+
] });
|
|
1102
|
+
}
|
|
1103
|
+
return button;
|
|
1034
1104
|
}
|
|
1035
1105
|
|
|
1036
1106
|
// src/ui/button-group.tsx
|
|
1037
|
-
var
|
|
1107
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1038
1108
|
function ButtonGroup({ className, ...props }) {
|
|
1039
|
-
return /* @__PURE__ */ (0,
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1040
1110
|
"div",
|
|
1041
1111
|
{
|
|
1042
1112
|
role: "group",
|
|
@@ -1051,9 +1121,9 @@ function ButtonGroup({ className, ...props }) {
|
|
|
1051
1121
|
}
|
|
1052
1122
|
|
|
1053
1123
|
// src/components/components/ButtonGroup/index.tsx
|
|
1054
|
-
var
|
|
1124
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1055
1125
|
function ButtonGroup2({ className, style, children }) {
|
|
1056
|
-
return /* @__PURE__ */ (0,
|
|
1126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ButtonGroup, { className, style, children });
|
|
1057
1127
|
}
|
|
1058
1128
|
|
|
1059
1129
|
// src/components/components/Calendar/index.tsx
|
|
@@ -1063,7 +1133,7 @@ var import_react4 = require("react");
|
|
|
1063
1133
|
// src/ui/calendar.tsx
|
|
1064
1134
|
var import_lucide_react5 = require("lucide-react");
|
|
1065
1135
|
var import_react_day_picker = require("react-day-picker");
|
|
1066
|
-
var
|
|
1136
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1067
1137
|
function Calendar2({
|
|
1068
1138
|
className,
|
|
1069
1139
|
classNames,
|
|
@@ -1071,7 +1141,7 @@ function Calendar2({
|
|
|
1071
1141
|
...props
|
|
1072
1142
|
}) {
|
|
1073
1143
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1074
|
-
return /* @__PURE__ */ (0,
|
|
1144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1075
1145
|
import_react_day_picker.DayPicker,
|
|
1076
1146
|
{
|
|
1077
1147
|
showOutsideDays,
|
|
@@ -1128,7 +1198,7 @@ function Calendar2({
|
|
|
1128
1198
|
...classNames
|
|
1129
1199
|
},
|
|
1130
1200
|
components: {
|
|
1131
|
-
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0,
|
|
1201
|
+
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.ChevronLeftIcon, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.ChevronRightIcon, { className: "size-4" })
|
|
1132
1202
|
},
|
|
1133
1203
|
...props
|
|
1134
1204
|
}
|
|
@@ -1154,7 +1224,7 @@ function formItemClass(layout) {
|
|
|
1154
1224
|
}
|
|
1155
1225
|
|
|
1156
1226
|
// src/components/components/Calendar/index.tsx
|
|
1157
|
-
var
|
|
1227
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1158
1228
|
function parseValue(value) {
|
|
1159
1229
|
if (typeof value !== "string" || value === "") return void 0;
|
|
1160
1230
|
const date = (0, import_date_fns.parseISO)(value);
|
|
@@ -1188,7 +1258,7 @@ function Calendar3({
|
|
|
1188
1258
|
}
|
|
1189
1259
|
onChange?.(next);
|
|
1190
1260
|
};
|
|
1191
|
-
const calendar = /* @__PURE__ */ (0,
|
|
1261
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1192
1262
|
Calendar2,
|
|
1193
1263
|
{
|
|
1194
1264
|
mode,
|
|
@@ -1201,16 +1271,16 @@ function Calendar3({
|
|
|
1201
1271
|
);
|
|
1202
1272
|
if (inForm && form && name) {
|
|
1203
1273
|
const error = form.errors[name];
|
|
1204
|
-
return /* @__PURE__ */ (0,
|
|
1274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1205
1275
|
"div",
|
|
1206
1276
|
{
|
|
1207
1277
|
"data-slot": "form-item",
|
|
1208
1278
|
className: cn(formItemClass(form.layout), className),
|
|
1209
1279
|
style,
|
|
1210
1280
|
children: [
|
|
1211
|
-
label ? /* @__PURE__ */ (0,
|
|
1281
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1212
1282
|
calendar,
|
|
1213
|
-
error ? /* @__PURE__ */ (0,
|
|
1283
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1214
1284
|
]
|
|
1215
1285
|
}
|
|
1216
1286
|
);
|
|
@@ -1219,7 +1289,7 @@ function Calendar3({
|
|
|
1219
1289
|
}
|
|
1220
1290
|
|
|
1221
1291
|
// src/ui/card.tsx
|
|
1222
|
-
var
|
|
1292
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1223
1293
|
var cardRoundedClasses = {
|
|
1224
1294
|
none: "rounded-none",
|
|
1225
1295
|
sm: "rounded-sm",
|
|
@@ -1234,7 +1304,7 @@ function Card({
|
|
|
1234
1304
|
rounded = "lg",
|
|
1235
1305
|
...props
|
|
1236
1306
|
}) {
|
|
1237
|
-
return /* @__PURE__ */ (0,
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1238
1308
|
"div",
|
|
1239
1309
|
{
|
|
1240
1310
|
"data-slot": "card",
|
|
@@ -1248,7 +1318,7 @@ function Card({
|
|
|
1248
1318
|
);
|
|
1249
1319
|
}
|
|
1250
1320
|
function CardHeader({ className, ...props }) {
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1252
1322
|
"div",
|
|
1253
1323
|
{
|
|
1254
1324
|
"data-slot": "card-header",
|
|
@@ -1261,7 +1331,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1261
1331
|
);
|
|
1262
1332
|
}
|
|
1263
1333
|
function CardTitle({ className, ...props }) {
|
|
1264
|
-
return /* @__PURE__ */ (0,
|
|
1334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1265
1335
|
"div",
|
|
1266
1336
|
{
|
|
1267
1337
|
"data-slot": "card-title",
|
|
@@ -1271,7 +1341,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1271
1341
|
);
|
|
1272
1342
|
}
|
|
1273
1343
|
function CardContent({ className, ...props }) {
|
|
1274
|
-
return /* @__PURE__ */ (0,
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1275
1345
|
"div",
|
|
1276
1346
|
{
|
|
1277
1347
|
"data-slot": "card-content",
|
|
@@ -1282,17 +1352,17 @@ function CardContent({ className, ...props }) {
|
|
|
1282
1352
|
}
|
|
1283
1353
|
|
|
1284
1354
|
// src/components/components/Card/index.tsx
|
|
1285
|
-
var
|
|
1355
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1286
1356
|
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1288
1358
|
Card,
|
|
1289
1359
|
{
|
|
1290
1360
|
rounded,
|
|
1291
1361
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1292
1362
|
style,
|
|
1293
1363
|
children: [
|
|
1294
|
-
title ? /* @__PURE__ */ (0,
|
|
1295
|
-
/* @__PURE__ */ (0,
|
|
1364
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardHeader, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardTitle, { children: title }) }) : null,
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardContent, { className: "px-4", children })
|
|
1296
1366
|
]
|
|
1297
1367
|
}
|
|
1298
1368
|
);
|
|
@@ -1306,7 +1376,7 @@ var import_react5 = require("react");
|
|
|
1306
1376
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1307
1377
|
var import_lucide_react6 = require("lucide-react");
|
|
1308
1378
|
var React3 = __toESM(require("react"), 1);
|
|
1309
|
-
var
|
|
1379
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1310
1380
|
var CarouselContext = React3.createContext(null);
|
|
1311
1381
|
function useCarousel() {
|
|
1312
1382
|
const context = React3.useContext(CarouselContext);
|
|
@@ -1361,7 +1431,7 @@ function Carousel({
|
|
|
1361
1431
|
api.off("select", onSelect);
|
|
1362
1432
|
};
|
|
1363
1433
|
}, [api, onSelect]);
|
|
1364
|
-
return /* @__PURE__ */ (0,
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1365
1435
|
CarouselContext.Provider,
|
|
1366
1436
|
{
|
|
1367
1437
|
value: {
|
|
@@ -1374,7 +1444,7 @@ function Carousel({
|
|
|
1374
1444
|
canScrollPrev,
|
|
1375
1445
|
canScrollNext
|
|
1376
1446
|
},
|
|
1377
|
-
children: /* @__PURE__ */ (0,
|
|
1447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1378
1448
|
"div",
|
|
1379
1449
|
{
|
|
1380
1450
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1391,7 +1461,7 @@ function Carousel({
|
|
|
1391
1461
|
}
|
|
1392
1462
|
function CarouselContent({ className, ...props }) {
|
|
1393
1463
|
const { carouselRef, orientation } = useCarousel();
|
|
1394
|
-
return /* @__PURE__ */ (0,
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-viewport", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1395
1465
|
"div",
|
|
1396
1466
|
{
|
|
1397
1467
|
className: cn(
|
|
@@ -1405,7 +1475,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1405
1475
|
}
|
|
1406
1476
|
function CarouselItem({ className, ...props }) {
|
|
1407
1477
|
const { orientation } = useCarousel();
|
|
1408
|
-
return /* @__PURE__ */ (0,
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1409
1479
|
"div",
|
|
1410
1480
|
{
|
|
1411
1481
|
role: "group",
|
|
@@ -1427,7 +1497,7 @@ function CarouselPrevious({
|
|
|
1427
1497
|
...props
|
|
1428
1498
|
}) {
|
|
1429
1499
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1431
1501
|
Button,
|
|
1432
1502
|
{
|
|
1433
1503
|
"data-slot": "carousel-previous",
|
|
@@ -1442,8 +1512,8 @@ function CarouselPrevious({
|
|
|
1442
1512
|
onClick: scrollPrev,
|
|
1443
1513
|
...props,
|
|
1444
1514
|
children: [
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronLeftIcon, {}),
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1447
1517
|
]
|
|
1448
1518
|
}
|
|
1449
1519
|
);
|
|
@@ -1455,7 +1525,7 @@ function CarouselNext({
|
|
|
1455
1525
|
...props
|
|
1456
1526
|
}) {
|
|
1457
1527
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1459
1529
|
Button,
|
|
1460
1530
|
{
|
|
1461
1531
|
"data-slot": "carousel-next",
|
|
@@ -1470,15 +1540,15 @@ function CarouselNext({
|
|
|
1470
1540
|
onClick: scrollNext,
|
|
1471
1541
|
...props,
|
|
1472
1542
|
children: [
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1474
|
-
/* @__PURE__ */ (0,
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronRightIcon, {}),
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1475
1545
|
]
|
|
1476
1546
|
}
|
|
1477
1547
|
);
|
|
1478
1548
|
}
|
|
1479
1549
|
|
|
1480
1550
|
// src/components/components/Carousel/index.tsx
|
|
1481
|
-
var
|
|
1551
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1482
1552
|
function isDslNode(item) {
|
|
1483
1553
|
return typeof item.type === "string";
|
|
1484
1554
|
}
|
|
@@ -1503,7 +1573,7 @@ function Carousel2({
|
|
|
1503
1573
|
}, interval);
|
|
1504
1574
|
return () => clearInterval(timer);
|
|
1505
1575
|
}, [api, autoplay, loop]);
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1507
1577
|
Carousel,
|
|
1508
1578
|
{
|
|
1509
1579
|
opts: { loop: loop === true },
|
|
@@ -1511,7 +1581,7 @@ function Carousel2({
|
|
|
1511
1581
|
className,
|
|
1512
1582
|
style,
|
|
1513
1583
|
children: [
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselItem, { children: isDslNode(item) ? renderChildren([item]) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1515
1585
|
"img",
|
|
1516
1586
|
{
|
|
1517
1587
|
src: item.src,
|
|
@@ -1519,8 +1589,8 @@ function Carousel2({
|
|
|
1519
1589
|
className: "w-full rounded-md object-cover"
|
|
1520
1590
|
}
|
|
1521
1591
|
) }, index)) }),
|
|
1522
|
-
/* @__PURE__ */ (0,
|
|
1523
|
-
/* @__PURE__ */ (0,
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselPrevious, {}),
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselNext, {})
|
|
1524
1594
|
]
|
|
1525
1595
|
}
|
|
1526
1596
|
);
|
|
@@ -1532,9 +1602,9 @@ var import_react6 = require("react");
|
|
|
1532
1602
|
// src/ui/checkbox.tsx
|
|
1533
1603
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1534
1604
|
var import_lucide_react7 = require("lucide-react");
|
|
1535
|
-
var
|
|
1605
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1536
1606
|
function Checkbox({ className, ...props }) {
|
|
1537
|
-
return /* @__PURE__ */ (0,
|
|
1607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1538
1608
|
import_checkbox.Checkbox.Root,
|
|
1539
1609
|
{
|
|
1540
1610
|
"data-slot": "checkbox",
|
|
@@ -1543,12 +1613,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1543
1613
|
className
|
|
1544
1614
|
),
|
|
1545
1615
|
...props,
|
|
1546
|
-
children: /* @__PURE__ */ (0,
|
|
1616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1547
1617
|
import_checkbox.Checkbox.Indicator,
|
|
1548
1618
|
{
|
|
1549
1619
|
"data-slot": "checkbox-indicator",
|
|
1550
1620
|
className: "flex items-center justify-center text-current",
|
|
1551
|
-
children: /* @__PURE__ */ (0,
|
|
1621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1552
1622
|
}
|
|
1553
1623
|
)
|
|
1554
1624
|
}
|
|
@@ -1556,7 +1626,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1556
1626
|
}
|
|
1557
1627
|
|
|
1558
1628
|
// src/components/components/Checkbox/index.tsx
|
|
1559
|
-
var
|
|
1629
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1560
1630
|
function Checkbox2({
|
|
1561
1631
|
name,
|
|
1562
1632
|
label,
|
|
@@ -1585,13 +1655,13 @@ function Checkbox2({
|
|
|
1585
1655
|
}
|
|
1586
1656
|
onChange?.(next);
|
|
1587
1657
|
};
|
|
1588
|
-
const control = /* @__PURE__ */ (0,
|
|
1658
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1589
1659
|
"span",
|
|
1590
1660
|
{
|
|
1591
1661
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1592
1662
|
style: inForm ? void 0 : style,
|
|
1593
1663
|
children: [
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1664
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1595
1665
|
Checkbox,
|
|
1596
1666
|
{
|
|
1597
1667
|
id: controlId,
|
|
@@ -1601,12 +1671,12 @@ function Checkbox2({
|
|
|
1601
1671
|
onCheckedChange: handleChange
|
|
1602
1672
|
}
|
|
1603
1673
|
),
|
|
1604
|
-
label ? /* @__PURE__ */ (0,
|
|
1674
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1605
1675
|
]
|
|
1606
1676
|
}
|
|
1607
1677
|
);
|
|
1608
1678
|
if (inForm && form && name) {
|
|
1609
|
-
return /* @__PURE__ */ (0,
|
|
1679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1610
1680
|
"div",
|
|
1611
1681
|
{
|
|
1612
1682
|
"data-slot": "form-item",
|
|
@@ -1614,7 +1684,7 @@ function Checkbox2({
|
|
|
1614
1684
|
style,
|
|
1615
1685
|
children: [
|
|
1616
1686
|
control,
|
|
1617
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
1687
|
+
form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
|
|
1618
1688
|
]
|
|
1619
1689
|
}
|
|
1620
1690
|
);
|
|
@@ -1628,18 +1698,18 @@ var import_react7 = require("react");
|
|
|
1628
1698
|
// src/ui/collapsible.tsx
|
|
1629
1699
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1630
1700
|
var import_lucide_react8 = require("lucide-react");
|
|
1631
|
-
var
|
|
1701
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1632
1702
|
function Collapsible({
|
|
1633
1703
|
...props
|
|
1634
1704
|
}) {
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1636
1706
|
}
|
|
1637
1707
|
function CollapsibleTrigger({
|
|
1638
1708
|
className,
|
|
1639
1709
|
children,
|
|
1640
1710
|
...props
|
|
1641
1711
|
}) {
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1643
1713
|
import_collapsible.Collapsible.Trigger,
|
|
1644
1714
|
{
|
|
1645
1715
|
"data-slot": "collapsible-trigger",
|
|
@@ -1650,7 +1720,7 @@ function CollapsibleTrigger({
|
|
|
1650
1720
|
...props,
|
|
1651
1721
|
children: [
|
|
1652
1722
|
children,
|
|
1653
|
-
/* @__PURE__ */ (0,
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react8.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1654
1724
|
]
|
|
1655
1725
|
}
|
|
1656
1726
|
);
|
|
@@ -1659,7 +1729,7 @@ function CollapsibleContent({
|
|
|
1659
1729
|
className,
|
|
1660
1730
|
...props
|
|
1661
1731
|
}) {
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1663
1733
|
import_collapsible.Collapsible.Panel,
|
|
1664
1734
|
{
|
|
1665
1735
|
"data-slot": "collapsible-content",
|
|
@@ -1673,7 +1743,7 @@ function CollapsibleContent({
|
|
|
1673
1743
|
}
|
|
1674
1744
|
|
|
1675
1745
|
// src/components/components/Collapsible/index.tsx
|
|
1676
|
-
var
|
|
1746
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1677
1747
|
function Collapsible2({
|
|
1678
1748
|
title,
|
|
1679
1749
|
open,
|
|
@@ -1683,7 +1753,7 @@ function Collapsible2({
|
|
|
1683
1753
|
}) {
|
|
1684
1754
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1685
1755
|
const controlled = open !== void 0;
|
|
1686
|
-
return /* @__PURE__ */ (0,
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1687
1757
|
Collapsible,
|
|
1688
1758
|
{
|
|
1689
1759
|
open: controlled ? open : innerOpen,
|
|
@@ -1695,8 +1765,8 @@ function Collapsible2({
|
|
|
1695
1765
|
className,
|
|
1696
1766
|
style,
|
|
1697
1767
|
children: [
|
|
1698
|
-
title ? /* @__PURE__ */ (0,
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1768
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1769
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleContent, { children })
|
|
1700
1770
|
]
|
|
1701
1771
|
}
|
|
1702
1772
|
);
|
|
@@ -1710,16 +1780,16 @@ var import_lucide_react9 = require("lucide-react");
|
|
|
1710
1780
|
|
|
1711
1781
|
// src/ui/popover.tsx
|
|
1712
1782
|
var import_popover = require("@base-ui/react/popover");
|
|
1713
|
-
var
|
|
1783
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1714
1784
|
function Popover({
|
|
1715
1785
|
...props
|
|
1716
1786
|
}) {
|
|
1717
|
-
return /* @__PURE__ */ (0,
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1718
1788
|
}
|
|
1719
1789
|
function PopoverTrigger({
|
|
1720
1790
|
...props
|
|
1721
1791
|
}) {
|
|
1722
|
-
return /* @__PURE__ */ (0,
|
|
1792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1723
1793
|
}
|
|
1724
1794
|
function PopoverContent({
|
|
1725
1795
|
className,
|
|
@@ -1729,7 +1799,7 @@ function PopoverContent({
|
|
|
1729
1799
|
anchor,
|
|
1730
1800
|
...props
|
|
1731
1801
|
}) {
|
|
1732
|
-
return /* @__PURE__ */ (0,
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1733
1803
|
import_popover.Popover.Positioner,
|
|
1734
1804
|
{
|
|
1735
1805
|
align,
|
|
@@ -1737,7 +1807,7 @@ function PopoverContent({
|
|
|
1737
1807
|
sideOffset,
|
|
1738
1808
|
anchor,
|
|
1739
1809
|
className: "isolate z-50",
|
|
1740
|
-
children: /* @__PURE__ */ (0,
|
|
1810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1741
1811
|
import_popover.Popover.Popup,
|
|
1742
1812
|
{
|
|
1743
1813
|
"data-slot": "popover-content",
|
|
@@ -1753,20 +1823,20 @@ function PopoverContent({
|
|
|
1753
1823
|
}
|
|
1754
1824
|
|
|
1755
1825
|
// src/ui/combobox.tsx
|
|
1756
|
-
var
|
|
1826
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1757
1827
|
function Combobox({
|
|
1758
1828
|
open,
|
|
1759
1829
|
onOpenChange,
|
|
1760
1830
|
children
|
|
1761
1831
|
}) {
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1763
1833
|
}
|
|
1764
1834
|
function ComboboxTrigger({
|
|
1765
1835
|
className,
|
|
1766
1836
|
children,
|
|
1767
1837
|
...props
|
|
1768
1838
|
}) {
|
|
1769
|
-
return /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1770
1840
|
PopoverTrigger,
|
|
1771
1841
|
{
|
|
1772
1842
|
"data-slot": "combobox-trigger",
|
|
@@ -1776,8 +1846,8 @@ function ComboboxTrigger({
|
|
|
1776
1846
|
),
|
|
1777
1847
|
...props,
|
|
1778
1848
|
children: [
|
|
1779
|
-
/* @__PURE__ */ (0,
|
|
1780
|
-
/* @__PURE__ */ (0,
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children }),
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.ChevronsUpDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
1781
1851
|
]
|
|
1782
1852
|
}
|
|
1783
1853
|
);
|
|
@@ -1787,7 +1857,7 @@ function ComboboxContent({
|
|
|
1787
1857
|
children,
|
|
1788
1858
|
...props
|
|
1789
1859
|
}) {
|
|
1790
|
-
return /* @__PURE__ */ (0,
|
|
1860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1791
1861
|
PopoverContent,
|
|
1792
1862
|
{
|
|
1793
1863
|
"data-slot": "combobox-content",
|
|
@@ -1801,12 +1871,12 @@ function ComboboxContent({
|
|
|
1801
1871
|
// src/ui/command.tsx
|
|
1802
1872
|
var import_cmdk = require("cmdk");
|
|
1803
1873
|
var import_lucide_react10 = require("lucide-react");
|
|
1804
|
-
var
|
|
1874
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1805
1875
|
function Command({
|
|
1806
1876
|
className,
|
|
1807
1877
|
...props
|
|
1808
1878
|
}) {
|
|
1809
|
-
return /* @__PURE__ */ (0,
|
|
1879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1810
1880
|
import_cmdk.Command,
|
|
1811
1881
|
{
|
|
1812
1882
|
"data-slot": "command",
|
|
@@ -1822,14 +1892,14 @@ function CommandInput({
|
|
|
1822
1892
|
className,
|
|
1823
1893
|
...props
|
|
1824
1894
|
}) {
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1826
1896
|
"div",
|
|
1827
1897
|
{
|
|
1828
1898
|
"data-slot": "command-input-wrapper",
|
|
1829
1899
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1830
1900
|
children: [
|
|
1831
|
-
/* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1833
1903
|
import_cmdk.Command.Input,
|
|
1834
1904
|
{
|
|
1835
1905
|
"data-slot": "command-input",
|
|
@@ -1848,7 +1918,7 @@ function CommandList({
|
|
|
1848
1918
|
className,
|
|
1849
1919
|
...props
|
|
1850
1920
|
}) {
|
|
1851
|
-
return /* @__PURE__ */ (0,
|
|
1921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1852
1922
|
import_cmdk.Command.List,
|
|
1853
1923
|
{
|
|
1854
1924
|
"data-slot": "command-list",
|
|
@@ -1863,7 +1933,7 @@ function CommandList({
|
|
|
1863
1933
|
function CommandEmpty({
|
|
1864
1934
|
...props
|
|
1865
1935
|
}) {
|
|
1866
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1867
1937
|
import_cmdk.Command.Empty,
|
|
1868
1938
|
{
|
|
1869
1939
|
"data-slot": "command-empty",
|
|
@@ -1876,7 +1946,7 @@ function CommandGroup({
|
|
|
1876
1946
|
className,
|
|
1877
1947
|
...props
|
|
1878
1948
|
}) {
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1880
1950
|
import_cmdk.Command.Group,
|
|
1881
1951
|
{
|
|
1882
1952
|
"data-slot": "command-group",
|
|
@@ -1892,7 +1962,7 @@ function CommandItem({
|
|
|
1892
1962
|
className,
|
|
1893
1963
|
...props
|
|
1894
1964
|
}) {
|
|
1895
|
-
return /* @__PURE__ */ (0,
|
|
1965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1896
1966
|
import_cmdk.Command.Item,
|
|
1897
1967
|
{
|
|
1898
1968
|
"data-slot": "command-item",
|
|
@@ -1906,7 +1976,7 @@ function CommandItem({
|
|
|
1906
1976
|
}
|
|
1907
1977
|
|
|
1908
1978
|
// src/components/components/Combobox/index.tsx
|
|
1909
|
-
var
|
|
1979
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1910
1980
|
function Combobox2({
|
|
1911
1981
|
name,
|
|
1912
1982
|
label,
|
|
@@ -1947,8 +2017,8 @@ function Combobox2({
|
|
|
1947
2017
|
onChange?.(option.value);
|
|
1948
2018
|
setOpen(false);
|
|
1949
2019
|
};
|
|
1950
|
-
const control = /* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2020
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1952
2022
|
ComboboxTrigger,
|
|
1953
2023
|
{
|
|
1954
2024
|
id: controlId,
|
|
@@ -1959,11 +2029,11 @@ function Combobox2({
|
|
|
1959
2029
|
children: selected ? selected.label : placeholder ?? ""
|
|
1960
2030
|
}
|
|
1961
2031
|
),
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
1966
|
-
/* @__PURE__ */ (0,
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Command, { children: [
|
|
2033
|
+
searchable ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandInput, { placeholder }) : null,
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CommandList, { children: [
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandEmpty, { children: "\u65E0\u5339\u914D\u7ED3\u679C" }),
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1967
2037
|
CommandItem,
|
|
1968
2038
|
{
|
|
1969
2039
|
value: String(option.value),
|
|
@@ -1980,14 +2050,14 @@ function Combobox2({
|
|
|
1980
2050
|
] });
|
|
1981
2051
|
if (inForm && form && name) {
|
|
1982
2052
|
const error = form.errors[name];
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
2053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1984
2054
|
"div",
|
|
1985
2055
|
{
|
|
1986
2056
|
"data-slot": "form-item",
|
|
1987
2057
|
className: cn(formItemClass(form.layout), className),
|
|
1988
2058
|
style,
|
|
1989
2059
|
children: [
|
|
1990
|
-
label ? /* @__PURE__ */ (0,
|
|
2060
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1991
2061
|
"label",
|
|
1992
2062
|
{
|
|
1993
2063
|
htmlFor: controlId,
|
|
@@ -1996,7 +2066,7 @@ function Combobox2({
|
|
|
1996
2066
|
}
|
|
1997
2067
|
) : null,
|
|
1998
2068
|
control,
|
|
1999
|
-
error ? /* @__PURE__ */ (0,
|
|
2069
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2000
2070
|
]
|
|
2001
2071
|
}
|
|
2002
2072
|
);
|
|
@@ -2006,7 +2076,7 @@ function Combobox2({
|
|
|
2006
2076
|
|
|
2007
2077
|
// src/components/components/Command/index.tsx
|
|
2008
2078
|
var import_runtime5 = require("@pactor-app/runtime");
|
|
2009
|
-
var
|
|
2079
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2010
2080
|
function Command2({
|
|
2011
2081
|
groups = [],
|
|
2012
2082
|
placeholder,
|
|
@@ -2016,11 +2086,11 @@ function Command2({
|
|
|
2016
2086
|
style
|
|
2017
2087
|
}) {
|
|
2018
2088
|
const { t } = (0, import_runtime5.useI18n)();
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
groups.map((group, index) => /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Command, { className, style, children: [
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandInput, { placeholder }),
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CommandList, { children: [
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandEmpty, { children: emptyText ?? t("pactor.command.empty") }),
|
|
2093
|
+
groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandGroup, { heading: group.heading, children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2024
2094
|
CommandItem,
|
|
2025
2095
|
{
|
|
2026
2096
|
value: item.value,
|
|
@@ -2028,7 +2098,7 @@ function Command2({
|
|
|
2028
2098
|
disabled: item.disabled,
|
|
2029
2099
|
onSelect: (value) => onSelect?.(value),
|
|
2030
2100
|
children: [
|
|
2031
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2101
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2032
2102
|
item.label
|
|
2033
2103
|
]
|
|
2034
2104
|
},
|
|
@@ -2043,7 +2113,7 @@ var import_recharts2 = require("recharts");
|
|
|
2043
2113
|
|
|
2044
2114
|
// src/ui/chart.tsx
|
|
2045
2115
|
var import_recharts = require("recharts");
|
|
2046
|
-
var
|
|
2116
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2047
2117
|
var CHART_TOKEN_COLORS = [
|
|
2048
2118
|
"var(--chart-1)",
|
|
2049
2119
|
"var(--chart-2)",
|
|
@@ -2062,19 +2132,19 @@ function ChartContainer({
|
|
|
2062
2132
|
children,
|
|
2063
2133
|
...props
|
|
2064
2134
|
}) {
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2066
2136
|
"div",
|
|
2067
2137
|
{
|
|
2068
2138
|
"data-slot": "chart-container",
|
|
2069
2139
|
className: cn("h-64 w-full", className),
|
|
2070
2140
|
...props,
|
|
2071
|
-
children: /* @__PURE__ */ (0,
|
|
2141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children })
|
|
2072
2142
|
}
|
|
2073
2143
|
);
|
|
2074
2144
|
}
|
|
2075
2145
|
|
|
2076
2146
|
// src/components/components/Chart/index.tsx
|
|
2077
|
-
var
|
|
2147
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2078
2148
|
function Chart({
|
|
2079
2149
|
chartType,
|
|
2080
2150
|
data = [],
|
|
@@ -2085,17 +2155,17 @@ function Chart({
|
|
|
2085
2155
|
style
|
|
2086
2156
|
}) {
|
|
2087
2157
|
const series = yKeys.length > 0 ? yKeys : ["value"];
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2089
2159
|
"div",
|
|
2090
2160
|
{
|
|
2091
2161
|
"data-slot": "chart",
|
|
2092
2162
|
"data-chart-type": chartType,
|
|
2093
2163
|
className: cn("w-full", className),
|
|
2094
2164
|
style,
|
|
2095
|
-
children: /* @__PURE__ */ (0,
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChartContainer, { children: chartType === "pie" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.PieChart, { children: [
|
|
2166
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2167
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}),
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2099
2169
|
import_recharts2.Pie,
|
|
2100
2170
|
{
|
|
2101
2171
|
data,
|
|
@@ -2104,16 +2174,16 @@ function Chart({
|
|
|
2104
2174
|
innerRadius: 0,
|
|
2105
2175
|
outerRadius: "80%",
|
|
2106
2176
|
isAnimationActive: false,
|
|
2107
|
-
children: data.map((_, index) => /* @__PURE__ */ (0,
|
|
2177
|
+
children: data.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Cell, { fill: chartColor(index, colors) }, index))
|
|
2108
2178
|
}
|
|
2109
2179
|
)
|
|
2110
|
-
] }) : chartType === "line" ? /* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2113
|
-
/* @__PURE__ */ (0,
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2115
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2116
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2180
|
+
] }) : chartType === "line" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.LineChart, { data, children: [
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2182
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2183
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2185
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2186
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2117
2187
|
import_recharts2.Line,
|
|
2118
2188
|
{
|
|
2119
2189
|
type: "monotone",
|
|
@@ -2124,13 +2194,13 @@ function Chart({
|
|
|
2124
2194
|
},
|
|
2125
2195
|
key
|
|
2126
2196
|
))
|
|
2127
|
-
] }) : chartType === "area" ? /* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2129
|
-
/* @__PURE__ */ (0,
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2132
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2133
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2197
|
+
] }) : chartType === "area" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.AreaChart, { data, children: [
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2200
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2201
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2202
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2203
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2134
2204
|
import_recharts2.Area,
|
|
2135
2205
|
{
|
|
2136
2206
|
type: "monotone",
|
|
@@ -2143,13 +2213,13 @@ function Chart({
|
|
|
2143
2213
|
},
|
|
2144
2214
|
key
|
|
2145
2215
|
))
|
|
2146
|
-
] }) : /* @__PURE__ */ (0,
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2149
|
-
/* @__PURE__ */ (0,
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2152
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2216
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.BarChart, { data, children: [
|
|
2217
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2218
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2219
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2221
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2222
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2153
2223
|
import_recharts2.Bar,
|
|
2154
2224
|
{
|
|
2155
2225
|
dataKey: key,
|
|
@@ -2170,12 +2240,12 @@ var import_lucide_react11 = require("lucide-react");
|
|
|
2170
2240
|
var import_react9 = require("react");
|
|
2171
2241
|
|
|
2172
2242
|
// src/ui/textarea.tsx
|
|
2173
|
-
var
|
|
2243
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2174
2244
|
function Textarea({
|
|
2175
2245
|
className,
|
|
2176
2246
|
...props
|
|
2177
2247
|
}) {
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2179
2249
|
"textarea",
|
|
2180
2250
|
{
|
|
2181
2251
|
"data-slot": "textarea",
|
|
@@ -2189,7 +2259,7 @@ function Textarea({
|
|
|
2189
2259
|
}
|
|
2190
2260
|
|
|
2191
2261
|
// src/components/components/ChatInput/index.tsx
|
|
2192
|
-
var
|
|
2262
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2193
2263
|
function ChatInput({
|
|
2194
2264
|
value,
|
|
2195
2265
|
placeholder,
|
|
@@ -2235,7 +2305,7 @@ function ChatInput({
|
|
|
2235
2305
|
const handleComposition = (event) => {
|
|
2236
2306
|
composingRef.current = event.type === "compositionstart";
|
|
2237
2307
|
};
|
|
2238
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2239
2309
|
"div",
|
|
2240
2310
|
{
|
|
2241
2311
|
"data-slot": "chat-input",
|
|
@@ -2245,8 +2315,8 @@ function ChatInput({
|
|
|
2245
2315
|
),
|
|
2246
2316
|
style,
|
|
2247
2317
|
children: [
|
|
2248
|
-
header ? /* @__PURE__ */ (0,
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2318
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "px-3 pt-3", children: renderChildren([header]) }) : null,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2250
2320
|
Textarea,
|
|
2251
2321
|
{
|
|
2252
2322
|
value: text,
|
|
@@ -2260,11 +2330,11 @@ function ChatInput({
|
|
|
2260
2330
|
className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
|
|
2261
2331
|
}
|
|
2262
2332
|
),
|
|
2263
|
-
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0,
|
|
2333
|
+
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
|
|
2264
2334
|
toolbarStart ? renderChildren([toolbarStart]) : null,
|
|
2265
|
-
/* @__PURE__ */ (0,
|
|
2335
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1" }),
|
|
2266
2336
|
toolbarEnd ? renderChildren([toolbarEnd]) : null,
|
|
2267
|
-
hideSend ? null : /* @__PURE__ */ (0,
|
|
2337
|
+
hideSend ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2268
2338
|
Button,
|
|
2269
2339
|
{
|
|
2270
2340
|
type: "button",
|
|
@@ -2273,20 +2343,20 @@ function ChatInput({
|
|
|
2273
2343
|
disabled: !canSubmit,
|
|
2274
2344
|
onClick: submit,
|
|
2275
2345
|
className: "size-8 rounded-full",
|
|
2276
|
-
children: /* @__PURE__ */ (0,
|
|
2346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react11.ArrowUp, {})
|
|
2277
2347
|
}
|
|
2278
2348
|
)
|
|
2279
2349
|
] }) : null,
|
|
2280
|
-
footer ? /* @__PURE__ */ (0,
|
|
2350
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-t border-border px-3 py-2", children: renderChildren([footer]) }) : null
|
|
2281
2351
|
]
|
|
2282
2352
|
}
|
|
2283
2353
|
);
|
|
2284
2354
|
}
|
|
2285
2355
|
|
|
2286
2356
|
// src/components/components/Content/index.tsx
|
|
2287
|
-
var
|
|
2357
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2288
2358
|
function Content({ className, style, children }) {
|
|
2289
|
-
return /* @__PURE__ */ (0,
|
|
2359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2290
2360
|
"main",
|
|
2291
2361
|
{
|
|
2292
2362
|
"data-slot": "layout-content",
|
|
@@ -2299,22 +2369,22 @@ function Content({ className, style, children }) {
|
|
|
2299
2369
|
|
|
2300
2370
|
// src/ui/context-menu.tsx
|
|
2301
2371
|
var import_context_menu = require("@base-ui/react/context-menu");
|
|
2302
|
-
var
|
|
2372
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2303
2373
|
function ContextMenu({
|
|
2304
2374
|
...props
|
|
2305
2375
|
}) {
|
|
2306
|
-
return /* @__PURE__ */ (0,
|
|
2376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
2307
2377
|
}
|
|
2308
2378
|
function ContextMenuTrigger({
|
|
2309
2379
|
...props
|
|
2310
2380
|
}) {
|
|
2311
|
-
return /* @__PURE__ */ (0,
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2312
2382
|
}
|
|
2313
2383
|
function ContextMenuContent({
|
|
2314
2384
|
className,
|
|
2315
2385
|
...props
|
|
2316
2386
|
}) {
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Positioner, { className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2318
2388
|
import_context_menu.ContextMenu.Popup,
|
|
2319
2389
|
{
|
|
2320
2390
|
"data-slot": "context-menu-content",
|
|
@@ -2331,7 +2401,7 @@ function ContextMenuItem({
|
|
|
2331
2401
|
variant = "default",
|
|
2332
2402
|
...props
|
|
2333
2403
|
}) {
|
|
2334
|
-
return /* @__PURE__ */ (0,
|
|
2404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2335
2405
|
import_context_menu.ContextMenu.Item,
|
|
2336
2406
|
{
|
|
2337
2407
|
"data-slot": "context-menu-item",
|
|
@@ -2346,7 +2416,7 @@ function ContextMenuItem({
|
|
|
2346
2416
|
}
|
|
2347
2417
|
|
|
2348
2418
|
// src/components/components/ContextMenu/index.tsx
|
|
2349
|
-
var
|
|
2419
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2350
2420
|
function ContextMenu2({
|
|
2351
2421
|
items = [],
|
|
2352
2422
|
onSelect,
|
|
@@ -2354,16 +2424,16 @@ function ContextMenu2({
|
|
|
2354
2424
|
className,
|
|
2355
2425
|
style
|
|
2356
2426
|
}) {
|
|
2357
|
-
return /* @__PURE__ */ (0,
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ContextMenu, { children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuTrigger, { children }),
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2360
2430
|
ContextMenuItem,
|
|
2361
2431
|
{
|
|
2362
2432
|
variant: item.danger ? "destructive" : "default",
|
|
2363
2433
|
disabled: item.disabled,
|
|
2364
2434
|
onClick: () => onSelect?.(item.value),
|
|
2365
2435
|
children: [
|
|
2366
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2436
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2367
2437
|
item.label
|
|
2368
2438
|
]
|
|
2369
2439
|
},
|
|
@@ -2378,9 +2448,9 @@ var import_lucide_react12 = require("lucide-react");
|
|
|
2378
2448
|
var import_react10 = require("react");
|
|
2379
2449
|
|
|
2380
2450
|
// src/ui/input.tsx
|
|
2381
|
-
var
|
|
2451
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2382
2452
|
function Input({ className, type, ...props }) {
|
|
2383
|
-
return /* @__PURE__ */ (0,
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2384
2454
|
"input",
|
|
2385
2455
|
{
|
|
2386
2456
|
type,
|
|
@@ -2395,14 +2465,14 @@ function Input({ className, type, ...props }) {
|
|
|
2395
2465
|
}
|
|
2396
2466
|
|
|
2397
2467
|
// src/ui/table.tsx
|
|
2398
|
-
var
|
|
2468
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2399
2469
|
function Table2({ className, ...props }) {
|
|
2400
|
-
return /* @__PURE__ */ (0,
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2401
2471
|
"div",
|
|
2402
2472
|
{
|
|
2403
2473
|
"data-slot": "table-container",
|
|
2404
2474
|
className: "relative w-full overflow-x-auto",
|
|
2405
|
-
children: /* @__PURE__ */ (0,
|
|
2475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2406
2476
|
"table",
|
|
2407
2477
|
{
|
|
2408
2478
|
"data-slot": "table",
|
|
@@ -2414,7 +2484,7 @@ function Table2({ className, ...props }) {
|
|
|
2414
2484
|
);
|
|
2415
2485
|
}
|
|
2416
2486
|
function TableHeader({ className, ...props }) {
|
|
2417
|
-
return /* @__PURE__ */ (0,
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2418
2488
|
"thead",
|
|
2419
2489
|
{
|
|
2420
2490
|
"data-slot": "table-header",
|
|
@@ -2424,7 +2494,7 @@ function TableHeader({ className, ...props }) {
|
|
|
2424
2494
|
);
|
|
2425
2495
|
}
|
|
2426
2496
|
function TableBody({ className, ...props }) {
|
|
2427
|
-
return /* @__PURE__ */ (0,
|
|
2497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2428
2498
|
"tbody",
|
|
2429
2499
|
{
|
|
2430
2500
|
"data-slot": "table-body",
|
|
@@ -2434,7 +2504,7 @@ function TableBody({ className, ...props }) {
|
|
|
2434
2504
|
);
|
|
2435
2505
|
}
|
|
2436
2506
|
function TableRow({ className, ...props }) {
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2438
2508
|
"tr",
|
|
2439
2509
|
{
|
|
2440
2510
|
"data-slot": "table-row",
|
|
@@ -2447,7 +2517,7 @@ function TableRow({ className, ...props }) {
|
|
|
2447
2517
|
);
|
|
2448
2518
|
}
|
|
2449
2519
|
function TableHead({ className, ...props }) {
|
|
2450
|
-
return /* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2451
2521
|
"th",
|
|
2452
2522
|
{
|
|
2453
2523
|
"data-slot": "table-head",
|
|
@@ -2460,7 +2530,7 @@ function TableHead({ className, ...props }) {
|
|
|
2460
2530
|
);
|
|
2461
2531
|
}
|
|
2462
2532
|
function TableCell({ className, ...props }) {
|
|
2463
|
-
return /* @__PURE__ */ (0,
|
|
2533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2464
2534
|
"td",
|
|
2465
2535
|
{
|
|
2466
2536
|
"data-slot": "table-cell",
|
|
@@ -2474,7 +2544,7 @@ function TableCell({ className, ...props }) {
|
|
|
2474
2544
|
}
|
|
2475
2545
|
|
|
2476
2546
|
// src/components/components/DataTable/index.tsx
|
|
2477
|
-
var
|
|
2547
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2478
2548
|
function renderCellValue(value) {
|
|
2479
2549
|
if (value === void 0 || value === null) {
|
|
2480
2550
|
return "";
|
|
@@ -2543,12 +2613,12 @@ function DataTable({
|
|
|
2543
2613
|
setCurrent(page);
|
|
2544
2614
|
onPageChange?.(page);
|
|
2545
2615
|
};
|
|
2546
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2548
|
-
/* @__PURE__ */ (0,
|
|
2616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Table2, { children: [
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
|
|
2549
2619
|
const sorted = sortState?.key === column.key;
|
|
2550
|
-
return /* @__PURE__ */ (0,
|
|
2551
|
-
column.sortable ? /* @__PURE__ */ (0,
|
|
2620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2621
|
+
column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2552
2622
|
"button",
|
|
2553
2623
|
{
|
|
2554
2624
|
type: "button",
|
|
@@ -2559,7 +2629,7 @@ function DataTable({
|
|
|
2559
2629
|
onClick: () => toggleSort(column),
|
|
2560
2630
|
children: [
|
|
2561
2631
|
column.title,
|
|
2562
|
-
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0,
|
|
2632
|
+
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.ArrowUp, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.ArrowDown, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2563
2633
|
import_lucide_react12.ArrowUpDown,
|
|
2564
2634
|
{
|
|
2565
2635
|
"aria-hidden": true,
|
|
@@ -2568,8 +2638,8 @@ function DataTable({
|
|
|
2568
2638
|
)
|
|
2569
2639
|
]
|
|
2570
2640
|
}
|
|
2571
|
-
) : /* @__PURE__ */ (0,
|
|
2572
|
-
column.filterable ? /* @__PURE__ */ (0,
|
|
2641
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: column.title }),
|
|
2642
|
+
column.filterable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2573
2643
|
Input,
|
|
2574
2644
|
{
|
|
2575
2645
|
"data-slot": "data-table-filter",
|
|
@@ -2582,7 +2652,7 @@ function DataTable({
|
|
|
2582
2652
|
) : null
|
|
2583
2653
|
] }) }, column.key ?? String(index));
|
|
2584
2654
|
}) }) }),
|
|
2585
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2586
2656
|
"div",
|
|
2587
2657
|
{
|
|
2588
2658
|
"data-slot": "table-empty",
|
|
@@ -2591,20 +2661,20 @@ function DataTable({
|
|
|
2591
2661
|
}
|
|
2592
2662
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
2593
2663
|
const key = row[rowKey];
|
|
2594
|
-
return /* @__PURE__ */ (0,
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2595
2665
|
TableRow,
|
|
2596
2666
|
{
|
|
2597
2667
|
children: columns.map((column, columnIndex) => {
|
|
2598
2668
|
const template = column.children ?? column.renderChildren;
|
|
2599
|
-
return /* @__PURE__ */ (0,
|
|
2669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableCell, { children: template ? renderChildren(template, { row, rowIndex }) : renderCellValue(row[column.key]) }, column.key ?? String(columnIndex));
|
|
2600
2670
|
})
|
|
2601
2671
|
},
|
|
2602
2672
|
key === void 0 || key === null ? rowIndex : String(key)
|
|
2603
2673
|
);
|
|
2604
2674
|
}) })
|
|
2605
2675
|
] }),
|
|
2606
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
2607
|
-
(page) => /* @__PURE__ */ (0,
|
|
2676
|
+
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
|
|
2677
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2608
2678
|
Button,
|
|
2609
2679
|
{
|
|
2610
2680
|
type: "button",
|
|
@@ -2626,7 +2696,7 @@ var import_date_fns2 = require("date-fns");
|
|
|
2626
2696
|
var import_locale = require("date-fns/locale");
|
|
2627
2697
|
var import_lucide_react13 = require("lucide-react");
|
|
2628
2698
|
var import_react11 = require("react");
|
|
2629
|
-
var
|
|
2699
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2630
2700
|
function toDateFnsLocale(locale) {
|
|
2631
2701
|
switch (locale) {
|
|
2632
2702
|
case "zh-CN":
|
|
@@ -2798,13 +2868,13 @@ function DatePicker(props) {
|
|
|
2798
2868
|
} : void 0;
|
|
2799
2869
|
const displayText = isRange ? typeof current === "object" && current !== null ? `${current.start} ~ ${current.end}` : "" : typeof current === "string" ? current : "";
|
|
2800
2870
|
const placeholderText = placeholder ?? t(isRange ? "pactor.datePicker.placeholderRange" : "pactor.datePicker.placeholder");
|
|
2801
|
-
const calendar = isRange ? /* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2871
|
+
const calendar = isRange ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex", children: [
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2803
2873
|
"div",
|
|
2804
2874
|
{
|
|
2805
2875
|
"data-slot": "datepicker-start-panel",
|
|
2806
2876
|
className: "border-r border-border",
|
|
2807
|
-
children: /* @__PURE__ */ (0,
|
|
2877
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2808
2878
|
Calendar2,
|
|
2809
2879
|
{
|
|
2810
2880
|
mode: "single",
|
|
@@ -2818,7 +2888,7 @@ function DatePicker(props) {
|
|
|
2818
2888
|
)
|
|
2819
2889
|
}
|
|
2820
2890
|
),
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2891
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2822
2892
|
Calendar2,
|
|
2823
2893
|
{
|
|
2824
2894
|
mode: "single",
|
|
@@ -2830,7 +2900,7 @@ function DatePicker(props) {
|
|
|
2830
2900
|
locale: dfLocale
|
|
2831
2901
|
}
|
|
2832
2902
|
) })
|
|
2833
|
-
] }) : /* @__PURE__ */ (0,
|
|
2903
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2834
2904
|
Calendar2,
|
|
2835
2905
|
{
|
|
2836
2906
|
mode: "single",
|
|
@@ -2839,8 +2909,8 @@ function DatePicker(props) {
|
|
|
2839
2909
|
locale: dfLocale
|
|
2840
2910
|
}
|
|
2841
2911
|
);
|
|
2842
|
-
const control = /* @__PURE__ */ (0,
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
2912
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2844
2914
|
PopoverTrigger,
|
|
2845
2915
|
{
|
|
2846
2916
|
id: controlId,
|
|
@@ -2854,20 +2924,20 @@ function DatePicker(props) {
|
|
|
2854
2924
|
),
|
|
2855
2925
|
style: inForm ? void 0 : style,
|
|
2856
2926
|
children: [
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2858
|
-
/* @__PURE__ */ (0,
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholderText : displayText }),
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react13.Calendar, { className: "size-4 shrink-0 opacity-50" })
|
|
2859
2929
|
]
|
|
2860
2930
|
}
|
|
2861
2931
|
),
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2932
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PopoverContent, { className: "w-auto p-0", children: presetList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex", children: [
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2864
2934
|
"div",
|
|
2865
2935
|
{
|
|
2866
2936
|
"data-slot": "datepicker-presets",
|
|
2867
2937
|
className: "flex flex-col gap-1 border-r border-border p-3",
|
|
2868
2938
|
children: presetList.map((preset, index) => {
|
|
2869
2939
|
const resolved = resolvePreset(preset);
|
|
2870
|
-
return /* @__PURE__ */ (0,
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2871
2941
|
"button",
|
|
2872
2942
|
{
|
|
2873
2943
|
type: "button",
|
|
@@ -2885,14 +2955,14 @@ function DatePicker(props) {
|
|
|
2885
2955
|
] });
|
|
2886
2956
|
if (inForm && form && name) {
|
|
2887
2957
|
const error = form.errors[name];
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
2958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2889
2959
|
"div",
|
|
2890
2960
|
{
|
|
2891
2961
|
"data-slot": "form-item",
|
|
2892
2962
|
className: cn(formItemClass(form.layout), className),
|
|
2893
2963
|
style,
|
|
2894
2964
|
children: [
|
|
2895
|
-
label ? /* @__PURE__ */ (0,
|
|
2965
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2896
2966
|
"label",
|
|
2897
2967
|
{
|
|
2898
2968
|
htmlFor: controlId,
|
|
@@ -2901,7 +2971,7 @@ function DatePicker(props) {
|
|
|
2901
2971
|
}
|
|
2902
2972
|
) : null,
|
|
2903
2973
|
control,
|
|
2904
|
-
error ? /* @__PURE__ */ (0,
|
|
2974
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2905
2975
|
]
|
|
2906
2976
|
}
|
|
2907
2977
|
);
|
|
@@ -2916,27 +2986,27 @@ var import_react12 = require("react");
|
|
|
2916
2986
|
// src/ui/dialog.tsx
|
|
2917
2987
|
var import_dialog = require("@base-ui/react/dialog");
|
|
2918
2988
|
var import_lucide_react14 = require("lucide-react");
|
|
2919
|
-
var
|
|
2989
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2920
2990
|
function Dialog({
|
|
2921
2991
|
...props
|
|
2922
2992
|
}) {
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
2993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
2924
2994
|
}
|
|
2925
2995
|
function DialogTrigger({
|
|
2926
2996
|
...props
|
|
2927
2997
|
}) {
|
|
2928
|
-
return /* @__PURE__ */ (0,
|
|
2998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
2929
2999
|
}
|
|
2930
3000
|
function DialogPortal({
|
|
2931
3001
|
...props
|
|
2932
3002
|
}) {
|
|
2933
|
-
return /* @__PURE__ */ (0,
|
|
3003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
2934
3004
|
}
|
|
2935
3005
|
function DialogOverlay({
|
|
2936
3006
|
className,
|
|
2937
3007
|
...props
|
|
2938
3008
|
}) {
|
|
2939
|
-
return /* @__PURE__ */ (0,
|
|
3009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2940
3010
|
import_dialog.Dialog.Backdrop,
|
|
2941
3011
|
{
|
|
2942
3012
|
"data-slot": "dialog-overlay",
|
|
@@ -2954,9 +3024,9 @@ function DialogContent({
|
|
|
2954
3024
|
showCloseButton = true,
|
|
2955
3025
|
...props
|
|
2956
3026
|
}) {
|
|
2957
|
-
return /* @__PURE__ */ (0,
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
3028
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DialogOverlay, {}),
|
|
3029
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2960
3030
|
import_dialog.Dialog.Popup,
|
|
2961
3031
|
{
|
|
2962
3032
|
"data-slot": "dialog-content",
|
|
@@ -2967,11 +3037,11 @@ function DialogContent({
|
|
|
2967
3037
|
...props,
|
|
2968
3038
|
children: [
|
|
2969
3039
|
children,
|
|
2970
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
3040
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2971
3041
|
import_dialog.Dialog.Close,
|
|
2972
3042
|
{
|
|
2973
3043
|
"data-slot": "dialog-close",
|
|
2974
|
-
render: /* @__PURE__ */ (0,
|
|
3044
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2975
3045
|
"button",
|
|
2976
3046
|
{
|
|
2977
3047
|
type: "button",
|
|
@@ -2979,8 +3049,8 @@ function DialogContent({
|
|
|
2979
3049
|
}
|
|
2980
3050
|
),
|
|
2981
3051
|
children: [
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
2983
|
-
/* @__PURE__ */ (0,
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react14.XIcon, {}),
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2984
3054
|
]
|
|
2985
3055
|
}
|
|
2986
3056
|
)
|
|
@@ -2990,7 +3060,7 @@ function DialogContent({
|
|
|
2990
3060
|
] });
|
|
2991
3061
|
}
|
|
2992
3062
|
function DialogHeader({ className, ...props }) {
|
|
2993
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2994
3064
|
"div",
|
|
2995
3065
|
{
|
|
2996
3066
|
"data-slot": "dialog-header",
|
|
@@ -3003,7 +3073,7 @@ function DialogTitle({
|
|
|
3003
3073
|
className,
|
|
3004
3074
|
...props
|
|
3005
3075
|
}) {
|
|
3006
|
-
return /* @__PURE__ */ (0,
|
|
3076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3007
3077
|
import_dialog.Dialog.Title,
|
|
3008
3078
|
{
|
|
3009
3079
|
"data-slot": "dialog-title",
|
|
@@ -3016,7 +3086,7 @@ function DialogDescription({
|
|
|
3016
3086
|
className,
|
|
3017
3087
|
...props
|
|
3018
3088
|
}) {
|
|
3019
|
-
return /* @__PURE__ */ (0,
|
|
3089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3020
3090
|
import_dialog.Dialog.Description,
|
|
3021
3091
|
{
|
|
3022
3092
|
"data-slot": "dialog-description",
|
|
@@ -3027,7 +3097,7 @@ function DialogDescription({
|
|
|
3027
3097
|
}
|
|
3028
3098
|
|
|
3029
3099
|
// src/components/components/Dialog/index.tsx
|
|
3030
|
-
var
|
|
3100
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3031
3101
|
function Dialog2({
|
|
3032
3102
|
title,
|
|
3033
3103
|
description,
|
|
@@ -3042,7 +3112,7 @@ function Dialog2({
|
|
|
3042
3112
|
const [innerOpen, setInnerOpen] = (0, import_react12.useState)(false);
|
|
3043
3113
|
const controlled = open !== void 0;
|
|
3044
3114
|
const visible = controlled ? open : innerOpen;
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3046
3116
|
Dialog,
|
|
3047
3117
|
{
|
|
3048
3118
|
open: visible,
|
|
@@ -3055,7 +3125,7 @@ function Dialog2({
|
|
|
3055
3125
|
}
|
|
3056
3126
|
},
|
|
3057
3127
|
children: [
|
|
3058
|
-
trigger ? /* @__PURE__ */ (0,
|
|
3128
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3059
3129
|
DialogTrigger,
|
|
3060
3130
|
{
|
|
3061
3131
|
nativeButton: false,
|
|
@@ -3063,10 +3133,10 @@ function Dialog2({
|
|
|
3063
3133
|
children: renderChildren([trigger])
|
|
3064
3134
|
}
|
|
3065
3135
|
) : null,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3068
|
-
title ? /* @__PURE__ */ (0,
|
|
3069
|
-
description ? /* @__PURE__ */ (0,
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogContent, { className, style, children: [
|
|
3137
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogHeader, { children: [
|
|
3138
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogTitle, { children: title }) : null,
|
|
3139
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogDescription, { children: description }) : null
|
|
3070
3140
|
] }) : null,
|
|
3071
3141
|
children
|
|
3072
3142
|
] })
|
|
@@ -3077,22 +3147,22 @@ function Dialog2({
|
|
|
3077
3147
|
|
|
3078
3148
|
// src/ui/drawer.tsx
|
|
3079
3149
|
var import_vaul = require("vaul");
|
|
3080
|
-
var
|
|
3150
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3081
3151
|
function Drawer({
|
|
3082
3152
|
...props
|
|
3083
3153
|
}) {
|
|
3084
|
-
return /* @__PURE__ */ (0,
|
|
3154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
3085
3155
|
}
|
|
3086
3156
|
function DrawerPortal({
|
|
3087
3157
|
...props
|
|
3088
3158
|
}) {
|
|
3089
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
3090
3160
|
}
|
|
3091
3161
|
function DrawerOverlay({
|
|
3092
3162
|
className,
|
|
3093
3163
|
...props
|
|
3094
3164
|
}) {
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3096
3166
|
import_vaul.Drawer.Overlay,
|
|
3097
3167
|
{
|
|
3098
3168
|
"data-slot": "drawer-overlay",
|
|
@@ -3106,9 +3176,9 @@ function DrawerContent({
|
|
|
3106
3176
|
children,
|
|
3107
3177
|
...props
|
|
3108
3178
|
}) {
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3111
|
-
/* @__PURE__ */ (0,
|
|
3179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
3180
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DrawerOverlay, {}),
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
3112
3182
|
import_vaul.Drawer.Content,
|
|
3113
3183
|
{
|
|
3114
3184
|
"data-slot": "drawer-content",
|
|
@@ -3122,7 +3192,7 @@ function DrawerContent({
|
|
|
3122
3192
|
),
|
|
3123
3193
|
...props,
|
|
3124
3194
|
children: [
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3195
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
3126
3196
|
children
|
|
3127
3197
|
]
|
|
3128
3198
|
}
|
|
@@ -3130,7 +3200,7 @@ function DrawerContent({
|
|
|
3130
3200
|
] });
|
|
3131
3201
|
}
|
|
3132
3202
|
function DrawerHeader({ className, ...props }) {
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3134
3204
|
"div",
|
|
3135
3205
|
{
|
|
3136
3206
|
"data-slot": "drawer-header",
|
|
@@ -3143,7 +3213,7 @@ function DrawerTitle({
|
|
|
3143
3213
|
className,
|
|
3144
3214
|
...props
|
|
3145
3215
|
}) {
|
|
3146
|
-
return /* @__PURE__ */ (0,
|
|
3216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3147
3217
|
import_vaul.Drawer.Title,
|
|
3148
3218
|
{
|
|
3149
3219
|
"data-slot": "drawer-title",
|
|
@@ -3154,7 +3224,7 @@ function DrawerTitle({
|
|
|
3154
3224
|
}
|
|
3155
3225
|
|
|
3156
3226
|
// src/components/components/Drawer/index.tsx
|
|
3157
|
-
var
|
|
3227
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3158
3228
|
function Drawer2({
|
|
3159
3229
|
title,
|
|
3160
3230
|
open,
|
|
@@ -3164,7 +3234,7 @@ function Drawer2({
|
|
|
3164
3234
|
className,
|
|
3165
3235
|
style
|
|
3166
3236
|
}) {
|
|
3167
|
-
return /* @__PURE__ */ (0,
|
|
3237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3168
3238
|
Drawer,
|
|
3169
3239
|
{
|
|
3170
3240
|
direction: placement,
|
|
@@ -3174,9 +3244,9 @@ function Drawer2({
|
|
|
3174
3244
|
onClose?.();
|
|
3175
3245
|
}
|
|
3176
3246
|
},
|
|
3177
|
-
children: /* @__PURE__ */ (0,
|
|
3178
|
-
title ? /* @__PURE__ */ (0,
|
|
3179
|
-
/* @__PURE__ */ (0,
|
|
3247
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DrawerContent, { className, style, children: [
|
|
3248
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerTitle, { children: title }) }) : null,
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1 overflow-auto p-4", children })
|
|
3180
3250
|
] })
|
|
3181
3251
|
}
|
|
3182
3252
|
);
|
|
@@ -3185,16 +3255,16 @@ function Drawer2({
|
|
|
3185
3255
|
// src/ui/dropdown-menu.tsx
|
|
3186
3256
|
var import_menu = require("@base-ui/react/menu");
|
|
3187
3257
|
var import_lucide_react15 = require("lucide-react");
|
|
3188
|
-
var
|
|
3258
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3189
3259
|
function DropdownMenu({
|
|
3190
3260
|
...props
|
|
3191
3261
|
}) {
|
|
3192
|
-
return /* @__PURE__ */ (0,
|
|
3262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3193
3263
|
}
|
|
3194
3264
|
function DropdownMenuTrigger({
|
|
3195
3265
|
...props
|
|
3196
3266
|
}) {
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
3198
3268
|
}
|
|
3199
3269
|
function DropdownMenuContent({
|
|
3200
3270
|
className,
|
|
@@ -3203,14 +3273,14 @@ function DropdownMenuContent({
|
|
|
3203
3273
|
sideOffset = 4,
|
|
3204
3274
|
...props
|
|
3205
3275
|
}) {
|
|
3206
|
-
return /* @__PURE__ */ (0,
|
|
3276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3207
3277
|
import_menu.Menu.Positioner,
|
|
3208
3278
|
{
|
|
3209
3279
|
align,
|
|
3210
3280
|
side,
|
|
3211
3281
|
sideOffset,
|
|
3212
3282
|
className: "isolate z-50",
|
|
3213
|
-
children: /* @__PURE__ */ (0,
|
|
3283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3214
3284
|
import_menu.Menu.Popup,
|
|
3215
3285
|
{
|
|
3216
3286
|
"data-slot": "dropdown-menu-content",
|
|
@@ -3229,7 +3299,7 @@ function DropdownMenuItem({
|
|
|
3229
3299
|
variant = "default",
|
|
3230
3300
|
...props
|
|
3231
3301
|
}) {
|
|
3232
|
-
return /* @__PURE__ */ (0,
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3233
3303
|
import_menu.Menu.Item,
|
|
3234
3304
|
{
|
|
3235
3305
|
"data-slot": "dropdown-menu-item",
|
|
@@ -3245,14 +3315,14 @@ function DropdownMenuItem({
|
|
|
3245
3315
|
function DropdownMenuSub({
|
|
3246
3316
|
...props
|
|
3247
3317
|
}) {
|
|
3248
|
-
return /* @__PURE__ */ (0,
|
|
3318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
3249
3319
|
}
|
|
3250
3320
|
function DropdownMenuSubTrigger({
|
|
3251
3321
|
className,
|
|
3252
3322
|
children,
|
|
3253
3323
|
...props
|
|
3254
3324
|
}) {
|
|
3255
|
-
return /* @__PURE__ */ (0,
|
|
3325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3256
3326
|
import_menu.Menu.SubmenuTrigger,
|
|
3257
3327
|
{
|
|
3258
3328
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -3263,7 +3333,7 @@ function DropdownMenuSubTrigger({
|
|
|
3263
3333
|
...props,
|
|
3264
3334
|
children: [
|
|
3265
3335
|
children,
|
|
3266
|
-
/* @__PURE__ */ (0,
|
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.ChevronRightIcon, { className: "ml-auto" })
|
|
3267
3337
|
]
|
|
3268
3338
|
}
|
|
3269
3339
|
);
|
|
@@ -3273,7 +3343,7 @@ function DropdownMenuSubContent({
|
|
|
3273
3343
|
sideOffset = 2,
|
|
3274
3344
|
...props
|
|
3275
3345
|
}) {
|
|
3276
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Positioner, { sideOffset, className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3277
3347
|
import_menu.Menu.Popup,
|
|
3278
3348
|
{
|
|
3279
3349
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -3287,7 +3357,7 @@ function DropdownMenuSubContent({
|
|
|
3287
3357
|
}
|
|
3288
3358
|
|
|
3289
3359
|
// src/components/components/DropdownMenu/index.tsx
|
|
3290
|
-
var
|
|
3360
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3291
3361
|
function DropdownMenu2({
|
|
3292
3362
|
items = [],
|
|
3293
3363
|
onSelect,
|
|
@@ -3295,8 +3365,8 @@ function DropdownMenu2({
|
|
|
3295
3365
|
className,
|
|
3296
3366
|
style
|
|
3297
3367
|
}) {
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
-
/* @__PURE__ */ (0,
|
|
3368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3300
3370
|
DropdownMenuTrigger,
|
|
3301
3371
|
{
|
|
3302
3372
|
nativeButton: false,
|
|
@@ -3304,14 +3374,14 @@ function DropdownMenu2({
|
|
|
3304
3374
|
children
|
|
3305
3375
|
}
|
|
3306
3376
|
),
|
|
3307
|
-
/* @__PURE__ */ (0,
|
|
3377
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3308
3378
|
DropdownMenuItem,
|
|
3309
3379
|
{
|
|
3310
3380
|
variant: item.danger ? "destructive" : "default",
|
|
3311
3381
|
disabled: item.disabled,
|
|
3312
3382
|
onClick: () => onSelect?.(item.value),
|
|
3313
3383
|
children: [
|
|
3314
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3384
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3315
3385
|
item.label
|
|
3316
3386
|
]
|
|
3317
3387
|
},
|
|
@@ -3321,9 +3391,9 @@ function DropdownMenu2({
|
|
|
3321
3391
|
}
|
|
3322
3392
|
|
|
3323
3393
|
// src/ui/empty.tsx
|
|
3324
|
-
var
|
|
3394
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3325
3395
|
function Empty({ className, ...props }) {
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3327
3397
|
"div",
|
|
3328
3398
|
{
|
|
3329
3399
|
"data-slot": "empty",
|
|
@@ -3336,7 +3406,7 @@ function Empty({ className, ...props }) {
|
|
|
3336
3406
|
);
|
|
3337
3407
|
}
|
|
3338
3408
|
function EmptyHeader({ className, ...props }) {
|
|
3339
|
-
return /* @__PURE__ */ (0,
|
|
3409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3340
3410
|
"div",
|
|
3341
3411
|
{
|
|
3342
3412
|
"data-slot": "empty-header",
|
|
@@ -3346,7 +3416,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3346
3416
|
);
|
|
3347
3417
|
}
|
|
3348
3418
|
function EmptyTitle({ className, ...props }) {
|
|
3349
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3350
3420
|
"div",
|
|
3351
3421
|
{
|
|
3352
3422
|
"data-slot": "empty-title",
|
|
@@ -3356,7 +3426,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
3356
3426
|
);
|
|
3357
3427
|
}
|
|
3358
3428
|
function EmptyDescription({ className, ...props }) {
|
|
3359
|
-
return /* @__PURE__ */ (0,
|
|
3429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3360
3430
|
"p",
|
|
3361
3431
|
{
|
|
3362
3432
|
"data-slot": "empty-description",
|
|
@@ -3366,7 +3436,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
3366
3436
|
);
|
|
3367
3437
|
}
|
|
3368
3438
|
function EmptyContent({ className, ...props }) {
|
|
3369
|
-
return /* @__PURE__ */ (0,
|
|
3439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3370
3440
|
"div",
|
|
3371
3441
|
{
|
|
3372
3442
|
"data-slot": "empty-content",
|
|
@@ -3380,22 +3450,22 @@ function EmptyContent({ className, ...props }) {
|
|
|
3380
3450
|
}
|
|
3381
3451
|
|
|
3382
3452
|
// src/components/components/Empty/index.tsx
|
|
3383
|
-
var
|
|
3453
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3384
3454
|
function Empty2({ title, description, children, className, style }) {
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3386
|
-
/* @__PURE__ */ (0,
|
|
3387
|
-
title ? /* @__PURE__ */ (0,
|
|
3388
|
-
description ? /* @__PURE__ */ (0,
|
|
3455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Empty, { className, style, children: [
|
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(EmptyHeader, { children: [
|
|
3457
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyTitle, { children: title }) : null,
|
|
3458
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyDescription, { children: description }) : null
|
|
3389
3459
|
] }),
|
|
3390
|
-
children ? /* @__PURE__ */ (0,
|
|
3460
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyContent, { children }) : null
|
|
3391
3461
|
] });
|
|
3392
3462
|
}
|
|
3393
3463
|
|
|
3394
3464
|
// src/ui/field.tsx
|
|
3395
3465
|
var import_field = require("@base-ui/react/field");
|
|
3396
|
-
var
|
|
3466
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3397
3467
|
function Field({ className, ...props }) {
|
|
3398
|
-
return /* @__PURE__ */ (0,
|
|
3468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3399
3469
|
import_field.Field.Root,
|
|
3400
3470
|
{
|
|
3401
3471
|
"data-slot": "field",
|
|
@@ -3405,7 +3475,7 @@ function Field({ className, ...props }) {
|
|
|
3405
3475
|
);
|
|
3406
3476
|
}
|
|
3407
3477
|
function FieldLabel({ className, ...props }) {
|
|
3408
|
-
return /* @__PURE__ */ (0,
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3409
3479
|
import_field.Field.Label,
|
|
3410
3480
|
{
|
|
3411
3481
|
"data-slot": "field-label",
|
|
@@ -3415,7 +3485,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
3415
3485
|
);
|
|
3416
3486
|
}
|
|
3417
3487
|
function FieldDescription({ className, ...props }) {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3419
3489
|
import_field.Field.Description,
|
|
3420
3490
|
{
|
|
3421
3491
|
"data-slot": "field-description",
|
|
@@ -3425,7 +3495,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
3425
3495
|
);
|
|
3426
3496
|
}
|
|
3427
3497
|
function FieldError({ className, ...props }) {
|
|
3428
|
-
return /* @__PURE__ */ (0,
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3429
3499
|
import_field.Field.Error,
|
|
3430
3500
|
{
|
|
3431
3501
|
"data-slot": "field-error",
|
|
@@ -3436,24 +3506,24 @@ function FieldError({ className, ...props }) {
|
|
|
3436
3506
|
}
|
|
3437
3507
|
|
|
3438
3508
|
// src/components/components/Field/index.tsx
|
|
3439
|
-
var
|
|
3509
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3440
3510
|
function Field2({ label, required, description, error, children, className, style }) {
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
-
label ? /* @__PURE__ */ (0,
|
|
3443
|
-
required ? /* @__PURE__ */ (0,
|
|
3511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
|
|
3512
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
|
|
3513
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
|
|
3444
3514
|
"*",
|
|
3445
3515
|
" "
|
|
3446
3516
|
] }) : null,
|
|
3447
3517
|
label
|
|
3448
3518
|
] }) : null,
|
|
3449
3519
|
children,
|
|
3450
|
-
description ? /* @__PURE__ */ (0,
|
|
3451
|
-
error ? /* @__PURE__ */ (0,
|
|
3520
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldDescription, { children: description }) : null,
|
|
3521
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, children: error }) : null
|
|
3452
3522
|
] });
|
|
3453
3523
|
}
|
|
3454
3524
|
|
|
3455
3525
|
// src/components/components/Flex/index.tsx
|
|
3456
|
-
var
|
|
3526
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3457
3527
|
var gapClass = {
|
|
3458
3528
|
small: "gap-(--flex-gap-sm)",
|
|
3459
3529
|
middle: "gap-(--flex-gap-md)",
|
|
@@ -3483,7 +3553,7 @@ function Flex({
|
|
|
3483
3553
|
style,
|
|
3484
3554
|
children
|
|
3485
3555
|
}) {
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3487
3557
|
"div",
|
|
3488
3558
|
{
|
|
3489
3559
|
"data-slot": "flex",
|
|
@@ -3503,9 +3573,9 @@ function Flex({
|
|
|
3503
3573
|
}
|
|
3504
3574
|
|
|
3505
3575
|
// src/components/components/Footer/index.tsx
|
|
3506
|
-
var
|
|
3576
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3507
3577
|
function Footer({ className, style, children }) {
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3509
3579
|
"footer",
|
|
3510
3580
|
{
|
|
3511
3581
|
"data-slot": "layout-footer",
|
|
@@ -3522,7 +3592,7 @@ function Footer({ className, style, children }) {
|
|
|
3522
3592
|
// src/components/components/Form/index.tsx
|
|
3523
3593
|
var import_runtime10 = require("@pactor-app/runtime");
|
|
3524
3594
|
var import_react13 = require("react");
|
|
3525
|
-
var
|
|
3595
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3526
3596
|
function isEmpty(value) {
|
|
3527
3597
|
return value === void 0 || value === null || value === "";
|
|
3528
3598
|
}
|
|
@@ -3603,7 +3673,7 @@ function Form({
|
|
|
3603
3673
|
context.state.set("form", values);
|
|
3604
3674
|
onSubmit?.(values);
|
|
3605
3675
|
};
|
|
3606
|
-
return /* @__PURE__ */ (0,
|
|
3676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FormContextProvider, { value: formContext, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3607
3677
|
"form",
|
|
3608
3678
|
{
|
|
3609
3679
|
"data-slot": "form",
|
|
@@ -3617,10 +3687,10 @@ function Form({
|
|
|
3617
3687
|
|
|
3618
3688
|
// src/components/components/Grid/index.tsx
|
|
3619
3689
|
var import_react14 = require("react");
|
|
3620
|
-
var
|
|
3690
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3621
3691
|
function Grid({ columns = 1, gap, className, style, children }) {
|
|
3622
3692
|
const cols = Math.max(1, columns);
|
|
3623
|
-
return /* @__PURE__ */ (0,
|
|
3693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3624
3694
|
"div",
|
|
3625
3695
|
{
|
|
3626
3696
|
"data-slot": "grid",
|
|
@@ -3631,7 +3701,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3631
3701
|
...gap !== void 0 ? { gap } : {},
|
|
3632
3702
|
...style
|
|
3633
3703
|
},
|
|
3634
|
-
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0,
|
|
3704
|
+
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { "data-slot": "grid-item", children: child }, index))
|
|
3635
3705
|
}
|
|
3636
3706
|
);
|
|
3637
3707
|
}
|
|
@@ -3639,7 +3709,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3639
3709
|
// src/components/components/Header/index.tsx
|
|
3640
3710
|
var import_runtime11 = require("@pactor-app/runtime");
|
|
3641
3711
|
var import_lucide_react16 = require("lucide-react");
|
|
3642
|
-
var
|
|
3712
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3643
3713
|
var menuItemClass = "flex items-center gap-1 rounded-md px-3 py-2 text-sm transition-colors text-muted-foreground hover:bg-accent/50 hover:text-foreground";
|
|
3644
3714
|
function Header({
|
|
3645
3715
|
logo,
|
|
@@ -3670,10 +3740,10 @@ function Header({
|
|
|
3670
3740
|
className
|
|
3671
3741
|
);
|
|
3672
3742
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
3673
|
-
return /* @__PURE__ */ (0,
|
|
3743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
3674
3744
|
}
|
|
3675
|
-
const brandNode = hasBrand && /* @__PURE__ */ (0,
|
|
3676
|
-
logo !== void 0 && /* @__PURE__ */ (0,
|
|
3745
|
+
const brandNode = hasBrand && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
3746
|
+
logo !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3677
3747
|
"img",
|
|
3678
3748
|
{
|
|
3679
3749
|
"data-slot": "header-brand-logo",
|
|
@@ -3682,23 +3752,23 @@ function Header({
|
|
|
3682
3752
|
className: "h-8 w-8 shrink-0 object-contain"
|
|
3683
3753
|
}
|
|
3684
3754
|
),
|
|
3685
|
-
title !== void 0 && /* @__PURE__ */ (0,
|
|
3755
|
+
title !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
|
|
3686
3756
|
] });
|
|
3687
|
-
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0,
|
|
3757
|
+
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
3688
3758
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
3689
3759
|
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
-
showLeft && /* @__PURE__ */ (0,
|
|
3760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
3761
|
+
showLeft && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
3692
3762
|
brandLeft && brandNode,
|
|
3693
3763
|
dropdownLeft && dropdownNode,
|
|
3694
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
3764
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
|
|
3695
3765
|
] }),
|
|
3696
|
-
/* @__PURE__ */ (0,
|
|
3697
|
-
showRight && /* @__PURE__ */ (0,
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
|
|
3767
|
+
showRight && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
3698
3768
|
dropdownRight && dropdownNode,
|
|
3699
3769
|
brandRight && brandNode,
|
|
3700
|
-
hasLocales && /* @__PURE__ */ (0,
|
|
3701
|
-
hasUser && /* @__PURE__ */ (0,
|
|
3770
|
+
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
3771
|
+
hasUser && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
3702
3772
|
] })
|
|
3703
3773
|
] });
|
|
3704
3774
|
}
|
|
@@ -3706,25 +3776,25 @@ function HeaderDropdownArea({
|
|
|
3706
3776
|
dropdown,
|
|
3707
3777
|
onSelect
|
|
3708
3778
|
}) {
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3710
|
-
/* @__PURE__ */ (0,
|
|
3779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3711
3781
|
DropdownMenuTrigger,
|
|
3712
3782
|
{
|
|
3713
3783
|
"data-slot": "header-dropdown",
|
|
3714
3784
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3715
3785
|
children: [
|
|
3716
3786
|
dropdown.label,
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3718
3788
|
]
|
|
3719
3789
|
}
|
|
3720
3790
|
),
|
|
3721
|
-
/* @__PURE__ */ (0,
|
|
3791
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3722
3792
|
DropdownMenuItem,
|
|
3723
3793
|
{
|
|
3724
3794
|
disabled: item.disabled,
|
|
3725
3795
|
onClick: () => onSelect?.(item.value),
|
|
3726
3796
|
children: [
|
|
3727
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3797
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3728
3798
|
item.label
|
|
3729
3799
|
]
|
|
3730
3800
|
},
|
|
@@ -3736,23 +3806,23 @@ function HeaderMenuArea({
|
|
|
3736
3806
|
items,
|
|
3737
3807
|
onSelect
|
|
3738
3808
|
}) {
|
|
3739
|
-
return /* @__PURE__ */ (0,
|
|
3740
|
-
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0,
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
3809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
|
|
3810
|
+
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3811
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3742
3812
|
DropdownMenuTrigger,
|
|
3743
3813
|
{
|
|
3744
3814
|
"data-slot": "header-menu-item",
|
|
3745
3815
|
"data-key": item.key,
|
|
3746
3816
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3747
3817
|
children: [
|
|
3748
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3818
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3749
3819
|
item.label,
|
|
3750
|
-
/* @__PURE__ */ (0,
|
|
3820
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3751
3821
|
]
|
|
3752
3822
|
}
|
|
3753
3823
|
),
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
3755
|
-
] }, item.key) : /* @__PURE__ */ (0,
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3825
|
+
] }, item.key) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3756
3826
|
"button",
|
|
3757
3827
|
{
|
|
3758
3828
|
type: "button",
|
|
@@ -3761,7 +3831,7 @@ function HeaderMenuArea({
|
|
|
3761
3831
|
className: menuItemClass,
|
|
3762
3832
|
onClick: () => onSelect?.(item.key),
|
|
3763
3833
|
children: [
|
|
3764
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3834
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3765
3835
|
item.label
|
|
3766
3836
|
]
|
|
3767
3837
|
},
|
|
@@ -3774,16 +3844,16 @@ function HeaderMenuEntry({
|
|
|
3774
3844
|
onSelect
|
|
3775
3845
|
}) {
|
|
3776
3846
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
3777
|
-
return /* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3779
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSub, { children: [
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
|
|
3849
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3780
3850
|
item.label
|
|
3781
3851
|
] }),
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3783
3853
|
] });
|
|
3784
3854
|
}
|
|
3785
|
-
return /* @__PURE__ */ (0,
|
|
3786
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
|
|
3856
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3787
3857
|
item.label
|
|
3788
3858
|
] });
|
|
3789
3859
|
}
|
|
@@ -3791,18 +3861,18 @@ function HeaderUserArea({
|
|
|
3791
3861
|
user,
|
|
3792
3862
|
onSelect
|
|
3793
3863
|
}) {
|
|
3794
|
-
const identity = /* @__PURE__ */ (0,
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3796
|
-
user.avatar !== void 0 && /* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
3864
|
+
const identity = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Avatar, { className: "size-7", children: [
|
|
3866
|
+
user.avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarFallback, { children: user.name.charAt(0) })
|
|
3798
3868
|
] }),
|
|
3799
|
-
/* @__PURE__ */ (0,
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm", children: user.name })
|
|
3800
3870
|
] });
|
|
3801
3871
|
if (user.items === void 0 || user.items.length === 0) {
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
3872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
|
|
3803
3873
|
}
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3806
3876
|
DropdownMenuTrigger,
|
|
3807
3877
|
{
|
|
3808
3878
|
"data-slot": "header-user",
|
|
@@ -3810,8 +3880,8 @@ function HeaderUserArea({
|
|
|
3810
3880
|
children: identity
|
|
3811
3881
|
}
|
|
3812
3882
|
),
|
|
3813
|
-
/* @__PURE__ */ (0,
|
|
3814
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { align: "end", children: user.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuItem, { onClick: () => onSelect?.(item.value), children: [
|
|
3884
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3815
3885
|
item.label
|
|
3816
3886
|
] }, item.value)) })
|
|
3817
3887
|
] });
|
|
@@ -3822,19 +3892,19 @@ function HeaderLocalesArea({
|
|
|
3822
3892
|
}) {
|
|
3823
3893
|
const { locale } = (0, import_runtime11.useI18n)();
|
|
3824
3894
|
const current = locales.find((option) => option.value === locale);
|
|
3825
|
-
return /* @__PURE__ */ (0,
|
|
3826
|
-
/* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3827
3897
|
DropdownMenuTrigger,
|
|
3828
3898
|
{
|
|
3829
3899
|
"data-slot": "header-locales",
|
|
3830
3900
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3831
3901
|
children: [
|
|
3832
3902
|
current?.label ?? locale,
|
|
3833
|
-
/* @__PURE__ */ (0,
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3834
3904
|
]
|
|
3835
3905
|
}
|
|
3836
3906
|
),
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3838
3908
|
DropdownMenuItem,
|
|
3839
3909
|
{
|
|
3840
3910
|
onClick: () => onSelect?.(option.value),
|
|
@@ -3850,16 +3920,16 @@ var import_runtime12 = require("@pactor-app/runtime");
|
|
|
3850
3920
|
|
|
3851
3921
|
// src/ui/hover-card.tsx
|
|
3852
3922
|
var import_preview_card = require("@base-ui/react/preview-card");
|
|
3853
|
-
var
|
|
3923
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3854
3924
|
function HoverCard({
|
|
3855
3925
|
...props
|
|
3856
3926
|
}) {
|
|
3857
|
-
return /* @__PURE__ */ (0,
|
|
3927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Root, { "data-slot": "hover-card", ...props });
|
|
3858
3928
|
}
|
|
3859
3929
|
function HoverCardTrigger({
|
|
3860
3930
|
...props
|
|
3861
3931
|
}) {
|
|
3862
|
-
return /* @__PURE__ */ (0,
|
|
3932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3863
3933
|
}
|
|
3864
3934
|
function HoverCardContent({
|
|
3865
3935
|
className,
|
|
@@ -3868,14 +3938,14 @@ function HoverCardContent({
|
|
|
3868
3938
|
sideOffset = 4,
|
|
3869
3939
|
...props
|
|
3870
3940
|
}) {
|
|
3871
|
-
return /* @__PURE__ */ (0,
|
|
3941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3872
3942
|
import_preview_card.PreviewCard.Positioner,
|
|
3873
3943
|
{
|
|
3874
3944
|
align,
|
|
3875
3945
|
side,
|
|
3876
3946
|
sideOffset,
|
|
3877
3947
|
className: "isolate z-50",
|
|
3878
|
-
children: /* @__PURE__ */ (0,
|
|
3948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3879
3949
|
import_preview_card.PreviewCard.Popup,
|
|
3880
3950
|
{
|
|
3881
3951
|
"data-slot": "hover-card-content",
|
|
@@ -3891,22 +3961,22 @@ function HoverCardContent({
|
|
|
3891
3961
|
}
|
|
3892
3962
|
|
|
3893
3963
|
// src/components/components/HoverCard/index.tsx
|
|
3894
|
-
var
|
|
3964
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3895
3965
|
function isDslNode2(value) {
|
|
3896
3966
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
3897
3967
|
}
|
|
3898
3968
|
function HoverCard2({ content, children, className, style }) {
|
|
3899
3969
|
const { renderChildren } = (0, import_runtime12.useRenderer)();
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(HoverCard, { children: [
|
|
3971
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
|
|
3903
3973
|
] });
|
|
3904
3974
|
}
|
|
3905
3975
|
|
|
3906
3976
|
// src/components/components/Input/index.tsx
|
|
3907
3977
|
var import_runtime13 = require("@pactor-app/runtime");
|
|
3908
3978
|
var import_react15 = require("react");
|
|
3909
|
-
var
|
|
3979
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3910
3980
|
function Input2({
|
|
3911
3981
|
name,
|
|
3912
3982
|
label,
|
|
@@ -3942,7 +4012,7 @@ function Input2({
|
|
|
3942
4012
|
onChange?.("");
|
|
3943
4013
|
};
|
|
3944
4014
|
const inFormRoot = inForm === true;
|
|
3945
|
-
const input = /* @__PURE__ */ (0,
|
|
4015
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3946
4016
|
Input,
|
|
3947
4017
|
{
|
|
3948
4018
|
id: controlId,
|
|
@@ -3963,7 +4033,7 @@ function Input2({
|
|
|
3963
4033
|
}
|
|
3964
4034
|
}
|
|
3965
4035
|
);
|
|
3966
|
-
const clearButton = showClear ? /* @__PURE__ */ (0,
|
|
4036
|
+
const clearButton = showClear ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3967
4037
|
"button",
|
|
3968
4038
|
{
|
|
3969
4039
|
type: "button",
|
|
@@ -3973,7 +4043,7 @@ function Input2({
|
|
|
3973
4043
|
children: "\xD7"
|
|
3974
4044
|
}
|
|
3975
4045
|
) : null;
|
|
3976
|
-
const control = allowClear === true ? /* @__PURE__ */ (0,
|
|
4046
|
+
const control = allowClear === true ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3977
4047
|
"span",
|
|
3978
4048
|
{
|
|
3979
4049
|
className: cn(
|
|
@@ -3990,14 +4060,14 @@ function Input2({
|
|
|
3990
4060
|
) : input;
|
|
3991
4061
|
if (inForm && form && name) {
|
|
3992
4062
|
const error = form.errors[name];
|
|
3993
|
-
return /* @__PURE__ */ (0,
|
|
4063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3994
4064
|
"div",
|
|
3995
4065
|
{
|
|
3996
4066
|
"data-slot": "form-item",
|
|
3997
4067
|
className: cn(formItemClass(form.layout), className),
|
|
3998
4068
|
style,
|
|
3999
4069
|
children: [
|
|
4000
|
-
label ? /* @__PURE__ */ (0,
|
|
4070
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4001
4071
|
"label",
|
|
4002
4072
|
{
|
|
4003
4073
|
htmlFor: controlId,
|
|
@@ -4006,7 +4076,7 @@ function Input2({
|
|
|
4006
4076
|
}
|
|
4007
4077
|
) : null,
|
|
4008
4078
|
control,
|
|
4009
|
-
error ? /* @__PURE__ */ (0,
|
|
4079
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4010
4080
|
]
|
|
4011
4081
|
}
|
|
4012
4082
|
);
|
|
@@ -4015,9 +4085,9 @@ function Input2({
|
|
|
4015
4085
|
}
|
|
4016
4086
|
|
|
4017
4087
|
// src/ui/input-group.tsx
|
|
4018
|
-
var
|
|
4088
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4019
4089
|
function InputGroup({ className, ...props }) {
|
|
4020
|
-
return /* @__PURE__ */ (0,
|
|
4090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4021
4091
|
"div",
|
|
4022
4092
|
{
|
|
4023
4093
|
"data-slot": "input-group",
|
|
@@ -4036,9 +4106,9 @@ function InputGroup({ className, ...props }) {
|
|
|
4036
4106
|
}
|
|
4037
4107
|
|
|
4038
4108
|
// src/components/components/InputGroup/index.tsx
|
|
4039
|
-
var
|
|
4109
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4040
4110
|
function InputGroup2({ className, style, children }) {
|
|
4041
|
-
return /* @__PURE__ */ (0,
|
|
4111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InputGroup, { className, style, children });
|
|
4042
4112
|
}
|
|
4043
4113
|
|
|
4044
4114
|
// src/components/components/InputOTP/index.tsx
|
|
@@ -4048,13 +4118,13 @@ var import_react16 = require("react");
|
|
|
4048
4118
|
var import_input_otp = require("input-otp");
|
|
4049
4119
|
var import_lucide_react17 = require("lucide-react");
|
|
4050
4120
|
var React4 = __toESM(require("react"), 1);
|
|
4051
|
-
var
|
|
4121
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4052
4122
|
function InputOTP({
|
|
4053
4123
|
className,
|
|
4054
4124
|
containerClassName,
|
|
4055
4125
|
...props
|
|
4056
4126
|
}) {
|
|
4057
|
-
return /* @__PURE__ */ (0,
|
|
4127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4058
4128
|
import_input_otp.OTPInput,
|
|
4059
4129
|
{
|
|
4060
4130
|
"data-slot": "input-otp",
|
|
@@ -4068,7 +4138,7 @@ function InputOTP({
|
|
|
4068
4138
|
);
|
|
4069
4139
|
}
|
|
4070
4140
|
function InputOTPGroup({ className, ...props }) {
|
|
4071
|
-
return /* @__PURE__ */ (0,
|
|
4141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4072
4142
|
"div",
|
|
4073
4143
|
{
|
|
4074
4144
|
"data-slot": "input-otp-group",
|
|
@@ -4084,7 +4154,7 @@ function InputOTPSlot({
|
|
|
4084
4154
|
}) {
|
|
4085
4155
|
const inputOTPContext = React4.useContext(import_input_otp.OTPInputContext);
|
|
4086
4156
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4087
|
-
return /* @__PURE__ */ (0,
|
|
4157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
4088
4158
|
"div",
|
|
4089
4159
|
{
|
|
4090
4160
|
"data-slot": "input-otp-slot",
|
|
@@ -4096,14 +4166,14 @@ function InputOTPSlot({
|
|
|
4096
4166
|
...props,
|
|
4097
4167
|
children: [
|
|
4098
4168
|
char,
|
|
4099
|
-
hasFakeCaret ? /* @__PURE__ */ (0,
|
|
4169
|
+
hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
|
|
4100
4170
|
]
|
|
4101
4171
|
}
|
|
4102
4172
|
);
|
|
4103
4173
|
}
|
|
4104
4174
|
|
|
4105
4175
|
// src/components/components/InputOTP/index.tsx
|
|
4106
|
-
var
|
|
4176
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4107
4177
|
function InputOTP2({
|
|
4108
4178
|
name,
|
|
4109
4179
|
label,
|
|
@@ -4141,42 +4211,42 @@ function InputOTP2({
|
|
|
4141
4211
|
onComplete?.(next);
|
|
4142
4212
|
}
|
|
4143
4213
|
};
|
|
4144
|
-
const control = /* @__PURE__ */ (0,
|
|
4214
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4145
4215
|
InputOTP,
|
|
4146
4216
|
{
|
|
4147
4217
|
maxLength: length,
|
|
4148
4218
|
value: current,
|
|
4149
4219
|
onChange: handleChange,
|
|
4150
4220
|
disabled,
|
|
4151
|
-
children: /* @__PURE__ */ (0,
|
|
4221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPSlot, { index }, index)) })
|
|
4152
4222
|
}
|
|
4153
4223
|
);
|
|
4154
4224
|
if (inForm && form && name) {
|
|
4155
4225
|
const error = form.errors[name];
|
|
4156
|
-
return /* @__PURE__ */ (0,
|
|
4226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
4157
4227
|
"div",
|
|
4158
4228
|
{
|
|
4159
4229
|
"data-slot": "form-item",
|
|
4160
4230
|
className: cn(formItemClass(form.layout), className),
|
|
4161
4231
|
style,
|
|
4162
4232
|
children: [
|
|
4163
|
-
label ? /* @__PURE__ */ (0,
|
|
4233
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
4164
4234
|
control,
|
|
4165
|
-
error ? /* @__PURE__ */ (0,
|
|
4235
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4166
4236
|
]
|
|
4167
4237
|
}
|
|
4168
4238
|
);
|
|
4169
4239
|
}
|
|
4170
|
-
return /* @__PURE__ */ (0,
|
|
4240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
|
|
4171
4241
|
}
|
|
4172
4242
|
|
|
4173
4243
|
// src/components/components/Item/index.tsx
|
|
4174
4244
|
var import_runtime14 = require("@pactor-app/runtime");
|
|
4175
4245
|
|
|
4176
4246
|
// src/ui/item.tsx
|
|
4177
|
-
var
|
|
4247
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4178
4248
|
function Item({ className, ...props }) {
|
|
4179
|
-
return /* @__PURE__ */ (0,
|
|
4249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4180
4250
|
"div",
|
|
4181
4251
|
{
|
|
4182
4252
|
"data-slot": "item",
|
|
@@ -4189,7 +4259,7 @@ function Item({ className, ...props }) {
|
|
|
4189
4259
|
);
|
|
4190
4260
|
}
|
|
4191
4261
|
function ItemMedia({ className, ...props }) {
|
|
4192
|
-
return /* @__PURE__ */ (0,
|
|
4262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4193
4263
|
"div",
|
|
4194
4264
|
{
|
|
4195
4265
|
"data-slot": "item-media",
|
|
@@ -4202,7 +4272,7 @@ function ItemMedia({ className, ...props }) {
|
|
|
4202
4272
|
);
|
|
4203
4273
|
}
|
|
4204
4274
|
function ItemContent({ className, ...props }) {
|
|
4205
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4206
4276
|
"div",
|
|
4207
4277
|
{
|
|
4208
4278
|
"data-slot": "item-content",
|
|
@@ -4212,7 +4282,7 @@ function ItemContent({ className, ...props }) {
|
|
|
4212
4282
|
);
|
|
4213
4283
|
}
|
|
4214
4284
|
function ItemTitle({ className, ...props }) {
|
|
4215
|
-
return /* @__PURE__ */ (0,
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4216
4286
|
"div",
|
|
4217
4287
|
{
|
|
4218
4288
|
"data-slot": "item-title",
|
|
@@ -4222,7 +4292,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
4222
4292
|
);
|
|
4223
4293
|
}
|
|
4224
4294
|
function ItemDescription({ className, ...props }) {
|
|
4225
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4226
4296
|
"p",
|
|
4227
4297
|
{
|
|
4228
4298
|
"data-slot": "item-description",
|
|
@@ -4232,7 +4302,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
4232
4302
|
);
|
|
4233
4303
|
}
|
|
4234
4304
|
function ItemActions({ className, ...props }) {
|
|
4235
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4236
4306
|
"div",
|
|
4237
4307
|
{
|
|
4238
4308
|
"data-slot": "item-actions",
|
|
@@ -4243,7 +4313,7 @@ function ItemActions({ className, ...props }) {
|
|
|
4243
4313
|
}
|
|
4244
4314
|
|
|
4245
4315
|
// src/components/components/Item/index.tsx
|
|
4246
|
-
var
|
|
4316
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4247
4317
|
function Item2({
|
|
4248
4318
|
title,
|
|
4249
4319
|
description,
|
|
@@ -4254,20 +4324,20 @@ function Item2({
|
|
|
4254
4324
|
}) {
|
|
4255
4325
|
const { renderChildren } = (0, import_runtime14.useRenderer)();
|
|
4256
4326
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4257
|
-
return /* @__PURE__ */ (0,
|
|
4258
|
-
mediaNodes.length > 0 ? /* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
title ? /* @__PURE__ */ (0,
|
|
4261
|
-
description ? /* @__PURE__ */ (0,
|
|
4327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Item, { className, style, children: [
|
|
4328
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(ItemContent, { children: [
|
|
4330
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemTitle, { children: title }) : null,
|
|
4331
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemDescription, { children: description }) : null
|
|
4262
4332
|
] }),
|
|
4263
|
-
actions && actions.length > 0 ? /* @__PURE__ */ (0,
|
|
4333
|
+
actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemActions, { children: renderChildren(actions) }) : null
|
|
4264
4334
|
] });
|
|
4265
4335
|
}
|
|
4266
4336
|
|
|
4267
4337
|
// src/ui/kbd.tsx
|
|
4268
|
-
var
|
|
4338
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4269
4339
|
function Kbd({ className, ...props }) {
|
|
4270
|
-
return /* @__PURE__ */ (0,
|
|
4340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4271
4341
|
"kbd",
|
|
4272
4342
|
{
|
|
4273
4343
|
"data-slot": "kbd",
|
|
@@ -4281,18 +4351,18 @@ function Kbd({ className, ...props }) {
|
|
|
4281
4351
|
}
|
|
4282
4352
|
|
|
4283
4353
|
// src/components/components/Kbd/index.tsx
|
|
4284
|
-
var
|
|
4354
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4285
4355
|
function Kbd2({ text, className, style }) {
|
|
4286
|
-
return /* @__PURE__ */ (0,
|
|
4356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Kbd, { className, style, children: text });
|
|
4287
4357
|
}
|
|
4288
4358
|
|
|
4289
4359
|
// src/ui/label.tsx
|
|
4290
|
-
var
|
|
4360
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4291
4361
|
function Label({
|
|
4292
4362
|
className,
|
|
4293
4363
|
...props
|
|
4294
4364
|
}) {
|
|
4295
|
-
return /* @__PURE__ */ (0,
|
|
4365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4296
4366
|
"label",
|
|
4297
4367
|
{
|
|
4298
4368
|
"data-slot": "label",
|
|
@@ -4306,22 +4376,22 @@ function Label({
|
|
|
4306
4376
|
}
|
|
4307
4377
|
|
|
4308
4378
|
// src/components/components/Label/index.tsx
|
|
4309
|
-
var
|
|
4379
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4310
4380
|
function Label2({ text, htmlFor, className, style }) {
|
|
4311
|
-
return /* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Label, { htmlFor, className, style, children: text });
|
|
4312
4382
|
}
|
|
4313
4383
|
|
|
4314
4384
|
// src/components/components/Layout/index.tsx
|
|
4315
4385
|
var import_core = require("@pactor-app/core");
|
|
4316
4386
|
var import_runtime15 = require("@pactor-app/runtime");
|
|
4317
|
-
var
|
|
4387
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4318
4388
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4319
4389
|
const { renderChildren, context } = (0, import_runtime15.useRenderer)();
|
|
4320
4390
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4321
4391
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4322
4392
|
) : false;
|
|
4323
4393
|
const dir = direction ?? (hasSider ? "horizontal" : "vertical");
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4325
4395
|
"div",
|
|
4326
4396
|
{
|
|
4327
4397
|
"data-slot": "layout",
|
|
@@ -4345,10 +4415,10 @@ function resolveRootType(node, context) {
|
|
|
4345
4415
|
}
|
|
4346
4416
|
|
|
4347
4417
|
// src/components/components/Link/index.tsx
|
|
4348
|
-
var
|
|
4418
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4349
4419
|
function Link2({ href, text, target, className, style, children }) {
|
|
4350
4420
|
const handleSpaClick = useSpaLinkClick();
|
|
4351
|
-
return /* @__PURE__ */ (0,
|
|
4421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4352
4422
|
"a",
|
|
4353
4423
|
{
|
|
4354
4424
|
"data-slot": "link",
|
|
@@ -4366,73 +4436,13 @@ function Link2({ href, text, target, className, style, children }) {
|
|
|
4366
4436
|
// src/components/components/Menu/index.tsx
|
|
4367
4437
|
var import_react19 = require("react");
|
|
4368
4438
|
|
|
4369
|
-
// src/ui/tooltip.tsx
|
|
4370
|
-
var import_tooltip = require("@base-ui/react/tooltip");
|
|
4371
|
-
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4372
|
-
function TooltipProvider({
|
|
4373
|
-
delay = 0,
|
|
4374
|
-
...props
|
|
4375
|
-
}) {
|
|
4376
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4377
|
-
import_tooltip.Tooltip.Provider,
|
|
4378
|
-
{
|
|
4379
|
-
"data-slot": "tooltip-provider",
|
|
4380
|
-
delay,
|
|
4381
|
-
...props
|
|
4382
|
-
}
|
|
4383
|
-
);
|
|
4384
|
-
}
|
|
4385
|
-
function Tooltip2({
|
|
4386
|
-
...props
|
|
4387
|
-
}) {
|
|
4388
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
4389
|
-
}
|
|
4390
|
-
function TooltipTrigger({
|
|
4391
|
-
...props
|
|
4392
|
-
}) {
|
|
4393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4394
|
-
}
|
|
4395
|
-
function TooltipContent({
|
|
4396
|
-
className,
|
|
4397
|
-
side = "top",
|
|
4398
|
-
sideOffset = 4,
|
|
4399
|
-
align = "center",
|
|
4400
|
-
children,
|
|
4401
|
-
...props
|
|
4402
|
-
}) {
|
|
4403
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4404
|
-
import_tooltip.Tooltip.Positioner,
|
|
4405
|
-
{
|
|
4406
|
-
align,
|
|
4407
|
-
side,
|
|
4408
|
-
sideOffset,
|
|
4409
|
-
className: "isolate z-50",
|
|
4410
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4411
|
-
import_tooltip.Tooltip.Popup,
|
|
4412
|
-
{
|
|
4413
|
-
"data-slot": "tooltip-content",
|
|
4414
|
-
className: cn(
|
|
4415
|
-
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4416
|
-
className
|
|
4417
|
-
),
|
|
4418
|
-
...props,
|
|
4419
|
-
children: [
|
|
4420
|
-
children,
|
|
4421
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
4422
|
-
]
|
|
4423
|
-
}
|
|
4424
|
-
)
|
|
4425
|
-
}
|
|
4426
|
-
) });
|
|
4427
|
-
}
|
|
4428
|
-
|
|
4429
4439
|
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
4430
4440
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4431
4441
|
function RailTooltip({
|
|
4432
4442
|
label,
|
|
4433
4443
|
children
|
|
4434
4444
|
}) {
|
|
4435
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Tooltip, { children: [
|
|
4436
4446
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipTrigger, { render: children }),
|
|
4437
4447
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
4438
4448
|
] });
|
|
@@ -4947,7 +4957,7 @@ function SidebarMenuButton({
|
|
|
4947
4957
|
children: tooltip
|
|
4948
4958
|
};
|
|
4949
4959
|
}
|
|
4950
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Tooltip, { children: [
|
|
4951
4961
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TooltipTrigger, { render: button }),
|
|
4952
4962
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4953
4963
|
TooltipContent,
|
|
@@ -6406,7 +6416,8 @@ function Select2({
|
|
|
6406
6416
|
"span",
|
|
6407
6417
|
{
|
|
6408
6418
|
className: cn(
|
|
6409
|
-
|
|
6419
|
+
// Form / Field(Form 上下文)内控件占满整行宽度;独立渲染保持内容自然宽度
|
|
6420
|
+
inFormRoot ? "flex w-full items-center gap-1" : "inline-flex items-center gap-1",
|
|
6410
6421
|
!inFormRoot && className,
|
|
6411
6422
|
controlClassName
|
|
6412
6423
|
),
|
|
@@ -6421,7 +6432,7 @@ function Select2({
|
|
|
6421
6432
|
disabled,
|
|
6422
6433
|
name: inForm ? name : void 0,
|
|
6423
6434
|
children: [
|
|
6424
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6425
6436
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
6426
6437
|
SelectItem,
|
|
6427
6438
|
{
|
|
@@ -7146,9 +7157,15 @@ var typeClassMap = {
|
|
|
7146
7157
|
warning: "text-warning",
|
|
7147
7158
|
danger: "text-destructive"
|
|
7148
7159
|
};
|
|
7160
|
+
var sizeClassMap = {
|
|
7161
|
+
small: "text-xs",
|
|
7162
|
+
middle: "",
|
|
7163
|
+
large: "text-lg"
|
|
7164
|
+
};
|
|
7149
7165
|
function Text({
|
|
7150
7166
|
text,
|
|
7151
7167
|
type = "default",
|
|
7168
|
+
size = "middle",
|
|
7152
7169
|
strong,
|
|
7153
7170
|
delete: del,
|
|
7154
7171
|
underline,
|
|
@@ -7164,6 +7181,7 @@ function Text({
|
|
|
7164
7181
|
"data-type": type,
|
|
7165
7182
|
className: cn(
|
|
7166
7183
|
typeClassMap[type],
|
|
7184
|
+
sizeClassMap[size],
|
|
7167
7185
|
strong && "font-semibold",
|
|
7168
7186
|
del && "line-through",
|
|
7169
7187
|
underline && "underline",
|
|
@@ -7415,7 +7433,7 @@ function ToggleGroup2({
|
|
|
7415
7433
|
// src/components/components/Tooltip/index.tsx
|
|
7416
7434
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
7417
7435
|
function Tooltip3({ content, children, className, style }) {
|
|
7418
|
-
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
7436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Tooltip, { children: [
|
|
7419
7437
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
7420
7438
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipContent, { className, style, children: content })
|
|
7421
7439
|
] });
|