@pactor-app/ui 1.11.0 → 1.13.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-VM4FESQB.js → chunk-AUSWAD26.js} +79 -79
- package/dist/{chunk-HW6M3BEF.js → chunk-CFUWF54N.js} +42 -8
- package/dist/{chunk-PECP7DJB.js → chunk-GQE62HDV.js} +24 -3
- package/dist/{chunk-NVORKHWX.js → chunk-NQQAPB7Q.js} +6 -4
- package/dist/{chunk-TAJXMOEX.js → chunk-V2J6FHWX.js} +2 -2
- package/dist/components/index.cjs +509 -450
- package/dist/components/index.d.cts +22 -6
- package/dist/components/index.d.ts +22 -6
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +512 -453
- package/dist/index.js +5 -5
- package/dist/layout/index.cjs +23 -2
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.cjs +5 -3
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +6 -0
package/dist/index.cjs
CHANGED
|
@@ -412,7 +412,28 @@ var ICONS = {
|
|
|
412
412
|
"rotate-ccw": import_lucide_react2.RotateCcw,
|
|
413
413
|
quote: import_lucide_react2.Quote,
|
|
414
414
|
chat: import_lucide_react2.MessageSquare,
|
|
415
|
-
brain: import_lucide_react2.Brain
|
|
415
|
+
brain: import_lucide_react2.Brain,
|
|
416
|
+
// lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
|
|
417
|
+
// 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
|
|
418
|
+
"trash-2": import_lucide_react2.Trash2,
|
|
419
|
+
"share-2": import_lucide_react2.Share2,
|
|
420
|
+
"building-2": import_lucide_react2.Building2,
|
|
421
|
+
house: import_lucide_react2.House,
|
|
422
|
+
"triangle-alert": import_lucide_react2.TriangleAlert,
|
|
423
|
+
"circle-alert": import_lucide_react2.CircleAlert,
|
|
424
|
+
"circle-check": import_lucide_react2.CircleCheck,
|
|
425
|
+
"circle-x": import_lucide_react2.CircleX,
|
|
426
|
+
"circle-question-mark": import_lucide_react2.CircleQuestionMark,
|
|
427
|
+
"square-pen": import_lucide_react2.SquarePen,
|
|
428
|
+
"refresh-ccw": import_lucide_react2.RefreshCcw,
|
|
429
|
+
"chart-column": import_lucide_react2.ChartColumn,
|
|
430
|
+
"layout-grid": import_lucide_react2.LayoutGrid,
|
|
431
|
+
funnel: import_lucide_react2.Funnel,
|
|
432
|
+
"loader-circle": import_lucide_react2.LoaderCircle,
|
|
433
|
+
ellipsis: import_lucide_react2.Ellipsis,
|
|
434
|
+
"ellipsis-vertical": import_lucide_react2.EllipsisVertical,
|
|
435
|
+
"message-circle": import_lucide_react2.MessageCircle,
|
|
436
|
+
"lock-open": import_lucide_react2.LockOpen
|
|
416
437
|
};
|
|
417
438
|
function normalizeIconName(name) {
|
|
418
439
|
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
@@ -442,7 +463,7 @@ function Icon({
|
|
|
442
463
|
size: px,
|
|
443
464
|
color,
|
|
444
465
|
strokeWidth,
|
|
445
|
-
className: cn("shrink-0
|
|
466
|
+
className: cn("shrink-0", className),
|
|
446
467
|
style,
|
|
447
468
|
"aria-hidden": "true"
|
|
448
469
|
}
|
|
@@ -998,7 +1019,69 @@ function Breadcrumb2({ items = [], className, style }) {
|
|
|
998
1019
|
|
|
999
1020
|
// src/components/components/Button/index.tsx
|
|
1000
1021
|
var import_lucide_react4 = require("lucide-react");
|
|
1022
|
+
|
|
1023
|
+
// src/ui/tooltip.tsx
|
|
1024
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
1001
1025
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1026
|
+
function TooltipProvider({
|
|
1027
|
+
delay = 0,
|
|
1028
|
+
...props
|
|
1029
|
+
}) {
|
|
1030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1031
|
+
import_tooltip.Tooltip.Provider,
|
|
1032
|
+
{
|
|
1033
|
+
"data-slot": "tooltip-provider",
|
|
1034
|
+
delay,
|
|
1035
|
+
...props
|
|
1036
|
+
}
|
|
1037
|
+
);
|
|
1038
|
+
}
|
|
1039
|
+
function Tooltip({
|
|
1040
|
+
...props
|
|
1041
|
+
}) {
|
|
1042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
1043
|
+
}
|
|
1044
|
+
function TooltipTrigger({
|
|
1045
|
+
...props
|
|
1046
|
+
}) {
|
|
1047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1048
|
+
}
|
|
1049
|
+
function TooltipContent({
|
|
1050
|
+
className,
|
|
1051
|
+
side = "top",
|
|
1052
|
+
sideOffset = 4,
|
|
1053
|
+
align = "center",
|
|
1054
|
+
children,
|
|
1055
|
+
...props
|
|
1056
|
+
}) {
|
|
1057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1058
|
+
import_tooltip.Tooltip.Positioner,
|
|
1059
|
+
{
|
|
1060
|
+
align,
|
|
1061
|
+
side,
|
|
1062
|
+
sideOffset,
|
|
1063
|
+
className: "isolate z-50",
|
|
1064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1065
|
+
import_tooltip.Tooltip.Popup,
|
|
1066
|
+
{
|
|
1067
|
+
"data-slot": "tooltip-content",
|
|
1068
|
+
className: cn(
|
|
1069
|
+
"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",
|
|
1070
|
+
className
|
|
1071
|
+
),
|
|
1072
|
+
...props,
|
|
1073
|
+
children: [
|
|
1074
|
+
children,
|
|
1075
|
+
/* @__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" })
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1079
|
+
}
|
|
1080
|
+
) });
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
// src/components/components/Button/index.tsx
|
|
1084
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1002
1085
|
var variantMap2 = {
|
|
1003
1086
|
default: "outline",
|
|
1004
1087
|
primary: "default",
|
|
@@ -1014,6 +1097,7 @@ var sizeMap = {
|
|
|
1014
1097
|
function Button2({
|
|
1015
1098
|
text,
|
|
1016
1099
|
icon,
|
|
1100
|
+
tooltip,
|
|
1017
1101
|
variant = "default",
|
|
1018
1102
|
danger,
|
|
1019
1103
|
size = "middle",
|
|
@@ -1026,7 +1110,7 @@ function Button2({
|
|
|
1026
1110
|
children
|
|
1027
1111
|
}) {
|
|
1028
1112
|
const textual = variant === "link" || variant === "text";
|
|
1029
|
-
|
|
1113
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1030
1114
|
Button,
|
|
1031
1115
|
{
|
|
1032
1116
|
type: submit ? "submit" : "button",
|
|
@@ -1042,17 +1126,24 @@ function Button2({
|
|
|
1042
1126
|
className
|
|
1043
1127
|
),
|
|
1044
1128
|
children: [
|
|
1045
|
-
loading ? /* @__PURE__ */ (0,
|
|
1129
|
+
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,
|
|
1046
1130
|
text ?? children
|
|
1047
1131
|
]
|
|
1048
1132
|
}
|
|
1049
1133
|
);
|
|
1134
|
+
if (tooltip) {
|
|
1135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
|
|
1136
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipTrigger, { render: button }),
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: tooltip })
|
|
1138
|
+
] });
|
|
1139
|
+
}
|
|
1140
|
+
return button;
|
|
1050
1141
|
}
|
|
1051
1142
|
|
|
1052
1143
|
// src/ui/button-group.tsx
|
|
1053
|
-
var
|
|
1144
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1054
1145
|
function ButtonGroup({ className, ...props }) {
|
|
1055
|
-
return /* @__PURE__ */ (0,
|
|
1146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1056
1147
|
"div",
|
|
1057
1148
|
{
|
|
1058
1149
|
role: "group",
|
|
@@ -1067,9 +1158,9 @@ function ButtonGroup({ className, ...props }) {
|
|
|
1067
1158
|
}
|
|
1068
1159
|
|
|
1069
1160
|
// src/components/components/ButtonGroup/index.tsx
|
|
1070
|
-
var
|
|
1161
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1071
1162
|
function ButtonGroup2({ className, style, children }) {
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ButtonGroup, { className, style, children });
|
|
1073
1164
|
}
|
|
1074
1165
|
|
|
1075
1166
|
// src/components/components/Calendar/index.tsx
|
|
@@ -1079,7 +1170,7 @@ var import_react4 = require("react");
|
|
|
1079
1170
|
// src/ui/calendar.tsx
|
|
1080
1171
|
var import_lucide_react5 = require("lucide-react");
|
|
1081
1172
|
var import_react_day_picker = require("react-day-picker");
|
|
1082
|
-
var
|
|
1173
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1083
1174
|
function Calendar2({
|
|
1084
1175
|
className,
|
|
1085
1176
|
classNames,
|
|
@@ -1087,7 +1178,7 @@ function Calendar2({
|
|
|
1087
1178
|
...props
|
|
1088
1179
|
}) {
|
|
1089
1180
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1090
|
-
return /* @__PURE__ */ (0,
|
|
1181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1091
1182
|
import_react_day_picker.DayPicker,
|
|
1092
1183
|
{
|
|
1093
1184
|
showOutsideDays,
|
|
@@ -1144,7 +1235,7 @@ function Calendar2({
|
|
|
1144
1235
|
...classNames
|
|
1145
1236
|
},
|
|
1146
1237
|
components: {
|
|
1147
|
-
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0,
|
|
1238
|
+
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" })
|
|
1148
1239
|
},
|
|
1149
1240
|
...props
|
|
1150
1241
|
}
|
|
@@ -1170,7 +1261,7 @@ function formItemClass(layout) {
|
|
|
1170
1261
|
}
|
|
1171
1262
|
|
|
1172
1263
|
// src/components/components/Calendar/index.tsx
|
|
1173
|
-
var
|
|
1264
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1174
1265
|
function parseValue(value) {
|
|
1175
1266
|
if (typeof value !== "string" || value === "") return void 0;
|
|
1176
1267
|
const date = (0, import_date_fns.parseISO)(value);
|
|
@@ -1204,7 +1295,7 @@ function Calendar3({
|
|
|
1204
1295
|
}
|
|
1205
1296
|
onChange?.(next);
|
|
1206
1297
|
};
|
|
1207
|
-
const calendar = /* @__PURE__ */ (0,
|
|
1298
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1208
1299
|
Calendar2,
|
|
1209
1300
|
{
|
|
1210
1301
|
mode,
|
|
@@ -1217,16 +1308,16 @@ function Calendar3({
|
|
|
1217
1308
|
);
|
|
1218
1309
|
if (inForm && form && name) {
|
|
1219
1310
|
const error = form.errors[name];
|
|
1220
|
-
return /* @__PURE__ */ (0,
|
|
1311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1221
1312
|
"div",
|
|
1222
1313
|
{
|
|
1223
1314
|
"data-slot": "form-item",
|
|
1224
1315
|
className: cn(formItemClass(form.layout), className),
|
|
1225
1316
|
style,
|
|
1226
1317
|
children: [
|
|
1227
|
-
label ? /* @__PURE__ */ (0,
|
|
1318
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1228
1319
|
calendar,
|
|
1229
|
-
error ? /* @__PURE__ */ (0,
|
|
1320
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1230
1321
|
]
|
|
1231
1322
|
}
|
|
1232
1323
|
);
|
|
@@ -1235,7 +1326,7 @@ function Calendar3({
|
|
|
1235
1326
|
}
|
|
1236
1327
|
|
|
1237
1328
|
// src/ui/card.tsx
|
|
1238
|
-
var
|
|
1329
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1239
1330
|
var cardRoundedClasses = {
|
|
1240
1331
|
none: "rounded-none",
|
|
1241
1332
|
sm: "rounded-sm",
|
|
@@ -1250,7 +1341,7 @@ function Card({
|
|
|
1250
1341
|
rounded = "lg",
|
|
1251
1342
|
...props
|
|
1252
1343
|
}) {
|
|
1253
|
-
return /* @__PURE__ */ (0,
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1254
1345
|
"div",
|
|
1255
1346
|
{
|
|
1256
1347
|
"data-slot": "card",
|
|
@@ -1264,7 +1355,7 @@ function Card({
|
|
|
1264
1355
|
);
|
|
1265
1356
|
}
|
|
1266
1357
|
function CardHeader({ className, ...props }) {
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1268
1359
|
"div",
|
|
1269
1360
|
{
|
|
1270
1361
|
"data-slot": "card-header",
|
|
@@ -1277,7 +1368,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1277
1368
|
);
|
|
1278
1369
|
}
|
|
1279
1370
|
function CardTitle({ className, ...props }) {
|
|
1280
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1281
1372
|
"div",
|
|
1282
1373
|
{
|
|
1283
1374
|
"data-slot": "card-title",
|
|
@@ -1287,7 +1378,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1287
1378
|
);
|
|
1288
1379
|
}
|
|
1289
1380
|
function CardContent({ className, ...props }) {
|
|
1290
|
-
return /* @__PURE__ */ (0,
|
|
1381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1291
1382
|
"div",
|
|
1292
1383
|
{
|
|
1293
1384
|
"data-slot": "card-content",
|
|
@@ -1298,17 +1389,17 @@ function CardContent({ className, ...props }) {
|
|
|
1298
1389
|
}
|
|
1299
1390
|
|
|
1300
1391
|
// src/components/components/Card/index.tsx
|
|
1301
|
-
var
|
|
1392
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1302
1393
|
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1303
|
-
return /* @__PURE__ */ (0,
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1304
1395
|
Card,
|
|
1305
1396
|
{
|
|
1306
1397
|
rounded,
|
|
1307
1398
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1308
1399
|
style,
|
|
1309
1400
|
children: [
|
|
1310
|
-
title ? /* @__PURE__ */ (0,
|
|
1311
|
-
/* @__PURE__ */ (0,
|
|
1401
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardHeader, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardTitle, { children: title }) }) : null,
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardContent, { className: "px-4", children })
|
|
1312
1403
|
]
|
|
1313
1404
|
}
|
|
1314
1405
|
);
|
|
@@ -1322,7 +1413,7 @@ var import_react5 = require("react");
|
|
|
1322
1413
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1323
1414
|
var import_lucide_react6 = require("lucide-react");
|
|
1324
1415
|
var React3 = __toESM(require("react"), 1);
|
|
1325
|
-
var
|
|
1416
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1326
1417
|
var CarouselContext = React3.createContext(null);
|
|
1327
1418
|
function useCarousel() {
|
|
1328
1419
|
const context = React3.useContext(CarouselContext);
|
|
@@ -1377,7 +1468,7 @@ function Carousel({
|
|
|
1377
1468
|
api.off("select", onSelect);
|
|
1378
1469
|
};
|
|
1379
1470
|
}, [api, onSelect]);
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1381
1472
|
CarouselContext.Provider,
|
|
1382
1473
|
{
|
|
1383
1474
|
value: {
|
|
@@ -1390,7 +1481,7 @@ function Carousel({
|
|
|
1390
1481
|
canScrollPrev,
|
|
1391
1482
|
canScrollNext
|
|
1392
1483
|
},
|
|
1393
|
-
children: /* @__PURE__ */ (0,
|
|
1484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1394
1485
|
"div",
|
|
1395
1486
|
{
|
|
1396
1487
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1407,7 +1498,7 @@ function Carousel({
|
|
|
1407
1498
|
}
|
|
1408
1499
|
function CarouselContent({ className, ...props }) {
|
|
1409
1500
|
const { carouselRef, orientation } = useCarousel();
|
|
1410
|
-
return /* @__PURE__ */ (0,
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-viewport", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1411
1502
|
"div",
|
|
1412
1503
|
{
|
|
1413
1504
|
className: cn(
|
|
@@ -1421,7 +1512,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1421
1512
|
}
|
|
1422
1513
|
function CarouselItem({ className, ...props }) {
|
|
1423
1514
|
const { orientation } = useCarousel();
|
|
1424
|
-
return /* @__PURE__ */ (0,
|
|
1515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1425
1516
|
"div",
|
|
1426
1517
|
{
|
|
1427
1518
|
role: "group",
|
|
@@ -1443,7 +1534,7 @@ function CarouselPrevious({
|
|
|
1443
1534
|
...props
|
|
1444
1535
|
}) {
|
|
1445
1536
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1447
1538
|
Button,
|
|
1448
1539
|
{
|
|
1449
1540
|
"data-slot": "carousel-previous",
|
|
@@ -1458,8 +1549,8 @@ function CarouselPrevious({
|
|
|
1458
1549
|
onClick: scrollPrev,
|
|
1459
1550
|
...props,
|
|
1460
1551
|
children: [
|
|
1461
|
-
/* @__PURE__ */ (0,
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1552
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronLeftIcon, {}),
|
|
1553
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1463
1554
|
]
|
|
1464
1555
|
}
|
|
1465
1556
|
);
|
|
@@ -1471,7 +1562,7 @@ function CarouselNext({
|
|
|
1471
1562
|
...props
|
|
1472
1563
|
}) {
|
|
1473
1564
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1474
|
-
return /* @__PURE__ */ (0,
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1475
1566
|
Button,
|
|
1476
1567
|
{
|
|
1477
1568
|
"data-slot": "carousel-next",
|
|
@@ -1486,15 +1577,15 @@ function CarouselNext({
|
|
|
1486
1577
|
onClick: scrollNext,
|
|
1487
1578
|
...props,
|
|
1488
1579
|
children: [
|
|
1489
|
-
/* @__PURE__ */ (0,
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronRightIcon, {}),
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1491
1582
|
]
|
|
1492
1583
|
}
|
|
1493
1584
|
);
|
|
1494
1585
|
}
|
|
1495
1586
|
|
|
1496
1587
|
// src/components/components/Carousel/index.tsx
|
|
1497
|
-
var
|
|
1588
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1498
1589
|
function isDslNode(item) {
|
|
1499
1590
|
return typeof item.type === "string";
|
|
1500
1591
|
}
|
|
@@ -1519,7 +1610,7 @@ function Carousel2({
|
|
|
1519
1610
|
}, interval);
|
|
1520
1611
|
return () => clearInterval(timer);
|
|
1521
1612
|
}, [api, autoplay, loop]);
|
|
1522
|
-
return /* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1523
1614
|
Carousel,
|
|
1524
1615
|
{
|
|
1525
1616
|
opts: { loop: loop === true },
|
|
@@ -1527,7 +1618,7 @@ function Carousel2({
|
|
|
1527
1618
|
className,
|
|
1528
1619
|
style,
|
|
1529
1620
|
children: [
|
|
1530
|
-
/* @__PURE__ */ (0,
|
|
1621
|
+
/* @__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)(
|
|
1531
1622
|
"img",
|
|
1532
1623
|
{
|
|
1533
1624
|
src: item.src,
|
|
@@ -1535,8 +1626,8 @@ function Carousel2({
|
|
|
1535
1626
|
className: "w-full rounded-md object-cover"
|
|
1536
1627
|
}
|
|
1537
1628
|
) }, index)) }),
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselPrevious, {}),
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselNext, {})
|
|
1540
1631
|
]
|
|
1541
1632
|
}
|
|
1542
1633
|
);
|
|
@@ -1548,9 +1639,9 @@ var import_react6 = require("react");
|
|
|
1548
1639
|
// src/ui/checkbox.tsx
|
|
1549
1640
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1550
1641
|
var import_lucide_react7 = require("lucide-react");
|
|
1551
|
-
var
|
|
1642
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1552
1643
|
function Checkbox({ className, ...props }) {
|
|
1553
|
-
return /* @__PURE__ */ (0,
|
|
1644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1554
1645
|
import_checkbox.Checkbox.Root,
|
|
1555
1646
|
{
|
|
1556
1647
|
"data-slot": "checkbox",
|
|
@@ -1559,12 +1650,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1559
1650
|
className
|
|
1560
1651
|
),
|
|
1561
1652
|
...props,
|
|
1562
|
-
children: /* @__PURE__ */ (0,
|
|
1653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1563
1654
|
import_checkbox.Checkbox.Indicator,
|
|
1564
1655
|
{
|
|
1565
1656
|
"data-slot": "checkbox-indicator",
|
|
1566
1657
|
className: "flex items-center justify-center text-current",
|
|
1567
|
-
children: /* @__PURE__ */ (0,
|
|
1658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1568
1659
|
}
|
|
1569
1660
|
)
|
|
1570
1661
|
}
|
|
@@ -1572,7 +1663,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1572
1663
|
}
|
|
1573
1664
|
|
|
1574
1665
|
// src/components/components/Checkbox/index.tsx
|
|
1575
|
-
var
|
|
1666
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1576
1667
|
function Checkbox2({
|
|
1577
1668
|
name,
|
|
1578
1669
|
label,
|
|
@@ -1601,13 +1692,13 @@ function Checkbox2({
|
|
|
1601
1692
|
}
|
|
1602
1693
|
onChange?.(next);
|
|
1603
1694
|
};
|
|
1604
|
-
const control = /* @__PURE__ */ (0,
|
|
1695
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1605
1696
|
"span",
|
|
1606
1697
|
{
|
|
1607
1698
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1608
1699
|
style: inForm ? void 0 : style,
|
|
1609
1700
|
children: [
|
|
1610
|
-
/* @__PURE__ */ (0,
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1611
1702
|
Checkbox,
|
|
1612
1703
|
{
|
|
1613
1704
|
id: controlId,
|
|
@@ -1617,12 +1708,12 @@ function Checkbox2({
|
|
|
1617
1708
|
onCheckedChange: handleChange
|
|
1618
1709
|
}
|
|
1619
1710
|
),
|
|
1620
|
-
label ? /* @__PURE__ */ (0,
|
|
1711
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1621
1712
|
]
|
|
1622
1713
|
}
|
|
1623
1714
|
);
|
|
1624
1715
|
if (inForm && form && name) {
|
|
1625
|
-
return /* @__PURE__ */ (0,
|
|
1716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1626
1717
|
"div",
|
|
1627
1718
|
{
|
|
1628
1719
|
"data-slot": "form-item",
|
|
@@ -1630,7 +1721,7 @@ function Checkbox2({
|
|
|
1630
1721
|
style,
|
|
1631
1722
|
children: [
|
|
1632
1723
|
control,
|
|
1633
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
1724
|
+
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
|
|
1634
1725
|
]
|
|
1635
1726
|
}
|
|
1636
1727
|
);
|
|
@@ -1644,18 +1735,18 @@ var import_react7 = require("react");
|
|
|
1644
1735
|
// src/ui/collapsible.tsx
|
|
1645
1736
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1646
1737
|
var import_lucide_react8 = require("lucide-react");
|
|
1647
|
-
var
|
|
1738
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1648
1739
|
function Collapsible({
|
|
1649
1740
|
...props
|
|
1650
1741
|
}) {
|
|
1651
|
-
return /* @__PURE__ */ (0,
|
|
1742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1652
1743
|
}
|
|
1653
1744
|
function CollapsibleTrigger({
|
|
1654
1745
|
className,
|
|
1655
1746
|
children,
|
|
1656
1747
|
...props
|
|
1657
1748
|
}) {
|
|
1658
|
-
return /* @__PURE__ */ (0,
|
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1659
1750
|
import_collapsible.Collapsible.Trigger,
|
|
1660
1751
|
{
|
|
1661
1752
|
"data-slot": "collapsible-trigger",
|
|
@@ -1666,7 +1757,7 @@ function CollapsibleTrigger({
|
|
|
1666
1757
|
...props,
|
|
1667
1758
|
children: [
|
|
1668
1759
|
children,
|
|
1669
|
-
/* @__PURE__ */ (0,
|
|
1760
|
+
/* @__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" })
|
|
1670
1761
|
]
|
|
1671
1762
|
}
|
|
1672
1763
|
);
|
|
@@ -1675,7 +1766,7 @@ function CollapsibleContent({
|
|
|
1675
1766
|
className,
|
|
1676
1767
|
...props
|
|
1677
1768
|
}) {
|
|
1678
|
-
return /* @__PURE__ */ (0,
|
|
1769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1679
1770
|
import_collapsible.Collapsible.Panel,
|
|
1680
1771
|
{
|
|
1681
1772
|
"data-slot": "collapsible-content",
|
|
@@ -1689,7 +1780,7 @@ function CollapsibleContent({
|
|
|
1689
1780
|
}
|
|
1690
1781
|
|
|
1691
1782
|
// src/components/components/Collapsible/index.tsx
|
|
1692
|
-
var
|
|
1783
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1693
1784
|
function Collapsible2({
|
|
1694
1785
|
title,
|
|
1695
1786
|
open,
|
|
@@ -1699,7 +1790,7 @@ function Collapsible2({
|
|
|
1699
1790
|
}) {
|
|
1700
1791
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1701
1792
|
const controlled = open !== void 0;
|
|
1702
|
-
return /* @__PURE__ */ (0,
|
|
1793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1703
1794
|
Collapsible,
|
|
1704
1795
|
{
|
|
1705
1796
|
open: controlled ? open : innerOpen,
|
|
@@ -1711,8 +1802,8 @@ function Collapsible2({
|
|
|
1711
1802
|
className,
|
|
1712
1803
|
style,
|
|
1713
1804
|
children: [
|
|
1714
|
-
title ? /* @__PURE__ */ (0,
|
|
1715
|
-
/* @__PURE__ */ (0,
|
|
1805
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleContent, { children })
|
|
1716
1807
|
]
|
|
1717
1808
|
}
|
|
1718
1809
|
);
|
|
@@ -1726,16 +1817,16 @@ var import_lucide_react9 = require("lucide-react");
|
|
|
1726
1817
|
|
|
1727
1818
|
// src/ui/popover.tsx
|
|
1728
1819
|
var import_popover = require("@base-ui/react/popover");
|
|
1729
|
-
var
|
|
1820
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1730
1821
|
function Popover({
|
|
1731
1822
|
...props
|
|
1732
1823
|
}) {
|
|
1733
|
-
return /* @__PURE__ */ (0,
|
|
1824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1734
1825
|
}
|
|
1735
1826
|
function PopoverTrigger({
|
|
1736
1827
|
...props
|
|
1737
1828
|
}) {
|
|
1738
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1739
1830
|
}
|
|
1740
1831
|
function PopoverContent({
|
|
1741
1832
|
className,
|
|
@@ -1745,7 +1836,7 @@ function PopoverContent({
|
|
|
1745
1836
|
anchor,
|
|
1746
1837
|
...props
|
|
1747
1838
|
}) {
|
|
1748
|
-
return /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1749
1840
|
import_popover.Popover.Positioner,
|
|
1750
1841
|
{
|
|
1751
1842
|
align,
|
|
@@ -1753,7 +1844,7 @@ function PopoverContent({
|
|
|
1753
1844
|
sideOffset,
|
|
1754
1845
|
anchor,
|
|
1755
1846
|
className: "isolate z-50",
|
|
1756
|
-
children: /* @__PURE__ */ (0,
|
|
1847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1757
1848
|
import_popover.Popover.Popup,
|
|
1758
1849
|
{
|
|
1759
1850
|
"data-slot": "popover-content",
|
|
@@ -1769,20 +1860,20 @@ function PopoverContent({
|
|
|
1769
1860
|
}
|
|
1770
1861
|
|
|
1771
1862
|
// src/ui/combobox.tsx
|
|
1772
|
-
var
|
|
1863
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1773
1864
|
function Combobox({
|
|
1774
1865
|
open,
|
|
1775
1866
|
onOpenChange,
|
|
1776
1867
|
children
|
|
1777
1868
|
}) {
|
|
1778
|
-
return /* @__PURE__ */ (0,
|
|
1869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1779
1870
|
}
|
|
1780
1871
|
function ComboboxTrigger({
|
|
1781
1872
|
className,
|
|
1782
1873
|
children,
|
|
1783
1874
|
...props
|
|
1784
1875
|
}) {
|
|
1785
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1786
1877
|
PopoverTrigger,
|
|
1787
1878
|
{
|
|
1788
1879
|
"data-slot": "combobox-trigger",
|
|
@@ -1792,8 +1883,8 @@ function ComboboxTrigger({
|
|
|
1792
1883
|
),
|
|
1793
1884
|
...props,
|
|
1794
1885
|
children: [
|
|
1795
|
-
/* @__PURE__ */ (0,
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.ChevronsUpDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
1797
1888
|
]
|
|
1798
1889
|
}
|
|
1799
1890
|
);
|
|
@@ -1803,7 +1894,7 @@ function ComboboxContent({
|
|
|
1803
1894
|
children,
|
|
1804
1895
|
...props
|
|
1805
1896
|
}) {
|
|
1806
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1807
1898
|
PopoverContent,
|
|
1808
1899
|
{
|
|
1809
1900
|
"data-slot": "combobox-content",
|
|
@@ -1817,12 +1908,12 @@ function ComboboxContent({
|
|
|
1817
1908
|
// src/ui/command.tsx
|
|
1818
1909
|
var import_cmdk = require("cmdk");
|
|
1819
1910
|
var import_lucide_react10 = require("lucide-react");
|
|
1820
|
-
var
|
|
1911
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1821
1912
|
function Command({
|
|
1822
1913
|
className,
|
|
1823
1914
|
...props
|
|
1824
1915
|
}) {
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1826
1917
|
import_cmdk.Command,
|
|
1827
1918
|
{
|
|
1828
1919
|
"data-slot": "command",
|
|
@@ -1838,14 +1929,14 @@ function CommandInput({
|
|
|
1838
1929
|
className,
|
|
1839
1930
|
...props
|
|
1840
1931
|
}) {
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1842
1933
|
"div",
|
|
1843
1934
|
{
|
|
1844
1935
|
"data-slot": "command-input-wrapper",
|
|
1845
1936
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1846
1937
|
children: [
|
|
1847
|
-
/* @__PURE__ */ (0,
|
|
1848
|
-
/* @__PURE__ */ (0,
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1849
1940
|
import_cmdk.Command.Input,
|
|
1850
1941
|
{
|
|
1851
1942
|
"data-slot": "command-input",
|
|
@@ -1864,7 +1955,7 @@ function CommandList({
|
|
|
1864
1955
|
className,
|
|
1865
1956
|
...props
|
|
1866
1957
|
}) {
|
|
1867
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1868
1959
|
import_cmdk.Command.List,
|
|
1869
1960
|
{
|
|
1870
1961
|
"data-slot": "command-list",
|
|
@@ -1879,7 +1970,7 @@ function CommandList({
|
|
|
1879
1970
|
function CommandEmpty({
|
|
1880
1971
|
...props
|
|
1881
1972
|
}) {
|
|
1882
|
-
return /* @__PURE__ */ (0,
|
|
1973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1883
1974
|
import_cmdk.Command.Empty,
|
|
1884
1975
|
{
|
|
1885
1976
|
"data-slot": "command-empty",
|
|
@@ -1892,7 +1983,7 @@ function CommandGroup({
|
|
|
1892
1983
|
className,
|
|
1893
1984
|
...props
|
|
1894
1985
|
}) {
|
|
1895
|
-
return /* @__PURE__ */ (0,
|
|
1986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1896
1987
|
import_cmdk.Command.Group,
|
|
1897
1988
|
{
|
|
1898
1989
|
"data-slot": "command-group",
|
|
@@ -1908,7 +1999,7 @@ function CommandItem({
|
|
|
1908
1999
|
className,
|
|
1909
2000
|
...props
|
|
1910
2001
|
}) {
|
|
1911
|
-
return /* @__PURE__ */ (0,
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1912
2003
|
import_cmdk.Command.Item,
|
|
1913
2004
|
{
|
|
1914
2005
|
"data-slot": "command-item",
|
|
@@ -1922,7 +2013,7 @@ function CommandItem({
|
|
|
1922
2013
|
}
|
|
1923
2014
|
|
|
1924
2015
|
// src/components/components/Combobox/index.tsx
|
|
1925
|
-
var
|
|
2016
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1926
2017
|
function Combobox2({
|
|
1927
2018
|
name,
|
|
1928
2019
|
label,
|
|
@@ -1963,8 +2054,8 @@ function Combobox2({
|
|
|
1963
2054
|
onChange?.(option.value);
|
|
1964
2055
|
setOpen(false);
|
|
1965
2056
|
};
|
|
1966
|
-
const control = /* @__PURE__ */ (0,
|
|
1967
|
-
/* @__PURE__ */ (0,
|
|
2057
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1968
2059
|
ComboboxTrigger,
|
|
1969
2060
|
{
|
|
1970
2061
|
id: controlId,
|
|
@@ -1975,11 +2066,11 @@ function Combobox2({
|
|
|
1975
2066
|
children: selected ? selected.label : placeholder ?? ""
|
|
1976
2067
|
}
|
|
1977
2068
|
),
|
|
1978
|
-
/* @__PURE__ */ (0,
|
|
1979
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1980
|
-
/* @__PURE__ */ (0,
|
|
1981
|
-
/* @__PURE__ */ (0,
|
|
1982
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Command, { children: [
|
|
2070
|
+
searchable ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandInput, { placeholder }) : null,
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CommandList, { children: [
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandEmpty, { children: "\u65E0\u5339\u914D\u7ED3\u679C" }),
|
|
2073
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1983
2074
|
CommandItem,
|
|
1984
2075
|
{
|
|
1985
2076
|
value: String(option.value),
|
|
@@ -1996,14 +2087,14 @@ function Combobox2({
|
|
|
1996
2087
|
] });
|
|
1997
2088
|
if (inForm && form && name) {
|
|
1998
2089
|
const error = form.errors[name];
|
|
1999
|
-
return /* @__PURE__ */ (0,
|
|
2090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2000
2091
|
"div",
|
|
2001
2092
|
{
|
|
2002
2093
|
"data-slot": "form-item",
|
|
2003
2094
|
className: cn(formItemClass(form.layout), className),
|
|
2004
2095
|
style,
|
|
2005
2096
|
children: [
|
|
2006
|
-
label ? /* @__PURE__ */ (0,
|
|
2097
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2007
2098
|
"label",
|
|
2008
2099
|
{
|
|
2009
2100
|
htmlFor: controlId,
|
|
@@ -2012,7 +2103,7 @@ function Combobox2({
|
|
|
2012
2103
|
}
|
|
2013
2104
|
) : null,
|
|
2014
2105
|
control,
|
|
2015
|
-
error ? /* @__PURE__ */ (0,
|
|
2106
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2016
2107
|
]
|
|
2017
2108
|
}
|
|
2018
2109
|
);
|
|
@@ -2022,7 +2113,7 @@ function Combobox2({
|
|
|
2022
2113
|
|
|
2023
2114
|
// src/components/components/Command/index.tsx
|
|
2024
2115
|
var import_runtime5 = require("@pactor-app/runtime");
|
|
2025
|
-
var
|
|
2116
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2026
2117
|
function Command2({
|
|
2027
2118
|
groups = [],
|
|
2028
2119
|
placeholder,
|
|
@@ -2032,11 +2123,11 @@ function Command2({
|
|
|
2032
2123
|
style
|
|
2033
2124
|
}) {
|
|
2034
2125
|
const { t } = (0, import_runtime5.useI18n)();
|
|
2035
|
-
return /* @__PURE__ */ (0,
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2039
|
-
groups.map((group, index) => /* @__PURE__ */ (0,
|
|
2126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Command, { className, style, children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandInput, { placeholder }),
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CommandList, { children: [
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandEmpty, { children: emptyText ?? t("pactor.command.empty") }),
|
|
2130
|
+
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)(
|
|
2040
2131
|
CommandItem,
|
|
2041
2132
|
{
|
|
2042
2133
|
value: item.value,
|
|
@@ -2044,7 +2135,7 @@ function Command2({
|
|
|
2044
2135
|
disabled: item.disabled,
|
|
2045
2136
|
onSelect: (value) => onSelect?.(value),
|
|
2046
2137
|
children: [
|
|
2047
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2138
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2048
2139
|
item.label
|
|
2049
2140
|
]
|
|
2050
2141
|
},
|
|
@@ -2059,7 +2150,7 @@ var import_recharts2 = require("recharts");
|
|
|
2059
2150
|
|
|
2060
2151
|
// src/ui/chart.tsx
|
|
2061
2152
|
var import_recharts = require("recharts");
|
|
2062
|
-
var
|
|
2153
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2063
2154
|
var CHART_TOKEN_COLORS = [
|
|
2064
2155
|
"var(--chart-1)",
|
|
2065
2156
|
"var(--chart-2)",
|
|
@@ -2078,19 +2169,19 @@ function ChartContainer({
|
|
|
2078
2169
|
children,
|
|
2079
2170
|
...props
|
|
2080
2171
|
}) {
|
|
2081
|
-
return /* @__PURE__ */ (0,
|
|
2172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2082
2173
|
"div",
|
|
2083
2174
|
{
|
|
2084
2175
|
"data-slot": "chart-container",
|
|
2085
2176
|
className: cn("h-64 w-full", className),
|
|
2086
2177
|
...props,
|
|
2087
|
-
children: /* @__PURE__ */ (0,
|
|
2178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children })
|
|
2088
2179
|
}
|
|
2089
2180
|
);
|
|
2090
2181
|
}
|
|
2091
2182
|
|
|
2092
2183
|
// src/components/components/Chart/index.tsx
|
|
2093
|
-
var
|
|
2184
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2094
2185
|
function Chart({
|
|
2095
2186
|
chartType,
|
|
2096
2187
|
data = [],
|
|
@@ -2101,17 +2192,17 @@ function Chart({
|
|
|
2101
2192
|
style
|
|
2102
2193
|
}) {
|
|
2103
2194
|
const series = yKeys.length > 0 ? yKeys : ["value"];
|
|
2104
|
-
return /* @__PURE__ */ (0,
|
|
2195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2105
2196
|
"div",
|
|
2106
2197
|
{
|
|
2107
2198
|
"data-slot": "chart",
|
|
2108
2199
|
"data-chart-type": chartType,
|
|
2109
2200
|
className: cn("w-full", className),
|
|
2110
2201
|
style,
|
|
2111
|
-
children: /* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2113
|
-
/* @__PURE__ */ (0,
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChartContainer, { children: chartType === "pie" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.PieChart, { children: [
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}),
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2115
2206
|
import_recharts2.Pie,
|
|
2116
2207
|
{
|
|
2117
2208
|
data,
|
|
@@ -2120,16 +2211,16 @@ function Chart({
|
|
|
2120
2211
|
innerRadius: 0,
|
|
2121
2212
|
outerRadius: "80%",
|
|
2122
2213
|
isAnimationActive: false,
|
|
2123
|
-
children: data.map((_, index) => /* @__PURE__ */ (0,
|
|
2214
|
+
children: data.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Cell, { fill: chartColor(index, colors) }, index))
|
|
2124
2215
|
}
|
|
2125
2216
|
)
|
|
2126
|
-
] }) : chartType === "line" ? /* @__PURE__ */ (0,
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2129
|
-
/* @__PURE__ */ (0,
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2131
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2132
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2217
|
+
] }) : chartType === "line" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.LineChart, { data, children: [
|
|
2218
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2219
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2222
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2223
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2133
2224
|
import_recharts2.Line,
|
|
2134
2225
|
{
|
|
2135
2226
|
type: "monotone",
|
|
@@ -2140,13 +2231,13 @@ function Chart({
|
|
|
2140
2231
|
},
|
|
2141
2232
|
key
|
|
2142
2233
|
))
|
|
2143
|
-
] }) : chartType === "area" ? /* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
-
/* @__PURE__ */ (0,
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2149
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2234
|
+
] }) : chartType === "area" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.AreaChart, { data, children: [
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2239
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2240
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2150
2241
|
import_recharts2.Area,
|
|
2151
2242
|
{
|
|
2152
2243
|
type: "monotone",
|
|
@@ -2159,13 +2250,13 @@ function Chart({
|
|
|
2159
2250
|
},
|
|
2160
2251
|
key
|
|
2161
2252
|
))
|
|
2162
|
-
] }) : /* @__PURE__ */ (0,
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2165
|
-
/* @__PURE__ */ (0,
|
|
2166
|
-
/* @__PURE__ */ (0,
|
|
2167
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2168
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2253
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.BarChart, { data, children: [
|
|
2254
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2258
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2259
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2169
2260
|
import_recharts2.Bar,
|
|
2170
2261
|
{
|
|
2171
2262
|
dataKey: key,
|
|
@@ -2186,12 +2277,12 @@ var import_lucide_react11 = require("lucide-react");
|
|
|
2186
2277
|
var import_react9 = require("react");
|
|
2187
2278
|
|
|
2188
2279
|
// src/ui/textarea.tsx
|
|
2189
|
-
var
|
|
2280
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2190
2281
|
function Textarea({
|
|
2191
2282
|
className,
|
|
2192
2283
|
...props
|
|
2193
2284
|
}) {
|
|
2194
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2195
2286
|
"textarea",
|
|
2196
2287
|
{
|
|
2197
2288
|
"data-slot": "textarea",
|
|
@@ -2205,7 +2296,7 @@ function Textarea({
|
|
|
2205
2296
|
}
|
|
2206
2297
|
|
|
2207
2298
|
// src/components/components/ChatInput/index.tsx
|
|
2208
|
-
var
|
|
2299
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2209
2300
|
function ChatInput({
|
|
2210
2301
|
value,
|
|
2211
2302
|
placeholder,
|
|
@@ -2251,7 +2342,7 @@ function ChatInput({
|
|
|
2251
2342
|
const handleComposition = (event) => {
|
|
2252
2343
|
composingRef.current = event.type === "compositionstart";
|
|
2253
2344
|
};
|
|
2254
|
-
return /* @__PURE__ */ (0,
|
|
2345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2255
2346
|
"div",
|
|
2256
2347
|
{
|
|
2257
2348
|
"data-slot": "chat-input",
|
|
@@ -2261,8 +2352,8 @@ function ChatInput({
|
|
|
2261
2352
|
),
|
|
2262
2353
|
style,
|
|
2263
2354
|
children: [
|
|
2264
|
-
header ? /* @__PURE__ */ (0,
|
|
2265
|
-
/* @__PURE__ */ (0,
|
|
2355
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "px-3 pt-3", children: renderChildren([header]) }) : null,
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2266
2357
|
Textarea,
|
|
2267
2358
|
{
|
|
2268
2359
|
value: text,
|
|
@@ -2276,11 +2367,11 @@ function ChatInput({
|
|
|
2276
2367
|
className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
|
|
2277
2368
|
}
|
|
2278
2369
|
),
|
|
2279
|
-
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0,
|
|
2370
|
+
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
|
|
2280
2371
|
toolbarStart ? renderChildren([toolbarStart]) : null,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1" }),
|
|
2282
2373
|
toolbarEnd ? renderChildren([toolbarEnd]) : null,
|
|
2283
|
-
hideSend ? null : /* @__PURE__ */ (0,
|
|
2374
|
+
hideSend ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2284
2375
|
Button,
|
|
2285
2376
|
{
|
|
2286
2377
|
type: "button",
|
|
@@ -2289,20 +2380,20 @@ function ChatInput({
|
|
|
2289
2380
|
disabled: !canSubmit,
|
|
2290
2381
|
onClick: submit,
|
|
2291
2382
|
className: "size-8 rounded-full",
|
|
2292
|
-
children: /* @__PURE__ */ (0,
|
|
2383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react11.ArrowUp, {})
|
|
2293
2384
|
}
|
|
2294
2385
|
)
|
|
2295
2386
|
] }) : null,
|
|
2296
|
-
footer ? /* @__PURE__ */ (0,
|
|
2387
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-t border-border px-3 py-2", children: renderChildren([footer]) }) : null
|
|
2297
2388
|
]
|
|
2298
2389
|
}
|
|
2299
2390
|
);
|
|
2300
2391
|
}
|
|
2301
2392
|
|
|
2302
2393
|
// src/components/components/Content/index.tsx
|
|
2303
|
-
var
|
|
2394
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2304
2395
|
function Content({ className, style, children }) {
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
2396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2306
2397
|
"main",
|
|
2307
2398
|
{
|
|
2308
2399
|
"data-slot": "layout-content",
|
|
@@ -2315,22 +2406,22 @@ function Content({ className, style, children }) {
|
|
|
2315
2406
|
|
|
2316
2407
|
// src/ui/context-menu.tsx
|
|
2317
2408
|
var import_context_menu = require("@base-ui/react/context-menu");
|
|
2318
|
-
var
|
|
2409
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2319
2410
|
function ContextMenu({
|
|
2320
2411
|
...props
|
|
2321
2412
|
}) {
|
|
2322
|
-
return /* @__PURE__ */ (0,
|
|
2413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
2323
2414
|
}
|
|
2324
2415
|
function ContextMenuTrigger({
|
|
2325
2416
|
...props
|
|
2326
2417
|
}) {
|
|
2327
|
-
return /* @__PURE__ */ (0,
|
|
2418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2328
2419
|
}
|
|
2329
2420
|
function ContextMenuContent({
|
|
2330
2421
|
className,
|
|
2331
2422
|
...props
|
|
2332
2423
|
}) {
|
|
2333
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
+
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)(
|
|
2334
2425
|
import_context_menu.ContextMenu.Popup,
|
|
2335
2426
|
{
|
|
2336
2427
|
"data-slot": "context-menu-content",
|
|
@@ -2347,7 +2438,7 @@ function ContextMenuItem({
|
|
|
2347
2438
|
variant = "default",
|
|
2348
2439
|
...props
|
|
2349
2440
|
}) {
|
|
2350
|
-
return /* @__PURE__ */ (0,
|
|
2441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2351
2442
|
import_context_menu.ContextMenu.Item,
|
|
2352
2443
|
{
|
|
2353
2444
|
"data-slot": "context-menu-item",
|
|
@@ -2362,7 +2453,7 @@ function ContextMenuItem({
|
|
|
2362
2453
|
}
|
|
2363
2454
|
|
|
2364
2455
|
// src/components/components/ContextMenu/index.tsx
|
|
2365
|
-
var
|
|
2456
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2366
2457
|
function ContextMenu2({
|
|
2367
2458
|
items = [],
|
|
2368
2459
|
onSelect,
|
|
@@ -2370,16 +2461,16 @@ function ContextMenu2({
|
|
|
2370
2461
|
className,
|
|
2371
2462
|
style
|
|
2372
2463
|
}) {
|
|
2373
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ContextMenu, { children: [
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuTrigger, { children }),
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2376
2467
|
ContextMenuItem,
|
|
2377
2468
|
{
|
|
2378
2469
|
variant: item.danger ? "destructive" : "default",
|
|
2379
2470
|
disabled: item.disabled,
|
|
2380
2471
|
onClick: () => onSelect?.(item.value),
|
|
2381
2472
|
children: [
|
|
2382
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2473
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2383
2474
|
item.label
|
|
2384
2475
|
]
|
|
2385
2476
|
},
|
|
@@ -2394,9 +2485,9 @@ var import_lucide_react12 = require("lucide-react");
|
|
|
2394
2485
|
var import_react10 = require("react");
|
|
2395
2486
|
|
|
2396
2487
|
// src/ui/input.tsx
|
|
2397
|
-
var
|
|
2488
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2398
2489
|
function Input({ className, type, ...props }) {
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2400
2491
|
"input",
|
|
2401
2492
|
{
|
|
2402
2493
|
type,
|
|
@@ -2411,14 +2502,14 @@ function Input({ className, type, ...props }) {
|
|
|
2411
2502
|
}
|
|
2412
2503
|
|
|
2413
2504
|
// src/ui/table.tsx
|
|
2414
|
-
var
|
|
2505
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2415
2506
|
function Table2({ className, ...props }) {
|
|
2416
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2417
2508
|
"div",
|
|
2418
2509
|
{
|
|
2419
2510
|
"data-slot": "table-container",
|
|
2420
2511
|
className: "relative w-full overflow-x-auto",
|
|
2421
|
-
children: /* @__PURE__ */ (0,
|
|
2512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2422
2513
|
"table",
|
|
2423
2514
|
{
|
|
2424
2515
|
"data-slot": "table",
|
|
@@ -2430,7 +2521,7 @@ function Table2({ className, ...props }) {
|
|
|
2430
2521
|
);
|
|
2431
2522
|
}
|
|
2432
2523
|
function TableHeader({ className, ...props }) {
|
|
2433
|
-
return /* @__PURE__ */ (0,
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2434
2525
|
"thead",
|
|
2435
2526
|
{
|
|
2436
2527
|
"data-slot": "table-header",
|
|
@@ -2440,7 +2531,7 @@ function TableHeader({ className, ...props }) {
|
|
|
2440
2531
|
);
|
|
2441
2532
|
}
|
|
2442
2533
|
function TableBody({ className, ...props }) {
|
|
2443
|
-
return /* @__PURE__ */ (0,
|
|
2534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2444
2535
|
"tbody",
|
|
2445
2536
|
{
|
|
2446
2537
|
"data-slot": "table-body",
|
|
@@ -2450,7 +2541,7 @@ function TableBody({ className, ...props }) {
|
|
|
2450
2541
|
);
|
|
2451
2542
|
}
|
|
2452
2543
|
function TableRow({ className, ...props }) {
|
|
2453
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2454
2545
|
"tr",
|
|
2455
2546
|
{
|
|
2456
2547
|
"data-slot": "table-row",
|
|
@@ -2463,7 +2554,7 @@ function TableRow({ className, ...props }) {
|
|
|
2463
2554
|
);
|
|
2464
2555
|
}
|
|
2465
2556
|
function TableHead({ className, ...props }) {
|
|
2466
|
-
return /* @__PURE__ */ (0,
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2467
2558
|
"th",
|
|
2468
2559
|
{
|
|
2469
2560
|
"data-slot": "table-head",
|
|
@@ -2476,7 +2567,7 @@ function TableHead({ className, ...props }) {
|
|
|
2476
2567
|
);
|
|
2477
2568
|
}
|
|
2478
2569
|
function TableCell({ className, ...props }) {
|
|
2479
|
-
return /* @__PURE__ */ (0,
|
|
2570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2480
2571
|
"td",
|
|
2481
2572
|
{
|
|
2482
2573
|
"data-slot": "table-cell",
|
|
@@ -2490,7 +2581,7 @@ function TableCell({ className, ...props }) {
|
|
|
2490
2581
|
}
|
|
2491
2582
|
|
|
2492
2583
|
// src/components/components/DataTable/index.tsx
|
|
2493
|
-
var
|
|
2584
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2494
2585
|
function renderCellValue(value) {
|
|
2495
2586
|
if (value === void 0 || value === null) {
|
|
2496
2587
|
return "";
|
|
@@ -2559,12 +2650,12 @@ function DataTable({
|
|
|
2559
2650
|
setCurrent(page);
|
|
2560
2651
|
onPageChange?.(page);
|
|
2561
2652
|
};
|
|
2562
|
-
return /* @__PURE__ */ (0,
|
|
2563
|
-
/* @__PURE__ */ (0,
|
|
2564
|
-
/* @__PURE__ */ (0,
|
|
2653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
|
|
2654
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Table2, { children: [
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
|
|
2565
2656
|
const sorted = sortState?.key === column.key;
|
|
2566
|
-
return /* @__PURE__ */ (0,
|
|
2567
|
-
column.sortable ? /* @__PURE__ */ (0,
|
|
2657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2658
|
+
column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2568
2659
|
"button",
|
|
2569
2660
|
{
|
|
2570
2661
|
type: "button",
|
|
@@ -2575,7 +2666,7 @@ function DataTable({
|
|
|
2575
2666
|
onClick: () => toggleSort(column),
|
|
2576
2667
|
children: [
|
|
2577
2668
|
column.title,
|
|
2578
|
-
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0,
|
|
2669
|
+
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)(
|
|
2579
2670
|
import_lucide_react12.ArrowUpDown,
|
|
2580
2671
|
{
|
|
2581
2672
|
"aria-hidden": true,
|
|
@@ -2584,8 +2675,8 @@ function DataTable({
|
|
|
2584
2675
|
)
|
|
2585
2676
|
]
|
|
2586
2677
|
}
|
|
2587
|
-
) : /* @__PURE__ */ (0,
|
|
2588
|
-
column.filterable ? /* @__PURE__ */ (0,
|
|
2678
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: column.title }),
|
|
2679
|
+
column.filterable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2589
2680
|
Input,
|
|
2590
2681
|
{
|
|
2591
2682
|
"data-slot": "data-table-filter",
|
|
@@ -2598,7 +2689,7 @@ function DataTable({
|
|
|
2598
2689
|
) : null
|
|
2599
2690
|
] }) }, column.key ?? String(index));
|
|
2600
2691
|
}) }) }),
|
|
2601
|
-
/* @__PURE__ */ (0,
|
|
2692
|
+
/* @__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)(
|
|
2602
2693
|
"div",
|
|
2603
2694
|
{
|
|
2604
2695
|
"data-slot": "table-empty",
|
|
@@ -2607,20 +2698,20 @@ function DataTable({
|
|
|
2607
2698
|
}
|
|
2608
2699
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
2609
2700
|
const key = row[rowKey];
|
|
2610
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2611
2702
|
TableRow,
|
|
2612
2703
|
{
|
|
2613
2704
|
children: columns.map((column, columnIndex) => {
|
|
2614
2705
|
const template = column.children ?? column.renderChildren;
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableCell, { children: template ? renderChildren(template, { row, rowIndex }) : renderCellValue(row[column.key]) }, column.key ?? String(columnIndex));
|
|
2616
2707
|
})
|
|
2617
2708
|
},
|
|
2618
2709
|
key === void 0 || key === null ? rowIndex : String(key)
|
|
2619
2710
|
);
|
|
2620
2711
|
}) })
|
|
2621
2712
|
] }),
|
|
2622
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
2623
|
-
(page) => /* @__PURE__ */ (0,
|
|
2713
|
+
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(
|
|
2714
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2624
2715
|
Button,
|
|
2625
2716
|
{
|
|
2626
2717
|
type: "button",
|
|
@@ -2642,7 +2733,7 @@ var import_date_fns2 = require("date-fns");
|
|
|
2642
2733
|
var import_locale = require("date-fns/locale");
|
|
2643
2734
|
var import_lucide_react13 = require("lucide-react");
|
|
2644
2735
|
var import_react11 = require("react");
|
|
2645
|
-
var
|
|
2736
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2646
2737
|
function toDateFnsLocale(locale) {
|
|
2647
2738
|
switch (locale) {
|
|
2648
2739
|
case "zh-CN":
|
|
@@ -2814,13 +2905,13 @@ function DatePicker(props) {
|
|
|
2814
2905
|
} : void 0;
|
|
2815
2906
|
const displayText = isRange ? typeof current === "object" && current !== null ? `${current.start} ~ ${current.end}` : "" : typeof current === "string" ? current : "";
|
|
2816
2907
|
const placeholderText = placeholder ?? t(isRange ? "pactor.datePicker.placeholderRange" : "pactor.datePicker.placeholder");
|
|
2817
|
-
const calendar = isRange ? /* @__PURE__ */ (0,
|
|
2818
|
-
/* @__PURE__ */ (0,
|
|
2908
|
+
const calendar = isRange ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex", children: [
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2819
2910
|
"div",
|
|
2820
2911
|
{
|
|
2821
2912
|
"data-slot": "datepicker-start-panel",
|
|
2822
2913
|
className: "border-r border-border",
|
|
2823
|
-
children: /* @__PURE__ */ (0,
|
|
2914
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2824
2915
|
Calendar2,
|
|
2825
2916
|
{
|
|
2826
2917
|
mode: "single",
|
|
@@ -2834,7 +2925,7 @@ function DatePicker(props) {
|
|
|
2834
2925
|
)
|
|
2835
2926
|
}
|
|
2836
2927
|
),
|
|
2837
|
-
/* @__PURE__ */ (0,
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2838
2929
|
Calendar2,
|
|
2839
2930
|
{
|
|
2840
2931
|
mode: "single",
|
|
@@ -2846,7 +2937,7 @@ function DatePicker(props) {
|
|
|
2846
2937
|
locale: dfLocale
|
|
2847
2938
|
}
|
|
2848
2939
|
) })
|
|
2849
|
-
] }) : /* @__PURE__ */ (0,
|
|
2940
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2850
2941
|
Calendar2,
|
|
2851
2942
|
{
|
|
2852
2943
|
mode: "single",
|
|
@@ -2855,8 +2946,8 @@ function DatePicker(props) {
|
|
|
2855
2946
|
locale: dfLocale
|
|
2856
2947
|
}
|
|
2857
2948
|
);
|
|
2858
|
-
const control = /* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
2949
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2950
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2860
2951
|
PopoverTrigger,
|
|
2861
2952
|
{
|
|
2862
2953
|
id: controlId,
|
|
@@ -2870,20 +2961,20 @@ function DatePicker(props) {
|
|
|
2870
2961
|
),
|
|
2871
2962
|
style: inForm ? void 0 : style,
|
|
2872
2963
|
children: [
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholderText : displayText }),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react13.Calendar, { className: "size-4 shrink-0 opacity-50" })
|
|
2875
2966
|
]
|
|
2876
2967
|
}
|
|
2877
2968
|
),
|
|
2878
|
-
/* @__PURE__ */ (0,
|
|
2879
|
-
/* @__PURE__ */ (0,
|
|
2969
|
+
/* @__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: [
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2880
2971
|
"div",
|
|
2881
2972
|
{
|
|
2882
2973
|
"data-slot": "datepicker-presets",
|
|
2883
2974
|
className: "flex flex-col gap-1 border-r border-border p-3",
|
|
2884
2975
|
children: presetList.map((preset, index) => {
|
|
2885
2976
|
const resolved = resolvePreset(preset);
|
|
2886
|
-
return /* @__PURE__ */ (0,
|
|
2977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2887
2978
|
"button",
|
|
2888
2979
|
{
|
|
2889
2980
|
type: "button",
|
|
@@ -2901,14 +2992,14 @@ function DatePicker(props) {
|
|
|
2901
2992
|
] });
|
|
2902
2993
|
if (inForm && form && name) {
|
|
2903
2994
|
const error = form.errors[name];
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
2995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2905
2996
|
"div",
|
|
2906
2997
|
{
|
|
2907
2998
|
"data-slot": "form-item",
|
|
2908
2999
|
className: cn(formItemClass(form.layout), className),
|
|
2909
3000
|
style,
|
|
2910
3001
|
children: [
|
|
2911
|
-
label ? /* @__PURE__ */ (0,
|
|
3002
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2912
3003
|
"label",
|
|
2913
3004
|
{
|
|
2914
3005
|
htmlFor: controlId,
|
|
@@ -2917,7 +3008,7 @@ function DatePicker(props) {
|
|
|
2917
3008
|
}
|
|
2918
3009
|
) : null,
|
|
2919
3010
|
control,
|
|
2920
|
-
error ? /* @__PURE__ */ (0,
|
|
3011
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2921
3012
|
]
|
|
2922
3013
|
}
|
|
2923
3014
|
);
|
|
@@ -2932,32 +3023,32 @@ var import_react12 = require("react");
|
|
|
2932
3023
|
// src/ui/dialog.tsx
|
|
2933
3024
|
var import_dialog = require("@base-ui/react/dialog");
|
|
2934
3025
|
var import_lucide_react14 = require("lucide-react");
|
|
2935
|
-
var
|
|
3026
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2936
3027
|
function Dialog({
|
|
2937
3028
|
...props
|
|
2938
3029
|
}) {
|
|
2939
|
-
return /* @__PURE__ */ (0,
|
|
3030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
2940
3031
|
}
|
|
2941
3032
|
function DialogTrigger({
|
|
2942
3033
|
...props
|
|
2943
3034
|
}) {
|
|
2944
|
-
return /* @__PURE__ */ (0,
|
|
3035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
2945
3036
|
}
|
|
2946
3037
|
function DialogPortal({
|
|
2947
3038
|
...props
|
|
2948
3039
|
}) {
|
|
2949
|
-
return /* @__PURE__ */ (0,
|
|
3040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
2950
3041
|
}
|
|
2951
3042
|
function DialogClose({
|
|
2952
3043
|
...props
|
|
2953
3044
|
}) {
|
|
2954
|
-
return /* @__PURE__ */ (0,
|
|
3045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
2955
3046
|
}
|
|
2956
3047
|
function DialogOverlay({
|
|
2957
3048
|
className,
|
|
2958
3049
|
...props
|
|
2959
3050
|
}) {
|
|
2960
|
-
return /* @__PURE__ */ (0,
|
|
3051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2961
3052
|
import_dialog.Dialog.Backdrop,
|
|
2962
3053
|
{
|
|
2963
3054
|
"data-slot": "dialog-overlay",
|
|
@@ -2975,9 +3066,9 @@ function DialogContent({
|
|
|
2975
3066
|
showCloseButton = true,
|
|
2976
3067
|
...props
|
|
2977
3068
|
}) {
|
|
2978
|
-
return /* @__PURE__ */ (0,
|
|
2979
|
-
/* @__PURE__ */ (0,
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DialogOverlay, {}),
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2981
3072
|
import_dialog.Dialog.Popup,
|
|
2982
3073
|
{
|
|
2983
3074
|
"data-slot": "dialog-content",
|
|
@@ -2988,11 +3079,11 @@ function DialogContent({
|
|
|
2988
3079
|
...props,
|
|
2989
3080
|
children: [
|
|
2990
3081
|
children,
|
|
2991
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
3082
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2992
3083
|
import_dialog.Dialog.Close,
|
|
2993
3084
|
{
|
|
2994
3085
|
"data-slot": "dialog-close",
|
|
2995
|
-
render: /* @__PURE__ */ (0,
|
|
3086
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2996
3087
|
"button",
|
|
2997
3088
|
{
|
|
2998
3089
|
type: "button",
|
|
@@ -3000,8 +3091,8 @@ function DialogContent({
|
|
|
3000
3091
|
}
|
|
3001
3092
|
),
|
|
3002
3093
|
children: [
|
|
3003
|
-
/* @__PURE__ */ (0,
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3094
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react14.XIcon, {}),
|
|
3095
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3005
3096
|
]
|
|
3006
3097
|
}
|
|
3007
3098
|
)
|
|
@@ -3011,7 +3102,7 @@ function DialogContent({
|
|
|
3011
3102
|
] });
|
|
3012
3103
|
}
|
|
3013
3104
|
function DialogHeader({ className, ...props }) {
|
|
3014
|
-
return /* @__PURE__ */ (0,
|
|
3105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3015
3106
|
"div",
|
|
3016
3107
|
{
|
|
3017
3108
|
"data-slot": "dialog-header",
|
|
@@ -3021,7 +3112,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
3021
3112
|
);
|
|
3022
3113
|
}
|
|
3023
3114
|
function DialogFooter({ className, ...props }) {
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3025
3116
|
"div",
|
|
3026
3117
|
{
|
|
3027
3118
|
"data-slot": "dialog-footer",
|
|
@@ -3037,7 +3128,7 @@ function DialogTitle({
|
|
|
3037
3128
|
className,
|
|
3038
3129
|
...props
|
|
3039
3130
|
}) {
|
|
3040
|
-
return /* @__PURE__ */ (0,
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3041
3132
|
import_dialog.Dialog.Title,
|
|
3042
3133
|
{
|
|
3043
3134
|
"data-slot": "dialog-title",
|
|
@@ -3050,7 +3141,7 @@ function DialogDescription({
|
|
|
3050
3141
|
className,
|
|
3051
3142
|
...props
|
|
3052
3143
|
}) {
|
|
3053
|
-
return /* @__PURE__ */ (0,
|
|
3144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3054
3145
|
import_dialog.Dialog.Description,
|
|
3055
3146
|
{
|
|
3056
3147
|
"data-slot": "dialog-description",
|
|
@@ -3061,7 +3152,7 @@ function DialogDescription({
|
|
|
3061
3152
|
}
|
|
3062
3153
|
|
|
3063
3154
|
// src/components/components/Dialog/index.tsx
|
|
3064
|
-
var
|
|
3155
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3065
3156
|
function Dialog2({
|
|
3066
3157
|
title,
|
|
3067
3158
|
description,
|
|
@@ -3076,7 +3167,7 @@ function Dialog2({
|
|
|
3076
3167
|
const [innerOpen, setInnerOpen] = (0, import_react12.useState)(false);
|
|
3077
3168
|
const controlled = open !== void 0;
|
|
3078
3169
|
const visible = controlled ? open : innerOpen;
|
|
3079
|
-
return /* @__PURE__ */ (0,
|
|
3170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3080
3171
|
Dialog,
|
|
3081
3172
|
{
|
|
3082
3173
|
open: visible,
|
|
@@ -3089,7 +3180,7 @@ function Dialog2({
|
|
|
3089
3180
|
}
|
|
3090
3181
|
},
|
|
3091
3182
|
children: [
|
|
3092
|
-
trigger ? /* @__PURE__ */ (0,
|
|
3183
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3093
3184
|
DialogTrigger,
|
|
3094
3185
|
{
|
|
3095
3186
|
nativeButton: false,
|
|
@@ -3097,10 +3188,10 @@ function Dialog2({
|
|
|
3097
3188
|
children: renderChildren([trigger])
|
|
3098
3189
|
}
|
|
3099
3190
|
) : null,
|
|
3100
|
-
/* @__PURE__ */ (0,
|
|
3101
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3102
|
-
title ? /* @__PURE__ */ (0,
|
|
3103
|
-
description ? /* @__PURE__ */ (0,
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogContent, { className, style, children: [
|
|
3192
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogHeader, { children: [
|
|
3193
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogTitle, { children: title }) : null,
|
|
3194
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogDescription, { children: description }) : null
|
|
3104
3195
|
] }) : null,
|
|
3105
3196
|
children
|
|
3106
3197
|
] })
|
|
@@ -3111,27 +3202,27 @@ function Dialog2({
|
|
|
3111
3202
|
|
|
3112
3203
|
// src/ui/drawer.tsx
|
|
3113
3204
|
var import_vaul = require("vaul");
|
|
3114
|
-
var
|
|
3205
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3115
3206
|
function Drawer({
|
|
3116
3207
|
...props
|
|
3117
3208
|
}) {
|
|
3118
|
-
return /* @__PURE__ */ (0,
|
|
3209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
3119
3210
|
}
|
|
3120
3211
|
function DrawerPortal({
|
|
3121
3212
|
...props
|
|
3122
3213
|
}) {
|
|
3123
|
-
return /* @__PURE__ */ (0,
|
|
3214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
3124
3215
|
}
|
|
3125
3216
|
function DrawerClose({
|
|
3126
3217
|
...props
|
|
3127
3218
|
}) {
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
|
|
3129
3220
|
}
|
|
3130
3221
|
function DrawerOverlay({
|
|
3131
3222
|
className,
|
|
3132
3223
|
...props
|
|
3133
3224
|
}) {
|
|
3134
|
-
return /* @__PURE__ */ (0,
|
|
3225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3135
3226
|
import_vaul.Drawer.Overlay,
|
|
3136
3227
|
{
|
|
3137
3228
|
"data-slot": "drawer-overlay",
|
|
@@ -3145,9 +3236,9 @@ function DrawerContent({
|
|
|
3145
3236
|
children,
|
|
3146
3237
|
...props
|
|
3147
3238
|
}) {
|
|
3148
|
-
return /* @__PURE__ */ (0,
|
|
3149
|
-
/* @__PURE__ */ (0,
|
|
3150
|
-
/* @__PURE__ */ (0,
|
|
3239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DrawerOverlay, {}),
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
3151
3242
|
import_vaul.Drawer.Content,
|
|
3152
3243
|
{
|
|
3153
3244
|
"data-slot": "drawer-content",
|
|
@@ -3161,7 +3252,7 @@ function DrawerContent({
|
|
|
3161
3252
|
),
|
|
3162
3253
|
...props,
|
|
3163
3254
|
children: [
|
|
3164
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__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" }),
|
|
3165
3256
|
children
|
|
3166
3257
|
]
|
|
3167
3258
|
}
|
|
@@ -3169,7 +3260,7 @@ function DrawerContent({
|
|
|
3169
3260
|
] });
|
|
3170
3261
|
}
|
|
3171
3262
|
function DrawerHeader({ className, ...props }) {
|
|
3172
|
-
return /* @__PURE__ */ (0,
|
|
3263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3173
3264
|
"div",
|
|
3174
3265
|
{
|
|
3175
3266
|
"data-slot": "drawer-header",
|
|
@@ -3182,7 +3273,7 @@ function DrawerTitle({
|
|
|
3182
3273
|
className,
|
|
3183
3274
|
...props
|
|
3184
3275
|
}) {
|
|
3185
|
-
return /* @__PURE__ */ (0,
|
|
3276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3186
3277
|
import_vaul.Drawer.Title,
|
|
3187
3278
|
{
|
|
3188
3279
|
"data-slot": "drawer-title",
|
|
@@ -3193,7 +3284,7 @@ function DrawerTitle({
|
|
|
3193
3284
|
}
|
|
3194
3285
|
|
|
3195
3286
|
// src/components/components/Drawer/index.tsx
|
|
3196
|
-
var
|
|
3287
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3197
3288
|
function Drawer2({
|
|
3198
3289
|
title,
|
|
3199
3290
|
open,
|
|
@@ -3203,7 +3294,7 @@ function Drawer2({
|
|
|
3203
3294
|
className,
|
|
3204
3295
|
style
|
|
3205
3296
|
}) {
|
|
3206
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3207
3298
|
Drawer,
|
|
3208
3299
|
{
|
|
3209
3300
|
direction: placement,
|
|
@@ -3213,9 +3304,9 @@ function Drawer2({
|
|
|
3213
3304
|
onClose?.();
|
|
3214
3305
|
}
|
|
3215
3306
|
},
|
|
3216
|
-
children: /* @__PURE__ */ (0,
|
|
3217
|
-
title ? /* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DrawerContent, { className, style, children: [
|
|
3308
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerTitle, { children: title }) }) : null,
|
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1 overflow-auto p-4", children })
|
|
3219
3310
|
] })
|
|
3220
3311
|
}
|
|
3221
3312
|
);
|
|
@@ -3224,16 +3315,16 @@ function Drawer2({
|
|
|
3224
3315
|
// src/ui/dropdown-menu.tsx
|
|
3225
3316
|
var import_menu = require("@base-ui/react/menu");
|
|
3226
3317
|
var import_lucide_react15 = require("lucide-react");
|
|
3227
|
-
var
|
|
3318
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3228
3319
|
function DropdownMenu({
|
|
3229
3320
|
...props
|
|
3230
3321
|
}) {
|
|
3231
|
-
return /* @__PURE__ */ (0,
|
|
3322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3232
3323
|
}
|
|
3233
3324
|
function DropdownMenuTrigger({
|
|
3234
3325
|
...props
|
|
3235
3326
|
}) {
|
|
3236
|
-
return /* @__PURE__ */ (0,
|
|
3327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
3237
3328
|
}
|
|
3238
3329
|
function DropdownMenuContent({
|
|
3239
3330
|
className,
|
|
@@ -3242,14 +3333,14 @@ function DropdownMenuContent({
|
|
|
3242
3333
|
sideOffset = 4,
|
|
3243
3334
|
...props
|
|
3244
3335
|
}) {
|
|
3245
|
-
return /* @__PURE__ */ (0,
|
|
3336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3246
3337
|
import_menu.Menu.Positioner,
|
|
3247
3338
|
{
|
|
3248
3339
|
align,
|
|
3249
3340
|
side,
|
|
3250
3341
|
sideOffset,
|
|
3251
3342
|
className: "isolate z-50",
|
|
3252
|
-
children: /* @__PURE__ */ (0,
|
|
3343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3253
3344
|
import_menu.Menu.Popup,
|
|
3254
3345
|
{
|
|
3255
3346
|
"data-slot": "dropdown-menu-content",
|
|
@@ -3268,7 +3359,7 @@ function DropdownMenuItem({
|
|
|
3268
3359
|
variant = "default",
|
|
3269
3360
|
...props
|
|
3270
3361
|
}) {
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3272
3363
|
import_menu.Menu.Item,
|
|
3273
3364
|
{
|
|
3274
3365
|
"data-slot": "dropdown-menu-item",
|
|
@@ -3284,14 +3375,14 @@ function DropdownMenuItem({
|
|
|
3284
3375
|
function DropdownMenuSub({
|
|
3285
3376
|
...props
|
|
3286
3377
|
}) {
|
|
3287
|
-
return /* @__PURE__ */ (0,
|
|
3378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
3288
3379
|
}
|
|
3289
3380
|
function DropdownMenuSubTrigger({
|
|
3290
3381
|
className,
|
|
3291
3382
|
children,
|
|
3292
3383
|
...props
|
|
3293
3384
|
}) {
|
|
3294
|
-
return /* @__PURE__ */ (0,
|
|
3385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3295
3386
|
import_menu.Menu.SubmenuTrigger,
|
|
3296
3387
|
{
|
|
3297
3388
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -3302,7 +3393,7 @@ function DropdownMenuSubTrigger({
|
|
|
3302
3393
|
...props,
|
|
3303
3394
|
children: [
|
|
3304
3395
|
children,
|
|
3305
|
-
/* @__PURE__ */ (0,
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.ChevronRightIcon, { className: "ml-auto" })
|
|
3306
3397
|
]
|
|
3307
3398
|
}
|
|
3308
3399
|
);
|
|
@@ -3312,7 +3403,7 @@ function DropdownMenuSubContent({
|
|
|
3312
3403
|
sideOffset = 2,
|
|
3313
3404
|
...props
|
|
3314
3405
|
}) {
|
|
3315
|
-
return /* @__PURE__ */ (0,
|
|
3406
|
+
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)(
|
|
3316
3407
|
import_menu.Menu.Popup,
|
|
3317
3408
|
{
|
|
3318
3409
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -3326,7 +3417,7 @@ function DropdownMenuSubContent({
|
|
|
3326
3417
|
}
|
|
3327
3418
|
|
|
3328
3419
|
// src/components/components/DropdownMenu/index.tsx
|
|
3329
|
-
var
|
|
3420
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3330
3421
|
function DropdownMenu2({
|
|
3331
3422
|
items = [],
|
|
3332
3423
|
onSelect,
|
|
@@ -3334,8 +3425,8 @@ function DropdownMenu2({
|
|
|
3334
3425
|
className,
|
|
3335
3426
|
style
|
|
3336
3427
|
}) {
|
|
3337
|
-
return /* @__PURE__ */ (0,
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
|
|
3429
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3339
3430
|
DropdownMenuTrigger,
|
|
3340
3431
|
{
|
|
3341
3432
|
nativeButton: false,
|
|
@@ -3343,14 +3434,14 @@ function DropdownMenu2({
|
|
|
3343
3434
|
children
|
|
3344
3435
|
}
|
|
3345
3436
|
),
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3347
3438
|
DropdownMenuItem,
|
|
3348
3439
|
{
|
|
3349
3440
|
variant: item.danger ? "destructive" : "default",
|
|
3350
3441
|
disabled: item.disabled,
|
|
3351
3442
|
onClick: () => onSelect?.(item.value),
|
|
3352
3443
|
children: [
|
|
3353
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3444
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3354
3445
|
item.label
|
|
3355
3446
|
]
|
|
3356
3447
|
},
|
|
@@ -3360,9 +3451,9 @@ function DropdownMenu2({
|
|
|
3360
3451
|
}
|
|
3361
3452
|
|
|
3362
3453
|
// src/ui/empty.tsx
|
|
3363
|
-
var
|
|
3454
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3364
3455
|
function Empty({ className, ...props }) {
|
|
3365
|
-
return /* @__PURE__ */ (0,
|
|
3456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3366
3457
|
"div",
|
|
3367
3458
|
{
|
|
3368
3459
|
"data-slot": "empty",
|
|
@@ -3375,7 +3466,7 @@ function Empty({ className, ...props }) {
|
|
|
3375
3466
|
);
|
|
3376
3467
|
}
|
|
3377
3468
|
function EmptyHeader({ className, ...props }) {
|
|
3378
|
-
return /* @__PURE__ */ (0,
|
|
3469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3379
3470
|
"div",
|
|
3380
3471
|
{
|
|
3381
3472
|
"data-slot": "empty-header",
|
|
@@ -3385,7 +3476,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3385
3476
|
);
|
|
3386
3477
|
}
|
|
3387
3478
|
function EmptyTitle({ className, ...props }) {
|
|
3388
|
-
return /* @__PURE__ */ (0,
|
|
3479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3389
3480
|
"div",
|
|
3390
3481
|
{
|
|
3391
3482
|
"data-slot": "empty-title",
|
|
@@ -3395,7 +3486,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
3395
3486
|
);
|
|
3396
3487
|
}
|
|
3397
3488
|
function EmptyDescription({ className, ...props }) {
|
|
3398
|
-
return /* @__PURE__ */ (0,
|
|
3489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3399
3490
|
"p",
|
|
3400
3491
|
{
|
|
3401
3492
|
"data-slot": "empty-description",
|
|
@@ -3405,7 +3496,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
3405
3496
|
);
|
|
3406
3497
|
}
|
|
3407
3498
|
function EmptyContent({ className, ...props }) {
|
|
3408
|
-
return /* @__PURE__ */ (0,
|
|
3499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3409
3500
|
"div",
|
|
3410
3501
|
{
|
|
3411
3502
|
"data-slot": "empty-content",
|
|
@@ -3419,22 +3510,22 @@ function EmptyContent({ className, ...props }) {
|
|
|
3419
3510
|
}
|
|
3420
3511
|
|
|
3421
3512
|
// src/components/components/Empty/index.tsx
|
|
3422
|
-
var
|
|
3513
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3423
3514
|
function Empty2({ title, description, children, className, style }) {
|
|
3424
|
-
return /* @__PURE__ */ (0,
|
|
3425
|
-
/* @__PURE__ */ (0,
|
|
3426
|
-
title ? /* @__PURE__ */ (0,
|
|
3427
|
-
description ? /* @__PURE__ */ (0,
|
|
3515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Empty, { className, style, children: [
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(EmptyHeader, { children: [
|
|
3517
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyTitle, { children: title }) : null,
|
|
3518
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyDescription, { children: description }) : null
|
|
3428
3519
|
] }),
|
|
3429
|
-
children ? /* @__PURE__ */ (0,
|
|
3520
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyContent, { children }) : null
|
|
3430
3521
|
] });
|
|
3431
3522
|
}
|
|
3432
3523
|
|
|
3433
3524
|
// src/ui/field.tsx
|
|
3434
3525
|
var import_field = require("@base-ui/react/field");
|
|
3435
|
-
var
|
|
3526
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3436
3527
|
function Field({ className, ...props }) {
|
|
3437
|
-
return /* @__PURE__ */ (0,
|
|
3528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3438
3529
|
import_field.Field.Root,
|
|
3439
3530
|
{
|
|
3440
3531
|
"data-slot": "field",
|
|
@@ -3444,7 +3535,7 @@ function Field({ className, ...props }) {
|
|
|
3444
3535
|
);
|
|
3445
3536
|
}
|
|
3446
3537
|
function FieldLabel({ className, ...props }) {
|
|
3447
|
-
return /* @__PURE__ */ (0,
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3448
3539
|
import_field.Field.Label,
|
|
3449
3540
|
{
|
|
3450
3541
|
"data-slot": "field-label",
|
|
@@ -3454,7 +3545,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
3454
3545
|
);
|
|
3455
3546
|
}
|
|
3456
3547
|
function FieldDescription({ className, ...props }) {
|
|
3457
|
-
return /* @__PURE__ */ (0,
|
|
3548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3458
3549
|
import_field.Field.Description,
|
|
3459
3550
|
{
|
|
3460
3551
|
"data-slot": "field-description",
|
|
@@ -3464,7 +3555,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
3464
3555
|
);
|
|
3465
3556
|
}
|
|
3466
3557
|
function FieldError({ className, ...props }) {
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3468
3559
|
import_field.Field.Error,
|
|
3469
3560
|
{
|
|
3470
3561
|
"data-slot": "field-error",
|
|
@@ -3475,24 +3566,24 @@ function FieldError({ className, ...props }) {
|
|
|
3475
3566
|
}
|
|
3476
3567
|
|
|
3477
3568
|
// src/components/components/Field/index.tsx
|
|
3478
|
-
var
|
|
3569
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3479
3570
|
function Field2({ label, required, description, error, children, className, style }) {
|
|
3480
|
-
return /* @__PURE__ */ (0,
|
|
3481
|
-
label ? /* @__PURE__ */ (0,
|
|
3482
|
-
required ? /* @__PURE__ */ (0,
|
|
3571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
|
|
3572
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
|
|
3573
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
|
|
3483
3574
|
"*",
|
|
3484
3575
|
" "
|
|
3485
3576
|
] }) : null,
|
|
3486
3577
|
label
|
|
3487
3578
|
] }) : null,
|
|
3488
3579
|
children,
|
|
3489
|
-
description ? /* @__PURE__ */ (0,
|
|
3490
|
-
error ? /* @__PURE__ */ (0,
|
|
3580
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldDescription, { children: description }) : null,
|
|
3581
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, children: error }) : null
|
|
3491
3582
|
] });
|
|
3492
3583
|
}
|
|
3493
3584
|
|
|
3494
3585
|
// src/components/components/Flex/index.tsx
|
|
3495
|
-
var
|
|
3586
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3496
3587
|
var gapClass = {
|
|
3497
3588
|
small: "gap-(--flex-gap-sm)",
|
|
3498
3589
|
middle: "gap-(--flex-gap-md)",
|
|
@@ -3522,7 +3613,7 @@ function Flex({
|
|
|
3522
3613
|
style,
|
|
3523
3614
|
children
|
|
3524
3615
|
}) {
|
|
3525
|
-
return /* @__PURE__ */ (0,
|
|
3616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3526
3617
|
"div",
|
|
3527
3618
|
{
|
|
3528
3619
|
"data-slot": "flex",
|
|
@@ -3542,9 +3633,9 @@ function Flex({
|
|
|
3542
3633
|
}
|
|
3543
3634
|
|
|
3544
3635
|
// src/components/components/Footer/index.tsx
|
|
3545
|
-
var
|
|
3636
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3546
3637
|
function Footer({ className, style, children }) {
|
|
3547
|
-
return /* @__PURE__ */ (0,
|
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3548
3639
|
"footer",
|
|
3549
3640
|
{
|
|
3550
3641
|
"data-slot": "layout-footer",
|
|
@@ -3561,7 +3652,7 @@ function Footer({ className, style, children }) {
|
|
|
3561
3652
|
// src/components/components/Form/index.tsx
|
|
3562
3653
|
var import_runtime10 = require("@pactor-app/runtime");
|
|
3563
3654
|
var import_react13 = require("react");
|
|
3564
|
-
var
|
|
3655
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3565
3656
|
function isEmpty(value) {
|
|
3566
3657
|
return value === void 0 || value === null || value === "";
|
|
3567
3658
|
}
|
|
@@ -3642,7 +3733,7 @@ function Form({
|
|
|
3642
3733
|
context.state.set("form", values);
|
|
3643
3734
|
onSubmit?.(values);
|
|
3644
3735
|
};
|
|
3645
|
-
return /* @__PURE__ */ (0,
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FormContextProvider, { value: formContext, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3646
3737
|
"form",
|
|
3647
3738
|
{
|
|
3648
3739
|
"data-slot": "form",
|
|
@@ -3656,10 +3747,10 @@ function Form({
|
|
|
3656
3747
|
|
|
3657
3748
|
// src/components/components/Grid/index.tsx
|
|
3658
3749
|
var import_react14 = require("react");
|
|
3659
|
-
var
|
|
3750
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3660
3751
|
function Grid({ columns = 1, gap, className, style, children }) {
|
|
3661
3752
|
const cols = Math.max(1, columns);
|
|
3662
|
-
return /* @__PURE__ */ (0,
|
|
3753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3663
3754
|
"div",
|
|
3664
3755
|
{
|
|
3665
3756
|
"data-slot": "grid",
|
|
@@ -3670,7 +3761,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3670
3761
|
...gap !== void 0 ? { gap } : {},
|
|
3671
3762
|
...style
|
|
3672
3763
|
},
|
|
3673
|
-
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0,
|
|
3764
|
+
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { "data-slot": "grid-item", children: child }, index))
|
|
3674
3765
|
}
|
|
3675
3766
|
);
|
|
3676
3767
|
}
|
|
@@ -3678,7 +3769,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3678
3769
|
// src/components/components/Header/index.tsx
|
|
3679
3770
|
var import_runtime11 = require("@pactor-app/runtime");
|
|
3680
3771
|
var import_lucide_react16 = require("lucide-react");
|
|
3681
|
-
var
|
|
3772
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3682
3773
|
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";
|
|
3683
3774
|
function Header({
|
|
3684
3775
|
logo,
|
|
@@ -3709,10 +3800,10 @@ function Header({
|
|
|
3709
3800
|
className
|
|
3710
3801
|
);
|
|
3711
3802
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
3712
|
-
return /* @__PURE__ */ (0,
|
|
3803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
3713
3804
|
}
|
|
3714
|
-
const brandNode = hasBrand && /* @__PURE__ */ (0,
|
|
3715
|
-
logo !== void 0 && /* @__PURE__ */ (0,
|
|
3805
|
+
const brandNode = hasBrand && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
3806
|
+
logo !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3716
3807
|
"img",
|
|
3717
3808
|
{
|
|
3718
3809
|
"data-slot": "header-brand-logo",
|
|
@@ -3721,23 +3812,23 @@ function Header({
|
|
|
3721
3812
|
className: "h-8 w-8 shrink-0 object-contain"
|
|
3722
3813
|
}
|
|
3723
3814
|
),
|
|
3724
|
-
title !== void 0 && /* @__PURE__ */ (0,
|
|
3815
|
+
title !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
|
|
3725
3816
|
] });
|
|
3726
|
-
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0,
|
|
3817
|
+
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
3727
3818
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
3728
3819
|
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
3729
|
-
return /* @__PURE__ */ (0,
|
|
3730
|
-
showLeft && /* @__PURE__ */ (0,
|
|
3820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
3821
|
+
showLeft && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
3731
3822
|
brandLeft && brandNode,
|
|
3732
3823
|
dropdownLeft && dropdownNode,
|
|
3733
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
3824
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
|
|
3734
3825
|
] }),
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3736
|
-
showRight && /* @__PURE__ */ (0,
|
|
3826
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
|
|
3827
|
+
showRight && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
3737
3828
|
dropdownRight && dropdownNode,
|
|
3738
3829
|
brandRight && brandNode,
|
|
3739
|
-
hasLocales && /* @__PURE__ */ (0,
|
|
3740
|
-
hasUser && /* @__PURE__ */ (0,
|
|
3830
|
+
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
3831
|
+
hasUser && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
3741
3832
|
] })
|
|
3742
3833
|
] });
|
|
3743
3834
|
}
|
|
@@ -3745,25 +3836,25 @@ function HeaderDropdownArea({
|
|
|
3745
3836
|
dropdown,
|
|
3746
3837
|
onSelect
|
|
3747
3838
|
}) {
|
|
3748
|
-
return /* @__PURE__ */ (0,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3750
3841
|
DropdownMenuTrigger,
|
|
3751
3842
|
{
|
|
3752
3843
|
"data-slot": "header-dropdown",
|
|
3753
3844
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3754
3845
|
children: [
|
|
3755
3846
|
dropdown.label,
|
|
3756
|
-
/* @__PURE__ */ (0,
|
|
3847
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3757
3848
|
]
|
|
3758
3849
|
}
|
|
3759
3850
|
),
|
|
3760
|
-
/* @__PURE__ */ (0,
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3761
3852
|
DropdownMenuItem,
|
|
3762
3853
|
{
|
|
3763
3854
|
disabled: item.disabled,
|
|
3764
3855
|
onClick: () => onSelect?.(item.value),
|
|
3765
3856
|
children: [
|
|
3766
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3857
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3767
3858
|
item.label
|
|
3768
3859
|
]
|
|
3769
3860
|
},
|
|
@@ -3775,23 +3866,23 @@ function HeaderMenuArea({
|
|
|
3775
3866
|
items,
|
|
3776
3867
|
onSelect
|
|
3777
3868
|
}) {
|
|
3778
|
-
return /* @__PURE__ */ (0,
|
|
3779
|
-
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0,
|
|
3780
|
-
/* @__PURE__ */ (0,
|
|
3869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
|
|
3870
|
+
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3781
3872
|
DropdownMenuTrigger,
|
|
3782
3873
|
{
|
|
3783
3874
|
"data-slot": "header-menu-item",
|
|
3784
3875
|
"data-key": item.key,
|
|
3785
3876
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3786
3877
|
children: [
|
|
3787
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3878
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3788
3879
|
item.label,
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3790
3881
|
]
|
|
3791
3882
|
}
|
|
3792
3883
|
),
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
] }, item.key) : /* @__PURE__ */ (0,
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3885
|
+
] }, item.key) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3795
3886
|
"button",
|
|
3796
3887
|
{
|
|
3797
3888
|
type: "button",
|
|
@@ -3800,7 +3891,7 @@ function HeaderMenuArea({
|
|
|
3800
3891
|
className: menuItemClass,
|
|
3801
3892
|
onClick: () => onSelect?.(item.key),
|
|
3802
3893
|
children: [
|
|
3803
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3894
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3804
3895
|
item.label
|
|
3805
3896
|
]
|
|
3806
3897
|
},
|
|
@@ -3813,16 +3904,16 @@ function HeaderMenuEntry({
|
|
|
3813
3904
|
onSelect
|
|
3814
3905
|
}) {
|
|
3815
3906
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
3816
|
-
return /* @__PURE__ */ (0,
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3818
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSub, { children: [
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
|
|
3909
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3819
3910
|
item.label
|
|
3820
3911
|
] }),
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3912
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3822
3913
|
] });
|
|
3823
3914
|
}
|
|
3824
|
-
return /* @__PURE__ */ (0,
|
|
3825
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
|
|
3916
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3826
3917
|
item.label
|
|
3827
3918
|
] });
|
|
3828
3919
|
}
|
|
@@ -3830,18 +3921,18 @@ function HeaderUserArea({
|
|
|
3830
3921
|
user,
|
|
3831
3922
|
onSelect
|
|
3832
3923
|
}) {
|
|
3833
|
-
const identity = /* @__PURE__ */ (0,
|
|
3834
|
-
/* @__PURE__ */ (0,
|
|
3835
|
-
user.avatar !== void 0 && /* @__PURE__ */ (0,
|
|
3836
|
-
/* @__PURE__ */ (0,
|
|
3924
|
+
const identity = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Avatar, { className: "size-7", children: [
|
|
3926
|
+
user.avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarFallback, { children: user.name.charAt(0) })
|
|
3837
3928
|
] }),
|
|
3838
|
-
/* @__PURE__ */ (0,
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm", children: user.name })
|
|
3839
3930
|
] });
|
|
3840
3931
|
if (user.items === void 0 || user.items.length === 0) {
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
3932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
|
|
3842
3933
|
}
|
|
3843
|
-
return /* @__PURE__ */ (0,
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
3934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3935
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3845
3936
|
DropdownMenuTrigger,
|
|
3846
3937
|
{
|
|
3847
3938
|
"data-slot": "header-user",
|
|
@@ -3849,8 +3940,8 @@ function HeaderUserArea({
|
|
|
3849
3940
|
children: identity
|
|
3850
3941
|
}
|
|
3851
3942
|
),
|
|
3852
|
-
/* @__PURE__ */ (0,
|
|
3853
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3943
|
+
/* @__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: [
|
|
3944
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3854
3945
|
item.label
|
|
3855
3946
|
] }, item.value)) })
|
|
3856
3947
|
] });
|
|
@@ -3861,19 +3952,19 @@ function HeaderLocalesArea({
|
|
|
3861
3952
|
}) {
|
|
3862
3953
|
const { locale } = (0, import_runtime11.useI18n)();
|
|
3863
3954
|
const current = locales.find((option) => option.value === locale);
|
|
3864
|
-
return /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3866
3957
|
DropdownMenuTrigger,
|
|
3867
3958
|
{
|
|
3868
3959
|
"data-slot": "header-locales",
|
|
3869
3960
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3870
3961
|
children: [
|
|
3871
3962
|
current?.label ?? locale,
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3963
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3873
3964
|
]
|
|
3874
3965
|
}
|
|
3875
3966
|
),
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3877
3968
|
DropdownMenuItem,
|
|
3878
3969
|
{
|
|
3879
3970
|
onClick: () => onSelect?.(option.value),
|
|
@@ -3889,16 +3980,16 @@ var import_runtime12 = require("@pactor-app/runtime");
|
|
|
3889
3980
|
|
|
3890
3981
|
// src/ui/hover-card.tsx
|
|
3891
3982
|
var import_preview_card = require("@base-ui/react/preview-card");
|
|
3892
|
-
var
|
|
3983
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3893
3984
|
function HoverCard({
|
|
3894
3985
|
...props
|
|
3895
3986
|
}) {
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Root, { "data-slot": "hover-card", ...props });
|
|
3897
3988
|
}
|
|
3898
3989
|
function HoverCardTrigger({
|
|
3899
3990
|
...props
|
|
3900
3991
|
}) {
|
|
3901
|
-
return /* @__PURE__ */ (0,
|
|
3992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3902
3993
|
}
|
|
3903
3994
|
function HoverCardContent({
|
|
3904
3995
|
className,
|
|
@@ -3907,14 +3998,14 @@ function HoverCardContent({
|
|
|
3907
3998
|
sideOffset = 4,
|
|
3908
3999
|
...props
|
|
3909
4000
|
}) {
|
|
3910
|
-
return /* @__PURE__ */ (0,
|
|
4001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3911
4002
|
import_preview_card.PreviewCard.Positioner,
|
|
3912
4003
|
{
|
|
3913
4004
|
align,
|
|
3914
4005
|
side,
|
|
3915
4006
|
sideOffset,
|
|
3916
4007
|
className: "isolate z-50",
|
|
3917
|
-
children: /* @__PURE__ */ (0,
|
|
4008
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3918
4009
|
import_preview_card.PreviewCard.Popup,
|
|
3919
4010
|
{
|
|
3920
4011
|
"data-slot": "hover-card-content",
|
|
@@ -3930,22 +4021,22 @@ function HoverCardContent({
|
|
|
3930
4021
|
}
|
|
3931
4022
|
|
|
3932
4023
|
// src/components/components/HoverCard/index.tsx
|
|
3933
|
-
var
|
|
4024
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3934
4025
|
function isDslNode2(value) {
|
|
3935
4026
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
3936
4027
|
}
|
|
3937
4028
|
function HoverCard2({ content, children, className, style }) {
|
|
3938
4029
|
const { renderChildren } = (0, import_runtime12.useRenderer)();
|
|
3939
|
-
return /* @__PURE__ */ (0,
|
|
3940
|
-
/* @__PURE__ */ (0,
|
|
3941
|
-
/* @__PURE__ */ (0,
|
|
4030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(HoverCard, { children: [
|
|
4031
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
|
|
4032
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
|
|
3942
4033
|
] });
|
|
3943
4034
|
}
|
|
3944
4035
|
|
|
3945
4036
|
// src/components/components/Input/index.tsx
|
|
3946
4037
|
var import_runtime13 = require("@pactor-app/runtime");
|
|
3947
4038
|
var import_react15 = require("react");
|
|
3948
|
-
var
|
|
4039
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3949
4040
|
function Input2({
|
|
3950
4041
|
name,
|
|
3951
4042
|
label,
|
|
@@ -3981,7 +4072,7 @@ function Input2({
|
|
|
3981
4072
|
onChange?.("");
|
|
3982
4073
|
};
|
|
3983
4074
|
const inFormRoot = inForm === true;
|
|
3984
|
-
const input = /* @__PURE__ */ (0,
|
|
4075
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3985
4076
|
Input,
|
|
3986
4077
|
{
|
|
3987
4078
|
id: controlId,
|
|
@@ -4002,7 +4093,7 @@ function Input2({
|
|
|
4002
4093
|
}
|
|
4003
4094
|
}
|
|
4004
4095
|
);
|
|
4005
|
-
const clearButton = showClear ? /* @__PURE__ */ (0,
|
|
4096
|
+
const clearButton = showClear ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4006
4097
|
"button",
|
|
4007
4098
|
{
|
|
4008
4099
|
type: "button",
|
|
@@ -4012,7 +4103,7 @@ function Input2({
|
|
|
4012
4103
|
children: "\xD7"
|
|
4013
4104
|
}
|
|
4014
4105
|
) : null;
|
|
4015
|
-
const control = allowClear === true ? /* @__PURE__ */ (0,
|
|
4106
|
+
const control = allowClear === true ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4016
4107
|
"span",
|
|
4017
4108
|
{
|
|
4018
4109
|
className: cn(
|
|
@@ -4029,14 +4120,14 @@ function Input2({
|
|
|
4029
4120
|
) : input;
|
|
4030
4121
|
if (inForm && form && name) {
|
|
4031
4122
|
const error = form.errors[name];
|
|
4032
|
-
return /* @__PURE__ */ (0,
|
|
4123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4033
4124
|
"div",
|
|
4034
4125
|
{
|
|
4035
4126
|
"data-slot": "form-item",
|
|
4036
4127
|
className: cn(formItemClass(form.layout), className),
|
|
4037
4128
|
style,
|
|
4038
4129
|
children: [
|
|
4039
|
-
label ? /* @__PURE__ */ (0,
|
|
4130
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4040
4131
|
"label",
|
|
4041
4132
|
{
|
|
4042
4133
|
htmlFor: controlId,
|
|
@@ -4045,7 +4136,7 @@ function Input2({
|
|
|
4045
4136
|
}
|
|
4046
4137
|
) : null,
|
|
4047
4138
|
control,
|
|
4048
|
-
error ? /* @__PURE__ */ (0,
|
|
4139
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4049
4140
|
]
|
|
4050
4141
|
}
|
|
4051
4142
|
);
|
|
@@ -4054,9 +4145,9 @@ function Input2({
|
|
|
4054
4145
|
}
|
|
4055
4146
|
|
|
4056
4147
|
// src/ui/input-group.tsx
|
|
4057
|
-
var
|
|
4148
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4058
4149
|
function InputGroup({ className, ...props }) {
|
|
4059
|
-
return /* @__PURE__ */ (0,
|
|
4150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4060
4151
|
"div",
|
|
4061
4152
|
{
|
|
4062
4153
|
"data-slot": "input-group",
|
|
@@ -4075,9 +4166,9 @@ function InputGroup({ className, ...props }) {
|
|
|
4075
4166
|
}
|
|
4076
4167
|
|
|
4077
4168
|
// src/components/components/InputGroup/index.tsx
|
|
4078
|
-
var
|
|
4169
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4079
4170
|
function InputGroup2({ className, style, children }) {
|
|
4080
|
-
return /* @__PURE__ */ (0,
|
|
4171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InputGroup, { className, style, children });
|
|
4081
4172
|
}
|
|
4082
4173
|
|
|
4083
4174
|
// src/components/components/InputOTP/index.tsx
|
|
@@ -4087,13 +4178,13 @@ var import_react16 = require("react");
|
|
|
4087
4178
|
var import_input_otp = require("input-otp");
|
|
4088
4179
|
var import_lucide_react17 = require("lucide-react");
|
|
4089
4180
|
var React4 = __toESM(require("react"), 1);
|
|
4090
|
-
var
|
|
4181
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4091
4182
|
function InputOTP({
|
|
4092
4183
|
className,
|
|
4093
4184
|
containerClassName,
|
|
4094
4185
|
...props
|
|
4095
4186
|
}) {
|
|
4096
|
-
return /* @__PURE__ */ (0,
|
|
4187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4097
4188
|
import_input_otp.OTPInput,
|
|
4098
4189
|
{
|
|
4099
4190
|
"data-slot": "input-otp",
|
|
@@ -4107,7 +4198,7 @@ function InputOTP({
|
|
|
4107
4198
|
);
|
|
4108
4199
|
}
|
|
4109
4200
|
function InputOTPGroup({ className, ...props }) {
|
|
4110
|
-
return /* @__PURE__ */ (0,
|
|
4201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4111
4202
|
"div",
|
|
4112
4203
|
{
|
|
4113
4204
|
"data-slot": "input-otp-group",
|
|
@@ -4123,7 +4214,7 @@ function InputOTPSlot({
|
|
|
4123
4214
|
}) {
|
|
4124
4215
|
const inputOTPContext = React4.useContext(import_input_otp.OTPInputContext);
|
|
4125
4216
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4126
|
-
return /* @__PURE__ */ (0,
|
|
4217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
4127
4218
|
"div",
|
|
4128
4219
|
{
|
|
4129
4220
|
"data-slot": "input-otp-slot",
|
|
@@ -4135,14 +4226,14 @@ function InputOTPSlot({
|
|
|
4135
4226
|
...props,
|
|
4136
4227
|
children: [
|
|
4137
4228
|
char,
|
|
4138
|
-
hasFakeCaret ? /* @__PURE__ */ (0,
|
|
4229
|
+
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
|
|
4139
4230
|
]
|
|
4140
4231
|
}
|
|
4141
4232
|
);
|
|
4142
4233
|
}
|
|
4143
4234
|
|
|
4144
4235
|
// src/components/components/InputOTP/index.tsx
|
|
4145
|
-
var
|
|
4236
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4146
4237
|
function InputOTP2({
|
|
4147
4238
|
name,
|
|
4148
4239
|
label,
|
|
@@ -4180,42 +4271,42 @@ function InputOTP2({
|
|
|
4180
4271
|
onComplete?.(next);
|
|
4181
4272
|
}
|
|
4182
4273
|
};
|
|
4183
|
-
const control = /* @__PURE__ */ (0,
|
|
4274
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4184
4275
|
InputOTP,
|
|
4185
4276
|
{
|
|
4186
4277
|
maxLength: length,
|
|
4187
4278
|
value: current,
|
|
4188
4279
|
onChange: handleChange,
|
|
4189
4280
|
disabled,
|
|
4190
|
-
children: /* @__PURE__ */ (0,
|
|
4281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPSlot, { index }, index)) })
|
|
4191
4282
|
}
|
|
4192
4283
|
);
|
|
4193
4284
|
if (inForm && form && name) {
|
|
4194
4285
|
const error = form.errors[name];
|
|
4195
|
-
return /* @__PURE__ */ (0,
|
|
4286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
4196
4287
|
"div",
|
|
4197
4288
|
{
|
|
4198
4289
|
"data-slot": "form-item",
|
|
4199
4290
|
className: cn(formItemClass(form.layout), className),
|
|
4200
4291
|
style,
|
|
4201
4292
|
children: [
|
|
4202
|
-
label ? /* @__PURE__ */ (0,
|
|
4293
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
4203
4294
|
control,
|
|
4204
|
-
error ? /* @__PURE__ */ (0,
|
|
4295
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4205
4296
|
]
|
|
4206
4297
|
}
|
|
4207
4298
|
);
|
|
4208
4299
|
}
|
|
4209
|
-
return /* @__PURE__ */ (0,
|
|
4300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
|
|
4210
4301
|
}
|
|
4211
4302
|
|
|
4212
4303
|
// src/components/components/Item/index.tsx
|
|
4213
4304
|
var import_runtime14 = require("@pactor-app/runtime");
|
|
4214
4305
|
|
|
4215
4306
|
// src/ui/item.tsx
|
|
4216
|
-
var
|
|
4307
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4217
4308
|
function Item({ className, ...props }) {
|
|
4218
|
-
return /* @__PURE__ */ (0,
|
|
4309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4219
4310
|
"div",
|
|
4220
4311
|
{
|
|
4221
4312
|
"data-slot": "item",
|
|
@@ -4228,7 +4319,7 @@ function Item({ className, ...props }) {
|
|
|
4228
4319
|
);
|
|
4229
4320
|
}
|
|
4230
4321
|
function ItemMedia({ className, ...props }) {
|
|
4231
|
-
return /* @__PURE__ */ (0,
|
|
4322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4232
4323
|
"div",
|
|
4233
4324
|
{
|
|
4234
4325
|
"data-slot": "item-media",
|
|
@@ -4241,7 +4332,7 @@ function ItemMedia({ className, ...props }) {
|
|
|
4241
4332
|
);
|
|
4242
4333
|
}
|
|
4243
4334
|
function ItemContent({ className, ...props }) {
|
|
4244
|
-
return /* @__PURE__ */ (0,
|
|
4335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4245
4336
|
"div",
|
|
4246
4337
|
{
|
|
4247
4338
|
"data-slot": "item-content",
|
|
@@ -4251,7 +4342,7 @@ function ItemContent({ className, ...props }) {
|
|
|
4251
4342
|
);
|
|
4252
4343
|
}
|
|
4253
4344
|
function ItemTitle({ className, ...props }) {
|
|
4254
|
-
return /* @__PURE__ */ (0,
|
|
4345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4255
4346
|
"div",
|
|
4256
4347
|
{
|
|
4257
4348
|
"data-slot": "item-title",
|
|
@@ -4261,7 +4352,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
4261
4352
|
);
|
|
4262
4353
|
}
|
|
4263
4354
|
function ItemDescription({ className, ...props }) {
|
|
4264
|
-
return /* @__PURE__ */ (0,
|
|
4355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4265
4356
|
"p",
|
|
4266
4357
|
{
|
|
4267
4358
|
"data-slot": "item-description",
|
|
@@ -4271,7 +4362,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
4271
4362
|
);
|
|
4272
4363
|
}
|
|
4273
4364
|
function ItemActions({ className, ...props }) {
|
|
4274
|
-
return /* @__PURE__ */ (0,
|
|
4365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4275
4366
|
"div",
|
|
4276
4367
|
{
|
|
4277
4368
|
"data-slot": "item-actions",
|
|
@@ -4282,7 +4373,7 @@ function ItemActions({ className, ...props }) {
|
|
|
4282
4373
|
}
|
|
4283
4374
|
|
|
4284
4375
|
// src/components/components/Item/index.tsx
|
|
4285
|
-
var
|
|
4376
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4286
4377
|
function Item2({
|
|
4287
4378
|
title,
|
|
4288
4379
|
description,
|
|
@@ -4293,20 +4384,20 @@ function Item2({
|
|
|
4293
4384
|
}) {
|
|
4294
4385
|
const { renderChildren } = (0, import_runtime14.useRenderer)();
|
|
4295
4386
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4296
|
-
return /* @__PURE__ */ (0,
|
|
4297
|
-
mediaNodes.length > 0 ? /* @__PURE__ */ (0,
|
|
4298
|
-
/* @__PURE__ */ (0,
|
|
4299
|
-
title ? /* @__PURE__ */ (0,
|
|
4300
|
-
description ? /* @__PURE__ */ (0,
|
|
4387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Item, { className, style, children: [
|
|
4388
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(ItemContent, { children: [
|
|
4390
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemTitle, { children: title }) : null,
|
|
4391
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemDescription, { children: description }) : null
|
|
4301
4392
|
] }),
|
|
4302
|
-
actions && actions.length > 0 ? /* @__PURE__ */ (0,
|
|
4393
|
+
actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemActions, { children: renderChildren(actions) }) : null
|
|
4303
4394
|
] });
|
|
4304
4395
|
}
|
|
4305
4396
|
|
|
4306
4397
|
// src/ui/kbd.tsx
|
|
4307
|
-
var
|
|
4398
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4308
4399
|
function Kbd({ className, ...props }) {
|
|
4309
|
-
return /* @__PURE__ */ (0,
|
|
4400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4310
4401
|
"kbd",
|
|
4311
4402
|
{
|
|
4312
4403
|
"data-slot": "kbd",
|
|
@@ -4320,18 +4411,18 @@ function Kbd({ className, ...props }) {
|
|
|
4320
4411
|
}
|
|
4321
4412
|
|
|
4322
4413
|
// src/components/components/Kbd/index.tsx
|
|
4323
|
-
var
|
|
4414
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4324
4415
|
function Kbd2({ text, className, style }) {
|
|
4325
|
-
return /* @__PURE__ */ (0,
|
|
4416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Kbd, { className, style, children: text });
|
|
4326
4417
|
}
|
|
4327
4418
|
|
|
4328
4419
|
// src/ui/label.tsx
|
|
4329
|
-
var
|
|
4420
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4330
4421
|
function Label({
|
|
4331
4422
|
className,
|
|
4332
4423
|
...props
|
|
4333
4424
|
}) {
|
|
4334
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4335
4426
|
"label",
|
|
4336
4427
|
{
|
|
4337
4428
|
"data-slot": "label",
|
|
@@ -4345,22 +4436,22 @@ function Label({
|
|
|
4345
4436
|
}
|
|
4346
4437
|
|
|
4347
4438
|
// src/components/components/Label/index.tsx
|
|
4348
|
-
var
|
|
4439
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4349
4440
|
function Label2({ text, htmlFor, className, style }) {
|
|
4350
|
-
return /* @__PURE__ */ (0,
|
|
4441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Label, { htmlFor, className, style, children: text });
|
|
4351
4442
|
}
|
|
4352
4443
|
|
|
4353
4444
|
// src/components/components/Layout/index.tsx
|
|
4354
4445
|
var import_core = require("@pactor-app/core");
|
|
4355
4446
|
var import_runtime15 = require("@pactor-app/runtime");
|
|
4356
|
-
var
|
|
4447
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4357
4448
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4358
4449
|
const { renderChildren, context } = (0, import_runtime15.useRenderer)();
|
|
4359
4450
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4360
4451
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4361
4452
|
) : false;
|
|
4362
4453
|
const dir = direction ?? (hasSider ? "horizontal" : "vertical");
|
|
4363
|
-
return /* @__PURE__ */ (0,
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4364
4455
|
"div",
|
|
4365
4456
|
{
|
|
4366
4457
|
"data-slot": "layout",
|
|
@@ -4384,10 +4475,10 @@ function resolveRootType(node, context) {
|
|
|
4384
4475
|
}
|
|
4385
4476
|
|
|
4386
4477
|
// src/components/components/Link/index.tsx
|
|
4387
|
-
var
|
|
4478
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4388
4479
|
function Link2({ href, text, target, className, style, children }) {
|
|
4389
4480
|
const handleSpaClick = useSpaLinkClick();
|
|
4390
|
-
return /* @__PURE__ */ (0,
|
|
4481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4391
4482
|
"a",
|
|
4392
4483
|
{
|
|
4393
4484
|
"data-slot": "link",
|
|
@@ -4405,73 +4496,13 @@ function Link2({ href, text, target, className, style, children }) {
|
|
|
4405
4496
|
// src/components/components/Menu/index.tsx
|
|
4406
4497
|
var import_react19 = require("react");
|
|
4407
4498
|
|
|
4408
|
-
// src/ui/tooltip.tsx
|
|
4409
|
-
var import_tooltip = require("@base-ui/react/tooltip");
|
|
4410
|
-
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4411
|
-
function TooltipProvider({
|
|
4412
|
-
delay = 0,
|
|
4413
|
-
...props
|
|
4414
|
-
}) {
|
|
4415
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4416
|
-
import_tooltip.Tooltip.Provider,
|
|
4417
|
-
{
|
|
4418
|
-
"data-slot": "tooltip-provider",
|
|
4419
|
-
delay,
|
|
4420
|
-
...props
|
|
4421
|
-
}
|
|
4422
|
-
);
|
|
4423
|
-
}
|
|
4424
|
-
function Tooltip2({
|
|
4425
|
-
...props
|
|
4426
|
-
}) {
|
|
4427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
4428
|
-
}
|
|
4429
|
-
function TooltipTrigger({
|
|
4430
|
-
...props
|
|
4431
|
-
}) {
|
|
4432
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4433
|
-
}
|
|
4434
|
-
function TooltipContent({
|
|
4435
|
-
className,
|
|
4436
|
-
side = "top",
|
|
4437
|
-
sideOffset = 4,
|
|
4438
|
-
align = "center",
|
|
4439
|
-
children,
|
|
4440
|
-
...props
|
|
4441
|
-
}) {
|
|
4442
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4443
|
-
import_tooltip.Tooltip.Positioner,
|
|
4444
|
-
{
|
|
4445
|
-
align,
|
|
4446
|
-
side,
|
|
4447
|
-
sideOffset,
|
|
4448
|
-
className: "isolate z-50",
|
|
4449
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4450
|
-
import_tooltip.Tooltip.Popup,
|
|
4451
|
-
{
|
|
4452
|
-
"data-slot": "tooltip-content",
|
|
4453
|
-
className: cn(
|
|
4454
|
-
"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",
|
|
4455
|
-
className
|
|
4456
|
-
),
|
|
4457
|
-
...props,
|
|
4458
|
-
children: [
|
|
4459
|
-
children,
|
|
4460
|
-
/* @__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" })
|
|
4461
|
-
]
|
|
4462
|
-
}
|
|
4463
|
-
)
|
|
4464
|
-
}
|
|
4465
|
-
) });
|
|
4466
|
-
}
|
|
4467
|
-
|
|
4468
4499
|
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
4469
4500
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4470
4501
|
function RailTooltip({
|
|
4471
4502
|
label,
|
|
4472
4503
|
children
|
|
4473
4504
|
}) {
|
|
4474
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Tooltip, { children: [
|
|
4475
4506
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipTrigger, { render: children }),
|
|
4476
4507
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
4477
4508
|
] });
|
|
@@ -4986,7 +5017,7 @@ function SidebarMenuButton({
|
|
|
4986
5017
|
children: tooltip
|
|
4987
5018
|
};
|
|
4988
5019
|
}
|
|
4989
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
5020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Tooltip, { children: [
|
|
4990
5021
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TooltipTrigger, { render: button }),
|
|
4991
5022
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4992
5023
|
TooltipContent,
|
|
@@ -6445,7 +6476,8 @@ function Select2({
|
|
|
6445
6476
|
"span",
|
|
6446
6477
|
{
|
|
6447
6478
|
className: cn(
|
|
6448
|
-
|
|
6479
|
+
// Form / Field(Form 上下文)内控件占满整行宽度;独立渲染保持内容自然宽度
|
|
6480
|
+
inFormRoot ? "flex w-full items-center gap-1" : "inline-flex items-center gap-1",
|
|
6449
6481
|
!inFormRoot && className,
|
|
6450
6482
|
controlClassName
|
|
6451
6483
|
),
|
|
@@ -6460,7 +6492,7 @@ function Select2({
|
|
|
6460
6492
|
disabled,
|
|
6461
6493
|
name: inForm ? name : void 0,
|
|
6462
6494
|
children: [
|
|
6463
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6495
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6464
6496
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
6465
6497
|
SelectItem,
|
|
6466
6498
|
{
|
|
@@ -7098,7 +7130,8 @@ var tabsListVariants = (0, import_class_variance_authority7.cva)(
|
|
|
7098
7130
|
variants: {
|
|
7099
7131
|
variant: {
|
|
7100
7132
|
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
7101
|
-
line
|
|
7133
|
+
// line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
|
|
7134
|
+
line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
7102
7135
|
}
|
|
7103
7136
|
},
|
|
7104
7137
|
defaultVariants: {
|
|
@@ -7134,8 +7167,9 @@ function TabsTrigger({
|
|
|
7134
7167
|
// default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
|
|
7135
7168
|
"group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
|
|
7136
7169
|
// line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
|
|
7137
|
-
//(叠在 List
|
|
7138
|
-
|
|
7170
|
+
//(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
|
|
7171
|
+
// flex-1 拉伸,触发器保持自然宽度
|
|
7172
|
+
"group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 group-data-[variant=line]/tabs-list:flex-none group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:border-x-0 group-data-[variant=line]/tabs-list:border-t-0 group-data-[variant=line]/tabs-list:border-b-2 group-data-[variant=line]/tabs-list:py-1.5 group-data-[variant=line]/tabs-list:text-muted-foreground group-data-[variant=line]/tabs-list:data-active:border-b-primary group-data-[variant=line]/tabs-list:data-active:text-foreground",
|
|
7139
7173
|
className
|
|
7140
7174
|
),
|
|
7141
7175
|
...props
|
|
@@ -7158,7 +7192,16 @@ function TabsContent({
|
|
|
7158
7192
|
|
|
7159
7193
|
// src/components/components/Tabs/index.tsx
|
|
7160
7194
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7161
|
-
function Tabs2({
|
|
7195
|
+
function Tabs2({
|
|
7196
|
+
items = [],
|
|
7197
|
+
activeKey,
|
|
7198
|
+
variant,
|
|
7199
|
+
onChange,
|
|
7200
|
+
contentClassName,
|
|
7201
|
+
contentStyle,
|
|
7202
|
+
className,
|
|
7203
|
+
style
|
|
7204
|
+
}) {
|
|
7162
7205
|
const { renderChildren } = (0, import_runtime22.useRenderer)();
|
|
7163
7206
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
7164
7207
|
Tabs,
|
|
@@ -7170,7 +7213,16 @@ function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
|
|
|
7170
7213
|
style,
|
|
7171
7214
|
children: [
|
|
7172
7215
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
|
|
7173
|
-
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7216
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7217
|
+
TabsContent,
|
|
7218
|
+
{
|
|
7219
|
+
value: item.key,
|
|
7220
|
+
className: cn(contentClassName, item.className),
|
|
7221
|
+
style: { ...contentStyle, ...item.style },
|
|
7222
|
+
children: renderChildren(item.children)
|
|
7223
|
+
},
|
|
7224
|
+
item.key
|
|
7225
|
+
))
|
|
7174
7226
|
]
|
|
7175
7227
|
}
|
|
7176
7228
|
);
|
|
@@ -7185,9 +7237,15 @@ var typeClassMap = {
|
|
|
7185
7237
|
warning: "text-warning",
|
|
7186
7238
|
danger: "text-destructive"
|
|
7187
7239
|
};
|
|
7240
|
+
var sizeClassMap = {
|
|
7241
|
+
small: "text-xs",
|
|
7242
|
+
middle: "",
|
|
7243
|
+
large: "text-lg"
|
|
7244
|
+
};
|
|
7188
7245
|
function Text({
|
|
7189
7246
|
text,
|
|
7190
7247
|
type = "default",
|
|
7248
|
+
size = "middle",
|
|
7191
7249
|
strong,
|
|
7192
7250
|
delete: del,
|
|
7193
7251
|
underline,
|
|
@@ -7203,6 +7261,7 @@ function Text({
|
|
|
7203
7261
|
"data-type": type,
|
|
7204
7262
|
className: cn(
|
|
7205
7263
|
typeClassMap[type],
|
|
7264
|
+
sizeClassMap[size],
|
|
7206
7265
|
strong && "font-semibold",
|
|
7207
7266
|
del && "line-through",
|
|
7208
7267
|
underline && "underline",
|
|
@@ -7454,7 +7513,7 @@ function ToggleGroup2({
|
|
|
7454
7513
|
// src/components/components/Tooltip/index.tsx
|
|
7455
7514
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
7456
7515
|
function Tooltip3({ content, children, className, style }) {
|
|
7457
|
-
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
7516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Tooltip, { children: [
|
|
7458
7517
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
7459
7518
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipContent, { className, style, children: content })
|
|
7460
7519
|
] });
|