@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
|
@@ -396,7 +396,28 @@ var ICONS = {
|
|
|
396
396
|
"rotate-ccw": import_lucide_react2.RotateCcw,
|
|
397
397
|
quote: import_lucide_react2.Quote,
|
|
398
398
|
chat: import_lucide_react2.MessageSquare,
|
|
399
|
-
brain: import_lucide_react2.Brain
|
|
399
|
+
brain: import_lucide_react2.Brain,
|
|
400
|
+
// lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
|
|
401
|
+
// 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
|
|
402
|
+
"trash-2": import_lucide_react2.Trash2,
|
|
403
|
+
"share-2": import_lucide_react2.Share2,
|
|
404
|
+
"building-2": import_lucide_react2.Building2,
|
|
405
|
+
house: import_lucide_react2.House,
|
|
406
|
+
"triangle-alert": import_lucide_react2.TriangleAlert,
|
|
407
|
+
"circle-alert": import_lucide_react2.CircleAlert,
|
|
408
|
+
"circle-check": import_lucide_react2.CircleCheck,
|
|
409
|
+
"circle-x": import_lucide_react2.CircleX,
|
|
410
|
+
"circle-question-mark": import_lucide_react2.CircleQuestionMark,
|
|
411
|
+
"square-pen": import_lucide_react2.SquarePen,
|
|
412
|
+
"refresh-ccw": import_lucide_react2.RefreshCcw,
|
|
413
|
+
"chart-column": import_lucide_react2.ChartColumn,
|
|
414
|
+
"layout-grid": import_lucide_react2.LayoutGrid,
|
|
415
|
+
funnel: import_lucide_react2.Funnel,
|
|
416
|
+
"loader-circle": import_lucide_react2.LoaderCircle,
|
|
417
|
+
ellipsis: import_lucide_react2.Ellipsis,
|
|
418
|
+
"ellipsis-vertical": import_lucide_react2.EllipsisVertical,
|
|
419
|
+
"message-circle": import_lucide_react2.MessageCircle,
|
|
420
|
+
"lock-open": import_lucide_react2.LockOpen
|
|
400
421
|
};
|
|
401
422
|
function normalizeIconName(name) {
|
|
402
423
|
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
@@ -426,7 +447,7 @@ function Icon({
|
|
|
426
447
|
size: px,
|
|
427
448
|
color,
|
|
428
449
|
strokeWidth,
|
|
429
|
-
className: cn("shrink-0
|
|
450
|
+
className: cn("shrink-0", className),
|
|
430
451
|
style,
|
|
431
452
|
"aria-hidden": "true"
|
|
432
453
|
}
|
|
@@ -982,7 +1003,69 @@ function Breadcrumb2({ items = [], className, style }) {
|
|
|
982
1003
|
|
|
983
1004
|
// src/components/components/Button/index.tsx
|
|
984
1005
|
var import_lucide_react4 = require("lucide-react");
|
|
1006
|
+
|
|
1007
|
+
// src/ui/tooltip.tsx
|
|
1008
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
985
1009
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1010
|
+
function TooltipProvider({
|
|
1011
|
+
delay = 0,
|
|
1012
|
+
...props
|
|
1013
|
+
}) {
|
|
1014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1015
|
+
import_tooltip.Tooltip.Provider,
|
|
1016
|
+
{
|
|
1017
|
+
"data-slot": "tooltip-provider",
|
|
1018
|
+
delay,
|
|
1019
|
+
...props
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
function Tooltip({
|
|
1024
|
+
...props
|
|
1025
|
+
}) {
|
|
1026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
1027
|
+
}
|
|
1028
|
+
function TooltipTrigger({
|
|
1029
|
+
...props
|
|
1030
|
+
}) {
|
|
1031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1032
|
+
}
|
|
1033
|
+
function TooltipContent({
|
|
1034
|
+
className,
|
|
1035
|
+
side = "top",
|
|
1036
|
+
sideOffset = 4,
|
|
1037
|
+
align = "center",
|
|
1038
|
+
children,
|
|
1039
|
+
...props
|
|
1040
|
+
}) {
|
|
1041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1042
|
+
import_tooltip.Tooltip.Positioner,
|
|
1043
|
+
{
|
|
1044
|
+
align,
|
|
1045
|
+
side,
|
|
1046
|
+
sideOffset,
|
|
1047
|
+
className: "isolate z-50",
|
|
1048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1049
|
+
import_tooltip.Tooltip.Popup,
|
|
1050
|
+
{
|
|
1051
|
+
"data-slot": "tooltip-content",
|
|
1052
|
+
className: cn(
|
|
1053
|
+
"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",
|
|
1054
|
+
className
|
|
1055
|
+
),
|
|
1056
|
+
...props,
|
|
1057
|
+
children: [
|
|
1058
|
+
children,
|
|
1059
|
+
/* @__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" })
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
)
|
|
1063
|
+
}
|
|
1064
|
+
) });
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
// src/components/components/Button/index.tsx
|
|
1068
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
986
1069
|
var variantMap2 = {
|
|
987
1070
|
default: "outline",
|
|
988
1071
|
primary: "default",
|
|
@@ -998,6 +1081,7 @@ var sizeMap = {
|
|
|
998
1081
|
function Button2({
|
|
999
1082
|
text,
|
|
1000
1083
|
icon,
|
|
1084
|
+
tooltip,
|
|
1001
1085
|
variant = "default",
|
|
1002
1086
|
danger,
|
|
1003
1087
|
size = "middle",
|
|
@@ -1010,7 +1094,7 @@ function Button2({
|
|
|
1010
1094
|
children
|
|
1011
1095
|
}) {
|
|
1012
1096
|
const textual = variant === "link" || variant === "text";
|
|
1013
|
-
|
|
1097
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1014
1098
|
Button,
|
|
1015
1099
|
{
|
|
1016
1100
|
type: submit ? "submit" : "button",
|
|
@@ -1026,17 +1110,24 @@ function Button2({
|
|
|
1026
1110
|
className
|
|
1027
1111
|
),
|
|
1028
1112
|
children: [
|
|
1029
|
-
loading ? /* @__PURE__ */ (0,
|
|
1113
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react4.Loader2, { "aria-hidden": true, className: "animate-spin" }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: icon, size: "sm" }) : null,
|
|
1030
1114
|
text ?? children
|
|
1031
1115
|
]
|
|
1032
1116
|
}
|
|
1033
1117
|
);
|
|
1118
|
+
if (tooltip) {
|
|
1119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipTrigger, { render: button }),
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: tooltip })
|
|
1122
|
+
] });
|
|
1123
|
+
}
|
|
1124
|
+
return button;
|
|
1034
1125
|
}
|
|
1035
1126
|
|
|
1036
1127
|
// src/ui/button-group.tsx
|
|
1037
|
-
var
|
|
1128
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1038
1129
|
function ButtonGroup({ className, ...props }) {
|
|
1039
|
-
return /* @__PURE__ */ (0,
|
|
1130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1040
1131
|
"div",
|
|
1041
1132
|
{
|
|
1042
1133
|
role: "group",
|
|
@@ -1051,9 +1142,9 @@ function ButtonGroup({ className, ...props }) {
|
|
|
1051
1142
|
}
|
|
1052
1143
|
|
|
1053
1144
|
// src/components/components/ButtonGroup/index.tsx
|
|
1054
|
-
var
|
|
1145
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1055
1146
|
function ButtonGroup2({ className, style, children }) {
|
|
1056
|
-
return /* @__PURE__ */ (0,
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ButtonGroup, { className, style, children });
|
|
1057
1148
|
}
|
|
1058
1149
|
|
|
1059
1150
|
// src/components/components/Calendar/index.tsx
|
|
@@ -1063,7 +1154,7 @@ var import_react4 = require("react");
|
|
|
1063
1154
|
// src/ui/calendar.tsx
|
|
1064
1155
|
var import_lucide_react5 = require("lucide-react");
|
|
1065
1156
|
var import_react_day_picker = require("react-day-picker");
|
|
1066
|
-
var
|
|
1157
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1067
1158
|
function Calendar2({
|
|
1068
1159
|
className,
|
|
1069
1160
|
classNames,
|
|
@@ -1071,7 +1162,7 @@ function Calendar2({
|
|
|
1071
1162
|
...props
|
|
1072
1163
|
}) {
|
|
1073
1164
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1074
|
-
return /* @__PURE__ */ (0,
|
|
1165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1075
1166
|
import_react_day_picker.DayPicker,
|
|
1076
1167
|
{
|
|
1077
1168
|
showOutsideDays,
|
|
@@ -1128,7 +1219,7 @@ function Calendar2({
|
|
|
1128
1219
|
...classNames
|
|
1129
1220
|
},
|
|
1130
1221
|
components: {
|
|
1131
|
-
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0,
|
|
1222
|
+
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.ChevronLeftIcon, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.ChevronRightIcon, { className: "size-4" })
|
|
1132
1223
|
},
|
|
1133
1224
|
...props
|
|
1134
1225
|
}
|
|
@@ -1154,7 +1245,7 @@ function formItemClass(layout) {
|
|
|
1154
1245
|
}
|
|
1155
1246
|
|
|
1156
1247
|
// src/components/components/Calendar/index.tsx
|
|
1157
|
-
var
|
|
1248
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1158
1249
|
function parseValue(value) {
|
|
1159
1250
|
if (typeof value !== "string" || value === "") return void 0;
|
|
1160
1251
|
const date = (0, import_date_fns.parseISO)(value);
|
|
@@ -1188,7 +1279,7 @@ function Calendar3({
|
|
|
1188
1279
|
}
|
|
1189
1280
|
onChange?.(next);
|
|
1190
1281
|
};
|
|
1191
|
-
const calendar = /* @__PURE__ */ (0,
|
|
1282
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1192
1283
|
Calendar2,
|
|
1193
1284
|
{
|
|
1194
1285
|
mode,
|
|
@@ -1201,16 +1292,16 @@ function Calendar3({
|
|
|
1201
1292
|
);
|
|
1202
1293
|
if (inForm && form && name) {
|
|
1203
1294
|
const error = form.errors[name];
|
|
1204
|
-
return /* @__PURE__ */ (0,
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1205
1296
|
"div",
|
|
1206
1297
|
{
|
|
1207
1298
|
"data-slot": "form-item",
|
|
1208
1299
|
className: cn(formItemClass(form.layout), className),
|
|
1209
1300
|
style,
|
|
1210
1301
|
children: [
|
|
1211
|
-
label ? /* @__PURE__ */ (0,
|
|
1302
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1212
1303
|
calendar,
|
|
1213
|
-
error ? /* @__PURE__ */ (0,
|
|
1304
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1214
1305
|
]
|
|
1215
1306
|
}
|
|
1216
1307
|
);
|
|
@@ -1219,7 +1310,7 @@ function Calendar3({
|
|
|
1219
1310
|
}
|
|
1220
1311
|
|
|
1221
1312
|
// src/ui/card.tsx
|
|
1222
|
-
var
|
|
1313
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1223
1314
|
var cardRoundedClasses = {
|
|
1224
1315
|
none: "rounded-none",
|
|
1225
1316
|
sm: "rounded-sm",
|
|
@@ -1234,7 +1325,7 @@ function Card({
|
|
|
1234
1325
|
rounded = "lg",
|
|
1235
1326
|
...props
|
|
1236
1327
|
}) {
|
|
1237
|
-
return /* @__PURE__ */ (0,
|
|
1328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1238
1329
|
"div",
|
|
1239
1330
|
{
|
|
1240
1331
|
"data-slot": "card",
|
|
@@ -1248,7 +1339,7 @@ function Card({
|
|
|
1248
1339
|
);
|
|
1249
1340
|
}
|
|
1250
1341
|
function CardHeader({ className, ...props }) {
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1252
1343
|
"div",
|
|
1253
1344
|
{
|
|
1254
1345
|
"data-slot": "card-header",
|
|
@@ -1261,7 +1352,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1261
1352
|
);
|
|
1262
1353
|
}
|
|
1263
1354
|
function CardTitle({ className, ...props }) {
|
|
1264
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1265
1356
|
"div",
|
|
1266
1357
|
{
|
|
1267
1358
|
"data-slot": "card-title",
|
|
@@ -1271,7 +1362,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1271
1362
|
);
|
|
1272
1363
|
}
|
|
1273
1364
|
function CardContent({ className, ...props }) {
|
|
1274
|
-
return /* @__PURE__ */ (0,
|
|
1365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1275
1366
|
"div",
|
|
1276
1367
|
{
|
|
1277
1368
|
"data-slot": "card-content",
|
|
@@ -1282,17 +1373,17 @@ function CardContent({ className, ...props }) {
|
|
|
1282
1373
|
}
|
|
1283
1374
|
|
|
1284
1375
|
// src/components/components/Card/index.tsx
|
|
1285
|
-
var
|
|
1376
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1286
1377
|
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1288
1379
|
Card,
|
|
1289
1380
|
{
|
|
1290
1381
|
rounded,
|
|
1291
1382
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1292
1383
|
style,
|
|
1293
1384
|
children: [
|
|
1294
|
-
title ? /* @__PURE__ */ (0,
|
|
1295
|
-
/* @__PURE__ */ (0,
|
|
1385
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardHeader, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardTitle, { children: title }) }) : null,
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CardContent, { className: "px-4", children })
|
|
1296
1387
|
]
|
|
1297
1388
|
}
|
|
1298
1389
|
);
|
|
@@ -1306,7 +1397,7 @@ var import_react5 = require("react");
|
|
|
1306
1397
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1307
1398
|
var import_lucide_react6 = require("lucide-react");
|
|
1308
1399
|
var React3 = __toESM(require("react"), 1);
|
|
1309
|
-
var
|
|
1400
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1310
1401
|
var CarouselContext = React3.createContext(null);
|
|
1311
1402
|
function useCarousel() {
|
|
1312
1403
|
const context = React3.useContext(CarouselContext);
|
|
@@ -1361,7 +1452,7 @@ function Carousel({
|
|
|
1361
1452
|
api.off("select", onSelect);
|
|
1362
1453
|
};
|
|
1363
1454
|
}, [api, onSelect]);
|
|
1364
|
-
return /* @__PURE__ */ (0,
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1365
1456
|
CarouselContext.Provider,
|
|
1366
1457
|
{
|
|
1367
1458
|
value: {
|
|
@@ -1374,7 +1465,7 @@ function Carousel({
|
|
|
1374
1465
|
canScrollPrev,
|
|
1375
1466
|
canScrollNext
|
|
1376
1467
|
},
|
|
1377
|
-
children: /* @__PURE__ */ (0,
|
|
1468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1378
1469
|
"div",
|
|
1379
1470
|
{
|
|
1380
1471
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1391,7 +1482,7 @@ function Carousel({
|
|
|
1391
1482
|
}
|
|
1392
1483
|
function CarouselContent({ className, ...props }) {
|
|
1393
1484
|
const { carouselRef, orientation } = useCarousel();
|
|
1394
|
-
return /* @__PURE__ */ (0,
|
|
1485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-viewport", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1395
1486
|
"div",
|
|
1396
1487
|
{
|
|
1397
1488
|
className: cn(
|
|
@@ -1405,7 +1496,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1405
1496
|
}
|
|
1406
1497
|
function CarouselItem({ className, ...props }) {
|
|
1407
1498
|
const { orientation } = useCarousel();
|
|
1408
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1409
1500
|
"div",
|
|
1410
1501
|
{
|
|
1411
1502
|
role: "group",
|
|
@@ -1427,7 +1518,7 @@ function CarouselPrevious({
|
|
|
1427
1518
|
...props
|
|
1428
1519
|
}) {
|
|
1429
1520
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1431
1522
|
Button,
|
|
1432
1523
|
{
|
|
1433
1524
|
"data-slot": "carousel-previous",
|
|
@@ -1442,8 +1533,8 @@ function CarouselPrevious({
|
|
|
1442
1533
|
onClick: scrollPrev,
|
|
1443
1534
|
...props,
|
|
1444
1535
|
children: [
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronLeftIcon, {}),
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1447
1538
|
]
|
|
1448
1539
|
}
|
|
1449
1540
|
);
|
|
@@ -1455,7 +1546,7 @@ function CarouselNext({
|
|
|
1455
1546
|
...props
|
|
1456
1547
|
}) {
|
|
1457
1548
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1459
1550
|
Button,
|
|
1460
1551
|
{
|
|
1461
1552
|
"data-slot": "carousel-next",
|
|
@@ -1470,15 +1561,15 @@ function CarouselNext({
|
|
|
1470
1561
|
onClick: scrollNext,
|
|
1471
1562
|
...props,
|
|
1472
1563
|
children: [
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1474
|
-
/* @__PURE__ */ (0,
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react6.ChevronRightIcon, {}),
|
|
1565
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1475
1566
|
]
|
|
1476
1567
|
}
|
|
1477
1568
|
);
|
|
1478
1569
|
}
|
|
1479
1570
|
|
|
1480
1571
|
// src/components/components/Carousel/index.tsx
|
|
1481
|
-
var
|
|
1572
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1482
1573
|
function isDslNode(item) {
|
|
1483
1574
|
return typeof item.type === "string";
|
|
1484
1575
|
}
|
|
@@ -1503,7 +1594,7 @@ function Carousel2({
|
|
|
1503
1594
|
}, interval);
|
|
1504
1595
|
return () => clearInterval(timer);
|
|
1505
1596
|
}, [api, autoplay, loop]);
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1507
1598
|
Carousel,
|
|
1508
1599
|
{
|
|
1509
1600
|
opts: { loop: loop === true },
|
|
@@ -1511,7 +1602,7 @@ function Carousel2({
|
|
|
1511
1602
|
className,
|
|
1512
1603
|
style,
|
|
1513
1604
|
children: [
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselItem, { children: isDslNode(item) ? renderChildren([item]) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1515
1606
|
"img",
|
|
1516
1607
|
{
|
|
1517
1608
|
src: item.src,
|
|
@@ -1519,8 +1610,8 @@ function Carousel2({
|
|
|
1519
1610
|
className: "w-full rounded-md object-cover"
|
|
1520
1611
|
}
|
|
1521
1612
|
) }, index)) }),
|
|
1522
|
-
/* @__PURE__ */ (0,
|
|
1523
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselPrevious, {}),
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselNext, {})
|
|
1524
1615
|
]
|
|
1525
1616
|
}
|
|
1526
1617
|
);
|
|
@@ -1532,9 +1623,9 @@ var import_react6 = require("react");
|
|
|
1532
1623
|
// src/ui/checkbox.tsx
|
|
1533
1624
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1534
1625
|
var import_lucide_react7 = require("lucide-react");
|
|
1535
|
-
var
|
|
1626
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1536
1627
|
function Checkbox({ className, ...props }) {
|
|
1537
|
-
return /* @__PURE__ */ (0,
|
|
1628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1538
1629
|
import_checkbox.Checkbox.Root,
|
|
1539
1630
|
{
|
|
1540
1631
|
"data-slot": "checkbox",
|
|
@@ -1543,12 +1634,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1543
1634
|
className
|
|
1544
1635
|
),
|
|
1545
1636
|
...props,
|
|
1546
|
-
children: /* @__PURE__ */ (0,
|
|
1637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1547
1638
|
import_checkbox.Checkbox.Indicator,
|
|
1548
1639
|
{
|
|
1549
1640
|
"data-slot": "checkbox-indicator",
|
|
1550
1641
|
className: "flex items-center justify-center text-current",
|
|
1551
|
-
children: /* @__PURE__ */ (0,
|
|
1642
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1552
1643
|
}
|
|
1553
1644
|
)
|
|
1554
1645
|
}
|
|
@@ -1556,7 +1647,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1556
1647
|
}
|
|
1557
1648
|
|
|
1558
1649
|
// src/components/components/Checkbox/index.tsx
|
|
1559
|
-
var
|
|
1650
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1560
1651
|
function Checkbox2({
|
|
1561
1652
|
name,
|
|
1562
1653
|
label,
|
|
@@ -1585,13 +1676,13 @@ function Checkbox2({
|
|
|
1585
1676
|
}
|
|
1586
1677
|
onChange?.(next);
|
|
1587
1678
|
};
|
|
1588
|
-
const control = /* @__PURE__ */ (0,
|
|
1679
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1589
1680
|
"span",
|
|
1590
1681
|
{
|
|
1591
1682
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1592
1683
|
style: inForm ? void 0 : style,
|
|
1593
1684
|
children: [
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1595
1686
|
Checkbox,
|
|
1596
1687
|
{
|
|
1597
1688
|
id: controlId,
|
|
@@ -1601,12 +1692,12 @@ function Checkbox2({
|
|
|
1601
1692
|
onCheckedChange: handleChange
|
|
1602
1693
|
}
|
|
1603
1694
|
),
|
|
1604
|
-
label ? /* @__PURE__ */ (0,
|
|
1695
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1605
1696
|
]
|
|
1606
1697
|
}
|
|
1607
1698
|
);
|
|
1608
1699
|
if (inForm && form && name) {
|
|
1609
|
-
return /* @__PURE__ */ (0,
|
|
1700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1610
1701
|
"div",
|
|
1611
1702
|
{
|
|
1612
1703
|
"data-slot": "form-item",
|
|
@@ -1614,7 +1705,7 @@ function Checkbox2({
|
|
|
1614
1705
|
style,
|
|
1615
1706
|
children: [
|
|
1616
1707
|
control,
|
|
1617
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
1708
|
+
form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
|
|
1618
1709
|
]
|
|
1619
1710
|
}
|
|
1620
1711
|
);
|
|
@@ -1628,18 +1719,18 @@ var import_react7 = require("react");
|
|
|
1628
1719
|
// src/ui/collapsible.tsx
|
|
1629
1720
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1630
1721
|
var import_lucide_react8 = require("lucide-react");
|
|
1631
|
-
var
|
|
1722
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1632
1723
|
function Collapsible({
|
|
1633
1724
|
...props
|
|
1634
1725
|
}) {
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1636
1727
|
}
|
|
1637
1728
|
function CollapsibleTrigger({
|
|
1638
1729
|
className,
|
|
1639
1730
|
children,
|
|
1640
1731
|
...props
|
|
1641
1732
|
}) {
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1643
1734
|
import_collapsible.Collapsible.Trigger,
|
|
1644
1735
|
{
|
|
1645
1736
|
"data-slot": "collapsible-trigger",
|
|
@@ -1650,7 +1741,7 @@ function CollapsibleTrigger({
|
|
|
1650
1741
|
...props,
|
|
1651
1742
|
children: [
|
|
1652
1743
|
children,
|
|
1653
|
-
/* @__PURE__ */ (0,
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react8.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1654
1745
|
]
|
|
1655
1746
|
}
|
|
1656
1747
|
);
|
|
@@ -1659,7 +1750,7 @@ function CollapsibleContent({
|
|
|
1659
1750
|
className,
|
|
1660
1751
|
...props
|
|
1661
1752
|
}) {
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1663
1754
|
import_collapsible.Collapsible.Panel,
|
|
1664
1755
|
{
|
|
1665
1756
|
"data-slot": "collapsible-content",
|
|
@@ -1673,7 +1764,7 @@ function CollapsibleContent({
|
|
|
1673
1764
|
}
|
|
1674
1765
|
|
|
1675
1766
|
// src/components/components/Collapsible/index.tsx
|
|
1676
|
-
var
|
|
1767
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1677
1768
|
function Collapsible2({
|
|
1678
1769
|
title,
|
|
1679
1770
|
open,
|
|
@@ -1683,7 +1774,7 @@ function Collapsible2({
|
|
|
1683
1774
|
}) {
|
|
1684
1775
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1685
1776
|
const controlled = open !== void 0;
|
|
1686
|
-
return /* @__PURE__ */ (0,
|
|
1777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1687
1778
|
Collapsible,
|
|
1688
1779
|
{
|
|
1689
1780
|
open: controlled ? open : innerOpen,
|
|
@@ -1695,8 +1786,8 @@ function Collapsible2({
|
|
|
1695
1786
|
className,
|
|
1696
1787
|
style,
|
|
1697
1788
|
children: [
|
|
1698
|
-
title ? /* @__PURE__ */ (0,
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1789
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CollapsibleContent, { children })
|
|
1700
1791
|
]
|
|
1701
1792
|
}
|
|
1702
1793
|
);
|
|
@@ -1710,16 +1801,16 @@ var import_lucide_react9 = require("lucide-react");
|
|
|
1710
1801
|
|
|
1711
1802
|
// src/ui/popover.tsx
|
|
1712
1803
|
var import_popover = require("@base-ui/react/popover");
|
|
1713
|
-
var
|
|
1804
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1714
1805
|
function Popover({
|
|
1715
1806
|
...props
|
|
1716
1807
|
}) {
|
|
1717
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1718
1809
|
}
|
|
1719
1810
|
function PopoverTrigger({
|
|
1720
1811
|
...props
|
|
1721
1812
|
}) {
|
|
1722
|
-
return /* @__PURE__ */ (0,
|
|
1813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1723
1814
|
}
|
|
1724
1815
|
function PopoverContent({
|
|
1725
1816
|
className,
|
|
@@ -1729,7 +1820,7 @@ function PopoverContent({
|
|
|
1729
1820
|
anchor,
|
|
1730
1821
|
...props
|
|
1731
1822
|
}) {
|
|
1732
|
-
return /* @__PURE__ */ (0,
|
|
1823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1733
1824
|
import_popover.Popover.Positioner,
|
|
1734
1825
|
{
|
|
1735
1826
|
align,
|
|
@@ -1737,7 +1828,7 @@ function PopoverContent({
|
|
|
1737
1828
|
sideOffset,
|
|
1738
1829
|
anchor,
|
|
1739
1830
|
className: "isolate z-50",
|
|
1740
|
-
children: /* @__PURE__ */ (0,
|
|
1831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1741
1832
|
import_popover.Popover.Popup,
|
|
1742
1833
|
{
|
|
1743
1834
|
"data-slot": "popover-content",
|
|
@@ -1753,20 +1844,20 @@ function PopoverContent({
|
|
|
1753
1844
|
}
|
|
1754
1845
|
|
|
1755
1846
|
// src/ui/combobox.tsx
|
|
1756
|
-
var
|
|
1847
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1757
1848
|
function Combobox({
|
|
1758
1849
|
open,
|
|
1759
1850
|
onOpenChange,
|
|
1760
1851
|
children
|
|
1761
1852
|
}) {
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1763
1854
|
}
|
|
1764
1855
|
function ComboboxTrigger({
|
|
1765
1856
|
className,
|
|
1766
1857
|
children,
|
|
1767
1858
|
...props
|
|
1768
1859
|
}) {
|
|
1769
|
-
return /* @__PURE__ */ (0,
|
|
1860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1770
1861
|
PopoverTrigger,
|
|
1771
1862
|
{
|
|
1772
1863
|
"data-slot": "combobox-trigger",
|
|
@@ -1776,8 +1867,8 @@ function ComboboxTrigger({
|
|
|
1776
1867
|
),
|
|
1777
1868
|
...props,
|
|
1778
1869
|
children: [
|
|
1779
|
-
/* @__PURE__ */ (0,
|
|
1780
|
-
/* @__PURE__ */ (0,
|
|
1870
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children }),
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.ChevronsUpDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
1781
1872
|
]
|
|
1782
1873
|
}
|
|
1783
1874
|
);
|
|
@@ -1787,7 +1878,7 @@ function ComboboxContent({
|
|
|
1787
1878
|
children,
|
|
1788
1879
|
...props
|
|
1789
1880
|
}) {
|
|
1790
|
-
return /* @__PURE__ */ (0,
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1791
1882
|
PopoverContent,
|
|
1792
1883
|
{
|
|
1793
1884
|
"data-slot": "combobox-content",
|
|
@@ -1801,12 +1892,12 @@ function ComboboxContent({
|
|
|
1801
1892
|
// src/ui/command.tsx
|
|
1802
1893
|
var import_cmdk = require("cmdk");
|
|
1803
1894
|
var import_lucide_react10 = require("lucide-react");
|
|
1804
|
-
var
|
|
1895
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1805
1896
|
function Command({
|
|
1806
1897
|
className,
|
|
1807
1898
|
...props
|
|
1808
1899
|
}) {
|
|
1809
|
-
return /* @__PURE__ */ (0,
|
|
1900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1810
1901
|
import_cmdk.Command,
|
|
1811
1902
|
{
|
|
1812
1903
|
"data-slot": "command",
|
|
@@ -1822,14 +1913,14 @@ function CommandInput({
|
|
|
1822
1913
|
className,
|
|
1823
1914
|
...props
|
|
1824
1915
|
}) {
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1826
1917
|
"div",
|
|
1827
1918
|
{
|
|
1828
1919
|
"data-slot": "command-input-wrapper",
|
|
1829
1920
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1830
1921
|
children: [
|
|
1831
|
-
/* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1833
1924
|
import_cmdk.Command.Input,
|
|
1834
1925
|
{
|
|
1835
1926
|
"data-slot": "command-input",
|
|
@@ -1848,7 +1939,7 @@ function CommandList({
|
|
|
1848
1939
|
className,
|
|
1849
1940
|
...props
|
|
1850
1941
|
}) {
|
|
1851
|
-
return /* @__PURE__ */ (0,
|
|
1942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1852
1943
|
import_cmdk.Command.List,
|
|
1853
1944
|
{
|
|
1854
1945
|
"data-slot": "command-list",
|
|
@@ -1863,7 +1954,7 @@ function CommandList({
|
|
|
1863
1954
|
function CommandEmpty({
|
|
1864
1955
|
...props
|
|
1865
1956
|
}) {
|
|
1866
|
-
return /* @__PURE__ */ (0,
|
|
1957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1867
1958
|
import_cmdk.Command.Empty,
|
|
1868
1959
|
{
|
|
1869
1960
|
"data-slot": "command-empty",
|
|
@@ -1876,7 +1967,7 @@ function CommandGroup({
|
|
|
1876
1967
|
className,
|
|
1877
1968
|
...props
|
|
1878
1969
|
}) {
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1880
1971
|
import_cmdk.Command.Group,
|
|
1881
1972
|
{
|
|
1882
1973
|
"data-slot": "command-group",
|
|
@@ -1892,7 +1983,7 @@ function CommandItem({
|
|
|
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.Item,
|
|
1897
1988
|
{
|
|
1898
1989
|
"data-slot": "command-item",
|
|
@@ -1906,7 +1997,7 @@ function CommandItem({
|
|
|
1906
1997
|
}
|
|
1907
1998
|
|
|
1908
1999
|
// src/components/components/Combobox/index.tsx
|
|
1909
|
-
var
|
|
2000
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1910
2001
|
function Combobox2({
|
|
1911
2002
|
name,
|
|
1912
2003
|
label,
|
|
@@ -1947,8 +2038,8 @@ function Combobox2({
|
|
|
1947
2038
|
onChange?.(option.value);
|
|
1948
2039
|
setOpen(false);
|
|
1949
2040
|
};
|
|
1950
|
-
const control = /* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2041
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1952
2043
|
ComboboxTrigger,
|
|
1953
2044
|
{
|
|
1954
2045
|
id: controlId,
|
|
@@ -1959,11 +2050,11 @@ function Combobox2({
|
|
|
1959
2050
|
children: selected ? selected.label : placeholder ?? ""
|
|
1960
2051
|
}
|
|
1961
2052
|
),
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
1966
|
-
/* @__PURE__ */ (0,
|
|
2053
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Command, { children: [
|
|
2054
|
+
searchable ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandInput, { placeholder }) : null,
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CommandList, { children: [
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandEmpty, { children: "\u65E0\u5339\u914D\u7ED3\u679C" }),
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1967
2058
|
CommandItem,
|
|
1968
2059
|
{
|
|
1969
2060
|
value: String(option.value),
|
|
@@ -1980,14 +2071,14 @@ function Combobox2({
|
|
|
1980
2071
|
] });
|
|
1981
2072
|
if (inForm && form && name) {
|
|
1982
2073
|
const error = form.errors[name];
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
2074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1984
2075
|
"div",
|
|
1985
2076
|
{
|
|
1986
2077
|
"data-slot": "form-item",
|
|
1987
2078
|
className: cn(formItemClass(form.layout), className),
|
|
1988
2079
|
style,
|
|
1989
2080
|
children: [
|
|
1990
|
-
label ? /* @__PURE__ */ (0,
|
|
2081
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1991
2082
|
"label",
|
|
1992
2083
|
{
|
|
1993
2084
|
htmlFor: controlId,
|
|
@@ -1996,7 +2087,7 @@ function Combobox2({
|
|
|
1996
2087
|
}
|
|
1997
2088
|
) : null,
|
|
1998
2089
|
control,
|
|
1999
|
-
error ? /* @__PURE__ */ (0,
|
|
2090
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2000
2091
|
]
|
|
2001
2092
|
}
|
|
2002
2093
|
);
|
|
@@ -2006,7 +2097,7 @@ function Combobox2({
|
|
|
2006
2097
|
|
|
2007
2098
|
// src/components/components/Command/index.tsx
|
|
2008
2099
|
var import_runtime5 = require("@pactor-app/runtime");
|
|
2009
|
-
var
|
|
2100
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2010
2101
|
function Command2({
|
|
2011
2102
|
groups = [],
|
|
2012
2103
|
placeholder,
|
|
@@ -2016,11 +2107,11 @@ function Command2({
|
|
|
2016
2107
|
style
|
|
2017
2108
|
}) {
|
|
2018
2109
|
const { t } = (0, import_runtime5.useI18n)();
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
groups.map((group, index) => /* @__PURE__ */ (0,
|
|
2110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Command, { className, style, children: [
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandInput, { placeholder }),
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CommandList, { children: [
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandEmpty, { children: emptyText ?? t("pactor.command.empty") }),
|
|
2114
|
+
groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CommandGroup, { heading: group.heading, children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2024
2115
|
CommandItem,
|
|
2025
2116
|
{
|
|
2026
2117
|
value: item.value,
|
|
@@ -2028,7 +2119,7 @@ function Command2({
|
|
|
2028
2119
|
disabled: item.disabled,
|
|
2029
2120
|
onSelect: (value) => onSelect?.(value),
|
|
2030
2121
|
children: [
|
|
2031
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2122
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2032
2123
|
item.label
|
|
2033
2124
|
]
|
|
2034
2125
|
},
|
|
@@ -2043,7 +2134,7 @@ var import_recharts2 = require("recharts");
|
|
|
2043
2134
|
|
|
2044
2135
|
// src/ui/chart.tsx
|
|
2045
2136
|
var import_recharts = require("recharts");
|
|
2046
|
-
var
|
|
2137
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2047
2138
|
var CHART_TOKEN_COLORS = [
|
|
2048
2139
|
"var(--chart-1)",
|
|
2049
2140
|
"var(--chart-2)",
|
|
@@ -2062,19 +2153,19 @@ function ChartContainer({
|
|
|
2062
2153
|
children,
|
|
2063
2154
|
...props
|
|
2064
2155
|
}) {
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2066
2157
|
"div",
|
|
2067
2158
|
{
|
|
2068
2159
|
"data-slot": "chart-container",
|
|
2069
2160
|
className: cn("h-64 w-full", className),
|
|
2070
2161
|
...props,
|
|
2071
|
-
children: /* @__PURE__ */ (0,
|
|
2162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children })
|
|
2072
2163
|
}
|
|
2073
2164
|
);
|
|
2074
2165
|
}
|
|
2075
2166
|
|
|
2076
2167
|
// src/components/components/Chart/index.tsx
|
|
2077
|
-
var
|
|
2168
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2078
2169
|
function Chart({
|
|
2079
2170
|
chartType,
|
|
2080
2171
|
data = [],
|
|
@@ -2085,17 +2176,17 @@ function Chart({
|
|
|
2085
2176
|
style
|
|
2086
2177
|
}) {
|
|
2087
2178
|
const series = yKeys.length > 0 ? yKeys : ["value"];
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2089
2180
|
"div",
|
|
2090
2181
|
{
|
|
2091
2182
|
"data-slot": "chart",
|
|
2092
2183
|
"data-chart-type": chartType,
|
|
2093
2184
|
className: cn("w-full", className),
|
|
2094
2185
|
style,
|
|
2095
|
-
children: /* @__PURE__ */ (0,
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2186
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChartContainer, { children: chartType === "pie" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.PieChart, { children: [
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2188
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}),
|
|
2189
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2099
2190
|
import_recharts2.Pie,
|
|
2100
2191
|
{
|
|
2101
2192
|
data,
|
|
@@ -2104,16 +2195,16 @@ function Chart({
|
|
|
2104
2195
|
innerRadius: 0,
|
|
2105
2196
|
outerRadius: "80%",
|
|
2106
2197
|
isAnimationActive: false,
|
|
2107
|
-
children: data.map((_, index) => /* @__PURE__ */ (0,
|
|
2198
|
+
children: data.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Cell, { fill: chartColor(index, colors) }, index))
|
|
2108
2199
|
}
|
|
2109
2200
|
)
|
|
2110
|
-
] }) : chartType === "line" ? /* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2113
|
-
/* @__PURE__ */ (0,
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2115
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2116
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2201
|
+
] }) : chartType === "line" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.LineChart, { data, children: [
|
|
2202
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2206
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2207
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2117
2208
|
import_recharts2.Line,
|
|
2118
2209
|
{
|
|
2119
2210
|
type: "monotone",
|
|
@@ -2124,13 +2215,13 @@ function Chart({
|
|
|
2124
2215
|
},
|
|
2125
2216
|
key
|
|
2126
2217
|
))
|
|
2127
|
-
] }) : chartType === "area" ? /* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2129
|
-
/* @__PURE__ */ (0,
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2132
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2133
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2218
|
+
] }) : chartType === "area" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.AreaChart, { data, children: [
|
|
2219
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2223
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2224
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2134
2225
|
import_recharts2.Area,
|
|
2135
2226
|
{
|
|
2136
2227
|
type: "monotone",
|
|
@@ -2143,13 +2234,13 @@ function Chart({
|
|
|
2143
2234
|
},
|
|
2144
2235
|
key
|
|
2145
2236
|
))
|
|
2146
|
-
] }) : /* @__PURE__ */ (0,
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2149
|
-
/* @__PURE__ */ (0,
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
series.length > 1 ? /* @__PURE__ */ (0,
|
|
2152
|
-
series.map((key, index) => /* @__PURE__ */ (0,
|
|
2237
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_recharts2.BarChart, { data, children: [
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.XAxis, { dataKey: xKey }),
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.YAxis, {}),
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Tooltip, {}),
|
|
2242
|
+
series.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_recharts2.Legend, {}) : null,
|
|
2243
|
+
series.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2153
2244
|
import_recharts2.Bar,
|
|
2154
2245
|
{
|
|
2155
2246
|
dataKey: key,
|
|
@@ -2170,12 +2261,12 @@ var import_lucide_react11 = require("lucide-react");
|
|
|
2170
2261
|
var import_react9 = require("react");
|
|
2171
2262
|
|
|
2172
2263
|
// src/ui/textarea.tsx
|
|
2173
|
-
var
|
|
2264
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2174
2265
|
function Textarea({
|
|
2175
2266
|
className,
|
|
2176
2267
|
...props
|
|
2177
2268
|
}) {
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2179
2270
|
"textarea",
|
|
2180
2271
|
{
|
|
2181
2272
|
"data-slot": "textarea",
|
|
@@ -2189,7 +2280,7 @@ function Textarea({
|
|
|
2189
2280
|
}
|
|
2190
2281
|
|
|
2191
2282
|
// src/components/components/ChatInput/index.tsx
|
|
2192
|
-
var
|
|
2283
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2193
2284
|
function ChatInput({
|
|
2194
2285
|
value,
|
|
2195
2286
|
placeholder,
|
|
@@ -2235,7 +2326,7 @@ function ChatInput({
|
|
|
2235
2326
|
const handleComposition = (event) => {
|
|
2236
2327
|
composingRef.current = event.type === "compositionstart";
|
|
2237
2328
|
};
|
|
2238
|
-
return /* @__PURE__ */ (0,
|
|
2329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2239
2330
|
"div",
|
|
2240
2331
|
{
|
|
2241
2332
|
"data-slot": "chat-input",
|
|
@@ -2245,8 +2336,8 @@ function ChatInput({
|
|
|
2245
2336
|
),
|
|
2246
2337
|
style,
|
|
2247
2338
|
children: [
|
|
2248
|
-
header ? /* @__PURE__ */ (0,
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2339
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "px-3 pt-3", children: renderChildren([header]) }) : null,
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2250
2341
|
Textarea,
|
|
2251
2342
|
{
|
|
2252
2343
|
value: text,
|
|
@@ -2260,11 +2351,11 @@ function ChatInput({
|
|
|
2260
2351
|
className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
|
|
2261
2352
|
}
|
|
2262
2353
|
),
|
|
2263
|
-
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0,
|
|
2354
|
+
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
|
|
2264
2355
|
toolbarStart ? renderChildren([toolbarStart]) : null,
|
|
2265
|
-
/* @__PURE__ */ (0,
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1" }),
|
|
2266
2357
|
toolbarEnd ? renderChildren([toolbarEnd]) : null,
|
|
2267
|
-
hideSend ? null : /* @__PURE__ */ (0,
|
|
2358
|
+
hideSend ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2268
2359
|
Button,
|
|
2269
2360
|
{
|
|
2270
2361
|
type: "button",
|
|
@@ -2273,20 +2364,20 @@ function ChatInput({
|
|
|
2273
2364
|
disabled: !canSubmit,
|
|
2274
2365
|
onClick: submit,
|
|
2275
2366
|
className: "size-8 rounded-full",
|
|
2276
|
-
children: /* @__PURE__ */ (0,
|
|
2367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react11.ArrowUp, {})
|
|
2277
2368
|
}
|
|
2278
2369
|
)
|
|
2279
2370
|
] }) : null,
|
|
2280
|
-
footer ? /* @__PURE__ */ (0,
|
|
2371
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-t border-border px-3 py-2", children: renderChildren([footer]) }) : null
|
|
2281
2372
|
]
|
|
2282
2373
|
}
|
|
2283
2374
|
);
|
|
2284
2375
|
}
|
|
2285
2376
|
|
|
2286
2377
|
// src/components/components/Content/index.tsx
|
|
2287
|
-
var
|
|
2378
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2288
2379
|
function Content({ className, style, children }) {
|
|
2289
|
-
return /* @__PURE__ */ (0,
|
|
2380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2290
2381
|
"main",
|
|
2291
2382
|
{
|
|
2292
2383
|
"data-slot": "layout-content",
|
|
@@ -2299,22 +2390,22 @@ function Content({ className, style, children }) {
|
|
|
2299
2390
|
|
|
2300
2391
|
// src/ui/context-menu.tsx
|
|
2301
2392
|
var import_context_menu = require("@base-ui/react/context-menu");
|
|
2302
|
-
var
|
|
2393
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2303
2394
|
function ContextMenu({
|
|
2304
2395
|
...props
|
|
2305
2396
|
}) {
|
|
2306
|
-
return /* @__PURE__ */ (0,
|
|
2397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
2307
2398
|
}
|
|
2308
2399
|
function ContextMenuTrigger({
|
|
2309
2400
|
...props
|
|
2310
2401
|
}) {
|
|
2311
|
-
return /* @__PURE__ */ (0,
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2312
2403
|
}
|
|
2313
2404
|
function ContextMenuContent({
|
|
2314
2405
|
className,
|
|
2315
2406
|
...props
|
|
2316
2407
|
}) {
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_context_menu.ContextMenu.Positioner, { className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2318
2409
|
import_context_menu.ContextMenu.Popup,
|
|
2319
2410
|
{
|
|
2320
2411
|
"data-slot": "context-menu-content",
|
|
@@ -2331,7 +2422,7 @@ function ContextMenuItem({
|
|
|
2331
2422
|
variant = "default",
|
|
2332
2423
|
...props
|
|
2333
2424
|
}) {
|
|
2334
|
-
return /* @__PURE__ */ (0,
|
|
2425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2335
2426
|
import_context_menu.ContextMenu.Item,
|
|
2336
2427
|
{
|
|
2337
2428
|
"data-slot": "context-menu-item",
|
|
@@ -2346,7 +2437,7 @@ function ContextMenuItem({
|
|
|
2346
2437
|
}
|
|
2347
2438
|
|
|
2348
2439
|
// src/components/components/ContextMenu/index.tsx
|
|
2349
|
-
var
|
|
2440
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2350
2441
|
function ContextMenu2({
|
|
2351
2442
|
items = [],
|
|
2352
2443
|
onSelect,
|
|
@@ -2354,16 +2445,16 @@ function ContextMenu2({
|
|
|
2354
2445
|
className,
|
|
2355
2446
|
style
|
|
2356
2447
|
}) {
|
|
2357
|
-
return /* @__PURE__ */ (0,
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ContextMenu, { children: [
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuTrigger, { children }),
|
|
2450
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2360
2451
|
ContextMenuItem,
|
|
2361
2452
|
{
|
|
2362
2453
|
variant: item.danger ? "destructive" : "default",
|
|
2363
2454
|
disabled: item.disabled,
|
|
2364
2455
|
onClick: () => onSelect?.(item.value),
|
|
2365
2456
|
children: [
|
|
2366
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2457
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2367
2458
|
item.label
|
|
2368
2459
|
]
|
|
2369
2460
|
},
|
|
@@ -2378,9 +2469,9 @@ var import_lucide_react12 = require("lucide-react");
|
|
|
2378
2469
|
var import_react10 = require("react");
|
|
2379
2470
|
|
|
2380
2471
|
// src/ui/input.tsx
|
|
2381
|
-
var
|
|
2472
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2382
2473
|
function Input({ className, type, ...props }) {
|
|
2383
|
-
return /* @__PURE__ */ (0,
|
|
2474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2384
2475
|
"input",
|
|
2385
2476
|
{
|
|
2386
2477
|
type,
|
|
@@ -2395,14 +2486,14 @@ function Input({ className, type, ...props }) {
|
|
|
2395
2486
|
}
|
|
2396
2487
|
|
|
2397
2488
|
// src/ui/table.tsx
|
|
2398
|
-
var
|
|
2489
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2399
2490
|
function Table2({ className, ...props }) {
|
|
2400
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2401
2492
|
"div",
|
|
2402
2493
|
{
|
|
2403
2494
|
"data-slot": "table-container",
|
|
2404
2495
|
className: "relative w-full overflow-x-auto",
|
|
2405
|
-
children: /* @__PURE__ */ (0,
|
|
2496
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2406
2497
|
"table",
|
|
2407
2498
|
{
|
|
2408
2499
|
"data-slot": "table",
|
|
@@ -2414,7 +2505,7 @@ function Table2({ className, ...props }) {
|
|
|
2414
2505
|
);
|
|
2415
2506
|
}
|
|
2416
2507
|
function TableHeader({ className, ...props }) {
|
|
2417
|
-
return /* @__PURE__ */ (0,
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2418
2509
|
"thead",
|
|
2419
2510
|
{
|
|
2420
2511
|
"data-slot": "table-header",
|
|
@@ -2424,7 +2515,7 @@ function TableHeader({ className, ...props }) {
|
|
|
2424
2515
|
);
|
|
2425
2516
|
}
|
|
2426
2517
|
function TableBody({ className, ...props }) {
|
|
2427
|
-
return /* @__PURE__ */ (0,
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2428
2519
|
"tbody",
|
|
2429
2520
|
{
|
|
2430
2521
|
"data-slot": "table-body",
|
|
@@ -2434,7 +2525,7 @@ function TableBody({ className, ...props }) {
|
|
|
2434
2525
|
);
|
|
2435
2526
|
}
|
|
2436
2527
|
function TableRow({ className, ...props }) {
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2438
2529
|
"tr",
|
|
2439
2530
|
{
|
|
2440
2531
|
"data-slot": "table-row",
|
|
@@ -2447,7 +2538,7 @@ function TableRow({ className, ...props }) {
|
|
|
2447
2538
|
);
|
|
2448
2539
|
}
|
|
2449
2540
|
function TableHead({ className, ...props }) {
|
|
2450
|
-
return /* @__PURE__ */ (0,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2451
2542
|
"th",
|
|
2452
2543
|
{
|
|
2453
2544
|
"data-slot": "table-head",
|
|
@@ -2460,7 +2551,7 @@ function TableHead({ className, ...props }) {
|
|
|
2460
2551
|
);
|
|
2461
2552
|
}
|
|
2462
2553
|
function TableCell({ className, ...props }) {
|
|
2463
|
-
return /* @__PURE__ */ (0,
|
|
2554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2464
2555
|
"td",
|
|
2465
2556
|
{
|
|
2466
2557
|
"data-slot": "table-cell",
|
|
@@ -2474,7 +2565,7 @@ function TableCell({ className, ...props }) {
|
|
|
2474
2565
|
}
|
|
2475
2566
|
|
|
2476
2567
|
// src/components/components/DataTable/index.tsx
|
|
2477
|
-
var
|
|
2568
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2478
2569
|
function renderCellValue(value) {
|
|
2479
2570
|
if (value === void 0 || value === null) {
|
|
2480
2571
|
return "";
|
|
@@ -2543,12 +2634,12 @@ function DataTable({
|
|
|
2543
2634
|
setCurrent(page);
|
|
2544
2635
|
onPageChange?.(page);
|
|
2545
2636
|
};
|
|
2546
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2548
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Table2, { children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
|
|
2549
2640
|
const sorted = sortState?.key === column.key;
|
|
2550
|
-
return /* @__PURE__ */ (0,
|
|
2551
|
-
column.sortable ? /* @__PURE__ */ (0,
|
|
2641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2642
|
+
column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2552
2643
|
"button",
|
|
2553
2644
|
{
|
|
2554
2645
|
type: "button",
|
|
@@ -2559,7 +2650,7 @@ function DataTable({
|
|
|
2559
2650
|
onClick: () => toggleSort(column),
|
|
2560
2651
|
children: [
|
|
2561
2652
|
column.title,
|
|
2562
|
-
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0,
|
|
2653
|
+
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.ArrowUp, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.ArrowDown, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2563
2654
|
import_lucide_react12.ArrowUpDown,
|
|
2564
2655
|
{
|
|
2565
2656
|
"aria-hidden": true,
|
|
@@ -2568,8 +2659,8 @@ function DataTable({
|
|
|
2568
2659
|
)
|
|
2569
2660
|
]
|
|
2570
2661
|
}
|
|
2571
|
-
) : /* @__PURE__ */ (0,
|
|
2572
|
-
column.filterable ? /* @__PURE__ */ (0,
|
|
2662
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: column.title }),
|
|
2663
|
+
column.filterable ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2573
2664
|
Input,
|
|
2574
2665
|
{
|
|
2575
2666
|
"data-slot": "data-table-filter",
|
|
@@ -2582,7 +2673,7 @@ function DataTable({
|
|
|
2582
2673
|
) : null
|
|
2583
2674
|
] }) }, column.key ?? String(index));
|
|
2584
2675
|
}) }) }),
|
|
2585
|
-
/* @__PURE__ */ (0,
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2586
2677
|
"div",
|
|
2587
2678
|
{
|
|
2588
2679
|
"data-slot": "table-empty",
|
|
@@ -2591,20 +2682,20 @@ function DataTable({
|
|
|
2591
2682
|
}
|
|
2592
2683
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
2593
2684
|
const key = row[rowKey];
|
|
2594
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2595
2686
|
TableRow,
|
|
2596
2687
|
{
|
|
2597
2688
|
children: columns.map((column, columnIndex) => {
|
|
2598
2689
|
const template = column.children ?? column.renderChildren;
|
|
2599
|
-
return /* @__PURE__ */ (0,
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableCell, { children: template ? renderChildren(template, { row, rowIndex }) : renderCellValue(row[column.key]) }, column.key ?? String(columnIndex));
|
|
2600
2691
|
})
|
|
2601
2692
|
},
|
|
2602
2693
|
key === void 0 || key === null ? rowIndex : String(key)
|
|
2603
2694
|
);
|
|
2604
2695
|
}) })
|
|
2605
2696
|
] }),
|
|
2606
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
2607
|
-
(page) => /* @__PURE__ */ (0,
|
|
2697
|
+
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(
|
|
2698
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2608
2699
|
Button,
|
|
2609
2700
|
{
|
|
2610
2701
|
type: "button",
|
|
@@ -2626,7 +2717,7 @@ var import_date_fns2 = require("date-fns");
|
|
|
2626
2717
|
var import_locale = require("date-fns/locale");
|
|
2627
2718
|
var import_lucide_react13 = require("lucide-react");
|
|
2628
2719
|
var import_react11 = require("react");
|
|
2629
|
-
var
|
|
2720
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2630
2721
|
function toDateFnsLocale(locale) {
|
|
2631
2722
|
switch (locale) {
|
|
2632
2723
|
case "zh-CN":
|
|
@@ -2798,13 +2889,13 @@ function DatePicker(props) {
|
|
|
2798
2889
|
} : void 0;
|
|
2799
2890
|
const displayText = isRange ? typeof current === "object" && current !== null ? `${current.start} ~ ${current.end}` : "" : typeof current === "string" ? current : "";
|
|
2800
2891
|
const placeholderText = placeholder ?? t(isRange ? "pactor.datePicker.placeholderRange" : "pactor.datePicker.placeholder");
|
|
2801
|
-
const calendar = isRange ? /* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2892
|
+
const calendar = isRange ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex", children: [
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2803
2894
|
"div",
|
|
2804
2895
|
{
|
|
2805
2896
|
"data-slot": "datepicker-start-panel",
|
|
2806
2897
|
className: "border-r border-border",
|
|
2807
|
-
children: /* @__PURE__ */ (0,
|
|
2898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2808
2899
|
Calendar2,
|
|
2809
2900
|
{
|
|
2810
2901
|
mode: "single",
|
|
@@ -2818,7 +2909,7 @@ function DatePicker(props) {
|
|
|
2818
2909
|
)
|
|
2819
2910
|
}
|
|
2820
2911
|
),
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2822
2913
|
Calendar2,
|
|
2823
2914
|
{
|
|
2824
2915
|
mode: "single",
|
|
@@ -2830,7 +2921,7 @@ function DatePicker(props) {
|
|
|
2830
2921
|
locale: dfLocale
|
|
2831
2922
|
}
|
|
2832
2923
|
) })
|
|
2833
|
-
] }) : /* @__PURE__ */ (0,
|
|
2924
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2834
2925
|
Calendar2,
|
|
2835
2926
|
{
|
|
2836
2927
|
mode: "single",
|
|
@@ -2839,8 +2930,8 @@ function DatePicker(props) {
|
|
|
2839
2930
|
locale: dfLocale
|
|
2840
2931
|
}
|
|
2841
2932
|
);
|
|
2842
|
-
const control = /* @__PURE__ */ (0,
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
2933
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2844
2935
|
PopoverTrigger,
|
|
2845
2936
|
{
|
|
2846
2937
|
id: controlId,
|
|
@@ -2854,20 +2945,20 @@ function DatePicker(props) {
|
|
|
2854
2945
|
),
|
|
2855
2946
|
style: inForm ? void 0 : style,
|
|
2856
2947
|
children: [
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2858
|
-
/* @__PURE__ */ (0,
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholderText : displayText }),
|
|
2949
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react13.Calendar, { className: "size-4 shrink-0 opacity-50" })
|
|
2859
2950
|
]
|
|
2860
2951
|
}
|
|
2861
2952
|
),
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2953
|
+
/* @__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: [
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2864
2955
|
"div",
|
|
2865
2956
|
{
|
|
2866
2957
|
"data-slot": "datepicker-presets",
|
|
2867
2958
|
className: "flex flex-col gap-1 border-r border-border p-3",
|
|
2868
2959
|
children: presetList.map((preset, index) => {
|
|
2869
2960
|
const resolved = resolvePreset(preset);
|
|
2870
|
-
return /* @__PURE__ */ (0,
|
|
2961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2871
2962
|
"button",
|
|
2872
2963
|
{
|
|
2873
2964
|
type: "button",
|
|
@@ -2885,14 +2976,14 @@ function DatePicker(props) {
|
|
|
2885
2976
|
] });
|
|
2886
2977
|
if (inForm && form && name) {
|
|
2887
2978
|
const error = form.errors[name];
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
2979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2889
2980
|
"div",
|
|
2890
2981
|
{
|
|
2891
2982
|
"data-slot": "form-item",
|
|
2892
2983
|
className: cn(formItemClass(form.layout), className),
|
|
2893
2984
|
style,
|
|
2894
2985
|
children: [
|
|
2895
|
-
label ? /* @__PURE__ */ (0,
|
|
2986
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2896
2987
|
"label",
|
|
2897
2988
|
{
|
|
2898
2989
|
htmlFor: controlId,
|
|
@@ -2901,7 +2992,7 @@ function DatePicker(props) {
|
|
|
2901
2992
|
}
|
|
2902
2993
|
) : null,
|
|
2903
2994
|
control,
|
|
2904
|
-
error ? /* @__PURE__ */ (0,
|
|
2995
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2905
2996
|
]
|
|
2906
2997
|
}
|
|
2907
2998
|
);
|
|
@@ -2916,27 +3007,27 @@ var import_react12 = require("react");
|
|
|
2916
3007
|
// src/ui/dialog.tsx
|
|
2917
3008
|
var import_dialog = require("@base-ui/react/dialog");
|
|
2918
3009
|
var import_lucide_react14 = require("lucide-react");
|
|
2919
|
-
var
|
|
3010
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2920
3011
|
function Dialog({
|
|
2921
3012
|
...props
|
|
2922
3013
|
}) {
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
3014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
2924
3015
|
}
|
|
2925
3016
|
function DialogTrigger({
|
|
2926
3017
|
...props
|
|
2927
3018
|
}) {
|
|
2928
|
-
return /* @__PURE__ */ (0,
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
2929
3020
|
}
|
|
2930
3021
|
function DialogPortal({
|
|
2931
3022
|
...props
|
|
2932
3023
|
}) {
|
|
2933
|
-
return /* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
2934
3025
|
}
|
|
2935
3026
|
function DialogOverlay({
|
|
2936
3027
|
className,
|
|
2937
3028
|
...props
|
|
2938
3029
|
}) {
|
|
2939
|
-
return /* @__PURE__ */ (0,
|
|
3030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2940
3031
|
import_dialog.Dialog.Backdrop,
|
|
2941
3032
|
{
|
|
2942
3033
|
"data-slot": "dialog-overlay",
|
|
@@ -2954,9 +3045,9 @@ function DialogContent({
|
|
|
2954
3045
|
showCloseButton = true,
|
|
2955
3046
|
...props
|
|
2956
3047
|
}) {
|
|
2957
|
-
return /* @__PURE__ */ (0,
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
3048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DialogOverlay, {}),
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2960
3051
|
import_dialog.Dialog.Popup,
|
|
2961
3052
|
{
|
|
2962
3053
|
"data-slot": "dialog-content",
|
|
@@ -2967,11 +3058,11 @@ function DialogContent({
|
|
|
2967
3058
|
...props,
|
|
2968
3059
|
children: [
|
|
2969
3060
|
children,
|
|
2970
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
3061
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2971
3062
|
import_dialog.Dialog.Close,
|
|
2972
3063
|
{
|
|
2973
3064
|
"data-slot": "dialog-close",
|
|
2974
|
-
render: /* @__PURE__ */ (0,
|
|
3065
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2975
3066
|
"button",
|
|
2976
3067
|
{
|
|
2977
3068
|
type: "button",
|
|
@@ -2979,8 +3070,8 @@ function DialogContent({
|
|
|
2979
3070
|
}
|
|
2980
3071
|
),
|
|
2981
3072
|
children: [
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
2983
|
-
/* @__PURE__ */ (0,
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react14.XIcon, {}),
|
|
3074
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2984
3075
|
]
|
|
2985
3076
|
}
|
|
2986
3077
|
)
|
|
@@ -2990,7 +3081,7 @@ function DialogContent({
|
|
|
2990
3081
|
] });
|
|
2991
3082
|
}
|
|
2992
3083
|
function DialogHeader({ className, ...props }) {
|
|
2993
|
-
return /* @__PURE__ */ (0,
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2994
3085
|
"div",
|
|
2995
3086
|
{
|
|
2996
3087
|
"data-slot": "dialog-header",
|
|
@@ -3003,7 +3094,7 @@ function DialogTitle({
|
|
|
3003
3094
|
className,
|
|
3004
3095
|
...props
|
|
3005
3096
|
}) {
|
|
3006
|
-
return /* @__PURE__ */ (0,
|
|
3097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3007
3098
|
import_dialog.Dialog.Title,
|
|
3008
3099
|
{
|
|
3009
3100
|
"data-slot": "dialog-title",
|
|
@@ -3016,7 +3107,7 @@ function DialogDescription({
|
|
|
3016
3107
|
className,
|
|
3017
3108
|
...props
|
|
3018
3109
|
}) {
|
|
3019
|
-
return /* @__PURE__ */ (0,
|
|
3110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3020
3111
|
import_dialog.Dialog.Description,
|
|
3021
3112
|
{
|
|
3022
3113
|
"data-slot": "dialog-description",
|
|
@@ -3027,7 +3118,7 @@ function DialogDescription({
|
|
|
3027
3118
|
}
|
|
3028
3119
|
|
|
3029
3120
|
// src/components/components/Dialog/index.tsx
|
|
3030
|
-
var
|
|
3121
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3031
3122
|
function Dialog2({
|
|
3032
3123
|
title,
|
|
3033
3124
|
description,
|
|
@@ -3042,7 +3133,7 @@ function Dialog2({
|
|
|
3042
3133
|
const [innerOpen, setInnerOpen] = (0, import_react12.useState)(false);
|
|
3043
3134
|
const controlled = open !== void 0;
|
|
3044
3135
|
const visible = controlled ? open : innerOpen;
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
3136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3046
3137
|
Dialog,
|
|
3047
3138
|
{
|
|
3048
3139
|
open: visible,
|
|
@@ -3055,7 +3146,7 @@ function Dialog2({
|
|
|
3055
3146
|
}
|
|
3056
3147
|
},
|
|
3057
3148
|
children: [
|
|
3058
|
-
trigger ? /* @__PURE__ */ (0,
|
|
3149
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3059
3150
|
DialogTrigger,
|
|
3060
3151
|
{
|
|
3061
3152
|
nativeButton: false,
|
|
@@ -3063,10 +3154,10 @@ function Dialog2({
|
|
|
3063
3154
|
children: renderChildren([trigger])
|
|
3064
3155
|
}
|
|
3065
3156
|
) : null,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3068
|
-
title ? /* @__PURE__ */ (0,
|
|
3069
|
-
description ? /* @__PURE__ */ (0,
|
|
3157
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogContent, { className, style, children: [
|
|
3158
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogHeader, { children: [
|
|
3159
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogTitle, { children: title }) : null,
|
|
3160
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogDescription, { children: description }) : null
|
|
3070
3161
|
] }) : null,
|
|
3071
3162
|
children
|
|
3072
3163
|
] })
|
|
@@ -3077,22 +3168,22 @@ function Dialog2({
|
|
|
3077
3168
|
|
|
3078
3169
|
// src/ui/drawer.tsx
|
|
3079
3170
|
var import_vaul = require("vaul");
|
|
3080
|
-
var
|
|
3171
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3081
3172
|
function Drawer({
|
|
3082
3173
|
...props
|
|
3083
3174
|
}) {
|
|
3084
|
-
return /* @__PURE__ */ (0,
|
|
3175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
3085
3176
|
}
|
|
3086
3177
|
function DrawerPortal({
|
|
3087
3178
|
...props
|
|
3088
3179
|
}) {
|
|
3089
|
-
return /* @__PURE__ */ (0,
|
|
3180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
3090
3181
|
}
|
|
3091
3182
|
function DrawerOverlay({
|
|
3092
3183
|
className,
|
|
3093
3184
|
...props
|
|
3094
3185
|
}) {
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3096
3187
|
import_vaul.Drawer.Overlay,
|
|
3097
3188
|
{
|
|
3098
3189
|
"data-slot": "drawer-overlay",
|
|
@@ -3106,9 +3197,9 @@ function DrawerContent({
|
|
|
3106
3197
|
children,
|
|
3107
3198
|
...props
|
|
3108
3199
|
}) {
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3111
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DrawerOverlay, {}),
|
|
3202
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
3112
3203
|
import_vaul.Drawer.Content,
|
|
3113
3204
|
{
|
|
3114
3205
|
"data-slot": "drawer-content",
|
|
@@ -3122,7 +3213,7 @@ function DrawerContent({
|
|
|
3122
3213
|
),
|
|
3123
3214
|
...props,
|
|
3124
3215
|
children: [
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3216
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
3126
3217
|
children
|
|
3127
3218
|
]
|
|
3128
3219
|
}
|
|
@@ -3130,7 +3221,7 @@ function DrawerContent({
|
|
|
3130
3221
|
] });
|
|
3131
3222
|
}
|
|
3132
3223
|
function DrawerHeader({ className, ...props }) {
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3134
3225
|
"div",
|
|
3135
3226
|
{
|
|
3136
3227
|
"data-slot": "drawer-header",
|
|
@@ -3143,7 +3234,7 @@ function DrawerTitle({
|
|
|
3143
3234
|
className,
|
|
3144
3235
|
...props
|
|
3145
3236
|
}) {
|
|
3146
|
-
return /* @__PURE__ */ (0,
|
|
3237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3147
3238
|
import_vaul.Drawer.Title,
|
|
3148
3239
|
{
|
|
3149
3240
|
"data-slot": "drawer-title",
|
|
@@ -3154,7 +3245,7 @@ function DrawerTitle({
|
|
|
3154
3245
|
}
|
|
3155
3246
|
|
|
3156
3247
|
// src/components/components/Drawer/index.tsx
|
|
3157
|
-
var
|
|
3248
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3158
3249
|
function Drawer2({
|
|
3159
3250
|
title,
|
|
3160
3251
|
open,
|
|
@@ -3164,7 +3255,7 @@ function Drawer2({
|
|
|
3164
3255
|
className,
|
|
3165
3256
|
style
|
|
3166
3257
|
}) {
|
|
3167
|
-
return /* @__PURE__ */ (0,
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3168
3259
|
Drawer,
|
|
3169
3260
|
{
|
|
3170
3261
|
direction: placement,
|
|
@@ -3174,9 +3265,9 @@ function Drawer2({
|
|
|
3174
3265
|
onClose?.();
|
|
3175
3266
|
}
|
|
3176
3267
|
},
|
|
3177
|
-
children: /* @__PURE__ */ (0,
|
|
3178
|
-
title ? /* @__PURE__ */ (0,
|
|
3179
|
-
/* @__PURE__ */ (0,
|
|
3268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DrawerContent, { className, style, children: [
|
|
3269
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerTitle, { children: title }) }) : null,
|
|
3270
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1 overflow-auto p-4", children })
|
|
3180
3271
|
] })
|
|
3181
3272
|
}
|
|
3182
3273
|
);
|
|
@@ -3185,16 +3276,16 @@ function Drawer2({
|
|
|
3185
3276
|
// src/ui/dropdown-menu.tsx
|
|
3186
3277
|
var import_menu = require("@base-ui/react/menu");
|
|
3187
3278
|
var import_lucide_react15 = require("lucide-react");
|
|
3188
|
-
var
|
|
3279
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3189
3280
|
function DropdownMenu({
|
|
3190
3281
|
...props
|
|
3191
3282
|
}) {
|
|
3192
|
-
return /* @__PURE__ */ (0,
|
|
3283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3193
3284
|
}
|
|
3194
3285
|
function DropdownMenuTrigger({
|
|
3195
3286
|
...props
|
|
3196
3287
|
}) {
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
3198
3289
|
}
|
|
3199
3290
|
function DropdownMenuContent({
|
|
3200
3291
|
className,
|
|
@@ -3203,14 +3294,14 @@ function DropdownMenuContent({
|
|
|
3203
3294
|
sideOffset = 4,
|
|
3204
3295
|
...props
|
|
3205
3296
|
}) {
|
|
3206
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3207
3298
|
import_menu.Menu.Positioner,
|
|
3208
3299
|
{
|
|
3209
3300
|
align,
|
|
3210
3301
|
side,
|
|
3211
3302
|
sideOffset,
|
|
3212
3303
|
className: "isolate z-50",
|
|
3213
|
-
children: /* @__PURE__ */ (0,
|
|
3304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3214
3305
|
import_menu.Menu.Popup,
|
|
3215
3306
|
{
|
|
3216
3307
|
"data-slot": "dropdown-menu-content",
|
|
@@ -3229,7 +3320,7 @@ function DropdownMenuItem({
|
|
|
3229
3320
|
variant = "default",
|
|
3230
3321
|
...props
|
|
3231
3322
|
}) {
|
|
3232
|
-
return /* @__PURE__ */ (0,
|
|
3323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3233
3324
|
import_menu.Menu.Item,
|
|
3234
3325
|
{
|
|
3235
3326
|
"data-slot": "dropdown-menu-item",
|
|
@@ -3245,14 +3336,14 @@ function DropdownMenuItem({
|
|
|
3245
3336
|
function DropdownMenuSub({
|
|
3246
3337
|
...props
|
|
3247
3338
|
}) {
|
|
3248
|
-
return /* @__PURE__ */ (0,
|
|
3339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
3249
3340
|
}
|
|
3250
3341
|
function DropdownMenuSubTrigger({
|
|
3251
3342
|
className,
|
|
3252
3343
|
children,
|
|
3253
3344
|
...props
|
|
3254
3345
|
}) {
|
|
3255
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3256
3347
|
import_menu.Menu.SubmenuTrigger,
|
|
3257
3348
|
{
|
|
3258
3349
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -3263,7 +3354,7 @@ function DropdownMenuSubTrigger({
|
|
|
3263
3354
|
...props,
|
|
3264
3355
|
children: [
|
|
3265
3356
|
children,
|
|
3266
|
-
/* @__PURE__ */ (0,
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.ChevronRightIcon, { className: "ml-auto" })
|
|
3267
3358
|
]
|
|
3268
3359
|
}
|
|
3269
3360
|
);
|
|
@@ -3273,7 +3364,7 @@ function DropdownMenuSubContent({
|
|
|
3273
3364
|
sideOffset = 2,
|
|
3274
3365
|
...props
|
|
3275
3366
|
}) {
|
|
3276
|
-
return /* @__PURE__ */ (0,
|
|
3367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_menu.Menu.Positioner, { sideOffset, className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3277
3368
|
import_menu.Menu.Popup,
|
|
3278
3369
|
{
|
|
3279
3370
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -3287,7 +3378,7 @@ function DropdownMenuSubContent({
|
|
|
3287
3378
|
}
|
|
3288
3379
|
|
|
3289
3380
|
// src/components/components/DropdownMenu/index.tsx
|
|
3290
|
-
var
|
|
3381
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3291
3382
|
function DropdownMenu2({
|
|
3292
3383
|
items = [],
|
|
3293
3384
|
onSelect,
|
|
@@ -3295,8 +3386,8 @@ function DropdownMenu2({
|
|
|
3295
3386
|
className,
|
|
3296
3387
|
style
|
|
3297
3388
|
}) {
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
-
/* @__PURE__ */ (0,
|
|
3389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3300
3391
|
DropdownMenuTrigger,
|
|
3301
3392
|
{
|
|
3302
3393
|
nativeButton: false,
|
|
@@ -3304,14 +3395,14 @@ function DropdownMenu2({
|
|
|
3304
3395
|
children
|
|
3305
3396
|
}
|
|
3306
3397
|
),
|
|
3307
|
-
/* @__PURE__ */ (0,
|
|
3398
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3308
3399
|
DropdownMenuItem,
|
|
3309
3400
|
{
|
|
3310
3401
|
variant: item.danger ? "destructive" : "default",
|
|
3311
3402
|
disabled: item.disabled,
|
|
3312
3403
|
onClick: () => onSelect?.(item.value),
|
|
3313
3404
|
children: [
|
|
3314
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3405
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3315
3406
|
item.label
|
|
3316
3407
|
]
|
|
3317
3408
|
},
|
|
@@ -3321,9 +3412,9 @@ function DropdownMenu2({
|
|
|
3321
3412
|
}
|
|
3322
3413
|
|
|
3323
3414
|
// src/ui/empty.tsx
|
|
3324
|
-
var
|
|
3415
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3325
3416
|
function Empty({ className, ...props }) {
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3327
3418
|
"div",
|
|
3328
3419
|
{
|
|
3329
3420
|
"data-slot": "empty",
|
|
@@ -3336,7 +3427,7 @@ function Empty({ className, ...props }) {
|
|
|
3336
3427
|
);
|
|
3337
3428
|
}
|
|
3338
3429
|
function EmptyHeader({ className, ...props }) {
|
|
3339
|
-
return /* @__PURE__ */ (0,
|
|
3430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3340
3431
|
"div",
|
|
3341
3432
|
{
|
|
3342
3433
|
"data-slot": "empty-header",
|
|
@@ -3346,7 +3437,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3346
3437
|
);
|
|
3347
3438
|
}
|
|
3348
3439
|
function EmptyTitle({ className, ...props }) {
|
|
3349
|
-
return /* @__PURE__ */ (0,
|
|
3440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3350
3441
|
"div",
|
|
3351
3442
|
{
|
|
3352
3443
|
"data-slot": "empty-title",
|
|
@@ -3356,7 +3447,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
3356
3447
|
);
|
|
3357
3448
|
}
|
|
3358
3449
|
function EmptyDescription({ className, ...props }) {
|
|
3359
|
-
return /* @__PURE__ */ (0,
|
|
3450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3360
3451
|
"p",
|
|
3361
3452
|
{
|
|
3362
3453
|
"data-slot": "empty-description",
|
|
@@ -3366,7 +3457,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
3366
3457
|
);
|
|
3367
3458
|
}
|
|
3368
3459
|
function EmptyContent({ className, ...props }) {
|
|
3369
|
-
return /* @__PURE__ */ (0,
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3370
3461
|
"div",
|
|
3371
3462
|
{
|
|
3372
3463
|
"data-slot": "empty-content",
|
|
@@ -3380,22 +3471,22 @@ function EmptyContent({ className, ...props }) {
|
|
|
3380
3471
|
}
|
|
3381
3472
|
|
|
3382
3473
|
// src/components/components/Empty/index.tsx
|
|
3383
|
-
var
|
|
3474
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3384
3475
|
function Empty2({ title, description, children, className, style }) {
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3386
|
-
/* @__PURE__ */ (0,
|
|
3387
|
-
title ? /* @__PURE__ */ (0,
|
|
3388
|
-
description ? /* @__PURE__ */ (0,
|
|
3476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Empty, { className, style, children: [
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(EmptyHeader, { children: [
|
|
3478
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyTitle, { children: title }) : null,
|
|
3479
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyDescription, { children: description }) : null
|
|
3389
3480
|
] }),
|
|
3390
|
-
children ? /* @__PURE__ */ (0,
|
|
3481
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EmptyContent, { children }) : null
|
|
3391
3482
|
] });
|
|
3392
3483
|
}
|
|
3393
3484
|
|
|
3394
3485
|
// src/ui/field.tsx
|
|
3395
3486
|
var import_field = require("@base-ui/react/field");
|
|
3396
|
-
var
|
|
3487
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3397
3488
|
function Field({ className, ...props }) {
|
|
3398
|
-
return /* @__PURE__ */ (0,
|
|
3489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3399
3490
|
import_field.Field.Root,
|
|
3400
3491
|
{
|
|
3401
3492
|
"data-slot": "field",
|
|
@@ -3405,7 +3496,7 @@ function Field({ className, ...props }) {
|
|
|
3405
3496
|
);
|
|
3406
3497
|
}
|
|
3407
3498
|
function FieldLabel({ className, ...props }) {
|
|
3408
|
-
return /* @__PURE__ */ (0,
|
|
3499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3409
3500
|
import_field.Field.Label,
|
|
3410
3501
|
{
|
|
3411
3502
|
"data-slot": "field-label",
|
|
@@ -3415,7 +3506,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
3415
3506
|
);
|
|
3416
3507
|
}
|
|
3417
3508
|
function FieldDescription({ className, ...props }) {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3419
3510
|
import_field.Field.Description,
|
|
3420
3511
|
{
|
|
3421
3512
|
"data-slot": "field-description",
|
|
@@ -3425,7 +3516,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
3425
3516
|
);
|
|
3426
3517
|
}
|
|
3427
3518
|
function FieldError({ className, ...props }) {
|
|
3428
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3429
3520
|
import_field.Field.Error,
|
|
3430
3521
|
{
|
|
3431
3522
|
"data-slot": "field-error",
|
|
@@ -3436,24 +3527,24 @@ function FieldError({ className, ...props }) {
|
|
|
3436
3527
|
}
|
|
3437
3528
|
|
|
3438
3529
|
// src/components/components/Field/index.tsx
|
|
3439
|
-
var
|
|
3530
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3440
3531
|
function Field2({ label, required, description, error, children, className, style }) {
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
-
label ? /* @__PURE__ */ (0,
|
|
3443
|
-
required ? /* @__PURE__ */ (0,
|
|
3532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
|
|
3533
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
|
|
3534
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
|
|
3444
3535
|
"*",
|
|
3445
3536
|
" "
|
|
3446
3537
|
] }) : null,
|
|
3447
3538
|
label
|
|
3448
3539
|
] }) : null,
|
|
3449
3540
|
children,
|
|
3450
|
-
description ? /* @__PURE__ */ (0,
|
|
3451
|
-
error ? /* @__PURE__ */ (0,
|
|
3541
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldDescription, { children: description }) : null,
|
|
3542
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, children: error }) : null
|
|
3452
3543
|
] });
|
|
3453
3544
|
}
|
|
3454
3545
|
|
|
3455
3546
|
// src/components/components/Flex/index.tsx
|
|
3456
|
-
var
|
|
3547
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3457
3548
|
var gapClass = {
|
|
3458
3549
|
small: "gap-(--flex-gap-sm)",
|
|
3459
3550
|
middle: "gap-(--flex-gap-md)",
|
|
@@ -3483,7 +3574,7 @@ function Flex({
|
|
|
3483
3574
|
style,
|
|
3484
3575
|
children
|
|
3485
3576
|
}) {
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3487
3578
|
"div",
|
|
3488
3579
|
{
|
|
3489
3580
|
"data-slot": "flex",
|
|
@@ -3503,9 +3594,9 @@ function Flex({
|
|
|
3503
3594
|
}
|
|
3504
3595
|
|
|
3505
3596
|
// src/components/components/Footer/index.tsx
|
|
3506
|
-
var
|
|
3597
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3507
3598
|
function Footer({ className, style, children }) {
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3509
3600
|
"footer",
|
|
3510
3601
|
{
|
|
3511
3602
|
"data-slot": "layout-footer",
|
|
@@ -3522,7 +3613,7 @@ function Footer({ className, style, children }) {
|
|
|
3522
3613
|
// src/components/components/Form/index.tsx
|
|
3523
3614
|
var import_runtime10 = require("@pactor-app/runtime");
|
|
3524
3615
|
var import_react13 = require("react");
|
|
3525
|
-
var
|
|
3616
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3526
3617
|
function isEmpty(value) {
|
|
3527
3618
|
return value === void 0 || value === null || value === "";
|
|
3528
3619
|
}
|
|
@@ -3603,7 +3694,7 @@ function Form({
|
|
|
3603
3694
|
context.state.set("form", values);
|
|
3604
3695
|
onSubmit?.(values);
|
|
3605
3696
|
};
|
|
3606
|
-
return /* @__PURE__ */ (0,
|
|
3697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FormContextProvider, { value: formContext, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3607
3698
|
"form",
|
|
3608
3699
|
{
|
|
3609
3700
|
"data-slot": "form",
|
|
@@ -3617,10 +3708,10 @@ function Form({
|
|
|
3617
3708
|
|
|
3618
3709
|
// src/components/components/Grid/index.tsx
|
|
3619
3710
|
var import_react14 = require("react");
|
|
3620
|
-
var
|
|
3711
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3621
3712
|
function Grid({ columns = 1, gap, className, style, children }) {
|
|
3622
3713
|
const cols = Math.max(1, columns);
|
|
3623
|
-
return /* @__PURE__ */ (0,
|
|
3714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3624
3715
|
"div",
|
|
3625
3716
|
{
|
|
3626
3717
|
"data-slot": "grid",
|
|
@@ -3631,7 +3722,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3631
3722
|
...gap !== void 0 ? { gap } : {},
|
|
3632
3723
|
...style
|
|
3633
3724
|
},
|
|
3634
|
-
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0,
|
|
3725
|
+
children: import_react14.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { "data-slot": "grid-item", children: child }, index))
|
|
3635
3726
|
}
|
|
3636
3727
|
);
|
|
3637
3728
|
}
|
|
@@ -3639,7 +3730,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3639
3730
|
// src/components/components/Header/index.tsx
|
|
3640
3731
|
var import_runtime11 = require("@pactor-app/runtime");
|
|
3641
3732
|
var import_lucide_react16 = require("lucide-react");
|
|
3642
|
-
var
|
|
3733
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3643
3734
|
var menuItemClass = "flex items-center gap-1 rounded-md px-3 py-2 text-sm transition-colors text-muted-foreground hover:bg-accent/50 hover:text-foreground";
|
|
3644
3735
|
function Header({
|
|
3645
3736
|
logo,
|
|
@@ -3670,10 +3761,10 @@ function Header({
|
|
|
3670
3761
|
className
|
|
3671
3762
|
);
|
|
3672
3763
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
3673
|
-
return /* @__PURE__ */ (0,
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
3674
3765
|
}
|
|
3675
|
-
const brandNode = hasBrand && /* @__PURE__ */ (0,
|
|
3676
|
-
logo !== void 0 && /* @__PURE__ */ (0,
|
|
3766
|
+
const brandNode = hasBrand && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
3767
|
+
logo !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3677
3768
|
"img",
|
|
3678
3769
|
{
|
|
3679
3770
|
"data-slot": "header-brand-logo",
|
|
@@ -3682,23 +3773,23 @@ function Header({
|
|
|
3682
3773
|
className: "h-8 w-8 shrink-0 object-contain"
|
|
3683
3774
|
}
|
|
3684
3775
|
),
|
|
3685
|
-
title !== void 0 && /* @__PURE__ */ (0,
|
|
3776
|
+
title !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
|
|
3686
3777
|
] });
|
|
3687
|
-
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0,
|
|
3778
|
+
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
3688
3779
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
3689
3780
|
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
-
showLeft && /* @__PURE__ */ (0,
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
3782
|
+
showLeft && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
3692
3783
|
brandLeft && brandNode,
|
|
3693
3784
|
dropdownLeft && dropdownNode,
|
|
3694
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
3785
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
|
|
3695
3786
|
] }),
|
|
3696
|
-
/* @__PURE__ */ (0,
|
|
3697
|
-
showRight && /* @__PURE__ */ (0,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
|
|
3788
|
+
showRight && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
3698
3789
|
dropdownRight && dropdownNode,
|
|
3699
3790
|
brandRight && brandNode,
|
|
3700
|
-
hasLocales && /* @__PURE__ */ (0,
|
|
3701
|
-
hasUser && /* @__PURE__ */ (0,
|
|
3791
|
+
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
3792
|
+
hasUser && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
3702
3793
|
] })
|
|
3703
3794
|
] });
|
|
3704
3795
|
}
|
|
@@ -3706,25 +3797,25 @@ function HeaderDropdownArea({
|
|
|
3706
3797
|
dropdown,
|
|
3707
3798
|
onSelect
|
|
3708
3799
|
}) {
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3710
|
-
/* @__PURE__ */ (0,
|
|
3800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3711
3802
|
DropdownMenuTrigger,
|
|
3712
3803
|
{
|
|
3713
3804
|
"data-slot": "header-dropdown",
|
|
3714
3805
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3715
3806
|
children: [
|
|
3716
3807
|
dropdown.label,
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3808
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3718
3809
|
]
|
|
3719
3810
|
}
|
|
3720
3811
|
),
|
|
3721
|
-
/* @__PURE__ */ (0,
|
|
3812
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3722
3813
|
DropdownMenuItem,
|
|
3723
3814
|
{
|
|
3724
3815
|
disabled: item.disabled,
|
|
3725
3816
|
onClick: () => onSelect?.(item.value),
|
|
3726
3817
|
children: [
|
|
3727
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3818
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3728
3819
|
item.label
|
|
3729
3820
|
]
|
|
3730
3821
|
},
|
|
@@ -3736,23 +3827,23 @@ function HeaderMenuArea({
|
|
|
3736
3827
|
items,
|
|
3737
3828
|
onSelect
|
|
3738
3829
|
}) {
|
|
3739
|
-
return /* @__PURE__ */ (0,
|
|
3740
|
-
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0,
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
3830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
|
|
3831
|
+
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3832
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3742
3833
|
DropdownMenuTrigger,
|
|
3743
3834
|
{
|
|
3744
3835
|
"data-slot": "header-menu-item",
|
|
3745
3836
|
"data-key": item.key,
|
|
3746
3837
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3747
3838
|
children: [
|
|
3748
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3839
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3749
3840
|
item.label,
|
|
3750
|
-
/* @__PURE__ */ (0,
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3751
3842
|
]
|
|
3752
3843
|
}
|
|
3753
3844
|
),
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
3755
|
-
] }, item.key) : /* @__PURE__ */ (0,
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3846
|
+
] }, item.key) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3756
3847
|
"button",
|
|
3757
3848
|
{
|
|
3758
3849
|
type: "button",
|
|
@@ -3761,7 +3852,7 @@ function HeaderMenuArea({
|
|
|
3761
3852
|
className: menuItemClass,
|
|
3762
3853
|
onClick: () => onSelect?.(item.key),
|
|
3763
3854
|
children: [
|
|
3764
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3855
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3765
3856
|
item.label
|
|
3766
3857
|
]
|
|
3767
3858
|
},
|
|
@@ -3774,16 +3865,16 @@ function HeaderMenuEntry({
|
|
|
3774
3865
|
onSelect
|
|
3775
3866
|
}) {
|
|
3776
3867
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
3777
|
-
return /* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3779
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSub, { children: [
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
|
|
3870
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3780
3871
|
item.label
|
|
3781
3872
|
] }),
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3783
3874
|
] });
|
|
3784
3875
|
}
|
|
3785
|
-
return /* @__PURE__ */ (0,
|
|
3786
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
|
|
3877
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3787
3878
|
item.label
|
|
3788
3879
|
] });
|
|
3789
3880
|
}
|
|
@@ -3791,18 +3882,18 @@ function HeaderUserArea({
|
|
|
3791
3882
|
user,
|
|
3792
3883
|
onSelect
|
|
3793
3884
|
}) {
|
|
3794
|
-
const identity = /* @__PURE__ */ (0,
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3796
|
-
user.avatar !== void 0 && /* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
3885
|
+
const identity = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
3886
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Avatar, { className: "size-7", children: [
|
|
3887
|
+
user.avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AvatarFallback, { children: user.name.charAt(0) })
|
|
3798
3889
|
] }),
|
|
3799
|
-
/* @__PURE__ */ (0,
|
|
3890
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm", children: user.name })
|
|
3800
3891
|
] });
|
|
3801
3892
|
if (user.items === void 0 || user.items.length === 0) {
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
3893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
|
|
3803
3894
|
}
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3806
3897
|
DropdownMenuTrigger,
|
|
3807
3898
|
{
|
|
3808
3899
|
"data-slot": "header-user",
|
|
@@ -3810,8 +3901,8 @@ function HeaderUserArea({
|
|
|
3810
3901
|
children: identity
|
|
3811
3902
|
}
|
|
3812
3903
|
),
|
|
3813
|
-
/* @__PURE__ */ (0,
|
|
3814
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3904
|
+
/* @__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: [
|
|
3905
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3815
3906
|
item.label
|
|
3816
3907
|
] }, item.value)) })
|
|
3817
3908
|
] });
|
|
@@ -3822,19 +3913,19 @@ function HeaderLocalesArea({
|
|
|
3822
3913
|
}) {
|
|
3823
3914
|
const { locale } = (0, import_runtime11.useI18n)();
|
|
3824
3915
|
const current = locales.find((option) => option.value === locale);
|
|
3825
|
-
return /* @__PURE__ */ (0,
|
|
3826
|
-
/* @__PURE__ */ (0,
|
|
3916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(DropdownMenu, { children: [
|
|
3917
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3827
3918
|
DropdownMenuTrigger,
|
|
3828
3919
|
{
|
|
3829
3920
|
"data-slot": "header-locales",
|
|
3830
3921
|
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
3831
3922
|
children: [
|
|
3832
3923
|
current?.label ?? locale,
|
|
3833
|
-
/* @__PURE__ */ (0,
|
|
3924
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react16.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3834
3925
|
]
|
|
3835
3926
|
}
|
|
3836
3927
|
),
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3838
3929
|
DropdownMenuItem,
|
|
3839
3930
|
{
|
|
3840
3931
|
onClick: () => onSelect?.(option.value),
|
|
@@ -3850,16 +3941,16 @@ var import_runtime12 = require("@pactor-app/runtime");
|
|
|
3850
3941
|
|
|
3851
3942
|
// src/ui/hover-card.tsx
|
|
3852
3943
|
var import_preview_card = require("@base-ui/react/preview-card");
|
|
3853
|
-
var
|
|
3944
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3854
3945
|
function HoverCard({
|
|
3855
3946
|
...props
|
|
3856
3947
|
}) {
|
|
3857
|
-
return /* @__PURE__ */ (0,
|
|
3948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Root, { "data-slot": "hover-card", ...props });
|
|
3858
3949
|
}
|
|
3859
3950
|
function HoverCardTrigger({
|
|
3860
3951
|
...props
|
|
3861
3952
|
}) {
|
|
3862
|
-
return /* @__PURE__ */ (0,
|
|
3953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3863
3954
|
}
|
|
3864
3955
|
function HoverCardContent({
|
|
3865
3956
|
className,
|
|
@@ -3868,14 +3959,14 @@ function HoverCardContent({
|
|
|
3868
3959
|
sideOffset = 4,
|
|
3869
3960
|
...props
|
|
3870
3961
|
}) {
|
|
3871
|
-
return /* @__PURE__ */ (0,
|
|
3962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_preview_card.PreviewCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3872
3963
|
import_preview_card.PreviewCard.Positioner,
|
|
3873
3964
|
{
|
|
3874
3965
|
align,
|
|
3875
3966
|
side,
|
|
3876
3967
|
sideOffset,
|
|
3877
3968
|
className: "isolate z-50",
|
|
3878
|
-
children: /* @__PURE__ */ (0,
|
|
3969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3879
3970
|
import_preview_card.PreviewCard.Popup,
|
|
3880
3971
|
{
|
|
3881
3972
|
"data-slot": "hover-card-content",
|
|
@@ -3891,22 +3982,22 @@ function HoverCardContent({
|
|
|
3891
3982
|
}
|
|
3892
3983
|
|
|
3893
3984
|
// src/components/components/HoverCard/index.tsx
|
|
3894
|
-
var
|
|
3985
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3895
3986
|
function isDslNode2(value) {
|
|
3896
3987
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
3897
3988
|
}
|
|
3898
3989
|
function HoverCard2({ content, children, className, style }) {
|
|
3899
3990
|
const { renderChildren } = (0, import_runtime12.useRenderer)();
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(HoverCard, { children: [
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
|
|
3903
3994
|
] });
|
|
3904
3995
|
}
|
|
3905
3996
|
|
|
3906
3997
|
// src/components/components/Input/index.tsx
|
|
3907
3998
|
var import_runtime13 = require("@pactor-app/runtime");
|
|
3908
3999
|
var import_react15 = require("react");
|
|
3909
|
-
var
|
|
4000
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3910
4001
|
function Input2({
|
|
3911
4002
|
name,
|
|
3912
4003
|
label,
|
|
@@ -3942,7 +4033,7 @@ function Input2({
|
|
|
3942
4033
|
onChange?.("");
|
|
3943
4034
|
};
|
|
3944
4035
|
const inFormRoot = inForm === true;
|
|
3945
|
-
const input = /* @__PURE__ */ (0,
|
|
4036
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3946
4037
|
Input,
|
|
3947
4038
|
{
|
|
3948
4039
|
id: controlId,
|
|
@@ -3963,7 +4054,7 @@ function Input2({
|
|
|
3963
4054
|
}
|
|
3964
4055
|
}
|
|
3965
4056
|
);
|
|
3966
|
-
const clearButton = showClear ? /* @__PURE__ */ (0,
|
|
4057
|
+
const clearButton = showClear ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3967
4058
|
"button",
|
|
3968
4059
|
{
|
|
3969
4060
|
type: "button",
|
|
@@ -3973,7 +4064,7 @@ function Input2({
|
|
|
3973
4064
|
children: "\xD7"
|
|
3974
4065
|
}
|
|
3975
4066
|
) : null;
|
|
3976
|
-
const control = allowClear === true ? /* @__PURE__ */ (0,
|
|
4067
|
+
const control = allowClear === true ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3977
4068
|
"span",
|
|
3978
4069
|
{
|
|
3979
4070
|
className: cn(
|
|
@@ -3990,14 +4081,14 @@ function Input2({
|
|
|
3990
4081
|
) : input;
|
|
3991
4082
|
if (inForm && form && name) {
|
|
3992
4083
|
const error = form.errors[name];
|
|
3993
|
-
return /* @__PURE__ */ (0,
|
|
4084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3994
4085
|
"div",
|
|
3995
4086
|
{
|
|
3996
4087
|
"data-slot": "form-item",
|
|
3997
4088
|
className: cn(formItemClass(form.layout), className),
|
|
3998
4089
|
style,
|
|
3999
4090
|
children: [
|
|
4000
|
-
label ? /* @__PURE__ */ (0,
|
|
4091
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4001
4092
|
"label",
|
|
4002
4093
|
{
|
|
4003
4094
|
htmlFor: controlId,
|
|
@@ -4006,7 +4097,7 @@ function Input2({
|
|
|
4006
4097
|
}
|
|
4007
4098
|
) : null,
|
|
4008
4099
|
control,
|
|
4009
|
-
error ? /* @__PURE__ */ (0,
|
|
4100
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4010
4101
|
]
|
|
4011
4102
|
}
|
|
4012
4103
|
);
|
|
@@ -4015,9 +4106,9 @@ function Input2({
|
|
|
4015
4106
|
}
|
|
4016
4107
|
|
|
4017
4108
|
// src/ui/input-group.tsx
|
|
4018
|
-
var
|
|
4109
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4019
4110
|
function InputGroup({ className, ...props }) {
|
|
4020
|
-
return /* @__PURE__ */ (0,
|
|
4111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4021
4112
|
"div",
|
|
4022
4113
|
{
|
|
4023
4114
|
"data-slot": "input-group",
|
|
@@ -4036,9 +4127,9 @@ function InputGroup({ className, ...props }) {
|
|
|
4036
4127
|
}
|
|
4037
4128
|
|
|
4038
4129
|
// src/components/components/InputGroup/index.tsx
|
|
4039
|
-
var
|
|
4130
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4040
4131
|
function InputGroup2({ className, style, children }) {
|
|
4041
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InputGroup, { className, style, children });
|
|
4042
4133
|
}
|
|
4043
4134
|
|
|
4044
4135
|
// src/components/components/InputOTP/index.tsx
|
|
@@ -4048,13 +4139,13 @@ var import_react16 = require("react");
|
|
|
4048
4139
|
var import_input_otp = require("input-otp");
|
|
4049
4140
|
var import_lucide_react17 = require("lucide-react");
|
|
4050
4141
|
var React4 = __toESM(require("react"), 1);
|
|
4051
|
-
var
|
|
4142
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4052
4143
|
function InputOTP({
|
|
4053
4144
|
className,
|
|
4054
4145
|
containerClassName,
|
|
4055
4146
|
...props
|
|
4056
4147
|
}) {
|
|
4057
|
-
return /* @__PURE__ */ (0,
|
|
4148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4058
4149
|
import_input_otp.OTPInput,
|
|
4059
4150
|
{
|
|
4060
4151
|
"data-slot": "input-otp",
|
|
@@ -4068,7 +4159,7 @@ function InputOTP({
|
|
|
4068
4159
|
);
|
|
4069
4160
|
}
|
|
4070
4161
|
function InputOTPGroup({ className, ...props }) {
|
|
4071
|
-
return /* @__PURE__ */ (0,
|
|
4162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4072
4163
|
"div",
|
|
4073
4164
|
{
|
|
4074
4165
|
"data-slot": "input-otp-group",
|
|
@@ -4084,7 +4175,7 @@ function InputOTPSlot({
|
|
|
4084
4175
|
}) {
|
|
4085
4176
|
const inputOTPContext = React4.useContext(import_input_otp.OTPInputContext);
|
|
4086
4177
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4087
|
-
return /* @__PURE__ */ (0,
|
|
4178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
4088
4179
|
"div",
|
|
4089
4180
|
{
|
|
4090
4181
|
"data-slot": "input-otp-slot",
|
|
@@ -4096,14 +4187,14 @@ function InputOTPSlot({
|
|
|
4096
4187
|
...props,
|
|
4097
4188
|
children: [
|
|
4098
4189
|
char,
|
|
4099
|
-
hasFakeCaret ? /* @__PURE__ */ (0,
|
|
4190
|
+
hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
|
|
4100
4191
|
]
|
|
4101
4192
|
}
|
|
4102
4193
|
);
|
|
4103
4194
|
}
|
|
4104
4195
|
|
|
4105
4196
|
// src/components/components/InputOTP/index.tsx
|
|
4106
|
-
var
|
|
4197
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4107
4198
|
function InputOTP2({
|
|
4108
4199
|
name,
|
|
4109
4200
|
label,
|
|
@@ -4141,42 +4232,42 @@ function InputOTP2({
|
|
|
4141
4232
|
onComplete?.(next);
|
|
4142
4233
|
}
|
|
4143
4234
|
};
|
|
4144
|
-
const control = /* @__PURE__ */ (0,
|
|
4235
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4145
4236
|
InputOTP,
|
|
4146
4237
|
{
|
|
4147
4238
|
maxLength: length,
|
|
4148
4239
|
value: current,
|
|
4149
4240
|
onChange: handleChange,
|
|
4150
4241
|
disabled,
|
|
4151
|
-
children: /* @__PURE__ */ (0,
|
|
4242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(InputOTPSlot, { index }, index)) })
|
|
4152
4243
|
}
|
|
4153
4244
|
);
|
|
4154
4245
|
if (inForm && form && name) {
|
|
4155
4246
|
const error = form.errors[name];
|
|
4156
|
-
return /* @__PURE__ */ (0,
|
|
4247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
4157
4248
|
"div",
|
|
4158
4249
|
{
|
|
4159
4250
|
"data-slot": "form-item",
|
|
4160
4251
|
className: cn(formItemClass(form.layout), className),
|
|
4161
4252
|
style,
|
|
4162
4253
|
children: [
|
|
4163
|
-
label ? /* @__PURE__ */ (0,
|
|
4254
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
4164
4255
|
control,
|
|
4165
|
-
error ? /* @__PURE__ */ (0,
|
|
4256
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4166
4257
|
]
|
|
4167
4258
|
}
|
|
4168
4259
|
);
|
|
4169
4260
|
}
|
|
4170
|
-
return /* @__PURE__ */ (0,
|
|
4261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
|
|
4171
4262
|
}
|
|
4172
4263
|
|
|
4173
4264
|
// src/components/components/Item/index.tsx
|
|
4174
4265
|
var import_runtime14 = require("@pactor-app/runtime");
|
|
4175
4266
|
|
|
4176
4267
|
// src/ui/item.tsx
|
|
4177
|
-
var
|
|
4268
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4178
4269
|
function Item({ className, ...props }) {
|
|
4179
|
-
return /* @__PURE__ */ (0,
|
|
4270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4180
4271
|
"div",
|
|
4181
4272
|
{
|
|
4182
4273
|
"data-slot": "item",
|
|
@@ -4189,7 +4280,7 @@ function Item({ className, ...props }) {
|
|
|
4189
4280
|
);
|
|
4190
4281
|
}
|
|
4191
4282
|
function ItemMedia({ className, ...props }) {
|
|
4192
|
-
return /* @__PURE__ */ (0,
|
|
4283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4193
4284
|
"div",
|
|
4194
4285
|
{
|
|
4195
4286
|
"data-slot": "item-media",
|
|
@@ -4202,7 +4293,7 @@ function ItemMedia({ className, ...props }) {
|
|
|
4202
4293
|
);
|
|
4203
4294
|
}
|
|
4204
4295
|
function ItemContent({ className, ...props }) {
|
|
4205
|
-
return /* @__PURE__ */ (0,
|
|
4296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4206
4297
|
"div",
|
|
4207
4298
|
{
|
|
4208
4299
|
"data-slot": "item-content",
|
|
@@ -4212,7 +4303,7 @@ function ItemContent({ className, ...props }) {
|
|
|
4212
4303
|
);
|
|
4213
4304
|
}
|
|
4214
4305
|
function ItemTitle({ className, ...props }) {
|
|
4215
|
-
return /* @__PURE__ */ (0,
|
|
4306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4216
4307
|
"div",
|
|
4217
4308
|
{
|
|
4218
4309
|
"data-slot": "item-title",
|
|
@@ -4222,7 +4313,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
4222
4313
|
);
|
|
4223
4314
|
}
|
|
4224
4315
|
function ItemDescription({ className, ...props }) {
|
|
4225
|
-
return /* @__PURE__ */ (0,
|
|
4316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4226
4317
|
"p",
|
|
4227
4318
|
{
|
|
4228
4319
|
"data-slot": "item-description",
|
|
@@ -4232,7 +4323,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
4232
4323
|
);
|
|
4233
4324
|
}
|
|
4234
4325
|
function ItemActions({ className, ...props }) {
|
|
4235
|
-
return /* @__PURE__ */ (0,
|
|
4326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4236
4327
|
"div",
|
|
4237
4328
|
{
|
|
4238
4329
|
"data-slot": "item-actions",
|
|
@@ -4243,7 +4334,7 @@ function ItemActions({ className, ...props }) {
|
|
|
4243
4334
|
}
|
|
4244
4335
|
|
|
4245
4336
|
// src/components/components/Item/index.tsx
|
|
4246
|
-
var
|
|
4337
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4247
4338
|
function Item2({
|
|
4248
4339
|
title,
|
|
4249
4340
|
description,
|
|
@@ -4254,20 +4345,20 @@ function Item2({
|
|
|
4254
4345
|
}) {
|
|
4255
4346
|
const { renderChildren } = (0, import_runtime14.useRenderer)();
|
|
4256
4347
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4257
|
-
return /* @__PURE__ */ (0,
|
|
4258
|
-
mediaNodes.length > 0 ? /* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
title ? /* @__PURE__ */ (0,
|
|
4261
|
-
description ? /* @__PURE__ */ (0,
|
|
4348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Item, { className, style, children: [
|
|
4349
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
4350
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(ItemContent, { children: [
|
|
4351
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemTitle, { children: title }) : null,
|
|
4352
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemDescription, { children: description }) : null
|
|
4262
4353
|
] }),
|
|
4263
|
-
actions && actions.length > 0 ? /* @__PURE__ */ (0,
|
|
4354
|
+
actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ItemActions, { children: renderChildren(actions) }) : null
|
|
4264
4355
|
] });
|
|
4265
4356
|
}
|
|
4266
4357
|
|
|
4267
4358
|
// src/ui/kbd.tsx
|
|
4268
|
-
var
|
|
4359
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4269
4360
|
function Kbd({ className, ...props }) {
|
|
4270
|
-
return /* @__PURE__ */ (0,
|
|
4361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4271
4362
|
"kbd",
|
|
4272
4363
|
{
|
|
4273
4364
|
"data-slot": "kbd",
|
|
@@ -4281,18 +4372,18 @@ function Kbd({ className, ...props }) {
|
|
|
4281
4372
|
}
|
|
4282
4373
|
|
|
4283
4374
|
// src/components/components/Kbd/index.tsx
|
|
4284
|
-
var
|
|
4375
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4285
4376
|
function Kbd2({ text, className, style }) {
|
|
4286
|
-
return /* @__PURE__ */ (0,
|
|
4377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Kbd, { className, style, children: text });
|
|
4287
4378
|
}
|
|
4288
4379
|
|
|
4289
4380
|
// src/ui/label.tsx
|
|
4290
|
-
var
|
|
4381
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4291
4382
|
function Label({
|
|
4292
4383
|
className,
|
|
4293
4384
|
...props
|
|
4294
4385
|
}) {
|
|
4295
|
-
return /* @__PURE__ */ (0,
|
|
4386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4296
4387
|
"label",
|
|
4297
4388
|
{
|
|
4298
4389
|
"data-slot": "label",
|
|
@@ -4306,22 +4397,22 @@ function Label({
|
|
|
4306
4397
|
}
|
|
4307
4398
|
|
|
4308
4399
|
// src/components/components/Label/index.tsx
|
|
4309
|
-
var
|
|
4400
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4310
4401
|
function Label2({ text, htmlFor, className, style }) {
|
|
4311
|
-
return /* @__PURE__ */ (0,
|
|
4402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Label, { htmlFor, className, style, children: text });
|
|
4312
4403
|
}
|
|
4313
4404
|
|
|
4314
4405
|
// src/components/components/Layout/index.tsx
|
|
4315
4406
|
var import_core = require("@pactor-app/core");
|
|
4316
4407
|
var import_runtime15 = require("@pactor-app/runtime");
|
|
4317
|
-
var
|
|
4408
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4318
4409
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4319
4410
|
const { renderChildren, context } = (0, import_runtime15.useRenderer)();
|
|
4320
4411
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4321
4412
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4322
4413
|
) : false;
|
|
4323
4414
|
const dir = direction ?? (hasSider ? "horizontal" : "vertical");
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4325
4416
|
"div",
|
|
4326
4417
|
{
|
|
4327
4418
|
"data-slot": "layout",
|
|
@@ -4345,10 +4436,10 @@ function resolveRootType(node, context) {
|
|
|
4345
4436
|
}
|
|
4346
4437
|
|
|
4347
4438
|
// src/components/components/Link/index.tsx
|
|
4348
|
-
var
|
|
4439
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4349
4440
|
function Link2({ href, text, target, className, style, children }) {
|
|
4350
4441
|
const handleSpaClick = useSpaLinkClick();
|
|
4351
|
-
return /* @__PURE__ */ (0,
|
|
4442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4352
4443
|
"a",
|
|
4353
4444
|
{
|
|
4354
4445
|
"data-slot": "link",
|
|
@@ -4366,73 +4457,13 @@ function Link2({ href, text, target, className, style, children }) {
|
|
|
4366
4457
|
// src/components/components/Menu/index.tsx
|
|
4367
4458
|
var import_react19 = require("react");
|
|
4368
4459
|
|
|
4369
|
-
// src/ui/tooltip.tsx
|
|
4370
|
-
var import_tooltip = require("@base-ui/react/tooltip");
|
|
4371
|
-
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4372
|
-
function TooltipProvider({
|
|
4373
|
-
delay = 0,
|
|
4374
|
-
...props
|
|
4375
|
-
}) {
|
|
4376
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4377
|
-
import_tooltip.Tooltip.Provider,
|
|
4378
|
-
{
|
|
4379
|
-
"data-slot": "tooltip-provider",
|
|
4380
|
-
delay,
|
|
4381
|
-
...props
|
|
4382
|
-
}
|
|
4383
|
-
);
|
|
4384
|
-
}
|
|
4385
|
-
function Tooltip2({
|
|
4386
|
-
...props
|
|
4387
|
-
}) {
|
|
4388
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
4389
|
-
}
|
|
4390
|
-
function TooltipTrigger({
|
|
4391
|
-
...props
|
|
4392
|
-
}) {
|
|
4393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4394
|
-
}
|
|
4395
|
-
function TooltipContent({
|
|
4396
|
-
className,
|
|
4397
|
-
side = "top",
|
|
4398
|
-
sideOffset = 4,
|
|
4399
|
-
align = "center",
|
|
4400
|
-
children,
|
|
4401
|
-
...props
|
|
4402
|
-
}) {
|
|
4403
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4404
|
-
import_tooltip.Tooltip.Positioner,
|
|
4405
|
-
{
|
|
4406
|
-
align,
|
|
4407
|
-
side,
|
|
4408
|
-
sideOffset,
|
|
4409
|
-
className: "isolate z-50",
|
|
4410
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4411
|
-
import_tooltip.Tooltip.Popup,
|
|
4412
|
-
{
|
|
4413
|
-
"data-slot": "tooltip-content",
|
|
4414
|
-
className: cn(
|
|
4415
|
-
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4416
|
-
className
|
|
4417
|
-
),
|
|
4418
|
-
...props,
|
|
4419
|
-
children: [
|
|
4420
|
-
children,
|
|
4421
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
4422
|
-
]
|
|
4423
|
-
}
|
|
4424
|
-
)
|
|
4425
|
-
}
|
|
4426
|
-
) });
|
|
4427
|
-
}
|
|
4428
|
-
|
|
4429
4460
|
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
4430
4461
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4431
4462
|
function RailTooltip({
|
|
4432
4463
|
label,
|
|
4433
4464
|
children
|
|
4434
4465
|
}) {
|
|
4435
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Tooltip, { children: [
|
|
4436
4467
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipTrigger, { render: children }),
|
|
4437
4468
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
4438
4469
|
] });
|
|
@@ -4947,7 +4978,7 @@ function SidebarMenuButton({
|
|
|
4947
4978
|
children: tooltip
|
|
4948
4979
|
};
|
|
4949
4980
|
}
|
|
4950
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Tooltip, { children: [
|
|
4951
4982
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TooltipTrigger, { render: button }),
|
|
4952
4983
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4953
4984
|
TooltipContent,
|
|
@@ -6406,7 +6437,8 @@ function Select2({
|
|
|
6406
6437
|
"span",
|
|
6407
6438
|
{
|
|
6408
6439
|
className: cn(
|
|
6409
|
-
|
|
6440
|
+
// Form / Field(Form 上下文)内控件占满整行宽度;独立渲染保持内容自然宽度
|
|
6441
|
+
inFormRoot ? "flex w-full items-center gap-1" : "inline-flex items-center gap-1",
|
|
6410
6442
|
!inFormRoot && className,
|
|
6411
6443
|
controlClassName
|
|
6412
6444
|
),
|
|
@@ -6421,7 +6453,7 @@ function Select2({
|
|
|
6421
6453
|
disabled,
|
|
6422
6454
|
name: inForm ? name : void 0,
|
|
6423
6455
|
children: [
|
|
6424
|
-
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6456
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
|
|
6425
6457
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
6426
6458
|
SelectItem,
|
|
6427
6459
|
{
|
|
@@ -7059,7 +7091,8 @@ var tabsListVariants = (0, import_class_variance_authority7.cva)(
|
|
|
7059
7091
|
variants: {
|
|
7060
7092
|
variant: {
|
|
7061
7093
|
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
7062
|
-
line
|
|
7094
|
+
// line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
|
|
7095
|
+
line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
7063
7096
|
}
|
|
7064
7097
|
},
|
|
7065
7098
|
defaultVariants: {
|
|
@@ -7095,8 +7128,9 @@ function TabsTrigger({
|
|
|
7095
7128
|
// default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
|
|
7096
7129
|
"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",
|
|
7097
7130
|
// line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
|
|
7098
|
-
//(叠在 List
|
|
7099
|
-
|
|
7131
|
+
//(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
|
|
7132
|
+
// flex-1 拉伸,触发器保持自然宽度
|
|
7133
|
+
"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",
|
|
7100
7134
|
className
|
|
7101
7135
|
),
|
|
7102
7136
|
...props
|
|
@@ -7119,7 +7153,16 @@ function TabsContent({
|
|
|
7119
7153
|
|
|
7120
7154
|
// src/components/components/Tabs/index.tsx
|
|
7121
7155
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7122
|
-
function Tabs2({
|
|
7156
|
+
function Tabs2({
|
|
7157
|
+
items = [],
|
|
7158
|
+
activeKey,
|
|
7159
|
+
variant,
|
|
7160
|
+
onChange,
|
|
7161
|
+
contentClassName,
|
|
7162
|
+
contentStyle,
|
|
7163
|
+
className,
|
|
7164
|
+
style
|
|
7165
|
+
}) {
|
|
7123
7166
|
const { renderChildren } = (0, import_runtime22.useRenderer)();
|
|
7124
7167
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
7125
7168
|
Tabs,
|
|
@@ -7131,7 +7174,16 @@ function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
|
|
|
7131
7174
|
style,
|
|
7132
7175
|
children: [
|
|
7133
7176
|
/* @__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)) }),
|
|
7134
|
-
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7177
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7178
|
+
TabsContent,
|
|
7179
|
+
{
|
|
7180
|
+
value: item.key,
|
|
7181
|
+
className: cn(contentClassName, item.className),
|
|
7182
|
+
style: { ...contentStyle, ...item.style },
|
|
7183
|
+
children: renderChildren(item.children)
|
|
7184
|
+
},
|
|
7185
|
+
item.key
|
|
7186
|
+
))
|
|
7135
7187
|
]
|
|
7136
7188
|
}
|
|
7137
7189
|
);
|
|
@@ -7146,9 +7198,15 @@ var typeClassMap = {
|
|
|
7146
7198
|
warning: "text-warning",
|
|
7147
7199
|
danger: "text-destructive"
|
|
7148
7200
|
};
|
|
7201
|
+
var sizeClassMap = {
|
|
7202
|
+
small: "text-xs",
|
|
7203
|
+
middle: "",
|
|
7204
|
+
large: "text-lg"
|
|
7205
|
+
};
|
|
7149
7206
|
function Text({
|
|
7150
7207
|
text,
|
|
7151
7208
|
type = "default",
|
|
7209
|
+
size = "middle",
|
|
7152
7210
|
strong,
|
|
7153
7211
|
delete: del,
|
|
7154
7212
|
underline,
|
|
@@ -7164,6 +7222,7 @@ function Text({
|
|
|
7164
7222
|
"data-type": type,
|
|
7165
7223
|
className: cn(
|
|
7166
7224
|
typeClassMap[type],
|
|
7225
|
+
sizeClassMap[size],
|
|
7167
7226
|
strong && "font-semibold",
|
|
7168
7227
|
del && "line-through",
|
|
7169
7228
|
underline && "underline",
|
|
@@ -7415,7 +7474,7 @@ function ToggleGroup2({
|
|
|
7415
7474
|
// src/components/components/Tooltip/index.tsx
|
|
7416
7475
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
7417
7476
|
function Tooltip3({ content, children, className, style }) {
|
|
7418
|
-
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
7477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Tooltip, { children: [
|
|
7419
7478
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
7420
7479
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipContent, { className, style, children: content })
|
|
7421
7480
|
] });
|