@pactor-app/ui 1.0.0 → 1.1.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-FVZMNP5P.js → chunk-6B5ZX7L3.js} +780 -465
- package/dist/{chunk-UR3I4WXQ.js → chunk-6JNCDPGS.js} +22 -1
- package/dist/{chunk-TUXCPXPA.js → chunk-BVHAP22U.js} +276 -276
- package/dist/{chunk-D6G4J5XS.js → chunk-GV5R6TUT.js} +1 -1
- package/dist/components/index.cjs +1105 -785
- package/dist/components/index.d.cts +98 -14
- package/dist/components/index.d.ts +98 -14
- package/dist/components/index.js +9 -5
- package/dist/index.cjs +1261 -941
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -6
- package/dist/layout/index.cjs +13 -1
- package/dist/layout/index.js +2 -2
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +5 -5
- package/styles.css +88 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Icon
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6JNCDPGS.js";
|
|
4
4
|
import {
|
|
5
5
|
Alert,
|
|
6
6
|
AlertDescription,
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
chartColor,
|
|
150
150
|
navigationMenuTriggerStyle,
|
|
151
151
|
toast
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-BVHAP22U.js";
|
|
153
153
|
import {
|
|
154
154
|
Button,
|
|
155
155
|
Dialog,
|
|
@@ -870,10 +870,111 @@ function Chart({
|
|
|
870
870
|
);
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
+
// src/components/components/ChatInput/index.tsx
|
|
874
|
+
import { useRenderer as useRenderer4 } from "@pactor-app/runtime";
|
|
875
|
+
import { ArrowUp } from "lucide-react";
|
|
876
|
+
import {
|
|
877
|
+
useRef,
|
|
878
|
+
useState as useState5
|
|
879
|
+
} from "react";
|
|
880
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
881
|
+
function ChatInput({
|
|
882
|
+
value,
|
|
883
|
+
placeholder,
|
|
884
|
+
disabled,
|
|
885
|
+
rows = 3,
|
|
886
|
+
hideSend,
|
|
887
|
+
toolbarStart,
|
|
888
|
+
toolbarEnd,
|
|
889
|
+
header,
|
|
890
|
+
footer,
|
|
891
|
+
onChange,
|
|
892
|
+
onSubmit,
|
|
893
|
+
className,
|
|
894
|
+
style
|
|
895
|
+
}) {
|
|
896
|
+
const { renderChildren } = useRenderer4();
|
|
897
|
+
const controlled = value !== void 0;
|
|
898
|
+
const [draft, setDraft] = useState5("");
|
|
899
|
+
const text = controlled ? value : draft;
|
|
900
|
+
const canSubmit = !disabled && text.trim() !== "";
|
|
901
|
+
const composingRef = useRef(false);
|
|
902
|
+
const handleChange = (next) => {
|
|
903
|
+
if (!controlled) {
|
|
904
|
+
setDraft(next);
|
|
905
|
+
}
|
|
906
|
+
onChange?.(next);
|
|
907
|
+
};
|
|
908
|
+
const submit = () => {
|
|
909
|
+
if (!canSubmit) {
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
onSubmit?.(text);
|
|
913
|
+
if (!controlled) {
|
|
914
|
+
setDraft("");
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
const handleKeyDown = (event) => {
|
|
918
|
+
if (event.key === "Enter" && !event.shiftKey && !composingRef.current && !event.nativeEvent.isComposing) {
|
|
919
|
+
event.preventDefault();
|
|
920
|
+
submit();
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
const handleComposition = (event) => {
|
|
924
|
+
composingRef.current = event.type === "compositionstart";
|
|
925
|
+
};
|
|
926
|
+
return /* @__PURE__ */ jsxs15(
|
|
927
|
+
"div",
|
|
928
|
+
{
|
|
929
|
+
"data-slot": "chat-input",
|
|
930
|
+
className: cn(
|
|
931
|
+
"rounded-xl border border-border bg-background transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
|
|
932
|
+
className
|
|
933
|
+
),
|
|
934
|
+
style,
|
|
935
|
+
children: [
|
|
936
|
+
header ? /* @__PURE__ */ jsx19("div", { className: "px-3 pt-3", children: renderChildren([header]) }) : null,
|
|
937
|
+
/* @__PURE__ */ jsx19(
|
|
938
|
+
Textarea,
|
|
939
|
+
{
|
|
940
|
+
value: text,
|
|
941
|
+
placeholder,
|
|
942
|
+
disabled,
|
|
943
|
+
rows,
|
|
944
|
+
onChange: (event) => handleChange(event.target.value),
|
|
945
|
+
onKeyDown: handleKeyDown,
|
|
946
|
+
onCompositionStart: handleComposition,
|
|
947
|
+
onCompositionEnd: handleComposition,
|
|
948
|
+
className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
|
|
949
|
+
}
|
|
950
|
+
),
|
|
951
|
+
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
|
|
952
|
+
toolbarStart ? renderChildren([toolbarStart]) : null,
|
|
953
|
+
/* @__PURE__ */ jsx19("span", { className: "flex-1" }),
|
|
954
|
+
toolbarEnd ? renderChildren([toolbarEnd]) : null,
|
|
955
|
+
hideSend ? null : /* @__PURE__ */ jsx19(
|
|
956
|
+
Button,
|
|
957
|
+
{
|
|
958
|
+
type: "button",
|
|
959
|
+
size: "icon",
|
|
960
|
+
"aria-label": "\u53D1\u9001",
|
|
961
|
+
disabled: !canSubmit,
|
|
962
|
+
onClick: submit,
|
|
963
|
+
className: "size-8 rounded-full",
|
|
964
|
+
children: /* @__PURE__ */ jsx19(ArrowUp, {})
|
|
965
|
+
}
|
|
966
|
+
)
|
|
967
|
+
] }) : null,
|
|
968
|
+
footer ? /* @__PURE__ */ jsx19("div", { className: "border-t border-border px-3 py-2", children: renderChildren([footer]) }) : null
|
|
969
|
+
]
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
}
|
|
973
|
+
|
|
873
974
|
// src/components/components/Content/index.tsx
|
|
874
|
-
import { jsx as
|
|
975
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
875
976
|
function Content({ className, style, children }) {
|
|
876
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ jsx20(
|
|
877
978
|
"main",
|
|
878
979
|
{
|
|
879
980
|
"data-slot": "layout-content",
|
|
@@ -885,7 +986,7 @@ function Content({ className, style, children }) {
|
|
|
885
986
|
}
|
|
886
987
|
|
|
887
988
|
// src/components/components/ContextMenu/index.tsx
|
|
888
|
-
import { jsx as
|
|
989
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
889
990
|
function ContextMenu2({
|
|
890
991
|
items = [],
|
|
891
992
|
onSelect,
|
|
@@ -893,16 +994,16 @@ function ContextMenu2({
|
|
|
893
994
|
className,
|
|
894
995
|
style
|
|
895
996
|
}) {
|
|
896
|
-
return /* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsxs16(ContextMenu, { children: [
|
|
998
|
+
/* @__PURE__ */ jsx21(ContextMenuTrigger, { children }),
|
|
999
|
+
/* @__PURE__ */ jsx21(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs16(
|
|
899
1000
|
ContextMenuItem,
|
|
900
1001
|
{
|
|
901
1002
|
variant: item.danger ? "destructive" : "default",
|
|
902
1003
|
disabled: item.disabled,
|
|
903
1004
|
onClick: () => onSelect?.(item.value),
|
|
904
1005
|
children: [
|
|
905
|
-
item.icon ? /* @__PURE__ */
|
|
1006
|
+
item.icon ? /* @__PURE__ */ jsx21(Icon, { name: item.icon, size: "sm" }) : null,
|
|
906
1007
|
item.label
|
|
907
1008
|
]
|
|
908
1009
|
},
|
|
@@ -912,10 +1013,10 @@ function ContextMenu2({
|
|
|
912
1013
|
}
|
|
913
1014
|
|
|
914
1015
|
// src/components/components/DataTable/index.tsx
|
|
915
|
-
import { useI18n as useI18n3, useRenderer as
|
|
916
|
-
import { ArrowDown, ArrowUp, ArrowUpDown } from "lucide-react";
|
|
917
|
-
import { useMemo, useState as
|
|
918
|
-
import { jsx as
|
|
1016
|
+
import { useI18n as useI18n3, useRenderer as useRenderer5 } from "@pactor-app/runtime";
|
|
1017
|
+
import { ArrowDown, ArrowUp as ArrowUp2, ArrowUpDown } from "lucide-react";
|
|
1018
|
+
import { useMemo, useState as useState6 } from "react";
|
|
1019
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
919
1020
|
function renderCellValue(value) {
|
|
920
1021
|
if (value === void 0 || value === null) {
|
|
921
1022
|
return "";
|
|
@@ -942,11 +1043,11 @@ function DataTable({
|
|
|
942
1043
|
className,
|
|
943
1044
|
style
|
|
944
1045
|
}) {
|
|
945
|
-
const { renderChildren } =
|
|
1046
|
+
const { renderChildren } = useRenderer5();
|
|
946
1047
|
const { t } = useI18n3();
|
|
947
|
-
const [sortState, setSortState] =
|
|
948
|
-
const [filters, setFilters] =
|
|
949
|
-
const [current, setCurrent] =
|
|
1048
|
+
const [sortState, setSortState] = useState6(sort);
|
|
1049
|
+
const [filters, setFilters] = useState6({});
|
|
1050
|
+
const [current, setCurrent] = useState6(1);
|
|
950
1051
|
const viewRows = useMemo(() => {
|
|
951
1052
|
const activeFilters = Object.entries(filters).filter(
|
|
952
1053
|
([, keyword]) => keyword !== ""
|
|
@@ -984,12 +1085,12 @@ function DataTable({
|
|
|
984
1085
|
setCurrent(page);
|
|
985
1086
|
onPageChange?.(page);
|
|
986
1087
|
};
|
|
987
|
-
return /* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsxs17("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
|
|
1089
|
+
/* @__PURE__ */ jsxs17(Table, { children: [
|
|
1090
|
+
/* @__PURE__ */ jsx22(TableHeader, { children: /* @__PURE__ */ jsx22(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
|
|
990
1091
|
const sorted = sortState?.key === column.key;
|
|
991
|
-
return /* @__PURE__ */
|
|
992
|
-
column.sortable ? /* @__PURE__ */
|
|
1092
|
+
return /* @__PURE__ */ jsx22(TableHead, { children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1", children: [
|
|
1093
|
+
column.sortable ? /* @__PURE__ */ jsxs17(
|
|
993
1094
|
"button",
|
|
994
1095
|
{
|
|
995
1096
|
type: "button",
|
|
@@ -1000,7 +1101,7 @@ function DataTable({
|
|
|
1000
1101
|
onClick: () => toggleSort(column),
|
|
1001
1102
|
children: [
|
|
1002
1103
|
column.title,
|
|
1003
|
-
sorted ? sortState.order === "asc" ? /* @__PURE__ */
|
|
1104
|
+
sorted ? sortState.order === "asc" ? /* @__PURE__ */ jsx22(ArrowUp2, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ jsx22(ArrowDown, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ jsx22(
|
|
1004
1105
|
ArrowUpDown,
|
|
1005
1106
|
{
|
|
1006
1107
|
"aria-hidden": true,
|
|
@@ -1009,8 +1110,8 @@ function DataTable({
|
|
|
1009
1110
|
)
|
|
1010
1111
|
]
|
|
1011
1112
|
}
|
|
1012
|
-
) : /* @__PURE__ */
|
|
1013
|
-
column.filterable ? /* @__PURE__ */
|
|
1113
|
+
) : /* @__PURE__ */ jsx22("span", { children: column.title }),
|
|
1114
|
+
column.filterable ? /* @__PURE__ */ jsx22(
|
|
1014
1115
|
Input,
|
|
1015
1116
|
{
|
|
1016
1117
|
"data-slot": "data-table-filter",
|
|
@@ -1023,7 +1124,7 @@ function DataTable({
|
|
|
1023
1124
|
) : null
|
|
1024
1125
|
] }) }, column.key ?? String(index));
|
|
1025
1126
|
}) }) }),
|
|
1026
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ jsx22(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ jsx22(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx22(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ jsx22(
|
|
1027
1128
|
"div",
|
|
1028
1129
|
{
|
|
1029
1130
|
"data-slot": "table-empty",
|
|
@@ -1032,20 +1133,20 @@ function DataTable({
|
|
|
1032
1133
|
}
|
|
1033
1134
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
1034
1135
|
const key = row[rowKey];
|
|
1035
|
-
return /* @__PURE__ */
|
|
1136
|
+
return /* @__PURE__ */ jsx22(
|
|
1036
1137
|
TableRow,
|
|
1037
1138
|
{
|
|
1038
1139
|
children: columns.map((column, columnIndex) => {
|
|
1039
1140
|
const template = column.children ?? column.renderChildren;
|
|
1040
|
-
return /* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsx22(TableCell, { children: template ? renderChildren(template, { row, rowIndex }) : renderCellValue(row[column.key]) }, column.key ?? String(columnIndex));
|
|
1041
1142
|
})
|
|
1042
1143
|
},
|
|
1043
1144
|
key === void 0 || key === null ? rowIndex : String(key)
|
|
1044
1145
|
);
|
|
1045
1146
|
}) })
|
|
1046
1147
|
] }),
|
|
1047
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */
|
|
1048
|
-
(page) => /* @__PURE__ */
|
|
1148
|
+
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx22("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
|
|
1149
|
+
(page) => /* @__PURE__ */ jsx22(
|
|
1049
1150
|
Button,
|
|
1050
1151
|
{
|
|
1051
1152
|
type: "button",
|
|
@@ -1062,9 +1163,9 @@ function DataTable({
|
|
|
1062
1163
|
}
|
|
1063
1164
|
|
|
1064
1165
|
// src/components/components/Dialog/index.tsx
|
|
1065
|
-
import { useRenderer as
|
|
1066
|
-
import { useState as
|
|
1067
|
-
import { jsx as
|
|
1166
|
+
import { useRenderer as useRenderer6 } from "@pactor-app/runtime";
|
|
1167
|
+
import { useState as useState7 } from "react";
|
|
1168
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1068
1169
|
function Dialog2({
|
|
1069
1170
|
title,
|
|
1070
1171
|
description,
|
|
@@ -1075,11 +1176,11 @@ function Dialog2({
|
|
|
1075
1176
|
className,
|
|
1076
1177
|
style
|
|
1077
1178
|
}) {
|
|
1078
|
-
const { renderChildren } =
|
|
1079
|
-
const [innerOpen, setInnerOpen] =
|
|
1179
|
+
const { renderChildren } = useRenderer6();
|
|
1180
|
+
const [innerOpen, setInnerOpen] = useState7(false);
|
|
1080
1181
|
const controlled = open !== void 0;
|
|
1081
1182
|
const visible = controlled ? open : innerOpen;
|
|
1082
|
-
return /* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ jsxs18(
|
|
1083
1184
|
Dialog,
|
|
1084
1185
|
{
|
|
1085
1186
|
open: visible,
|
|
@@ -1092,7 +1193,7 @@ function Dialog2({
|
|
|
1092
1193
|
}
|
|
1093
1194
|
},
|
|
1094
1195
|
children: [
|
|
1095
|
-
trigger ? /* @__PURE__ */
|
|
1196
|
+
trigger ? /* @__PURE__ */ jsx23(
|
|
1096
1197
|
DialogTrigger,
|
|
1097
1198
|
{
|
|
1098
1199
|
nativeButton: false,
|
|
@@ -1100,10 +1201,10 @@ function Dialog2({
|
|
|
1100
1201
|
children: renderChildren([trigger])
|
|
1101
1202
|
}
|
|
1102
1203
|
) : null,
|
|
1103
|
-
/* @__PURE__ */
|
|
1104
|
-
title || description ? /* @__PURE__ */
|
|
1105
|
-
title ? /* @__PURE__ */
|
|
1106
|
-
description ? /* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ jsxs18(DialogContent, { className, style, children: [
|
|
1205
|
+
title || description ? /* @__PURE__ */ jsxs18(DialogHeader, { children: [
|
|
1206
|
+
title ? /* @__PURE__ */ jsx23(DialogTitle, { children: title }) : null,
|
|
1207
|
+
description ? /* @__PURE__ */ jsx23(DialogDescription, { children: description }) : null
|
|
1107
1208
|
] }) : null,
|
|
1108
1209
|
children
|
|
1109
1210
|
] })
|
|
@@ -1113,7 +1214,7 @@ function Dialog2({
|
|
|
1113
1214
|
}
|
|
1114
1215
|
|
|
1115
1216
|
// src/components/components/Drawer/index.tsx
|
|
1116
|
-
import { jsx as
|
|
1217
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1117
1218
|
function Drawer2({
|
|
1118
1219
|
title,
|
|
1119
1220
|
open,
|
|
@@ -1123,7 +1224,7 @@ function Drawer2({
|
|
|
1123
1224
|
className,
|
|
1124
1225
|
style
|
|
1125
1226
|
}) {
|
|
1126
|
-
return /* @__PURE__ */
|
|
1227
|
+
return /* @__PURE__ */ jsx24(
|
|
1127
1228
|
Drawer,
|
|
1128
1229
|
{
|
|
1129
1230
|
direction: placement,
|
|
@@ -1133,16 +1234,16 @@ function Drawer2({
|
|
|
1133
1234
|
onClose?.();
|
|
1134
1235
|
}
|
|
1135
1236
|
},
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1137
|
-
title ? /* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1237
|
+
children: /* @__PURE__ */ jsxs19(DrawerContent, { className, style, children: [
|
|
1238
|
+
title ? /* @__PURE__ */ jsx24(DrawerHeader, { children: /* @__PURE__ */ jsx24(DrawerTitle, { children: title }) }) : null,
|
|
1239
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-1 overflow-auto p-4", children })
|
|
1139
1240
|
] })
|
|
1140
1241
|
}
|
|
1141
1242
|
);
|
|
1142
1243
|
}
|
|
1143
1244
|
|
|
1144
1245
|
// src/components/components/DropdownMenu/index.tsx
|
|
1145
|
-
import { jsx as
|
|
1246
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1146
1247
|
function DropdownMenu2({
|
|
1147
1248
|
items = [],
|
|
1148
1249
|
onSelect,
|
|
@@ -1150,8 +1251,8 @@ function DropdownMenu2({
|
|
|
1150
1251
|
className,
|
|
1151
1252
|
style
|
|
1152
1253
|
}) {
|
|
1153
|
-
return /* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ jsxs20(DropdownMenu, { children: [
|
|
1255
|
+
/* @__PURE__ */ jsx25(
|
|
1155
1256
|
DropdownMenuTrigger,
|
|
1156
1257
|
{
|
|
1157
1258
|
nativeButton: false,
|
|
@@ -1159,14 +1260,14 @@ function DropdownMenu2({
|
|
|
1159
1260
|
children
|
|
1160
1261
|
}
|
|
1161
1262
|
),
|
|
1162
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ jsx25(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs20(
|
|
1163
1264
|
DropdownMenuItem,
|
|
1164
1265
|
{
|
|
1165
1266
|
variant: item.danger ? "destructive" : "default",
|
|
1166
1267
|
disabled: item.disabled,
|
|
1167
1268
|
onClick: () => onSelect?.(item.value),
|
|
1168
1269
|
children: [
|
|
1169
|
-
item.icon ? /* @__PURE__ */
|
|
1270
|
+
item.icon ? /* @__PURE__ */ jsx25(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1170
1271
|
item.label
|
|
1171
1272
|
]
|
|
1172
1273
|
},
|
|
@@ -1176,30 +1277,30 @@ function DropdownMenu2({
|
|
|
1176
1277
|
}
|
|
1177
1278
|
|
|
1178
1279
|
// src/components/components/Empty/index.tsx
|
|
1179
|
-
import { jsx as
|
|
1280
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1180
1281
|
function Empty2({ title, description, children, className, style }) {
|
|
1181
|
-
return /* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
title ? /* @__PURE__ */
|
|
1184
|
-
description ? /* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ jsxs21(Empty, { className, style, children: [
|
|
1283
|
+
/* @__PURE__ */ jsxs21(EmptyHeader, { children: [
|
|
1284
|
+
title ? /* @__PURE__ */ jsx26(EmptyTitle, { children: title }) : null,
|
|
1285
|
+
description ? /* @__PURE__ */ jsx26(EmptyDescription, { children: description }) : null
|
|
1185
1286
|
] }),
|
|
1186
|
-
children ? /* @__PURE__ */
|
|
1287
|
+
children ? /* @__PURE__ */ jsx26(EmptyContent, { children }) : null
|
|
1187
1288
|
] });
|
|
1188
1289
|
}
|
|
1189
1290
|
|
|
1190
1291
|
// src/components/components/Field/index.tsx
|
|
1191
|
-
import { jsx as
|
|
1292
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1192
1293
|
function Field2({ label, description, error, children, className, style }) {
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
-
label ? /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ jsxs22(Field, { className, style, children: [
|
|
1295
|
+
label ? /* @__PURE__ */ jsx27(FieldLabel, { children: label }) : null,
|
|
1195
1296
|
children,
|
|
1196
|
-
description ? /* @__PURE__ */
|
|
1197
|
-
error ? /* @__PURE__ */
|
|
1297
|
+
description ? /* @__PURE__ */ jsx27(FieldDescription, { children: description }) : null,
|
|
1298
|
+
error ? /* @__PURE__ */ jsx27(FieldError, { match: true, children: error }) : null
|
|
1198
1299
|
] });
|
|
1199
1300
|
}
|
|
1200
1301
|
|
|
1201
1302
|
// src/components/components/Flex/index.tsx
|
|
1202
|
-
import { jsx as
|
|
1303
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1203
1304
|
var gapClass = {
|
|
1204
1305
|
small: "gap-2",
|
|
1205
1306
|
middle: "gap-4",
|
|
@@ -1229,7 +1330,7 @@ function Flex({
|
|
|
1229
1330
|
style,
|
|
1230
1331
|
children
|
|
1231
1332
|
}) {
|
|
1232
|
-
return /* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ jsx28(
|
|
1233
1334
|
"div",
|
|
1234
1335
|
{
|
|
1235
1336
|
"data-slot": "flex",
|
|
@@ -1248,9 +1349,9 @@ function Flex({
|
|
|
1248
1349
|
}
|
|
1249
1350
|
|
|
1250
1351
|
// src/components/components/Footer/index.tsx
|
|
1251
|
-
import { jsx as
|
|
1352
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1252
1353
|
function Footer({ className, style, children }) {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ jsx29(
|
|
1254
1355
|
"footer",
|
|
1255
1356
|
{
|
|
1256
1357
|
"data-slot": "layout-footer",
|
|
@@ -1265,15 +1366,15 @@ function Footer({ className, style, children }) {
|
|
|
1265
1366
|
}
|
|
1266
1367
|
|
|
1267
1368
|
// src/components/components/Form/index.tsx
|
|
1268
|
-
import { useRenderer as
|
|
1369
|
+
import { useRenderer as useRenderer7 } from "@pactor-app/runtime";
|
|
1269
1370
|
import {
|
|
1270
1371
|
useCallback,
|
|
1271
1372
|
useEffect as useEffect5,
|
|
1272
1373
|
useMemo as useMemo2,
|
|
1273
|
-
useRef,
|
|
1274
|
-
useState as
|
|
1374
|
+
useRef as useRef2,
|
|
1375
|
+
useState as useState8
|
|
1275
1376
|
} from "react";
|
|
1276
|
-
import { jsx as
|
|
1377
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1277
1378
|
function isEmpty(value) {
|
|
1278
1379
|
return value === void 0 || value === null || value === "";
|
|
1279
1380
|
}
|
|
@@ -1287,13 +1388,13 @@ function Form({
|
|
|
1287
1388
|
onSubmit,
|
|
1288
1389
|
onValuesChange
|
|
1289
1390
|
}) {
|
|
1290
|
-
const { context } =
|
|
1291
|
-
const [values, setValues] =
|
|
1391
|
+
const { context } = useRenderer7();
|
|
1392
|
+
const [values, setValues] = useState8(() => ({
|
|
1292
1393
|
...initialValues
|
|
1293
1394
|
}));
|
|
1294
|
-
const [errors, setErrors] =
|
|
1295
|
-
const fieldRulesRef =
|
|
1296
|
-
const mergedInitialFieldsRef =
|
|
1395
|
+
const [errors, setErrors] = useState8({});
|
|
1396
|
+
const fieldRulesRef = useRef2(/* @__PURE__ */ new Map());
|
|
1397
|
+
const mergedInitialFieldsRef = useRef2(/* @__PURE__ */ new Set());
|
|
1297
1398
|
const setValuesBatch = useCallback((partial) => {
|
|
1298
1399
|
setValues((prev) => ({ ...prev, ...partial }));
|
|
1299
1400
|
}, []);
|
|
@@ -1354,7 +1455,7 @@ function Form({
|
|
|
1354
1455
|
context.state.set("form", values);
|
|
1355
1456
|
onSubmit?.(values);
|
|
1356
1457
|
};
|
|
1357
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ jsx30(FormContextProvider, { value: formContext, children: /* @__PURE__ */ jsx30(
|
|
1358
1459
|
"form",
|
|
1359
1460
|
{
|
|
1360
1461
|
"data-slot": "form",
|
|
@@ -1368,10 +1469,10 @@ function Form({
|
|
|
1368
1469
|
|
|
1369
1470
|
// src/components/components/Grid/index.tsx
|
|
1370
1471
|
import { Children } from "react";
|
|
1371
|
-
import { jsx as
|
|
1472
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1372
1473
|
function Grid({ columns = 1, gap, className, style, children }) {
|
|
1373
1474
|
const cols = Math.max(1, columns);
|
|
1374
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ jsx31(
|
|
1375
1476
|
"div",
|
|
1376
1477
|
{
|
|
1377
1478
|
"data-slot": "grid",
|
|
@@ -1382,7 +1483,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
1382
1483
|
...gap !== void 0 ? { gap } : {},
|
|
1383
1484
|
...style
|
|
1384
1485
|
},
|
|
1385
|
-
children: Children.map(children, (child, index) => /* @__PURE__ */
|
|
1486
|
+
children: Children.map(children, (child, index) => /* @__PURE__ */ jsx31("div", { "data-slot": "grid-item", children: child }, index))
|
|
1386
1487
|
}
|
|
1387
1488
|
);
|
|
1388
1489
|
}
|
|
@@ -1390,7 +1491,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
1390
1491
|
// src/components/components/Header/index.tsx
|
|
1391
1492
|
import { useI18n as useI18n4 } from "@pactor-app/runtime";
|
|
1392
1493
|
import { ChevronDownIcon } from "lucide-react";
|
|
1393
|
-
import { Fragment as Fragment2, jsx as
|
|
1494
|
+
import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1394
1495
|
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";
|
|
1395
1496
|
function Header({
|
|
1396
1497
|
logo,
|
|
@@ -1421,10 +1522,10 @@ function Header({
|
|
|
1421
1522
|
className
|
|
1422
1523
|
);
|
|
1423
1524
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
1424
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ jsx32("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
1425
1526
|
}
|
|
1426
|
-
const brandNode = hasBrand && /* @__PURE__ */
|
|
1427
|
-
logo !== void 0 && /* @__PURE__ */
|
|
1527
|
+
const brandNode = hasBrand && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
1528
|
+
logo !== void 0 && /* @__PURE__ */ jsx32(
|
|
1428
1529
|
"img",
|
|
1429
1530
|
{
|
|
1430
1531
|
"data-slot": "header-brand-logo",
|
|
@@ -1433,23 +1534,23 @@ function Header({
|
|
|
1433
1534
|
className: "h-8 w-8 shrink-0 object-contain"
|
|
1434
1535
|
}
|
|
1435
1536
|
),
|
|
1436
|
-
title !== void 0 && /* @__PURE__ */
|
|
1537
|
+
title !== void 0 && /* @__PURE__ */ jsx32("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
|
|
1437
1538
|
] });
|
|
1438
|
-
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */
|
|
1539
|
+
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ jsx32(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
1439
1540
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
1440
1541
|
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
1441
|
-
return /* @__PURE__ */
|
|
1442
|
-
showLeft && /* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ jsxs23("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
1543
|
+
showLeft && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
1443
1544
|
brandLeft && brandNode,
|
|
1444
1545
|
dropdownLeft && dropdownNode,
|
|
1445
|
-
hasMenu && /* @__PURE__ */
|
|
1546
|
+
hasMenu && /* @__PURE__ */ jsx32(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
|
|
1446
1547
|
] }),
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
showRight && /* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ jsx32("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
|
|
1549
|
+
showRight && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
1449
1550
|
dropdownRight && dropdownNode,
|
|
1450
1551
|
brandRight && brandNode,
|
|
1451
|
-
hasLocales && /* @__PURE__ */
|
|
1452
|
-
hasUser && /* @__PURE__ */
|
|
1552
|
+
hasLocales && /* @__PURE__ */ jsx32(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
1553
|
+
hasUser && /* @__PURE__ */ jsx32(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
1453
1554
|
] })
|
|
1454
1555
|
] });
|
|
1455
1556
|
}
|
|
@@ -1457,25 +1558,25 @@ function HeaderDropdownArea({
|
|
|
1457
1558
|
dropdown,
|
|
1458
1559
|
onSelect
|
|
1459
1560
|
}) {
|
|
1460
|
-
return /* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1561
|
+
return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
|
|
1562
|
+
/* @__PURE__ */ jsxs23(
|
|
1462
1563
|
DropdownMenuTrigger,
|
|
1463
1564
|
{
|
|
1464
1565
|
"data-slot": "header-dropdown",
|
|
1465
1566
|
className: cn(menuItemClass, "outline-hidden"),
|
|
1466
1567
|
children: [
|
|
1467
1568
|
dropdown.label,
|
|
1468
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
1469
1570
|
]
|
|
1470
1571
|
}
|
|
1471
1572
|
),
|
|
1472
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsx32(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ jsxs23(
|
|
1473
1574
|
DropdownMenuItem,
|
|
1474
1575
|
{
|
|
1475
1576
|
disabled: item.disabled,
|
|
1476
1577
|
onClick: () => onSelect?.(item.value),
|
|
1477
1578
|
children: [
|
|
1478
|
-
item.icon ? /* @__PURE__ */
|
|
1579
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1479
1580
|
item.label
|
|
1480
1581
|
]
|
|
1481
1582
|
},
|
|
@@ -1487,23 +1588,23 @@ function HeaderMenuArea({
|
|
|
1487
1588
|
items,
|
|
1488
1589
|
onSelect
|
|
1489
1590
|
}) {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */
|
|
1492
|
-
/* @__PURE__ */
|
|
1591
|
+
return /* @__PURE__ */ jsx32("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
|
|
1592
|
+
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
|
|
1593
|
+
/* @__PURE__ */ jsxs23(
|
|
1493
1594
|
DropdownMenuTrigger,
|
|
1494
1595
|
{
|
|
1495
1596
|
"data-slot": "header-menu-item",
|
|
1496
1597
|
"data-key": item.key,
|
|
1497
1598
|
className: cn(menuItemClass, "outline-hidden"),
|
|
1498
1599
|
children: [
|
|
1499
|
-
item.icon ? /* @__PURE__ */
|
|
1600
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1500
1601
|
item.label,
|
|
1501
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
1502
1603
|
]
|
|
1503
1604
|
}
|
|
1504
1605
|
),
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
] }, item.key) : /* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ jsx32(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ jsx32(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
1607
|
+
] }, item.key) : /* @__PURE__ */ jsxs23(
|
|
1507
1608
|
"button",
|
|
1508
1609
|
{
|
|
1509
1610
|
type: "button",
|
|
@@ -1512,7 +1613,7 @@ function HeaderMenuArea({
|
|
|
1512
1613
|
className: menuItemClass,
|
|
1513
1614
|
onClick: () => onSelect?.(item.key),
|
|
1514
1615
|
children: [
|
|
1515
|
-
item.icon ? /* @__PURE__ */
|
|
1616
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1516
1617
|
item.label
|
|
1517
1618
|
]
|
|
1518
1619
|
},
|
|
@@ -1525,16 +1626,16 @@ function HeaderMenuEntry({
|
|
|
1525
1626
|
onSelect
|
|
1526
1627
|
}) {
|
|
1527
1628
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
item.icon ? /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsxs23(DropdownMenuSub, { children: [
|
|
1630
|
+
/* @__PURE__ */ jsxs23(DropdownMenuSubTrigger, { "data-key": item.key, children: [
|
|
1631
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1531
1632
|
item.label
|
|
1532
1633
|
] }),
|
|
1533
|
-
/* @__PURE__ */
|
|
1634
|
+
/* @__PURE__ */ jsx32(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ jsx32(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
1534
1635
|
] });
|
|
1535
1636
|
}
|
|
1536
|
-
return /* @__PURE__ */
|
|
1537
|
-
item.icon ? /* @__PURE__ */
|
|
1637
|
+
return /* @__PURE__ */ jsxs23(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
|
|
1638
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1538
1639
|
item.label
|
|
1539
1640
|
] });
|
|
1540
1641
|
}
|
|
@@ -1542,18 +1643,18 @@ function HeaderUserArea({
|
|
|
1542
1643
|
user,
|
|
1543
1644
|
onSelect
|
|
1544
1645
|
}) {
|
|
1545
|
-
const identity = /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
user.avatar !== void 0 && /* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1646
|
+
const identity = /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
1647
|
+
/* @__PURE__ */ jsxs23(Avatar, { className: "size-7", children: [
|
|
1648
|
+
user.avatar !== void 0 && /* @__PURE__ */ jsx32(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
1649
|
+
/* @__PURE__ */ jsx32(AvatarFallback, { children: user.name.charAt(0) })
|
|
1549
1650
|
] }),
|
|
1550
|
-
/* @__PURE__ */
|
|
1651
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm", children: user.name })
|
|
1551
1652
|
] });
|
|
1552
1653
|
if (user.items === void 0 || user.items.length === 0) {
|
|
1553
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ jsx32("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
|
|
1554
1655
|
}
|
|
1555
|
-
return /* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
|
|
1657
|
+
/* @__PURE__ */ jsx32(
|
|
1557
1658
|
DropdownMenuTrigger,
|
|
1558
1659
|
{
|
|
1559
1660
|
"data-slot": "header-user",
|
|
@@ -1561,8 +1662,8 @@ function HeaderUserArea({
|
|
|
1561
1662
|
children: identity
|
|
1562
1663
|
}
|
|
1563
1664
|
),
|
|
1564
|
-
/* @__PURE__ */
|
|
1565
|
-
item.icon ? /* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ jsx32(DropdownMenuContent, { align: "end", children: user.items.map((item) => /* @__PURE__ */ jsxs23(DropdownMenuItem, { onClick: () => onSelect?.(item.value), children: [
|
|
1666
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1566
1667
|
item.label
|
|
1567
1668
|
] }, item.value)) })
|
|
1568
1669
|
] });
|
|
@@ -1573,19 +1674,19 @@ function HeaderLocalesArea({
|
|
|
1573
1674
|
}) {
|
|
1574
1675
|
const { locale } = useI18n4();
|
|
1575
1676
|
const current = locales.find((option) => option.value === locale);
|
|
1576
|
-
return /* @__PURE__ */
|
|
1577
|
-
/* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
|
|
1678
|
+
/* @__PURE__ */ jsxs23(
|
|
1578
1679
|
DropdownMenuTrigger,
|
|
1579
1680
|
{
|
|
1580
1681
|
"data-slot": "header-locales",
|
|
1581
1682
|
className: cn(menuItemClass, "outline-hidden"),
|
|
1582
1683
|
children: [
|
|
1583
1684
|
current?.label ?? locale,
|
|
1584
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
1585
1686
|
]
|
|
1586
1687
|
}
|
|
1587
1688
|
),
|
|
1588
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ jsx32(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ jsx32(
|
|
1589
1690
|
DropdownMenuItem,
|
|
1590
1691
|
{
|
|
1591
1692
|
onClick: () => onSelect?.(option.value),
|
|
@@ -1597,22 +1698,22 @@ function HeaderLocalesArea({
|
|
|
1597
1698
|
}
|
|
1598
1699
|
|
|
1599
1700
|
// src/components/components/HoverCard/index.tsx
|
|
1600
|
-
import { useRenderer as
|
|
1601
|
-
import { jsx as
|
|
1701
|
+
import { useRenderer as useRenderer8 } from "@pactor-app/runtime";
|
|
1702
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1602
1703
|
function isDslNode2(value) {
|
|
1603
1704
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
1604
1705
|
}
|
|
1605
1706
|
function HoverCard2({ content, children, className, style }) {
|
|
1606
|
-
const { renderChildren } =
|
|
1607
|
-
return /* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
/* @__PURE__ */
|
|
1707
|
+
const { renderChildren } = useRenderer8();
|
|
1708
|
+
return /* @__PURE__ */ jsxs24(HoverCard, { children: [
|
|
1709
|
+
/* @__PURE__ */ jsx33(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
|
|
1710
|
+
/* @__PURE__ */ jsx33(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
|
|
1610
1711
|
] });
|
|
1611
1712
|
}
|
|
1612
1713
|
|
|
1613
1714
|
// src/components/components/Input/index.tsx
|
|
1614
1715
|
import { useEffect as useEffect6, useId as useId3 } from "react";
|
|
1615
|
-
import { jsx as
|
|
1716
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1616
1717
|
function Input2({
|
|
1617
1718
|
name,
|
|
1618
1719
|
label,
|
|
@@ -1638,14 +1739,14 @@ function Input2({
|
|
|
1638
1739
|
if (inForm && form && name) {
|
|
1639
1740
|
const fieldValue = form.values[name];
|
|
1640
1741
|
const error = form.errors[name];
|
|
1641
|
-
return /* @__PURE__ */
|
|
1742
|
+
return /* @__PURE__ */ jsxs25(
|
|
1642
1743
|
"div",
|
|
1643
1744
|
{
|
|
1644
1745
|
"data-slot": "form-item",
|
|
1645
1746
|
className: cn(formItemClass(form.layout), className),
|
|
1646
1747
|
style,
|
|
1647
1748
|
children: [
|
|
1648
|
-
label ? /* @__PURE__ */
|
|
1749
|
+
label ? /* @__PURE__ */ jsx34(
|
|
1649
1750
|
"label",
|
|
1650
1751
|
{
|
|
1651
1752
|
htmlFor: controlId,
|
|
@@ -1653,7 +1754,7 @@ function Input2({
|
|
|
1653
1754
|
children: label
|
|
1654
1755
|
}
|
|
1655
1756
|
) : null,
|
|
1656
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ jsx34(
|
|
1657
1758
|
Input,
|
|
1658
1759
|
{
|
|
1659
1760
|
id: controlId,
|
|
@@ -1667,12 +1768,12 @@ function Input2({
|
|
|
1667
1768
|
}
|
|
1668
1769
|
}
|
|
1669
1770
|
),
|
|
1670
|
-
error ? /* @__PURE__ */
|
|
1771
|
+
error ? /* @__PURE__ */ jsx34("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1671
1772
|
]
|
|
1672
1773
|
}
|
|
1673
1774
|
);
|
|
1674
1775
|
}
|
|
1675
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ jsx34(
|
|
1676
1777
|
Input,
|
|
1677
1778
|
{
|
|
1678
1779
|
type,
|
|
@@ -1687,14 +1788,14 @@ function Input2({
|
|
|
1687
1788
|
}
|
|
1688
1789
|
|
|
1689
1790
|
// src/components/components/InputGroup/index.tsx
|
|
1690
|
-
import { jsx as
|
|
1791
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1691
1792
|
function InputGroup2({ className, style, children }) {
|
|
1692
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ jsx35(InputGroup, { className, style, children });
|
|
1693
1794
|
}
|
|
1694
1795
|
|
|
1695
1796
|
// src/components/components/InputOTP/index.tsx
|
|
1696
|
-
import { useEffect as useEffect7, useState as
|
|
1697
|
-
import { jsx as
|
|
1797
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1798
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1698
1799
|
function InputOTP2({
|
|
1699
1800
|
name,
|
|
1700
1801
|
label,
|
|
@@ -1716,7 +1817,7 @@ function InputOTP2({
|
|
|
1716
1817
|
}
|
|
1717
1818
|
return void 0;
|
|
1718
1819
|
});
|
|
1719
|
-
const [innerValue, setInnerValue] =
|
|
1820
|
+
const [innerValue, setInnerValue] = useState9(typeof value === "string" ? value : "");
|
|
1720
1821
|
useEffect7(() => {
|
|
1721
1822
|
if (!inForm) setInnerValue(typeof value === "string" ? value : "");
|
|
1722
1823
|
}, [inForm, value]);
|
|
@@ -1732,38 +1833,38 @@ function InputOTP2({
|
|
|
1732
1833
|
onComplete?.(next);
|
|
1733
1834
|
}
|
|
1734
1835
|
};
|
|
1735
|
-
const control = /* @__PURE__ */
|
|
1836
|
+
const control = /* @__PURE__ */ jsx36(
|
|
1736
1837
|
InputOTP,
|
|
1737
1838
|
{
|
|
1738
1839
|
maxLength: length,
|
|
1739
1840
|
value: current,
|
|
1740
1841
|
onChange: handleChange,
|
|
1741
1842
|
disabled,
|
|
1742
|
-
children: /* @__PURE__ */
|
|
1843
|
+
children: /* @__PURE__ */ jsx36(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx36(InputOTPSlot, { index }, index)) })
|
|
1743
1844
|
}
|
|
1744
1845
|
);
|
|
1745
1846
|
if (inForm && form && name) {
|
|
1746
1847
|
const error = form.errors[name];
|
|
1747
|
-
return /* @__PURE__ */
|
|
1848
|
+
return /* @__PURE__ */ jsxs26(
|
|
1748
1849
|
"div",
|
|
1749
1850
|
{
|
|
1750
1851
|
"data-slot": "form-item",
|
|
1751
1852
|
className: cn(formItemClass(form.layout), className),
|
|
1752
1853
|
style,
|
|
1753
1854
|
children: [
|
|
1754
|
-
label ? /* @__PURE__ */
|
|
1855
|
+
label ? /* @__PURE__ */ jsx36("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1755
1856
|
control,
|
|
1756
|
-
error ? /* @__PURE__ */
|
|
1857
|
+
error ? /* @__PURE__ */ jsx36("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1757
1858
|
]
|
|
1758
1859
|
}
|
|
1759
1860
|
);
|
|
1760
1861
|
}
|
|
1761
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsx36("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
|
|
1762
1863
|
}
|
|
1763
1864
|
|
|
1764
1865
|
// src/components/components/Item/index.tsx
|
|
1765
|
-
import { useRenderer as
|
|
1766
|
-
import { jsx as
|
|
1866
|
+
import { useRenderer as useRenderer9 } from "@pactor-app/runtime";
|
|
1867
|
+
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1767
1868
|
function Item2({
|
|
1768
1869
|
title,
|
|
1769
1870
|
description,
|
|
@@ -1772,41 +1873,41 @@ function Item2({
|
|
|
1772
1873
|
className,
|
|
1773
1874
|
style
|
|
1774
1875
|
}) {
|
|
1775
|
-
const { renderChildren } =
|
|
1876
|
+
const { renderChildren } = useRenderer9();
|
|
1776
1877
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
1777
|
-
return /* @__PURE__ */
|
|
1778
|
-
mediaNodes.length > 0 ? /* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
title ? /* @__PURE__ */
|
|
1781
|
-
description ? /* @__PURE__ */
|
|
1878
|
+
return /* @__PURE__ */ jsxs27(Item, { className, style, children: [
|
|
1879
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ jsx37(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
1880
|
+
/* @__PURE__ */ jsxs27(ItemContent, { children: [
|
|
1881
|
+
title ? /* @__PURE__ */ jsx37(ItemTitle, { children: title }) : null,
|
|
1882
|
+
description ? /* @__PURE__ */ jsx37(ItemDescription, { children: description }) : null
|
|
1782
1883
|
] }),
|
|
1783
|
-
actions && actions.length > 0 ? /* @__PURE__ */
|
|
1884
|
+
actions && actions.length > 0 ? /* @__PURE__ */ jsx37(ItemActions, { children: renderChildren(actions) }) : null
|
|
1784
1885
|
] });
|
|
1785
1886
|
}
|
|
1786
1887
|
|
|
1787
1888
|
// src/components/components/Kbd/index.tsx
|
|
1788
|
-
import { jsx as
|
|
1889
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1789
1890
|
function Kbd2({ text, className, style }) {
|
|
1790
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsx38(Kbd, { className, style, children: text });
|
|
1791
1892
|
}
|
|
1792
1893
|
|
|
1793
1894
|
// src/components/components/Label/index.tsx
|
|
1794
|
-
import { jsx as
|
|
1895
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1795
1896
|
function Label2({ text, htmlFor, className, style }) {
|
|
1796
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ jsx39(Label, { htmlFor, className, style, children: text });
|
|
1797
1898
|
}
|
|
1798
1899
|
|
|
1799
1900
|
// src/components/components/Layout/index.tsx
|
|
1800
1901
|
import { isDslSourceRef } from "@pactor-app/core";
|
|
1801
|
-
import { useRenderer as
|
|
1802
|
-
import { jsx as
|
|
1902
|
+
import { useRenderer as useRenderer10 } from "@pactor-app/runtime";
|
|
1903
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1803
1904
|
function Layout({ direction, className, style, dslChildren }) {
|
|
1804
|
-
const { renderChildren, context } =
|
|
1905
|
+
const { renderChildren, context } = useRenderer10();
|
|
1805
1906
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
1806
1907
|
(child) => !isDslSourceRef(child) && resolveRootType(child, context) === "Sider"
|
|
1807
1908
|
) : false;
|
|
1808
1909
|
const dir = direction ?? (hasSider ? "horizontal" : "vertical");
|
|
1809
|
-
return /* @__PURE__ */
|
|
1910
|
+
return /* @__PURE__ */ jsx40(
|
|
1810
1911
|
"div",
|
|
1811
1912
|
{
|
|
1812
1913
|
"data-slot": "layout",
|
|
@@ -1830,9 +1931,9 @@ function resolveRootType(node, context) {
|
|
|
1830
1931
|
}
|
|
1831
1932
|
|
|
1832
1933
|
// src/components/components/Link/index.tsx
|
|
1833
|
-
import { jsx as
|
|
1934
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1834
1935
|
function Link({ href, text, target, className, style, children }) {
|
|
1835
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsx41(
|
|
1836
1937
|
"a",
|
|
1837
1938
|
{
|
|
1838
1939
|
"data-slot": "link",
|
|
@@ -1846,8 +1947,290 @@ function Link({ href, text, target, className, style, children }) {
|
|
|
1846
1947
|
);
|
|
1847
1948
|
}
|
|
1848
1949
|
|
|
1950
|
+
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
1951
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1952
|
+
function RailTooltip({
|
|
1953
|
+
label,
|
|
1954
|
+
children
|
|
1955
|
+
}) {
|
|
1956
|
+
return /* @__PURE__ */ jsxs28(Tooltip, { children: [
|
|
1957
|
+
/* @__PURE__ */ jsx42(TooltipTrigger, { render: children }),
|
|
1958
|
+
/* @__PURE__ */ jsx42(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
1959
|
+
] });
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
// src/components/components/Sidebar/index.tsx
|
|
1963
|
+
import { useI18n as useI18n5, useRenderer as useRenderer11 } from "@pactor-app/runtime";
|
|
1964
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
1965
|
+
import {
|
|
1966
|
+
createContext as createContext2,
|
|
1967
|
+
useCallback as useCallback2,
|
|
1968
|
+
useContext as useContext2,
|
|
1969
|
+
useEffect as useEffect8,
|
|
1970
|
+
useState as useState10
|
|
1971
|
+
} from "react";
|
|
1972
|
+
import { Fragment as Fragment3, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1973
|
+
var SidebarDrawerContext = createContext2(null);
|
|
1974
|
+
function useSidebarDrawer() {
|
|
1975
|
+
return useContext2(SidebarDrawerContext);
|
|
1976
|
+
}
|
|
1977
|
+
var MOBILE_MEDIA_QUERY = "(max-width: 767px)";
|
|
1978
|
+
function useIsMobileViewport() {
|
|
1979
|
+
const [isMobile, setIsMobile] = useState10(
|
|
1980
|
+
() => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(MOBILE_MEDIA_QUERY).matches
|
|
1981
|
+
);
|
|
1982
|
+
useEffect8(() => {
|
|
1983
|
+
if (typeof window.matchMedia !== "function") {
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
const media = window.matchMedia(MOBILE_MEDIA_QUERY);
|
|
1987
|
+
const onChange = (event) => {
|
|
1988
|
+
setIsMobile(event.matches);
|
|
1989
|
+
};
|
|
1990
|
+
setIsMobile(media.matches);
|
|
1991
|
+
media.addEventListener("change", onChange);
|
|
1992
|
+
return () => media.removeEventListener("change", onChange);
|
|
1993
|
+
}, []);
|
|
1994
|
+
return isMobile;
|
|
1995
|
+
}
|
|
1996
|
+
function useOptionalRenderer() {
|
|
1997
|
+
try {
|
|
1998
|
+
return useRenderer11();
|
|
1999
|
+
} catch {
|
|
2000
|
+
return null;
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
function SidebarContent({ content }) {
|
|
2004
|
+
const renderer = useOptionalRenderer();
|
|
2005
|
+
if (renderer !== null && typeof content === "object" && content !== null && !("$$typeof" in content) && "type" in content) {
|
|
2006
|
+
return /* @__PURE__ */ jsx43(Fragment3, { children: renderer.renderChildren([content]) });
|
|
2007
|
+
}
|
|
2008
|
+
return /* @__PURE__ */ jsx43(Fragment3, { children: content });
|
|
2009
|
+
}
|
|
2010
|
+
function isBrandObject(brand) {
|
|
2011
|
+
return typeof brand === "object" && brand !== null && !("$$typeof" in brand) && "title" in brand;
|
|
2012
|
+
}
|
|
2013
|
+
function Sidebar({
|
|
2014
|
+
brand,
|
|
2015
|
+
items = [],
|
|
2016
|
+
content,
|
|
2017
|
+
sidebarFooter,
|
|
2018
|
+
collapsible,
|
|
2019
|
+
onCollapse,
|
|
2020
|
+
locationKey,
|
|
2021
|
+
drawer = true,
|
|
2022
|
+
className,
|
|
2023
|
+
style,
|
|
2024
|
+
children
|
|
2025
|
+
}) {
|
|
2026
|
+
const { t } = useI18n5();
|
|
2027
|
+
const isMobile = useIsMobileViewport();
|
|
2028
|
+
const [drawerOpen, setDrawerOpen] = useState10(false);
|
|
2029
|
+
const [collapsed, setCollapsed] = useState10(false);
|
|
2030
|
+
const collapsedEffective = collapsible === true && collapsed && !isMobile;
|
|
2031
|
+
const close = useCallback2(() => setDrawerOpen(false), []);
|
|
2032
|
+
const toggleCollapsed = () => {
|
|
2033
|
+
const next = !collapsed;
|
|
2034
|
+
setCollapsed(next);
|
|
2035
|
+
onCollapse?.(next);
|
|
2036
|
+
};
|
|
2037
|
+
const [trackedLocationKey, setTrackedLocationKey] = useState10(locationKey);
|
|
2038
|
+
if (trackedLocationKey !== locationKey) {
|
|
2039
|
+
setTrackedLocationKey(locationKey);
|
|
2040
|
+
setDrawerOpen(false);
|
|
2041
|
+
}
|
|
2042
|
+
useEffect8(() => {
|
|
2043
|
+
if (!drawerOpen) {
|
|
2044
|
+
return;
|
|
2045
|
+
}
|
|
2046
|
+
const onKeyDown = (event) => {
|
|
2047
|
+
if (event.key === "Escape") {
|
|
2048
|
+
setDrawerOpen(false);
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
window.addEventListener("keydown", onKeyDown);
|
|
2052
|
+
return () => window.removeEventListener("keydown", onKeyDown);
|
|
2053
|
+
}, [drawerOpen]);
|
|
2054
|
+
const brandNode = isBrandObject(brand) ? /* @__PURE__ */ jsxs29(Fragment3, { children: [
|
|
2055
|
+
brand.logo ? /* @__PURE__ */ jsx43(
|
|
2056
|
+
"img",
|
|
2057
|
+
{
|
|
2058
|
+
"data-slot": "sidebar-brand-logo",
|
|
2059
|
+
src: brand.logo,
|
|
2060
|
+
alt: brand.title,
|
|
2061
|
+
className: "size-6 shrink-0"
|
|
2062
|
+
}
|
|
2063
|
+
) : null,
|
|
2064
|
+
collapsedEffective ? null : /* @__PURE__ */ jsx43("span", { className: "truncate text-sm font-semibold", children: brand.title })
|
|
2065
|
+
] }) : brand;
|
|
2066
|
+
const collapseTrigger = collapsible && !isMobile ? /* @__PURE__ */ jsx43(
|
|
2067
|
+
"button",
|
|
2068
|
+
{
|
|
2069
|
+
type: "button",
|
|
2070
|
+
"data-slot": "sidebar-collapse-trigger",
|
|
2071
|
+
"aria-label": collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
2072
|
+
"aria-expanded": !collapsedEffective,
|
|
2073
|
+
title: collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
2074
|
+
className: cn(
|
|
2075
|
+
"cursor-pointer flex size-8 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
|
2076
|
+
),
|
|
2077
|
+
onClick: toggleCollapsed,
|
|
2078
|
+
children: collapsedEffective ? /* @__PURE__ */ jsx43(ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx43(ChevronLeft, { "aria-hidden": true, className: "size-4" })
|
|
2079
|
+
}
|
|
2080
|
+
) : null;
|
|
2081
|
+
return /* @__PURE__ */ jsx43(
|
|
2082
|
+
SidebarDrawerContext.Provider,
|
|
2083
|
+
{
|
|
2084
|
+
value: { close, collapsed: collapsedEffective },
|
|
2085
|
+
children: /* @__PURE__ */ jsxs29(
|
|
2086
|
+
"div",
|
|
2087
|
+
{
|
|
2088
|
+
"data-slot": "sidebar-layout",
|
|
2089
|
+
className: cn("flex min-h-screen w-full", className),
|
|
2090
|
+
style,
|
|
2091
|
+
children: [
|
|
2092
|
+
drawer && drawerOpen ? /* @__PURE__ */ jsx43(
|
|
2093
|
+
"div",
|
|
2094
|
+
{
|
|
2095
|
+
"data-slot": "sidebar-scrim",
|
|
2096
|
+
"aria-hidden": true,
|
|
2097
|
+
className: "fixed inset-0 z-40 bg-black/40 md:hidden",
|
|
2098
|
+
onClick: close
|
|
2099
|
+
}
|
|
2100
|
+
) : null,
|
|
2101
|
+
/* @__PURE__ */ jsxs29(
|
|
2102
|
+
"aside",
|
|
2103
|
+
{
|
|
2104
|
+
"data-slot": "sidebar",
|
|
2105
|
+
"data-collapsed": collapsedEffective || void 0,
|
|
2106
|
+
"data-open": drawerOpen ? "true" : "false",
|
|
2107
|
+
inert: drawer && isMobile && !drawerOpen ? true : void 0,
|
|
2108
|
+
className: cn(
|
|
2109
|
+
"flex shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width,transform]",
|
|
2110
|
+
collapsedEffective ? "w-16" : "w-60",
|
|
2111
|
+
// 移动端覆盖抽屉:退出文档流,关闭时移出屏幕
|
|
2112
|
+
drawer && "max-md:fixed max-md:inset-y-0 max-md:left-0 max-md:z-50 max-md:w-60 max-md:-translate-x-full max-md:data-[open=true]:translate-x-0"
|
|
2113
|
+
),
|
|
2114
|
+
children: [
|
|
2115
|
+
brand !== void 0 || collapseTrigger !== null ? /* @__PURE__ */ jsxs29(
|
|
2116
|
+
"div",
|
|
2117
|
+
{
|
|
2118
|
+
"data-slot": "sidebar-brand",
|
|
2119
|
+
className: cn(
|
|
2120
|
+
"flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border px-4",
|
|
2121
|
+
// 移动端品牌维持顶栏现状:抽屉内不重复渲染品牌行
|
|
2122
|
+
"max-md:hidden",
|
|
2123
|
+
collapsedEffective && "justify-center px-2"
|
|
2124
|
+
),
|
|
2125
|
+
children: [
|
|
2126
|
+
collapsedEffective ? null : /* @__PURE__ */ jsx43("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: brandNode }),
|
|
2127
|
+
collapseTrigger
|
|
2128
|
+
]
|
|
2129
|
+
}
|
|
2130
|
+
) : null,
|
|
2131
|
+
/* @__PURE__ */ jsx43(
|
|
2132
|
+
"nav",
|
|
2133
|
+
{
|
|
2134
|
+
"data-slot": "sidebar-nav",
|
|
2135
|
+
className: "min-h-0 flex-1 overflow-auto p-2",
|
|
2136
|
+
children: content !== void 0 && content !== null ? /* @__PURE__ */ jsx43(SidebarContent, { content }) : items.map((item, index) => /* @__PURE__ */ jsx43(
|
|
2137
|
+
SidebarEntry,
|
|
2138
|
+
{
|
|
2139
|
+
item,
|
|
2140
|
+
depth: 0,
|
|
2141
|
+
collapsed: collapsedEffective
|
|
2142
|
+
},
|
|
2143
|
+
item.href ?? item.label ?? index
|
|
2144
|
+
))
|
|
2145
|
+
}
|
|
2146
|
+
),
|
|
2147
|
+
sidebarFooter !== void 0 && sidebarFooter !== null && !collapsedEffective ? /* @__PURE__ */ jsx43(
|
|
2148
|
+
"div",
|
|
2149
|
+
{
|
|
2150
|
+
"data-slot": "sidebar-footer",
|
|
2151
|
+
className: "shrink-0 border-t border-sidebar-border p-2",
|
|
2152
|
+
children: sidebarFooter
|
|
2153
|
+
}
|
|
2154
|
+
) : null
|
|
2155
|
+
]
|
|
2156
|
+
}
|
|
2157
|
+
),
|
|
2158
|
+
/* @__PURE__ */ jsxs29("main", { "data-slot": "sidebar-content", className: "min-w-0 flex-1", children: [
|
|
2159
|
+
drawer ? /* @__PURE__ */ jsxs29(
|
|
2160
|
+
"div",
|
|
2161
|
+
{
|
|
2162
|
+
"data-slot": "sidebar-topbar",
|
|
2163
|
+
className: "flex h-14 items-center gap-2 border-b border-sidebar-border bg-sidebar px-3 md:hidden",
|
|
2164
|
+
children: [
|
|
2165
|
+
/* @__PURE__ */ jsx43(
|
|
2166
|
+
"button",
|
|
2167
|
+
{
|
|
2168
|
+
type: "button",
|
|
2169
|
+
"data-slot": "sidebar-menu-trigger",
|
|
2170
|
+
"aria-label": t("pactor.layout.openNavigation"),
|
|
2171
|
+
"aria-expanded": drawerOpen,
|
|
2172
|
+
className: "flex size-8 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
|
|
2173
|
+
onClick: () => setDrawerOpen(true),
|
|
2174
|
+
children: /* @__PURE__ */ jsx43(Icon, { name: "menu", size: 18 })
|
|
2175
|
+
}
|
|
2176
|
+
),
|
|
2177
|
+
brandNode
|
|
2178
|
+
]
|
|
2179
|
+
}
|
|
2180
|
+
) : null,
|
|
2181
|
+
children
|
|
2182
|
+
] })
|
|
2183
|
+
]
|
|
2184
|
+
}
|
|
2185
|
+
)
|
|
2186
|
+
}
|
|
2187
|
+
);
|
|
2188
|
+
}
|
|
2189
|
+
function SidebarEntry({
|
|
2190
|
+
item,
|
|
2191
|
+
depth,
|
|
2192
|
+
collapsed
|
|
2193
|
+
}) {
|
|
2194
|
+
const entryClass = cn(
|
|
2195
|
+
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
2196
|
+
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2197
|
+
collapsed && "justify-center px-0"
|
|
2198
|
+
);
|
|
2199
|
+
const indentStyle = !collapsed && depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
|
|
2200
|
+
const labelNode = collapsed ? null : item.label;
|
|
2201
|
+
const iconNode = item.icon ? /* @__PURE__ */ jsx43(Icon, { name: item.icon, size: "sm" }) : null;
|
|
2202
|
+
const entry = item.href ? /* @__PURE__ */ jsxs29(
|
|
2203
|
+
"a",
|
|
2204
|
+
{
|
|
2205
|
+
"data-slot": "sidebar-item",
|
|
2206
|
+
href: item.href,
|
|
2207
|
+
className: entryClass,
|
|
2208
|
+
style: indentStyle,
|
|
2209
|
+
children: [
|
|
2210
|
+
iconNode,
|
|
2211
|
+
labelNode
|
|
2212
|
+
]
|
|
2213
|
+
}
|
|
2214
|
+
) : /* @__PURE__ */ jsxs29("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
|
|
2215
|
+
iconNode,
|
|
2216
|
+
labelNode
|
|
2217
|
+
] });
|
|
2218
|
+
return /* @__PURE__ */ jsxs29("div", { "data-slot": "sidebar-entry", children: [
|
|
2219
|
+
collapsed ? /* @__PURE__ */ jsx43(RailTooltip, { label: item.label, children: entry }) : entry,
|
|
2220
|
+
item.children?.map((child, index) => /* @__PURE__ */ jsx43(
|
|
2221
|
+
SidebarEntry,
|
|
2222
|
+
{
|
|
2223
|
+
item: child,
|
|
2224
|
+
depth: depth + 1,
|
|
2225
|
+
collapsed
|
|
2226
|
+
},
|
|
2227
|
+
child.href ?? child.label ?? index
|
|
2228
|
+
))
|
|
2229
|
+
] });
|
|
2230
|
+
}
|
|
2231
|
+
|
|
1849
2232
|
// src/components/components/Menu/index.tsx
|
|
1850
|
-
import { jsx as
|
|
2233
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1851
2234
|
function Menu({
|
|
1852
2235
|
items = [],
|
|
1853
2236
|
mode = "inline",
|
|
@@ -1856,27 +2239,48 @@ function Menu({
|
|
|
1856
2239
|
className,
|
|
1857
2240
|
style
|
|
1858
2241
|
}) {
|
|
1859
|
-
|
|
2242
|
+
const drawer = useSidebarDrawer();
|
|
2243
|
+
const collapsed = mode === "inline" && drawer?.collapsed === true;
|
|
2244
|
+
let previousGroup;
|
|
2245
|
+
return /* @__PURE__ */ jsx44(
|
|
1860
2246
|
"nav",
|
|
1861
2247
|
{
|
|
1862
2248
|
"data-slot": "menu",
|
|
1863
2249
|
"data-mode": mode,
|
|
2250
|
+
"data-collapsed": collapsed || void 0,
|
|
1864
2251
|
className: cn(
|
|
1865
2252
|
mode === "horizontal" ? "flex items-center gap-1" : "flex flex-col gap-0.5 p-2",
|
|
1866
2253
|
className
|
|
1867
2254
|
),
|
|
1868
2255
|
style,
|
|
1869
|
-
children: items.map((item) =>
|
|
1870
|
-
|
|
1871
|
-
{
|
|
1872
|
-
item
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
2256
|
+
children: items.map((item) => {
|
|
2257
|
+
let groupLabel;
|
|
2258
|
+
if (!collapsed && mode === "inline" && item.group !== void 0 && item.group !== previousGroup) {
|
|
2259
|
+
groupLabel = item.group;
|
|
2260
|
+
}
|
|
2261
|
+
previousGroup = item.group;
|
|
2262
|
+
return /* @__PURE__ */ jsxs30("div", { "data-slot": "menu-group-entry", children: [
|
|
2263
|
+
groupLabel !== void 0 && /* @__PURE__ */ jsx44(
|
|
2264
|
+
"div",
|
|
2265
|
+
{
|
|
2266
|
+
"data-slot": "menu-group",
|
|
2267
|
+
className: "px-3 pb-1 pt-3 text-xs font-medium text-muted-foreground first:pt-1",
|
|
2268
|
+
children: groupLabel
|
|
2269
|
+
}
|
|
2270
|
+
),
|
|
2271
|
+
/* @__PURE__ */ jsx44(
|
|
2272
|
+
MenuEntry,
|
|
2273
|
+
{
|
|
2274
|
+
item,
|
|
2275
|
+
mode,
|
|
2276
|
+
depth: 0,
|
|
2277
|
+
selectedKey,
|
|
2278
|
+
onSelect,
|
|
2279
|
+
collapsed
|
|
2280
|
+
}
|
|
2281
|
+
)
|
|
2282
|
+
] }, item.key);
|
|
2283
|
+
})
|
|
1880
2284
|
}
|
|
1881
2285
|
);
|
|
1882
2286
|
}
|
|
@@ -1885,37 +2289,56 @@ function MenuEntry({
|
|
|
1885
2289
|
mode,
|
|
1886
2290
|
depth,
|
|
1887
2291
|
selectedKey,
|
|
1888
|
-
onSelect
|
|
2292
|
+
onSelect,
|
|
2293
|
+
collapsed = false
|
|
1889
2294
|
}) {
|
|
1890
2295
|
const selected = item.key === selectedKey;
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
2296
|
+
const button = /* @__PURE__ */ jsxs30(
|
|
2297
|
+
"button",
|
|
2298
|
+
{
|
|
2299
|
+
type: "button",
|
|
2300
|
+
"data-slot": "menu-item",
|
|
2301
|
+
"aria-current": selected ? "page" : void 0,
|
|
2302
|
+
disabled: item.disabled,
|
|
2303
|
+
className: cn(
|
|
2304
|
+
"flex w-full items-center gap-2 rounded-md text-sm transition-colors",
|
|
2305
|
+
mode === "horizontal" ? "px-3 py-2" : "px-3 py-2 text-left",
|
|
2306
|
+
collapsed && "justify-center px-0",
|
|
2307
|
+
selected ? "bg-accent font-medium text-accent-foreground" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
2308
|
+
item.disabled && "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-muted-foreground"
|
|
2309
|
+
),
|
|
2310
|
+
style: mode === "inline" && depth > 0 && !collapsed ? { paddingLeft: 12 + depth * 16 } : void 0,
|
|
2311
|
+
onClick: () => {
|
|
2312
|
+
if (!item.disabled) {
|
|
2313
|
+
onSelect?.(item.key);
|
|
2314
|
+
}
|
|
2315
|
+
},
|
|
2316
|
+
children: [
|
|
2317
|
+
item.icon ? /* @__PURE__ */ jsx44(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2318
|
+
collapsed ? null : /* @__PURE__ */ jsx44("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label }),
|
|
2319
|
+
item.dot && !collapsed ? /* @__PURE__ */ jsx44("span", { "data-slot": "menu-item-dot", className: "size-1.5 shrink-0 rounded-full bg-destructive" }) : null,
|
|
2320
|
+
item.badge !== void 0 && !collapsed ? /* @__PURE__ */ jsx44(
|
|
2321
|
+
"span",
|
|
2322
|
+
{
|
|
2323
|
+
"data-slot": "menu-item-badge",
|
|
2324
|
+
className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
2325
|
+
children: item.badge
|
|
2326
|
+
}
|
|
2327
|
+
) : null
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
return /* @__PURE__ */ jsxs30("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
|
|
2332
|
+
collapsed ? /* @__PURE__ */ jsx44(RailTooltip, { label: item.label, children: button }) : button,
|
|
2333
|
+
item.children?.map((child) => /* @__PURE__ */ jsx44(
|
|
1912
2334
|
MenuEntry,
|
|
1913
2335
|
{
|
|
1914
2336
|
item: child,
|
|
1915
2337
|
mode,
|
|
1916
2338
|
depth: depth + 1,
|
|
1917
2339
|
selectedKey,
|
|
1918
|
-
onSelect
|
|
2340
|
+
onSelect,
|
|
2341
|
+
collapsed
|
|
1919
2342
|
},
|
|
1920
2343
|
child.key
|
|
1921
2344
|
))
|
|
@@ -1923,17 +2346,17 @@ function MenuEntry({
|
|
|
1923
2346
|
}
|
|
1924
2347
|
|
|
1925
2348
|
// src/components/components/Menubar/index.tsx
|
|
1926
|
-
import { jsx as
|
|
2349
|
+
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1927
2350
|
function Menubar2({ menus = [], onSelect, className, style }) {
|
|
1928
|
-
return /* @__PURE__ */
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
/* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx45(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ jsxs31(MenubarMenu, { children: [
|
|
2352
|
+
/* @__PURE__ */ jsx45(MenubarTrigger, { children: menu.label }),
|
|
2353
|
+
/* @__PURE__ */ jsx45(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ jsxs31(
|
|
1931
2354
|
MenubarItem,
|
|
1932
2355
|
{
|
|
1933
2356
|
disabled: item.disabled,
|
|
1934
2357
|
onClick: () => onSelect?.(item.value),
|
|
1935
2358
|
children: [
|
|
1936
|
-
item.icon ? /* @__PURE__ */
|
|
2359
|
+
item.icon ? /* @__PURE__ */ jsx45(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1937
2360
|
item.label
|
|
1938
2361
|
]
|
|
1939
2362
|
},
|
|
@@ -1943,33 +2366,33 @@ function Menubar2({ menus = [], onSelect, className, style }) {
|
|
|
1943
2366
|
}
|
|
1944
2367
|
|
|
1945
2368
|
// src/components/components/NavigationMenu/index.tsx
|
|
1946
|
-
import { Fragment as
|
|
2369
|
+
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1947
2370
|
function NavigationMenu2({ items = [], className, style }) {
|
|
1948
|
-
return /* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
2371
|
+
return /* @__PURE__ */ jsx46(NavigationMenu, { className, style, children: /* @__PURE__ */ jsx46(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ jsx46(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ jsxs32(Fragment4, { children: [
|
|
2372
|
+
/* @__PURE__ */ jsxs32(
|
|
1950
2373
|
NavigationMenuTrigger,
|
|
1951
2374
|
{
|
|
1952
2375
|
className: item.icon !== void 0 ? "gap-2" : void 0,
|
|
1953
2376
|
children: [
|
|
1954
|
-
item.icon ? /* @__PURE__ */
|
|
2377
|
+
item.icon ? /* @__PURE__ */ jsx46(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1955
2378
|
item.label
|
|
1956
2379
|
]
|
|
1957
2380
|
}
|
|
1958
2381
|
),
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ jsx46(NavigationMenuContent, { children: /* @__PURE__ */ jsx46("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ jsx46("li", { children: /* @__PURE__ */ jsxs32(NavigationMenuLink, { href: child.href, children: [
|
|
2383
|
+
/* @__PURE__ */ jsxs32(
|
|
1961
2384
|
"span",
|
|
1962
2385
|
{
|
|
1963
2386
|
className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
|
|
1964
2387
|
children: [
|
|
1965
|
-
child.icon ? /* @__PURE__ */
|
|
2388
|
+
child.icon ? /* @__PURE__ */ jsx46(Icon, { name: child.icon, size: "sm" }) : null,
|
|
1966
2389
|
child.label
|
|
1967
2390
|
]
|
|
1968
2391
|
}
|
|
1969
2392
|
),
|
|
1970
|
-
child.description ? /* @__PURE__ */
|
|
2393
|
+
child.description ? /* @__PURE__ */ jsx46("span", { className: "text-muted-foreground", children: child.description }) : null
|
|
1971
2394
|
] }) }, child.href)) }) })
|
|
1972
|
-
] }) : /* @__PURE__ */
|
|
2395
|
+
] }) : /* @__PURE__ */ jsxs32(
|
|
1973
2396
|
NavigationMenuLink,
|
|
1974
2397
|
{
|
|
1975
2398
|
href: item.href,
|
|
@@ -1978,7 +2401,7 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
1978
2401
|
item.icon !== void 0 && "gap-2"
|
|
1979
2402
|
),
|
|
1980
2403
|
children: [
|
|
1981
|
-
item.icon ? /* @__PURE__ */
|
|
2404
|
+
item.icon ? /* @__PURE__ */ jsx46(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1982
2405
|
item.label
|
|
1983
2406
|
]
|
|
1984
2407
|
}
|
|
@@ -1986,17 +2409,17 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
1986
2409
|
}
|
|
1987
2410
|
|
|
1988
2411
|
// src/components/components/Page/index.tsx
|
|
1989
|
-
import { jsx as
|
|
2412
|
+
import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1990
2413
|
function Page({ title, className, style, children }) {
|
|
1991
|
-
return /* @__PURE__ */
|
|
1992
|
-
title ? /* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ jsxs33("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
|
|
2415
|
+
title ? /* @__PURE__ */ jsx47("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
|
|
2416
|
+
/* @__PURE__ */ jsx47("div", { "data-slot": "page-content", className: "space-y-5", children })
|
|
1994
2417
|
] });
|
|
1995
2418
|
}
|
|
1996
2419
|
|
|
1997
2420
|
// src/components/components/Pagination/index.tsx
|
|
1998
|
-
import { useState as
|
|
1999
|
-
import { jsx as
|
|
2421
|
+
import { useState as useState11 } from "react";
|
|
2422
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2000
2423
|
function pageItems(current, count) {
|
|
2001
2424
|
if (count <= 7) {
|
|
2002
2425
|
return Array.from({ length: count }, (_, i) => i + 1);
|
|
@@ -2017,7 +2440,7 @@ function Pagination2({
|
|
|
2017
2440
|
className,
|
|
2018
2441
|
style
|
|
2019
2442
|
}) {
|
|
2020
|
-
const [innerPage, setInnerPage] =
|
|
2443
|
+
const [innerPage, setInnerPage] = useState11(1);
|
|
2021
2444
|
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
|
2022
2445
|
const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
|
|
2023
2446
|
const goTo = (next) => {
|
|
@@ -2030,8 +2453,8 @@ function Pagination2({
|
|
|
2030
2453
|
}
|
|
2031
2454
|
onChange?.(target);
|
|
2032
2455
|
};
|
|
2033
|
-
return /* @__PURE__ */
|
|
2034
|
-
/* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsx48(Pagination, { className, style, children: /* @__PURE__ */ jsxs34(PaginationContent, { children: [
|
|
2457
|
+
/* @__PURE__ */ jsx48(PaginationItem, { children: /* @__PURE__ */ jsx48(
|
|
2035
2458
|
PaginationPrevious,
|
|
2036
2459
|
{
|
|
2037
2460
|
href: "#",
|
|
@@ -2042,7 +2465,7 @@ function Pagination2({
|
|
|
2042
2465
|
}
|
|
2043
2466
|
}
|
|
2044
2467
|
) }),
|
|
2045
|
-
pageItems(current, pageCount).map((item, index) => /* @__PURE__ */
|
|
2468
|
+
pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ jsx48(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx48(PaginationEllipsis, {}) : /* @__PURE__ */ jsx48(
|
|
2046
2469
|
PaginationLink,
|
|
2047
2470
|
{
|
|
2048
2471
|
href: "#",
|
|
@@ -2054,7 +2477,7 @@ function Pagination2({
|
|
|
2054
2477
|
children: item
|
|
2055
2478
|
}
|
|
2056
2479
|
) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
|
|
2057
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ jsx48(PaginationItem, { children: /* @__PURE__ */ jsx48(
|
|
2058
2481
|
PaginationNext,
|
|
2059
2482
|
{
|
|
2060
2483
|
href: "#",
|
|
@@ -2069,15 +2492,15 @@ function Pagination2({
|
|
|
2069
2492
|
}
|
|
2070
2493
|
|
|
2071
2494
|
// src/components/components/Popover/index.tsx
|
|
2072
|
-
import { useRenderer as
|
|
2073
|
-
import { jsx as
|
|
2495
|
+
import { useRenderer as useRenderer12 } from "@pactor-app/runtime";
|
|
2496
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2074
2497
|
function isDslNode3(value) {
|
|
2075
2498
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
2076
2499
|
}
|
|
2077
2500
|
function Popover2({ content, children, className, style }) {
|
|
2078
|
-
const { renderChildren } =
|
|
2079
|
-
return /* @__PURE__ */
|
|
2080
|
-
/* @__PURE__ */
|
|
2501
|
+
const { renderChildren } = useRenderer12();
|
|
2502
|
+
return /* @__PURE__ */ jsxs35(Popover, { children: [
|
|
2503
|
+
/* @__PURE__ */ jsx49(
|
|
2081
2504
|
PopoverTrigger,
|
|
2082
2505
|
{
|
|
2083
2506
|
nativeButton: false,
|
|
@@ -2085,22 +2508,22 @@ function Popover2({ content, children, className, style }) {
|
|
|
2085
2508
|
children
|
|
2086
2509
|
}
|
|
2087
2510
|
),
|
|
2088
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ jsx49(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
|
|
2089
2512
|
] });
|
|
2090
2513
|
}
|
|
2091
2514
|
|
|
2092
2515
|
// src/components/components/Progress/index.tsx
|
|
2093
|
-
import { jsx as
|
|
2516
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2094
2517
|
function Progress2({ value, className, style }) {
|
|
2095
2518
|
const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
|
|
2096
|
-
return /* @__PURE__ */
|
|
2519
|
+
return /* @__PURE__ */ jsx50(Progress, { value: resolved, className, style, children: /* @__PURE__ */ jsx50(ProgressTrack, { children: /* @__PURE__ */ jsx50(ProgressIndicator, {}) }) });
|
|
2097
2520
|
}
|
|
2098
2521
|
|
|
2099
2522
|
// src/components/components/RadioGroup/index.tsx
|
|
2100
|
-
import { useEffect as
|
|
2523
|
+
import { useEffect as useEffect9, useId as useId4 } from "react";
|
|
2101
2524
|
|
|
2102
2525
|
// src/components/components/Form/form-item.tsx
|
|
2103
|
-
import { jsx as
|
|
2526
|
+
import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2104
2527
|
function FieldShell({
|
|
2105
2528
|
layout,
|
|
2106
2529
|
label,
|
|
@@ -2110,14 +2533,14 @@ function FieldShell({
|
|
|
2110
2533
|
style,
|
|
2111
2534
|
children
|
|
2112
2535
|
}) {
|
|
2113
|
-
return /* @__PURE__ */
|
|
2536
|
+
return /* @__PURE__ */ jsxs36(
|
|
2114
2537
|
"div",
|
|
2115
2538
|
{
|
|
2116
2539
|
"data-slot": "form-item",
|
|
2117
2540
|
className: cn(formItemClass(layout), className),
|
|
2118
2541
|
style,
|
|
2119
2542
|
children: [
|
|
2120
|
-
label ? /* @__PURE__ */
|
|
2543
|
+
label ? /* @__PURE__ */ jsx51(
|
|
2121
2544
|
"label",
|
|
2122
2545
|
{
|
|
2123
2546
|
htmlFor,
|
|
@@ -2126,14 +2549,14 @@ function FieldShell({
|
|
|
2126
2549
|
}
|
|
2127
2550
|
) : null,
|
|
2128
2551
|
children,
|
|
2129
|
-
error ? /* @__PURE__ */
|
|
2552
|
+
error ? /* @__PURE__ */ jsx51("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2130
2553
|
]
|
|
2131
2554
|
}
|
|
2132
2555
|
);
|
|
2133
2556
|
}
|
|
2134
2557
|
|
|
2135
2558
|
// src/components/components/RadioGroup/index.tsx
|
|
2136
|
-
import { jsx as
|
|
2559
|
+
import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2137
2560
|
function RadioGroup2({
|
|
2138
2561
|
name,
|
|
2139
2562
|
label,
|
|
@@ -2148,7 +2571,7 @@ function RadioGroup2({
|
|
|
2148
2571
|
const form = useFormContext();
|
|
2149
2572
|
const controlId = useId4();
|
|
2150
2573
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
2151
|
-
|
|
2574
|
+
useEffect9(() => {
|
|
2152
2575
|
if (inForm && form && name) {
|
|
2153
2576
|
form.registerField(name, rules, value);
|
|
2154
2577
|
return () => form.unregisterField(name);
|
|
@@ -2163,7 +2586,7 @@ function RadioGroup2({
|
|
|
2163
2586
|
onChange?.(next);
|
|
2164
2587
|
};
|
|
2165
2588
|
const groupValue = current ?? "";
|
|
2166
|
-
const group = /* @__PURE__ */
|
|
2589
|
+
const group = /* @__PURE__ */ jsx52(
|
|
2167
2590
|
RadioGroup,
|
|
2168
2591
|
{
|
|
2169
2592
|
value: groupValue,
|
|
@@ -2174,8 +2597,8 @@ function RadioGroup2({
|
|
|
2174
2597
|
style: inForm ? void 0 : style,
|
|
2175
2598
|
children: options.map((option, index) => {
|
|
2176
2599
|
const optionId = `${controlId}-${index}`;
|
|
2177
|
-
return /* @__PURE__ */
|
|
2178
|
-
/* @__PURE__ */
|
|
2600
|
+
return /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-2", children: [
|
|
2601
|
+
/* @__PURE__ */ jsx52(
|
|
2179
2602
|
RadioGroupItem,
|
|
2180
2603
|
{
|
|
2181
2604
|
id: optionId,
|
|
@@ -2183,13 +2606,13 @@ function RadioGroup2({
|
|
|
2183
2606
|
disabled: option.disabled
|
|
2184
2607
|
}
|
|
2185
2608
|
),
|
|
2186
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ jsx52("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
|
|
2187
2610
|
] }, String(option.value));
|
|
2188
2611
|
})
|
|
2189
2612
|
}
|
|
2190
2613
|
);
|
|
2191
2614
|
if (inForm && form && name) {
|
|
2192
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ jsx52(
|
|
2193
2616
|
FieldShell,
|
|
2194
2617
|
{
|
|
2195
2618
|
layout: form.layout,
|
|
@@ -2205,19 +2628,19 @@ function RadioGroup2({
|
|
|
2205
2628
|
}
|
|
2206
2629
|
|
|
2207
2630
|
// src/components/components/Resizable/index.tsx
|
|
2208
|
-
import { useRenderer as
|
|
2209
|
-
import { Fragment as
|
|
2210
|
-
import { jsx as
|
|
2631
|
+
import { useRenderer as useRenderer13 } from "@pactor-app/runtime";
|
|
2632
|
+
import { Fragment as Fragment5 } from "react";
|
|
2633
|
+
import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2211
2634
|
function Resizable({
|
|
2212
2635
|
panels = [],
|
|
2213
2636
|
direction = "horizontal",
|
|
2214
2637
|
className,
|
|
2215
2638
|
style
|
|
2216
2639
|
}) {
|
|
2217
|
-
const { renderChildren } =
|
|
2218
|
-
return /* @__PURE__ */
|
|
2219
|
-
index > 0 ? /* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2640
|
+
const { renderChildren } = useRenderer13();
|
|
2641
|
+
return /* @__PURE__ */ jsx53(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs38(Fragment5, { children: [
|
|
2642
|
+
index > 0 ? /* @__PURE__ */ jsx53(ResizableHandle, { withHandle: true }) : null,
|
|
2643
|
+
/* @__PURE__ */ jsx53(
|
|
2221
2644
|
Panel,
|
|
2222
2645
|
{
|
|
2223
2646
|
defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
|
|
@@ -2228,7 +2651,7 @@ function Resizable({
|
|
|
2228
2651
|
}
|
|
2229
2652
|
|
|
2230
2653
|
// src/components/components/ScrollArea/index.tsx
|
|
2231
|
-
import { jsx as
|
|
2654
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2232
2655
|
function ScrollArea2({
|
|
2233
2656
|
maxHeight,
|
|
2234
2657
|
maxWidth,
|
|
@@ -2236,7 +2659,7 @@ function ScrollArea2({
|
|
|
2236
2659
|
style,
|
|
2237
2660
|
children
|
|
2238
2661
|
}) {
|
|
2239
|
-
return /* @__PURE__ */
|
|
2662
|
+
return /* @__PURE__ */ jsx54(
|
|
2240
2663
|
ScrollArea,
|
|
2241
2664
|
{
|
|
2242
2665
|
className,
|
|
@@ -2247,9 +2670,9 @@ function ScrollArea2({
|
|
|
2247
2670
|
}
|
|
2248
2671
|
|
|
2249
2672
|
// src/components/components/Select/index.tsx
|
|
2250
|
-
import { useI18n as
|
|
2251
|
-
import { useEffect as
|
|
2252
|
-
import { jsx as
|
|
2673
|
+
import { useI18n as useI18n6 } from "@pactor-app/runtime";
|
|
2674
|
+
import { useEffect as useEffect10, useId as useId5 } from "react";
|
|
2675
|
+
import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2253
2676
|
function Select2({
|
|
2254
2677
|
name,
|
|
2255
2678
|
label,
|
|
@@ -2264,10 +2687,10 @@ function Select2({
|
|
|
2264
2687
|
style
|
|
2265
2688
|
}) {
|
|
2266
2689
|
const form = useFormContext();
|
|
2267
|
-
const { t } =
|
|
2690
|
+
const { t } = useI18n6();
|
|
2268
2691
|
const controlId = useId5();
|
|
2269
2692
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
2270
|
-
|
|
2693
|
+
useEffect10(() => {
|
|
2271
2694
|
if (inForm && form && name) {
|
|
2272
2695
|
form.registerField(name, rules, value);
|
|
2273
2696
|
return () => form.unregisterField(name);
|
|
@@ -2283,13 +2706,13 @@ function Select2({
|
|
|
2283
2706
|
onChange?.(next ?? void 0);
|
|
2284
2707
|
};
|
|
2285
2708
|
const inFormRoot = inForm === true;
|
|
2286
|
-
const select = /* @__PURE__ */
|
|
2709
|
+
const select = /* @__PURE__ */ jsxs39(
|
|
2287
2710
|
"span",
|
|
2288
2711
|
{
|
|
2289
2712
|
className: cn("inline-flex items-center gap-1", !inFormRoot && className),
|
|
2290
2713
|
style: inFormRoot ? void 0 : style,
|
|
2291
2714
|
children: [
|
|
2292
|
-
/* @__PURE__ */
|
|
2715
|
+
/* @__PURE__ */ jsxs39(
|
|
2293
2716
|
Select,
|
|
2294
2717
|
{
|
|
2295
2718
|
items: options,
|
|
@@ -2298,8 +2721,8 @@ function Select2({
|
|
|
2298
2721
|
disabled,
|
|
2299
2722
|
name: inForm ? name : void 0,
|
|
2300
2723
|
children: [
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
/* @__PURE__ */
|
|
2724
|
+
/* @__PURE__ */ jsx55(SelectTrigger, { id: controlId, children: /* @__PURE__ */ jsx55(SelectValue, { placeholder }) }),
|
|
2725
|
+
/* @__PURE__ */ jsx55(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx55(
|
|
2303
2726
|
SelectItem,
|
|
2304
2727
|
{
|
|
2305
2728
|
value: option.value,
|
|
@@ -2311,7 +2734,7 @@ function Select2({
|
|
|
2311
2734
|
]
|
|
2312
2735
|
}
|
|
2313
2736
|
),
|
|
2314
|
-
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */
|
|
2737
|
+
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ jsx55(
|
|
2315
2738
|
"button",
|
|
2316
2739
|
{
|
|
2317
2740
|
type: "button",
|
|
@@ -2331,14 +2754,14 @@ function Select2({
|
|
|
2331
2754
|
);
|
|
2332
2755
|
if (inForm && form && name) {
|
|
2333
2756
|
const error = form.errors[name];
|
|
2334
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ jsxs39(
|
|
2335
2758
|
"div",
|
|
2336
2759
|
{
|
|
2337
2760
|
"data-slot": "form-item",
|
|
2338
2761
|
className: cn(formItemClass(form.layout), className),
|
|
2339
2762
|
style,
|
|
2340
2763
|
children: [
|
|
2341
|
-
label ? /* @__PURE__ */
|
|
2764
|
+
label ? /* @__PURE__ */ jsx55(
|
|
2342
2765
|
"label",
|
|
2343
2766
|
{
|
|
2344
2767
|
htmlFor: controlId,
|
|
@@ -2347,7 +2770,7 @@ function Select2({
|
|
|
2347
2770
|
}
|
|
2348
2771
|
) : null,
|
|
2349
2772
|
select,
|
|
2350
|
-
error ? /* @__PURE__ */
|
|
2773
|
+
error ? /* @__PURE__ */ jsx55("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
2351
2774
|
]
|
|
2352
2775
|
}
|
|
2353
2776
|
);
|
|
@@ -2356,13 +2779,13 @@ function Select2({
|
|
|
2356
2779
|
}
|
|
2357
2780
|
|
|
2358
2781
|
// src/components/components/Separator/index.tsx
|
|
2359
|
-
import { jsx as
|
|
2782
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2360
2783
|
function Separator2({ orientation = "horizontal", className, style }) {
|
|
2361
|
-
return /* @__PURE__ */
|
|
2784
|
+
return /* @__PURE__ */ jsx56(Separator, { orientation, className, style });
|
|
2362
2785
|
}
|
|
2363
2786
|
|
|
2364
2787
|
// src/components/components/Sheet/index.tsx
|
|
2365
|
-
import { jsx as
|
|
2788
|
+
import { jsx as jsx57, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2366
2789
|
function Sheet2({
|
|
2367
2790
|
title,
|
|
2368
2791
|
open,
|
|
@@ -2372,7 +2795,7 @@ function Sheet2({
|
|
|
2372
2795
|
className,
|
|
2373
2796
|
style
|
|
2374
2797
|
}) {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2798
|
+
return /* @__PURE__ */ jsx57(
|
|
2376
2799
|
Sheet,
|
|
2377
2800
|
{
|
|
2378
2801
|
open: open ?? false,
|
|
@@ -2381,128 +2804,17 @@ function Sheet2({
|
|
|
2381
2804
|
onClose?.();
|
|
2382
2805
|
}
|
|
2383
2806
|
},
|
|
2384
|
-
children: /* @__PURE__ */
|
|
2385
|
-
title ? /* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */
|
|
2807
|
+
children: /* @__PURE__ */ jsxs40(SheetContent, { side, className, style, children: [
|
|
2808
|
+
title ? /* @__PURE__ */ jsx57(SheetHeader, { children: /* @__PURE__ */ jsx57(SheetTitle, { children: title }) }) : null,
|
|
2809
|
+
/* @__PURE__ */ jsx57("div", { className: "flex-1 overflow-auto px-4", children })
|
|
2387
2810
|
] })
|
|
2388
2811
|
}
|
|
2389
2812
|
);
|
|
2390
2813
|
}
|
|
2391
2814
|
|
|
2392
|
-
// src/components/components/Sidebar/index.tsx
|
|
2393
|
-
import { useI18n as useI18n6 } from "@pactor-app/runtime";
|
|
2394
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2395
|
-
import { useState as useState10 } from "react";
|
|
2396
|
-
import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2397
|
-
function Sidebar({
|
|
2398
|
-
brand,
|
|
2399
|
-
items = [],
|
|
2400
|
-
collapsible,
|
|
2401
|
-
onCollapse,
|
|
2402
|
-
className,
|
|
2403
|
-
style,
|
|
2404
|
-
children
|
|
2405
|
-
}) {
|
|
2406
|
-
const { t } = useI18n6();
|
|
2407
|
-
const [collapsed, setCollapsed] = useState10(false);
|
|
2408
|
-
const toggleCollapsed = () => {
|
|
2409
|
-
const next = !collapsed;
|
|
2410
|
-
setCollapsed(next);
|
|
2411
|
-
onCollapse?.(next);
|
|
2412
|
-
};
|
|
2413
|
-
return /* @__PURE__ */ jsxs38(
|
|
2414
|
-
"div",
|
|
2415
|
-
{
|
|
2416
|
-
"data-slot": "sidebar-layout",
|
|
2417
|
-
className: cn("flex min-h-screen w-full", className),
|
|
2418
|
-
style,
|
|
2419
|
-
children: [
|
|
2420
|
-
/* @__PURE__ */ jsxs38(
|
|
2421
|
-
"aside",
|
|
2422
|
-
{
|
|
2423
|
-
"data-slot": "sidebar",
|
|
2424
|
-
"data-collapsed": collapsed || void 0,
|
|
2425
|
-
className: cn(
|
|
2426
|
-
"flex shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width]",
|
|
2427
|
-
collapsed ? "w-14" : "w-60"
|
|
2428
|
-
),
|
|
2429
|
-
children: [
|
|
2430
|
-
brand ? /* @__PURE__ */ jsxs38(
|
|
2431
|
-
"div",
|
|
2432
|
-
{
|
|
2433
|
-
"data-slot": "sidebar-brand",
|
|
2434
|
-
className: "flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border px-4",
|
|
2435
|
-
children: [
|
|
2436
|
-
brand.logo ? /* @__PURE__ */ jsx55(
|
|
2437
|
-
"img",
|
|
2438
|
-
{
|
|
2439
|
-
"data-slot": "sidebar-brand-logo",
|
|
2440
|
-
src: brand.logo,
|
|
2441
|
-
alt: brand.title,
|
|
2442
|
-
className: "size-6 shrink-0"
|
|
2443
|
-
}
|
|
2444
|
-
) : null,
|
|
2445
|
-
collapsed ? null : /* @__PURE__ */ jsx55("span", { className: "truncate text-sm font-semibold", children: brand.title })
|
|
2446
|
-
]
|
|
2447
|
-
}
|
|
2448
|
-
) : null,
|
|
2449
|
-
collapsed ? null : /* @__PURE__ */ jsx55("nav", { "data-slot": "sidebar-nav", className: "min-h-0 flex-1 overflow-auto p-2", children: items.map((item, index) => /* @__PURE__ */ jsx55(SidebarEntry, { item, depth: 0 }, item.href ?? item.label ?? index)) }),
|
|
2450
|
-
collapsible ? /* @__PURE__ */ jsx55(
|
|
2451
|
-
"button",
|
|
2452
|
-
{
|
|
2453
|
-
type: "button",
|
|
2454
|
-
"data-slot": "sidebar-collapse-trigger",
|
|
2455
|
-
"aria-label": collapsed ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
2456
|
-
className: "flex h-10 shrink-0 items-center justify-center border-t border-sidebar-border text-sidebar-foreground/60 hover:text-sidebar-foreground",
|
|
2457
|
-
onClick: toggleCollapsed,
|
|
2458
|
-
children: collapsed ? /* @__PURE__ */ jsx55(ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx55(ChevronLeft, { "aria-hidden": true, className: "size-4" })
|
|
2459
|
-
}
|
|
2460
|
-
) : null
|
|
2461
|
-
]
|
|
2462
|
-
}
|
|
2463
|
-
),
|
|
2464
|
-
/* @__PURE__ */ jsx55("main", { "data-slot": "sidebar-content", className: "min-w-0 flex-1", children })
|
|
2465
|
-
]
|
|
2466
|
-
}
|
|
2467
|
-
);
|
|
2468
|
-
}
|
|
2469
|
-
function SidebarEntry({ item, depth }) {
|
|
2470
|
-
const entryClass = cn(
|
|
2471
|
-
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
2472
|
-
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
|
|
2473
|
-
);
|
|
2474
|
-
const indentStyle = depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
|
|
2475
|
-
return /* @__PURE__ */ jsxs38("div", { "data-slot": "sidebar-entry", children: [
|
|
2476
|
-
item.href ? /* @__PURE__ */ jsxs38(
|
|
2477
|
-
"a",
|
|
2478
|
-
{
|
|
2479
|
-
"data-slot": "sidebar-item",
|
|
2480
|
-
href: item.href,
|
|
2481
|
-
className: entryClass,
|
|
2482
|
-
style: indentStyle,
|
|
2483
|
-
children: [
|
|
2484
|
-
item.icon ? /* @__PURE__ */ jsx55(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2485
|
-
item.label
|
|
2486
|
-
]
|
|
2487
|
-
}
|
|
2488
|
-
) : /* @__PURE__ */ jsxs38("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
|
|
2489
|
-
item.icon ? /* @__PURE__ */ jsx55(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2490
|
-
item.label
|
|
2491
|
-
] }),
|
|
2492
|
-
item.children?.map((child, index) => /* @__PURE__ */ jsx55(
|
|
2493
|
-
SidebarEntry,
|
|
2494
|
-
{
|
|
2495
|
-
item: child,
|
|
2496
|
-
depth: depth + 1
|
|
2497
|
-
},
|
|
2498
|
-
child.href ?? child.label ?? index
|
|
2499
|
-
))
|
|
2500
|
-
] });
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
2815
|
// src/components/components/Sider/index.tsx
|
|
2504
2816
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
2505
|
-
import { jsx as
|
|
2817
|
+
import { jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
2506
2818
|
function Sider({
|
|
2507
2819
|
width = 200,
|
|
2508
2820
|
collapsible,
|
|
@@ -2514,7 +2826,7 @@ function Sider({
|
|
|
2514
2826
|
children
|
|
2515
2827
|
}) {
|
|
2516
2828
|
const current = collapsed ? collapsedWidth : width;
|
|
2517
|
-
return /* @__PURE__ */
|
|
2829
|
+
return /* @__PURE__ */ jsxs41(
|
|
2518
2830
|
"aside",
|
|
2519
2831
|
{
|
|
2520
2832
|
"data-slot": "layout-sider",
|
|
@@ -2525,15 +2837,15 @@ function Sider({
|
|
|
2525
2837
|
),
|
|
2526
2838
|
style: { width: current, ...style },
|
|
2527
2839
|
children: [
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
collapsible ? /* @__PURE__ */
|
|
2840
|
+
/* @__PURE__ */ jsx58("div", { className: "min-h-0 flex-1 overflow-auto", children }),
|
|
2841
|
+
collapsible ? /* @__PURE__ */ jsx58(
|
|
2530
2842
|
"button",
|
|
2531
2843
|
{
|
|
2532
2844
|
type: "button",
|
|
2533
2845
|
"aria-label": collapsed ? "expand sider" : "collapse sider",
|
|
2534
2846
|
className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
|
|
2535
2847
|
onClick: () => onCollapse?.(!collapsed),
|
|
2536
|
-
children: collapsed ? /* @__PURE__ */
|
|
2848
|
+
children: collapsed ? /* @__PURE__ */ jsx58(ChevronRight2, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx58(ChevronLeft2, { "aria-hidden": true, className: "size-4" })
|
|
2537
2849
|
}
|
|
2538
2850
|
) : null
|
|
2539
2851
|
]
|
|
@@ -2542,7 +2854,7 @@ function Sider({
|
|
|
2542
2854
|
}
|
|
2543
2855
|
|
|
2544
2856
|
// src/components/components/Skeleton/index.tsx
|
|
2545
|
-
import { jsx as
|
|
2857
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2546
2858
|
var shapeDefaults = {
|
|
2547
2859
|
line: { className: "h-4 w-full", style: {} },
|
|
2548
2860
|
circle: { className: "rounded-full", style: { width: 40, height: 40 } },
|
|
@@ -2553,7 +2865,7 @@ function toSize(value) {
|
|
|
2553
2865
|
}
|
|
2554
2866
|
function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
2555
2867
|
const defaults = shapeDefaults[shape];
|
|
2556
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ jsx59(
|
|
2557
2869
|
Skeleton,
|
|
2558
2870
|
{
|
|
2559
2871
|
className: cn(defaults.className, className),
|
|
@@ -2568,8 +2880,8 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
|
2568
2880
|
}
|
|
2569
2881
|
|
|
2570
2882
|
// src/components/components/Slider/index.tsx
|
|
2571
|
-
import { useEffect as
|
|
2572
|
-
import { jsx as
|
|
2883
|
+
import { useEffect as useEffect11 } from "react";
|
|
2884
|
+
import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
2573
2885
|
function Slider2({
|
|
2574
2886
|
name,
|
|
2575
2887
|
label,
|
|
@@ -2585,7 +2897,7 @@ function Slider2({
|
|
|
2585
2897
|
}) {
|
|
2586
2898
|
const form = useFormContext();
|
|
2587
2899
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
2588
|
-
|
|
2900
|
+
useEffect11(() => {
|
|
2589
2901
|
if (inForm && form && name) {
|
|
2590
2902
|
form.registerField(name, rules, value);
|
|
2591
2903
|
return () => form.unregisterField(name);
|
|
@@ -2600,7 +2912,7 @@ function Slider2({
|
|
|
2600
2912
|
}
|
|
2601
2913
|
onChange?.(next);
|
|
2602
2914
|
};
|
|
2603
|
-
const slider = /* @__PURE__ */
|
|
2915
|
+
const slider = /* @__PURE__ */ jsx60(
|
|
2604
2916
|
Slider,
|
|
2605
2917
|
{
|
|
2606
2918
|
value: numberValue,
|
|
@@ -2612,14 +2924,14 @@ function Slider2({
|
|
|
2612
2924
|
onValueChange: handleChange,
|
|
2613
2925
|
className: inForm ? void 0 : className,
|
|
2614
2926
|
style: inForm ? void 0 : style,
|
|
2615
|
-
children: /* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */
|
|
2927
|
+
children: /* @__PURE__ */ jsx60(SliderControl, { children: /* @__PURE__ */ jsxs42(SliderTrack, { children: [
|
|
2928
|
+
/* @__PURE__ */ jsx60(SliderIndicator, {}),
|
|
2929
|
+
/* @__PURE__ */ jsx60(SliderThumb, {})
|
|
2618
2930
|
] }) })
|
|
2619
2931
|
}
|
|
2620
2932
|
);
|
|
2621
2933
|
if (inForm && form && name) {
|
|
2622
|
-
return /* @__PURE__ */
|
|
2934
|
+
return /* @__PURE__ */ jsx60(
|
|
2623
2935
|
FieldShell,
|
|
2624
2936
|
{
|
|
2625
2937
|
layout: form.layout,
|
|
@@ -2635,12 +2947,12 @@ function Slider2({
|
|
|
2635
2947
|
}
|
|
2636
2948
|
|
|
2637
2949
|
// src/components/components/Sonner/index.tsx
|
|
2638
|
-
import { useRenderer as
|
|
2639
|
-
import { useEffect as
|
|
2640
|
-
import { jsx as
|
|
2950
|
+
import { useRenderer as useRenderer14 } from "@pactor-app/runtime";
|
|
2951
|
+
import { useEffect as useEffect12 } from "react";
|
|
2952
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2641
2953
|
function Sonner({ className, style }) {
|
|
2642
|
-
const { context } =
|
|
2643
|
-
|
|
2954
|
+
const { context } = useRenderer14();
|
|
2955
|
+
useEffect12(() => {
|
|
2644
2956
|
const { actions } = context;
|
|
2645
2957
|
if (actions.has("toast")) {
|
|
2646
2958
|
return;
|
|
@@ -2654,36 +2966,36 @@ function Sonner({ className, style }) {
|
|
|
2654
2966
|
return { ok: true };
|
|
2655
2967
|
});
|
|
2656
2968
|
}, [context]);
|
|
2657
|
-
return /* @__PURE__ */
|
|
2969
|
+
return /* @__PURE__ */ jsx61("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ jsx61(Toaster, {}) });
|
|
2658
2970
|
}
|
|
2659
2971
|
|
|
2660
2972
|
// src/components/components/Spinner/index.tsx
|
|
2661
|
-
import { jsx as
|
|
2973
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2662
2974
|
var sizeClass = {
|
|
2663
2975
|
sm: "size-3",
|
|
2664
2976
|
default: "size-4",
|
|
2665
2977
|
lg: "size-6"
|
|
2666
2978
|
};
|
|
2667
2979
|
function Spinner2({ size = "default", className, style }) {
|
|
2668
|
-
return /* @__PURE__ */
|
|
2980
|
+
return /* @__PURE__ */ jsx62(Spinner, { className: cn(sizeClass[size], className), style });
|
|
2669
2981
|
}
|
|
2670
2982
|
|
|
2671
2983
|
// src/components/components/Statistic/index.tsx
|
|
2672
|
-
import { jsx as
|
|
2984
|
+
import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
2673
2985
|
function Statistic({ title, value, precision, suffix, className, style }) {
|
|
2674
2986
|
const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
|
|
2675
|
-
return /* @__PURE__ */
|
|
2676
|
-
title ? /* @__PURE__ */
|
|
2677
|
-
/* @__PURE__ */
|
|
2987
|
+
return /* @__PURE__ */ jsxs43("div", { "data-slot": "statistic", className: cn(className), style, children: [
|
|
2988
|
+
title ? /* @__PURE__ */ jsx63("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
|
|
2989
|
+
/* @__PURE__ */ jsxs43("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
|
|
2678
2990
|
display,
|
|
2679
|
-
suffix ? /* @__PURE__ */
|
|
2991
|
+
suffix ? /* @__PURE__ */ jsx63("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
|
|
2680
2992
|
] })
|
|
2681
2993
|
] });
|
|
2682
2994
|
}
|
|
2683
2995
|
|
|
2684
2996
|
// src/components/components/Switch/index.tsx
|
|
2685
|
-
import { useEffect as
|
|
2686
|
-
import { jsx as
|
|
2997
|
+
import { useEffect as useEffect13, useId as useId6 } from "react";
|
|
2998
|
+
import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
2687
2999
|
function Switch2({
|
|
2688
3000
|
name,
|
|
2689
3001
|
label,
|
|
@@ -2697,7 +3009,7 @@ function Switch2({
|
|
|
2697
3009
|
const form = useFormContext();
|
|
2698
3010
|
const controlId = useId6();
|
|
2699
3011
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
2700
|
-
|
|
3012
|
+
useEffect13(() => {
|
|
2701
3013
|
if (inForm && form && name) {
|
|
2702
3014
|
form.registerField(name, rules, value);
|
|
2703
3015
|
return () => form.unregisterField(name);
|
|
@@ -2712,13 +3024,13 @@ function Switch2({
|
|
|
2712
3024
|
}
|
|
2713
3025
|
onChange?.(next);
|
|
2714
3026
|
};
|
|
2715
|
-
const control = /* @__PURE__ */
|
|
3027
|
+
const control = /* @__PURE__ */ jsxs44(
|
|
2716
3028
|
"span",
|
|
2717
3029
|
{
|
|
2718
3030
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
2719
3031
|
style: inForm ? void 0 : style,
|
|
2720
3032
|
children: [
|
|
2721
|
-
/* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ jsx64(
|
|
2722
3034
|
Switch,
|
|
2723
3035
|
{
|
|
2724
3036
|
id: controlId,
|
|
@@ -2728,12 +3040,12 @@ function Switch2({
|
|
|
2728
3040
|
onCheckedChange: handleChange
|
|
2729
3041
|
}
|
|
2730
3042
|
),
|
|
2731
|
-
label ? /* @__PURE__ */
|
|
3043
|
+
label ? /* @__PURE__ */ jsx64("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
2732
3044
|
]
|
|
2733
3045
|
}
|
|
2734
3046
|
);
|
|
2735
3047
|
if (inForm && form && name) {
|
|
2736
|
-
return /* @__PURE__ */
|
|
3048
|
+
return /* @__PURE__ */ jsxs44(
|
|
2737
3049
|
"div",
|
|
2738
3050
|
{
|
|
2739
3051
|
"data-slot": "form-item",
|
|
@@ -2741,7 +3053,7 @@ function Switch2({
|
|
|
2741
3053
|
style,
|
|
2742
3054
|
children: [
|
|
2743
3055
|
control,
|
|
2744
|
-
form.errors[name] ? /* @__PURE__ */
|
|
3056
|
+
form.errors[name] ? /* @__PURE__ */ jsx64("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
|
|
2745
3057
|
]
|
|
2746
3058
|
}
|
|
2747
3059
|
);
|
|
@@ -2750,9 +3062,9 @@ function Switch2({
|
|
|
2750
3062
|
}
|
|
2751
3063
|
|
|
2752
3064
|
// src/components/components/Table/index.tsx
|
|
2753
|
-
import { useI18n as useI18n7, useRenderer as
|
|
2754
|
-
import { useState as
|
|
2755
|
-
import { jsx as
|
|
3065
|
+
import { useI18n as useI18n7, useRenderer as useRenderer15 } from "@pactor-app/runtime";
|
|
3066
|
+
import { useState as useState12 } from "react";
|
|
3067
|
+
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
2756
3068
|
function renderCellValue2(value) {
|
|
2757
3069
|
if (value === void 0 || value === null) {
|
|
2758
3070
|
return "";
|
|
@@ -2772,9 +3084,9 @@ function Table2({
|
|
|
2772
3084
|
className,
|
|
2773
3085
|
style
|
|
2774
3086
|
}) {
|
|
2775
|
-
const { renderChildren } =
|
|
3087
|
+
const { renderChildren } = useRenderer15();
|
|
2776
3088
|
const { t } = useI18n7();
|
|
2777
|
-
const [current, setCurrent] =
|
|
3089
|
+
const [current, setCurrent] = useState12(1);
|
|
2778
3090
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
2779
3091
|
const total = dataSource.length;
|
|
2780
3092
|
const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
|
|
@@ -2783,8 +3095,8 @@ function Table2({
|
|
|
2783
3095
|
setCurrent(page);
|
|
2784
3096
|
onChange?.({ current: page, pageSize, total });
|
|
2785
3097
|
};
|
|
2786
|
-
return /* @__PURE__ */
|
|
2787
|
-
loading ? /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsxs45("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
|
|
3099
|
+
loading ? /* @__PURE__ */ jsx65(
|
|
2788
3100
|
"div",
|
|
2789
3101
|
{
|
|
2790
3102
|
"data-slot": "table-loading",
|
|
@@ -2792,8 +3104,8 @@ function Table2({
|
|
|
2792
3104
|
children: t("pactor.table.loading")
|
|
2793
3105
|
}
|
|
2794
3106
|
) : null,
|
|
2795
|
-
/* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
3107
|
+
/* @__PURE__ */ jsxs45(Table, { children: [
|
|
3108
|
+
/* @__PURE__ */ jsx65(TableHeader, { children: /* @__PURE__ */ jsx65(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ jsx65(
|
|
2797
3109
|
TableHead,
|
|
2798
3110
|
{
|
|
2799
3111
|
style: column.width !== void 0 ? { width: column.width } : void 0,
|
|
@@ -2801,7 +3113,7 @@ function Table2({
|
|
|
2801
3113
|
},
|
|
2802
3114
|
column.dataIndex ?? String(index)
|
|
2803
3115
|
)) }) }),
|
|
2804
|
-
/* @__PURE__ */
|
|
3116
|
+
/* @__PURE__ */ jsx65(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ jsx65(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx65(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ jsx65(
|
|
2805
3117
|
"div",
|
|
2806
3118
|
{
|
|
2807
3119
|
"data-slot": "table-empty",
|
|
@@ -2810,10 +3122,10 @@ function Table2({
|
|
|
2810
3122
|
}
|
|
2811
3123
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
2812
3124
|
const key = row[rowKey];
|
|
2813
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ jsx65(
|
|
2814
3126
|
TableRow,
|
|
2815
3127
|
{
|
|
2816
|
-
children: columns.map((column, columnIndex) => /* @__PURE__ */
|
|
3128
|
+
children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx65(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
|
|
2817
3129
|
column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
|
|
2818
3130
|
) }, column.dataIndex ?? String(columnIndex)))
|
|
2819
3131
|
},
|
|
@@ -2821,8 +3133,8 @@ function Table2({
|
|
|
2821
3133
|
);
|
|
2822
3134
|
}) })
|
|
2823
3135
|
] }),
|
|
2824
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */
|
|
2825
|
-
(page) => /* @__PURE__ */
|
|
3136
|
+
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx65("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
|
|
3137
|
+
(page) => /* @__PURE__ */ jsx65(
|
|
2826
3138
|
Button,
|
|
2827
3139
|
{
|
|
2828
3140
|
type: "button",
|
|
@@ -2839,11 +3151,11 @@ function Table2({
|
|
|
2839
3151
|
}
|
|
2840
3152
|
|
|
2841
3153
|
// src/components/components/Tabs/index.tsx
|
|
2842
|
-
import { useRenderer as
|
|
2843
|
-
import { jsx as
|
|
3154
|
+
import { useRenderer as useRenderer16 } from "@pactor-app/runtime";
|
|
3155
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
2844
3156
|
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
2845
|
-
const { renderChildren } =
|
|
2846
|
-
return /* @__PURE__ */
|
|
3157
|
+
const { renderChildren } = useRenderer16();
|
|
3158
|
+
return /* @__PURE__ */ jsxs46(
|
|
2847
3159
|
Tabs,
|
|
2848
3160
|
{
|
|
2849
3161
|
value: activeKey,
|
|
@@ -2852,15 +3164,15 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
2852
3164
|
className,
|
|
2853
3165
|
style,
|
|
2854
3166
|
children: [
|
|
2855
|
-
/* @__PURE__ */
|
|
2856
|
-
items.map((item) => /* @__PURE__ */
|
|
3167
|
+
/* @__PURE__ */ jsx66(TabsList, { children: items.map((item) => /* @__PURE__ */ jsx66(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
|
|
3168
|
+
items.map((item) => /* @__PURE__ */ jsx66(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
2857
3169
|
]
|
|
2858
3170
|
}
|
|
2859
3171
|
);
|
|
2860
3172
|
}
|
|
2861
3173
|
|
|
2862
3174
|
// src/components/components/Text/index.tsx
|
|
2863
|
-
import { jsx as
|
|
3175
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2864
3176
|
var typeClassMap = {
|
|
2865
3177
|
default: "",
|
|
2866
3178
|
secondary: "text-muted-foreground",
|
|
@@ -2879,7 +3191,7 @@ function Text({
|
|
|
2879
3191
|
style,
|
|
2880
3192
|
children
|
|
2881
3193
|
}) {
|
|
2882
|
-
return /* @__PURE__ */
|
|
3194
|
+
return /* @__PURE__ */ jsx67(
|
|
2883
3195
|
"span",
|
|
2884
3196
|
{
|
|
2885
3197
|
"data-slot": "text",
|
|
@@ -2899,8 +3211,8 @@ function Text({
|
|
|
2899
3211
|
}
|
|
2900
3212
|
|
|
2901
3213
|
// src/components/components/Textarea/index.tsx
|
|
2902
|
-
import { useEffect as
|
|
2903
|
-
import { jsx as
|
|
3214
|
+
import { useEffect as useEffect14, useId as useId7 } from "react";
|
|
3215
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2904
3216
|
function Textarea2({
|
|
2905
3217
|
name,
|
|
2906
3218
|
label,
|
|
@@ -2916,7 +3228,7 @@ function Textarea2({
|
|
|
2916
3228
|
const form = useFormContext();
|
|
2917
3229
|
const controlId = useId7();
|
|
2918
3230
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
2919
|
-
|
|
3231
|
+
useEffect14(() => {
|
|
2920
3232
|
if (inForm && form && name) {
|
|
2921
3233
|
form.registerField(name, rules, value);
|
|
2922
3234
|
return () => form.unregisterField(name);
|
|
@@ -2925,7 +3237,7 @@ function Textarea2({
|
|
|
2925
3237
|
});
|
|
2926
3238
|
if (inForm && form && name) {
|
|
2927
3239
|
const fieldValue = form.values[name];
|
|
2928
|
-
return /* @__PURE__ */
|
|
3240
|
+
return /* @__PURE__ */ jsx68(
|
|
2929
3241
|
FieldShell,
|
|
2930
3242
|
{
|
|
2931
3243
|
layout: form.layout,
|
|
@@ -2934,7 +3246,7 @@ function Textarea2({
|
|
|
2934
3246
|
error: form.errors[name],
|
|
2935
3247
|
className,
|
|
2936
3248
|
style,
|
|
2937
|
-
children: /* @__PURE__ */
|
|
3249
|
+
children: /* @__PURE__ */ jsx68(
|
|
2938
3250
|
Textarea,
|
|
2939
3251
|
{
|
|
2940
3252
|
id: controlId,
|
|
@@ -2951,7 +3263,7 @@ function Textarea2({
|
|
|
2951
3263
|
}
|
|
2952
3264
|
);
|
|
2953
3265
|
}
|
|
2954
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx68(
|
|
2955
3267
|
Textarea,
|
|
2956
3268
|
{
|
|
2957
3269
|
value: value ?? "",
|
|
@@ -2966,7 +3278,7 @@ function Textarea2({
|
|
|
2966
3278
|
}
|
|
2967
3279
|
|
|
2968
3280
|
// src/components/components/Toggle/index.tsx
|
|
2969
|
-
import { jsx as
|
|
3281
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2970
3282
|
function Toggle2({
|
|
2971
3283
|
text,
|
|
2972
3284
|
pressed,
|
|
@@ -2977,7 +3289,7 @@ function Toggle2({
|
|
|
2977
3289
|
className,
|
|
2978
3290
|
style
|
|
2979
3291
|
}) {
|
|
2980
|
-
return /* @__PURE__ */
|
|
3292
|
+
return /* @__PURE__ */ jsx69(
|
|
2981
3293
|
Toggle,
|
|
2982
3294
|
{
|
|
2983
3295
|
pressed,
|
|
@@ -2993,7 +3305,7 @@ function Toggle2({
|
|
|
2993
3305
|
}
|
|
2994
3306
|
|
|
2995
3307
|
// src/components/components/ToggleGroup/index.tsx
|
|
2996
|
-
import { jsx as
|
|
3308
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2997
3309
|
function ToggleGroup2({
|
|
2998
3310
|
options = [],
|
|
2999
3311
|
value,
|
|
@@ -3013,7 +3325,7 @@ function ToggleGroup2({
|
|
|
3013
3325
|
onChange?.(added ?? void 0);
|
|
3014
3326
|
}
|
|
3015
3327
|
};
|
|
3016
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ jsx70(
|
|
3017
3329
|
ToggleGroup,
|
|
3018
3330
|
{
|
|
3019
3331
|
value: groupValue,
|
|
@@ -3022,7 +3334,7 @@ function ToggleGroup2({
|
|
|
3022
3334
|
onValueChange: (next) => handleChange(next),
|
|
3023
3335
|
className,
|
|
3024
3336
|
style,
|
|
3025
|
-
children: options.map((option) => /* @__PURE__ */
|
|
3337
|
+
children: options.map((option) => /* @__PURE__ */ jsx70(
|
|
3026
3338
|
ToggleGroupItem,
|
|
3027
3339
|
{
|
|
3028
3340
|
value: option.value,
|
|
@@ -3036,23 +3348,23 @@ function ToggleGroup2({
|
|
|
3036
3348
|
}
|
|
3037
3349
|
|
|
3038
3350
|
// src/components/components/Tooltip/index.tsx
|
|
3039
|
-
import { jsx as
|
|
3351
|
+
import { jsx as jsx71, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
3040
3352
|
function Tooltip3({ content, children, className, style }) {
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3043
|
-
/* @__PURE__ */
|
|
3353
|
+
return /* @__PURE__ */ jsxs47(Tooltip, { children: [
|
|
3354
|
+
/* @__PURE__ */ jsx71(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
3355
|
+
/* @__PURE__ */ jsx71(TooltipContent, { className, style, children: content })
|
|
3044
3356
|
] });
|
|
3045
3357
|
}
|
|
3046
3358
|
|
|
3047
3359
|
// src/components/components/Typography/index.tsx
|
|
3048
|
-
import { jsx as
|
|
3360
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3049
3361
|
function Typography2({
|
|
3050
3362
|
variant = "p",
|
|
3051
3363
|
text,
|
|
3052
3364
|
className,
|
|
3053
3365
|
style
|
|
3054
3366
|
}) {
|
|
3055
|
-
return /* @__PURE__ */
|
|
3367
|
+
return /* @__PURE__ */ jsx72(Typography, { variant, className, style, children: text });
|
|
3056
3368
|
}
|
|
3057
3369
|
|
|
3058
3370
|
// src/components/register.ts
|
|
@@ -3096,6 +3408,7 @@ var shadcnComponents = {
|
|
|
3096
3408
|
Slider: Slider2,
|
|
3097
3409
|
Label: Label2,
|
|
3098
3410
|
Field: Field2,
|
|
3411
|
+
ChatInput,
|
|
3099
3412
|
// 导航类扩展组件
|
|
3100
3413
|
Breadcrumb: Breadcrumb2,
|
|
3101
3414
|
Pagination: Pagination2,
|
|
@@ -3187,6 +3500,9 @@ export {
|
|
|
3187
3500
|
Label2 as Label,
|
|
3188
3501
|
Layout,
|
|
3189
3502
|
Link,
|
|
3503
|
+
RailTooltip,
|
|
3504
|
+
useSidebarDrawer,
|
|
3505
|
+
Sidebar,
|
|
3190
3506
|
Menu,
|
|
3191
3507
|
Menubar2 as Menubar,
|
|
3192
3508
|
NavigationMenu2 as NavigationMenu,
|
|
@@ -3200,7 +3516,6 @@ export {
|
|
|
3200
3516
|
Select2 as Select,
|
|
3201
3517
|
Separator2 as Separator,
|
|
3202
3518
|
Sheet2 as Sheet,
|
|
3203
|
-
Sidebar,
|
|
3204
3519
|
Sider,
|
|
3205
3520
|
Skeleton2 as Skeleton,
|
|
3206
3521
|
Slider2 as Slider,
|