@kilnonedre/foundation 0.0.6 → 0.0.8
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/index.d.ts +39 -13
- package/dist/index.js +224 -178
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -136,16 +136,16 @@ type SemanticColorToken = {
|
|
|
136
136
|
};
|
|
137
137
|
declare const getSemanticColor: (semanticColor: EnumSemanticColor, variant: EnumVariant) => SemanticColorToken;
|
|
138
138
|
|
|
139
|
-
interface ConfigProp$
|
|
139
|
+
interface ConfigProp$g {
|
|
140
140
|
semanticColor?: EnumSemanticColor;
|
|
141
141
|
variant?: EnumVariant;
|
|
142
142
|
children?: ReactNode;
|
|
143
143
|
className?: string;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
declare const Badge: ({ semanticColor, variant, children, className, }: ConfigProp$
|
|
146
|
+
declare const Badge: ({ semanticColor, variant, children, className, }: ConfigProp$g) => react_jsx_runtime.JSX.Element;
|
|
147
147
|
|
|
148
|
-
interface ConfigProp$
|
|
148
|
+
interface ConfigProp$f {
|
|
149
149
|
semanticColor?: EnumSemanticColor;
|
|
150
150
|
variant?: EnumVariant;
|
|
151
151
|
children?: ReactNode;
|
|
@@ -157,15 +157,15 @@ interface ConfigProp$d {
|
|
|
157
157
|
type?: 'button' | 'submit' | 'reset';
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
declare const Button: ({ semanticColor, variant, children, className, onClick, disabled, type, size, loading, }: ConfigProp$
|
|
160
|
+
declare const Button: ({ semanticColor, variant, children, className, onClick, disabled, type, size, loading, }: ConfigProp$f) => react_jsx_runtime.JSX.Element;
|
|
161
161
|
|
|
162
|
-
interface ConfigProp$
|
|
162
|
+
interface ConfigProp$e {
|
|
163
163
|
options: Array<CommonOption>;
|
|
164
164
|
value?: string | null;
|
|
165
165
|
onChange: (_v: string) => void;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
declare const CheckboxSingleList: (props: ConfigProp$
|
|
168
|
+
declare const CheckboxSingleList: (props: ConfigProp$e) => react_jsx_runtime.JSX.Element;
|
|
169
169
|
|
|
170
170
|
interface ConfigListRespT<T> {
|
|
171
171
|
items: Array<T>;
|
|
@@ -193,7 +193,7 @@ type AdvancedFilterCtx = {
|
|
|
193
193
|
draftFilters: Record<string, unknown>;
|
|
194
194
|
setDraftFilters: (_updater: (_prev: Record<string, unknown>) => Record<string, unknown>) => void;
|
|
195
195
|
};
|
|
196
|
-
type ConfigProp$
|
|
196
|
+
type ConfigProp$d<T, P> = {
|
|
197
197
|
columns: Array<ColumnDef<T>>;
|
|
198
198
|
renderList: (_params: P) => Promise<ConfigApiRespT<ConfigListRespT<T>>>;
|
|
199
199
|
getRowId?: (_row: T) => string;
|
|
@@ -209,7 +209,19 @@ type ConfigProp$b<T, P> = {
|
|
|
209
209
|
navigate?: (_id: UUID) => void;
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
interface
|
|
212
|
+
interface ConfigProps$1 {
|
|
213
|
+
value?: string;
|
|
214
|
+
placeholder?: string;
|
|
215
|
+
widthClassName?: string;
|
|
216
|
+
onChange: (_value: string) => void;
|
|
217
|
+
onSearch: () => void;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare const KeywordSearchBar: (props: ConfigProps$1) => react_jsx_runtime.JSX.Element;
|
|
221
|
+
|
|
222
|
+
declare const TableEmpty: () => react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
224
|
+
interface ConfigProp$c {
|
|
213
225
|
id?: string;
|
|
214
226
|
mode: EnumFormMode;
|
|
215
227
|
children: ReactNode;
|
|
@@ -223,9 +235,16 @@ interface ConfigProp$a {
|
|
|
223
235
|
onOpenChange: (_nextOpen: boolean) => void;
|
|
224
236
|
}
|
|
225
237
|
|
|
226
|
-
declare const TableFormDialog: (props: ConfigProp$
|
|
238
|
+
declare const TableFormDialog: (props: ConfigProp$c) => react_jsx_runtime.JSX.Element;
|
|
227
239
|
|
|
228
|
-
interface ConfigProp$
|
|
240
|
+
interface ConfigProp$b {
|
|
241
|
+
text: string;
|
|
242
|
+
className?: ClassValue;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare const TableHeaderText: (props: ConfigProp$b) => react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
interface ConfigProp$a {
|
|
229
248
|
totalPage: number;
|
|
230
249
|
size: number;
|
|
231
250
|
sizeList: Array<number>;
|
|
@@ -234,9 +253,16 @@ interface ConfigProp$9 {
|
|
|
234
253
|
onUpdateSize: (_size: number) => void;
|
|
235
254
|
}
|
|
236
255
|
|
|
237
|
-
declare const TablePagination: (props: ConfigProp$
|
|
256
|
+
declare const TablePagination: (props: ConfigProp$a) => react_jsx_runtime.JSX.Element;
|
|
257
|
+
|
|
258
|
+
interface ConfigProp$9 {
|
|
259
|
+
text?: string | number;
|
|
260
|
+
wrap?: boolean;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare const TableText: (props: ConfigProp$9) => react_jsx_runtime.JSX.Element;
|
|
238
264
|
|
|
239
|
-
declare const DataTable: <T, P>(props: ConfigProp$
|
|
265
|
+
declare const DataTable: <T, P>(props: ConfigProp$d<T, P>) => react_jsx_runtime.JSX.Element;
|
|
240
266
|
|
|
241
267
|
interface ConfigProp$8 {
|
|
242
268
|
children: ReactNode;
|
|
@@ -462,4 +488,4 @@ declare const zCoerceNumberOptional: (label: string, min?: number, max?: number)
|
|
|
462
488
|
declare const zDecimal: (label: string, min?: number, max?: number) => z.ZodString;
|
|
463
489
|
declare const zDecimalOptional: (label: string, min?: number, max?: number) => z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
464
490
|
|
|
465
|
-
export { Badge, Button, CheckboxSingleList, type CommonObject, type CommonOption, type ConfigCascaderOption, type ConfigDropdownCascaderMultiProp, type ConfigDropdownCascaderSingleProp, DataTable, Dialog, DisplayTable, DropdownCascaderMulti, DropdownCascaderSingle, EnumApprovalStatus, EnumApprovalStatusLabel, EnumApprovalView, EnumApprovalViewLabel, EnumEntityStatus, EnumEntityStatusLabel, EnumFormMode, EnumFormModeLabel, EnumGenderType, EnumGenderTypeLabel, EnumMapProvider, EnumMapProviderLabel, EnumOrderStatus, EnumOrderStatusLabel, EnumPublishMethod, EnumPublishMethodLabel, EnumSemanticColor, EnumSemanticColorLabel, EnumStorageMethod, EnumStorageMethodLabel, EnumVariant, EnumVariantLabel, FieldController, FieldGroup, FieldPlain, FieldText, FormSelect, FormTimePicker, MediaUploader, Provider, type SemanticColorToken, TableFormDialog, TablePagination, Text, type UUID, boolToText, cn, emptyToUndefined, enumApprovalStatusOptions, enumApprovalViewOptions, enumEntityStatusOptions, enumFormModeOptions, enumGenderTypeOptions, enumMapProviderOptions, enumOrderStatusOptions, enumPublishMethodOptions, enumSemanticColorOptions, enumStorageMethodOptions, enumToOptions, enumValues, enumVariantOptions, formatDateTime, formatDecimal, genUuid, getOptionMap, getSemanticColor, getSuccessMessage, isEmpty, isFormData, isValidEmail, isValidURL, renderBody, renderCascaderNodes, renderConfirmFooter, renderFooter, renderInput, renderPasswordInput, renderTextarea, zBool, zCoerceNumber, zCoerceNumberOptional, zDate, zDateOptional, zDecimal, zDecimalOptional, zEmail, zEnumNullable, zEnumNullableOptional, zEnumNullableRequired, zEnumOptional, zEnumRequired, zId, zIdCard, zIdCardOptional, zIds, zImageId, zImageIdRequired, zImageIds, zImageIdsOptional, zNumber, zNumberOptional, zPhone, zTextOptional, zTextRequired, zTexts };
|
|
491
|
+
export { Badge, Button, CheckboxSingleList, type CommonObject, type CommonOption, type ConfigCascaderOption, type ConfigDropdownCascaderMultiProp, type ConfigDropdownCascaderSingleProp, type ConfigRenderBase, type ConfigRenderPasswordInput, DataTable, Dialog, DisplayTable, DropdownCascaderMulti, DropdownCascaderSingle, EnumApprovalStatus, EnumApprovalStatusLabel, EnumApprovalView, EnumApprovalViewLabel, EnumEntityStatus, EnumEntityStatusLabel, EnumFormMode, EnumFormModeLabel, EnumGenderType, EnumGenderTypeLabel, EnumMapProvider, EnumMapProviderLabel, EnumOrderStatus, EnumOrderStatusLabel, EnumPublishMethod, EnumPublishMethodLabel, EnumSemanticColor, EnumSemanticColorLabel, EnumStorageMethod, EnumStorageMethodLabel, EnumVariant, EnumVariantLabel, FieldController, FieldGroup, FieldPlain, FieldText, FormSelect, FormTimePicker, KeywordSearchBar, MediaUploader, Provider, type SemanticColorToken, TableEmpty, TableFormDialog, TableHeaderText, TablePagination, TableText, Text, type UUID, boolToText, cn, emptyToUndefined, enumApprovalStatusOptions, enumApprovalViewOptions, enumEntityStatusOptions, enumFormModeOptions, enumGenderTypeOptions, enumMapProviderOptions, enumOrderStatusOptions, enumPublishMethodOptions, enumSemanticColorOptions, enumStorageMethodOptions, enumToOptions, enumValues, enumVariantOptions, formatDateTime, formatDecimal, genUuid, getOptionMap, getSemanticColor, getSuccessMessage, isEmpty, isFormData, isValidEmail, isValidURL, renderBody, renderCascaderNodes, renderConfirmFooter, renderFooter, renderInput, renderPasswordInput, renderTextarea, zBool, zCoerceNumber, zCoerceNumberOptional, zDate, zDateOptional, zDecimal, zDecimalOptional, zEmail, zEnumNullable, zEnumNullableOptional, zEnumNullableRequired, zEnumOptional, zEnumRequired, zId, zIdCard, zIdCardOptional, zIds, zImageId, zImageIdRequired, zImageIds, zImageIdsOptional, zNumber, zNumberOptional, zPhone, zTextOptional, zTextRequired, zTexts };
|
package/dist/index.js
CHANGED
|
@@ -1082,14 +1082,36 @@ import {
|
|
|
1082
1082
|
RotateCcwIcon
|
|
1083
1083
|
} from "lucide-react";
|
|
1084
1084
|
|
|
1085
|
+
// src/components/data-table/component/keyword-search-bar/index.tsx
|
|
1086
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1087
|
+
var KeywordSearchBar = (props) => {
|
|
1088
|
+
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1089
|
+
/* @__PURE__ */ jsx13(
|
|
1090
|
+
Input,
|
|
1091
|
+
{
|
|
1092
|
+
className: props.widthClassName ?? "w-65",
|
|
1093
|
+
placeholder: props.placeholder ?? "\u8BF7\u8F93\u5165\u5173\u952E\u5B57",
|
|
1094
|
+
value: props.value ?? "",
|
|
1095
|
+
onChange: (e) => props.onChange(e.target.value),
|
|
1096
|
+
onKeyDown: (e) => {
|
|
1097
|
+
if (e.key === "Enter") {
|
|
1098
|
+
props.onSearch();
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
),
|
|
1103
|
+
/* @__PURE__ */ jsx13(Button, { size: "sm", onClick: props.onSearch, children: "\u67E5\u8BE2" })
|
|
1104
|
+
] });
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1085
1107
|
// src/components/data-table/component/table-empty/index.tsx
|
|
1086
1108
|
import { FolderOpen } from "lucide-react";
|
|
1087
1109
|
|
|
1088
1110
|
// src/shadcn/components/empty.tsx
|
|
1089
1111
|
import { cva as cva4 } from "class-variance-authority";
|
|
1090
|
-
import { jsx as
|
|
1112
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1091
1113
|
function Empty({ className, ...props }) {
|
|
1092
|
-
return /* @__PURE__ */
|
|
1114
|
+
return /* @__PURE__ */ jsx14(
|
|
1093
1115
|
"div",
|
|
1094
1116
|
{
|
|
1095
1117
|
"data-slot": "empty",
|
|
@@ -1102,7 +1124,7 @@ function Empty({ className, ...props }) {
|
|
|
1102
1124
|
);
|
|
1103
1125
|
}
|
|
1104
1126
|
function EmptyHeader({ className, ...props }) {
|
|
1105
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ jsx14(
|
|
1106
1128
|
"div",
|
|
1107
1129
|
{
|
|
1108
1130
|
"data-slot": "empty-header",
|
|
@@ -1133,7 +1155,7 @@ function EmptyMedia({
|
|
|
1133
1155
|
variant = "default",
|
|
1134
1156
|
...props
|
|
1135
1157
|
}) {
|
|
1136
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx14(
|
|
1137
1159
|
"div",
|
|
1138
1160
|
{
|
|
1139
1161
|
"data-slot": "empty-icon",
|
|
@@ -1144,7 +1166,7 @@ function EmptyMedia({
|
|
|
1144
1166
|
);
|
|
1145
1167
|
}
|
|
1146
1168
|
function EmptyDescription({ className, ...props }) {
|
|
1147
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ jsx14(
|
|
1148
1170
|
"div",
|
|
1149
1171
|
{
|
|
1150
1172
|
"data-slot": "empty-description",
|
|
@@ -1158,14 +1180,110 @@ function EmptyDescription({ className, ...props }) {
|
|
|
1158
1180
|
}
|
|
1159
1181
|
|
|
1160
1182
|
// src/components/data-table/component/table-empty/index.tsx
|
|
1161
|
-
import { jsx as
|
|
1183
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1162
1184
|
var TableEmpty = () => {
|
|
1163
|
-
return /* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1185
|
+
return /* @__PURE__ */ jsx15(Empty, { children: /* @__PURE__ */ jsxs6(EmptyHeader, { children: [
|
|
1186
|
+
/* @__PURE__ */ jsx15(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx15(FolderOpen, {}) }),
|
|
1187
|
+
/* @__PURE__ */ jsx15(EmptyDescription, { children: "\u5C1A\u672A\u521B\u5EFA\u4EFB\u4F55\u5185\u5BB9" })
|
|
1166
1188
|
] }) });
|
|
1167
1189
|
};
|
|
1168
|
-
|
|
1190
|
+
|
|
1191
|
+
// src/shadcn/components/scroll-area.tsx
|
|
1192
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
1193
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1194
|
+
function ScrollArea({
|
|
1195
|
+
className,
|
|
1196
|
+
children,
|
|
1197
|
+
...props
|
|
1198
|
+
}) {
|
|
1199
|
+
return /* @__PURE__ */ jsxs7(
|
|
1200
|
+
ScrollAreaPrimitive.Root,
|
|
1201
|
+
{
|
|
1202
|
+
"data-slot": "scroll-area",
|
|
1203
|
+
className: cn("relative", className),
|
|
1204
|
+
...props,
|
|
1205
|
+
children: [
|
|
1206
|
+
/* @__PURE__ */ jsx16(
|
|
1207
|
+
ScrollAreaPrimitive.Viewport,
|
|
1208
|
+
{
|
|
1209
|
+
"data-slot": "scroll-area-viewport",
|
|
1210
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
1211
|
+
children
|
|
1212
|
+
}
|
|
1213
|
+
),
|
|
1214
|
+
/* @__PURE__ */ jsx16(ScrollBar, {}),
|
|
1215
|
+
/* @__PURE__ */ jsx16(ScrollAreaPrimitive.Corner, {})
|
|
1216
|
+
]
|
|
1217
|
+
}
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
function ScrollBar({
|
|
1221
|
+
className,
|
|
1222
|
+
orientation = "vertical",
|
|
1223
|
+
...props
|
|
1224
|
+
}) {
|
|
1225
|
+
return /* @__PURE__ */ jsx16(
|
|
1226
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1227
|
+
{
|
|
1228
|
+
"data-slot": "scroll-area-scrollbar",
|
|
1229
|
+
orientation,
|
|
1230
|
+
className: cn(
|
|
1231
|
+
"flex touch-none p-px transition-colors select-none",
|
|
1232
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
1233
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
1234
|
+
className
|
|
1235
|
+
),
|
|
1236
|
+
...props,
|
|
1237
|
+
children: /* @__PURE__ */ jsx16(
|
|
1238
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
1239
|
+
{
|
|
1240
|
+
"data-slot": "scroll-area-thumb",
|
|
1241
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
1242
|
+
}
|
|
1243
|
+
)
|
|
1244
|
+
}
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
// src/components/data-table/component/table-form-dialog/index.tsx
|
|
1249
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1250
|
+
var TableFormDialog = (props) => {
|
|
1251
|
+
const { bodyHeight = "h-100", limitHeight = true } = props;
|
|
1252
|
+
return /* @__PURE__ */ jsxs8(Dialog, { open: props.open, onOpenChange: props.onOpenChange, children: [
|
|
1253
|
+
/* @__PURE__ */ jsx17(DialogTrigger, { asChild: true, children: props.children }),
|
|
1254
|
+
/* @__PURE__ */ jsxs8(DialogContent, { className: "sm:max-w-106.25", children: [
|
|
1255
|
+
/* @__PURE__ */ jsx17(DialogHeader, { children: /* @__PURE__ */ jsx17(DialogTitle, { children: EnumFormModeLabel[props.mode] }) }),
|
|
1256
|
+
/* @__PURE__ */ jsxs8("form", { onSubmit: props.onSubmit, className: "space-y-4", children: [
|
|
1257
|
+
/* @__PURE__ */ jsx17(
|
|
1258
|
+
ScrollArea,
|
|
1259
|
+
{
|
|
1260
|
+
className: cn2(
|
|
1261
|
+
"rounded-md",
|
|
1262
|
+
props.mode !== EnumFormMode.DELETE && limitHeight && (typeof bodyHeight === "number" ? `h-[${bodyHeight}px]` : bodyHeight)
|
|
1263
|
+
),
|
|
1264
|
+
children: /* @__PURE__ */ jsx17("div", { className: "p-2", children: props.renderBody() })
|
|
1265
|
+
}
|
|
1266
|
+
),
|
|
1267
|
+
props.renderFooter()
|
|
1268
|
+
] })
|
|
1269
|
+
] })
|
|
1270
|
+
] });
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
// src/components/data-table/component/table-header-text/index.tsx
|
|
1274
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1275
|
+
var TableHeaderText = (props) => {
|
|
1276
|
+
return /* @__PURE__ */ jsx18(
|
|
1277
|
+
"div",
|
|
1278
|
+
{
|
|
1279
|
+
className: cn2(
|
|
1280
|
+
"px-0 text-left whitespace-nowrap truncate",
|
|
1281
|
+
props.className
|
|
1282
|
+
),
|
|
1283
|
+
children: props.text
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
};
|
|
1169
1287
|
|
|
1170
1288
|
// src/components/data-table/component/table-pagination/index.tsx
|
|
1171
1289
|
import { useMemo } from "react";
|
|
@@ -1176,9 +1294,9 @@ import {
|
|
|
1176
1294
|
ChevronRightIcon,
|
|
1177
1295
|
MoreHorizontalIcon
|
|
1178
1296
|
} from "lucide-react";
|
|
1179
|
-
import { jsx as
|
|
1297
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1180
1298
|
function Pagination({ className, ...props }) {
|
|
1181
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ jsx19(
|
|
1182
1300
|
"nav",
|
|
1183
1301
|
{
|
|
1184
1302
|
role: "navigation",
|
|
@@ -1193,7 +1311,7 @@ function PaginationContent({
|
|
|
1193
1311
|
className,
|
|
1194
1312
|
...props
|
|
1195
1313
|
}) {
|
|
1196
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ jsx19(
|
|
1197
1315
|
"ul",
|
|
1198
1316
|
{
|
|
1199
1317
|
"data-slot": "pagination-content",
|
|
@@ -1203,7 +1321,7 @@ function PaginationContent({
|
|
|
1203
1321
|
);
|
|
1204
1322
|
}
|
|
1205
1323
|
function PaginationItem({ ...props }) {
|
|
1206
|
-
return /* @__PURE__ */
|
|
1324
|
+
return /* @__PURE__ */ jsx19("li", { "data-slot": "pagination-item", ...props });
|
|
1207
1325
|
}
|
|
1208
1326
|
function PaginationLink({
|
|
1209
1327
|
className,
|
|
@@ -1211,7 +1329,7 @@ function PaginationLink({
|
|
|
1211
1329
|
size = "icon",
|
|
1212
1330
|
...props
|
|
1213
1331
|
}) {
|
|
1214
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ jsx19(
|
|
1215
1333
|
"a",
|
|
1216
1334
|
{
|
|
1217
1335
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -1232,7 +1350,7 @@ function PaginationPrevious({
|
|
|
1232
1350
|
className,
|
|
1233
1351
|
...props
|
|
1234
1352
|
}) {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ jsxs9(
|
|
1236
1354
|
PaginationLink,
|
|
1237
1355
|
{
|
|
1238
1356
|
"aria-label": "Go to previous page",
|
|
@@ -1240,8 +1358,8 @@ function PaginationPrevious({
|
|
|
1240
1358
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1241
1359
|
...props,
|
|
1242
1360
|
children: [
|
|
1243
|
-
/* @__PURE__ */
|
|
1244
|
-
/* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ jsx19(ChevronLeftIcon, {}),
|
|
1362
|
+
/* @__PURE__ */ jsx19("span", { className: "hidden sm:block", children: "Previous" })
|
|
1245
1363
|
]
|
|
1246
1364
|
}
|
|
1247
1365
|
);
|
|
@@ -1250,7 +1368,7 @@ function PaginationNext({
|
|
|
1250
1368
|
className,
|
|
1251
1369
|
...props
|
|
1252
1370
|
}) {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1371
|
+
return /* @__PURE__ */ jsxs9(
|
|
1254
1372
|
PaginationLink,
|
|
1255
1373
|
{
|
|
1256
1374
|
"aria-label": "Go to next page",
|
|
@@ -1258,8 +1376,8 @@ function PaginationNext({
|
|
|
1258
1376
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1259
1377
|
...props,
|
|
1260
1378
|
children: [
|
|
1261
|
-
/* @__PURE__ */
|
|
1262
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ jsx19("span", { className: "hidden sm:block", children: "Next" }),
|
|
1380
|
+
/* @__PURE__ */ jsx19(ChevronRightIcon, {})
|
|
1263
1381
|
]
|
|
1264
1382
|
}
|
|
1265
1383
|
);
|
|
@@ -1268,7 +1386,7 @@ function PaginationEllipsis({
|
|
|
1268
1386
|
className,
|
|
1269
1387
|
...props
|
|
1270
1388
|
}) {
|
|
1271
|
-
return /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ jsxs9(
|
|
1272
1390
|
"span",
|
|
1273
1391
|
{
|
|
1274
1392
|
"aria-hidden": true,
|
|
@@ -1276,8 +1394,8 @@ function PaginationEllipsis({
|
|
|
1276
1394
|
className: cn("flex size-9 items-center justify-center", className),
|
|
1277
1395
|
...props,
|
|
1278
1396
|
children: [
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ jsx19(MoreHorizontalIcon, { className: "size-4" }),
|
|
1398
|
+
/* @__PURE__ */ jsx19("span", { className: "sr-only", children: "More pages" })
|
|
1281
1399
|
]
|
|
1282
1400
|
}
|
|
1283
1401
|
);
|
|
@@ -1286,21 +1404,21 @@ function PaginationEllipsis({
|
|
|
1286
1404
|
// src/shadcn/components/select.tsx
|
|
1287
1405
|
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
1288
1406
|
import { Select as SelectPrimitive } from "radix-ui";
|
|
1289
|
-
import { jsx as
|
|
1407
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1290
1408
|
function Select({
|
|
1291
1409
|
...props
|
|
1292
1410
|
}) {
|
|
1293
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ jsx20(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1294
1412
|
}
|
|
1295
1413
|
function SelectGroup({
|
|
1296
1414
|
...props
|
|
1297
1415
|
}) {
|
|
1298
|
-
return /* @__PURE__ */
|
|
1416
|
+
return /* @__PURE__ */ jsx20(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1299
1417
|
}
|
|
1300
1418
|
function SelectValue({
|
|
1301
1419
|
...props
|
|
1302
1420
|
}) {
|
|
1303
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsx20(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1304
1422
|
}
|
|
1305
1423
|
function SelectTrigger({
|
|
1306
1424
|
className,
|
|
@@ -1308,7 +1426,7 @@ function SelectTrigger({
|
|
|
1308
1426
|
children,
|
|
1309
1427
|
...props
|
|
1310
1428
|
}) {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ jsxs10(
|
|
1312
1430
|
SelectPrimitive.Trigger,
|
|
1313
1431
|
{
|
|
1314
1432
|
"data-slot": "select-trigger",
|
|
@@ -1320,7 +1438,7 @@ function SelectTrigger({
|
|
|
1320
1438
|
...props,
|
|
1321
1439
|
children: [
|
|
1322
1440
|
children,
|
|
1323
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx20(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1324
1442
|
]
|
|
1325
1443
|
}
|
|
1326
1444
|
);
|
|
@@ -1332,7 +1450,7 @@ function SelectContent({
|
|
|
1332
1450
|
align = "center",
|
|
1333
1451
|
...props
|
|
1334
1452
|
}) {
|
|
1335
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ jsx20(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs10(
|
|
1336
1454
|
SelectPrimitive.Content,
|
|
1337
1455
|
{
|
|
1338
1456
|
"data-slot": "select-content",
|
|
@@ -1345,8 +1463,8 @@ function SelectContent({
|
|
|
1345
1463
|
align,
|
|
1346
1464
|
...props,
|
|
1347
1465
|
children: [
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ jsx20(SelectScrollUpButton, {}),
|
|
1467
|
+
/* @__PURE__ */ jsx20(
|
|
1350
1468
|
SelectPrimitive.Viewport,
|
|
1351
1469
|
{
|
|
1352
1470
|
className: cn(
|
|
@@ -1356,7 +1474,7 @@ function SelectContent({
|
|
|
1356
1474
|
children
|
|
1357
1475
|
}
|
|
1358
1476
|
),
|
|
1359
|
-
/* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ jsx20(SelectScrollDownButton, {})
|
|
1360
1478
|
]
|
|
1361
1479
|
}
|
|
1362
1480
|
) });
|
|
@@ -1366,7 +1484,7 @@ function SelectItem({
|
|
|
1366
1484
|
children,
|
|
1367
1485
|
...props
|
|
1368
1486
|
}) {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ jsxs10(
|
|
1370
1488
|
SelectPrimitive.Item,
|
|
1371
1489
|
{
|
|
1372
1490
|
"data-slot": "select-item",
|
|
@@ -1376,15 +1494,15 @@ function SelectItem({
|
|
|
1376
1494
|
),
|
|
1377
1495
|
...props,
|
|
1378
1496
|
children: [
|
|
1379
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ jsx20(
|
|
1380
1498
|
"span",
|
|
1381
1499
|
{
|
|
1382
1500
|
"data-slot": "select-item-indicator",
|
|
1383
1501
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1384
|
-
children: /* @__PURE__ */
|
|
1502
|
+
children: /* @__PURE__ */ jsx20(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx20(CheckIcon2, { className: "size-4" }) })
|
|
1385
1503
|
}
|
|
1386
1504
|
),
|
|
1387
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.ItemText, { children })
|
|
1388
1506
|
]
|
|
1389
1507
|
}
|
|
1390
1508
|
);
|
|
@@ -1393,7 +1511,7 @@ function SelectScrollUpButton({
|
|
|
1393
1511
|
className,
|
|
1394
1512
|
...props
|
|
1395
1513
|
}) {
|
|
1396
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ jsx20(
|
|
1397
1515
|
SelectPrimitive.ScrollUpButton,
|
|
1398
1516
|
{
|
|
1399
1517
|
"data-slot": "select-scroll-up-button",
|
|
@@ -1402,7 +1520,7 @@ function SelectScrollUpButton({
|
|
|
1402
1520
|
className
|
|
1403
1521
|
),
|
|
1404
1522
|
...props,
|
|
1405
|
-
children: /* @__PURE__ */
|
|
1523
|
+
children: /* @__PURE__ */ jsx20(ChevronUpIcon, { className: "size-4" })
|
|
1406
1524
|
}
|
|
1407
1525
|
);
|
|
1408
1526
|
}
|
|
@@ -1410,7 +1528,7 @@ function SelectScrollDownButton({
|
|
|
1410
1528
|
className,
|
|
1411
1529
|
...props
|
|
1412
1530
|
}) {
|
|
1413
|
-
return /* @__PURE__ */
|
|
1531
|
+
return /* @__PURE__ */ jsx20(
|
|
1414
1532
|
SelectPrimitive.ScrollDownButton,
|
|
1415
1533
|
{
|
|
1416
1534
|
"data-slot": "select-scroll-down-button",
|
|
@@ -1419,13 +1537,13 @@ function SelectScrollDownButton({
|
|
|
1419
1537
|
className
|
|
1420
1538
|
),
|
|
1421
1539
|
...props,
|
|
1422
|
-
children: /* @__PURE__ */
|
|
1540
|
+
children: /* @__PURE__ */ jsx20(ChevronDownIcon, { className: "size-4" })
|
|
1423
1541
|
}
|
|
1424
1542
|
);
|
|
1425
1543
|
}
|
|
1426
1544
|
|
|
1427
1545
|
// src/components/data-table/component/table-pagination/index.tsx
|
|
1428
|
-
import { jsx as
|
|
1546
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1429
1547
|
var buildPages = (current, total) => {
|
|
1430
1548
|
if (total <= 0) return [];
|
|
1431
1549
|
if (total <= 7) {
|
|
@@ -1467,9 +1585,9 @@ var TablePagination = (props) => {
|
|
|
1467
1585
|
() => buildPages(props.currentPage, props.totalPage),
|
|
1468
1586
|
[props]
|
|
1469
1587
|
);
|
|
1470
|
-
return /* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex w-full items-center gap-8 lg:w-fit", children: [
|
|
1589
|
+
/* @__PURE__ */ jsx21("div", { className: "ml-auto flex items-center gap-2 lg:ml-0", children: /* @__PURE__ */ jsx21(Pagination, { children: /* @__PURE__ */ jsxs11(PaginationContent, { children: [
|
|
1590
|
+
/* @__PURE__ */ jsx21(PaginationItem, { children: /* @__PURE__ */ jsx21(
|
|
1473
1591
|
PaginationPrevious,
|
|
1474
1592
|
{
|
|
1475
1593
|
onClick: () => updateCurrentPage(props.currentPage - 1),
|
|
@@ -1479,9 +1597,9 @@ var TablePagination = (props) => {
|
|
|
1479
1597
|
) }),
|
|
1480
1598
|
pageItems.map((item) => {
|
|
1481
1599
|
if (item.type === "ellipsis") {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsx21(PaginationItem, { children: /* @__PURE__ */ jsx21(PaginationEllipsis, {}) }, item.key);
|
|
1483
1601
|
}
|
|
1484
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsx21(PaginationItem, { children: /* @__PURE__ */ jsx21(
|
|
1485
1603
|
PaginationLink,
|
|
1486
1604
|
{
|
|
1487
1605
|
isActive: props.currentPage === item.page,
|
|
@@ -1490,7 +1608,7 @@ var TablePagination = (props) => {
|
|
|
1490
1608
|
}
|
|
1491
1609
|
) }, item.page);
|
|
1492
1610
|
}),
|
|
1493
|
-
/* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ jsx21(PaginationItem, { children: /* @__PURE__ */ jsx21(
|
|
1494
1612
|
PaginationNext,
|
|
1495
1613
|
{
|
|
1496
1614
|
onClick: () => updateCurrentPage(props.currentPage + 1),
|
|
@@ -1499,7 +1617,7 @@ var TablePagination = (props) => {
|
|
|
1499
1617
|
}
|
|
1500
1618
|
) })
|
|
1501
1619
|
] }) }) }),
|
|
1502
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsx21("div", { className: "hidden items-center gap-2 lg:flex", children: /* @__PURE__ */ jsxs11(
|
|
1503
1621
|
Select,
|
|
1504
1622
|
{
|
|
1505
1623
|
value: String(props.size),
|
|
@@ -1507,8 +1625,8 @@ var TablePagination = (props) => {
|
|
|
1507
1625
|
props.onUpdateSize(Number(value));
|
|
1508
1626
|
},
|
|
1509
1627
|
children: [
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ jsx21(SelectTrigger, { className: "w-20", id: "rows-per-page", children: /* @__PURE__ */ jsx21(SelectValue, {}) }),
|
|
1629
|
+
/* @__PURE__ */ jsx21(SelectContent, { side: "top", children: props.sizeList.map((pageSize) => /* @__PURE__ */ jsxs11(SelectItem, { value: `${pageSize}`, children: [
|
|
1512
1630
|
pageSize,
|
|
1513
1631
|
"/\u9875"
|
|
1514
1632
|
] }, pageSize)) })
|
|
@@ -1518,24 +1636,39 @@ var TablePagination = (props) => {
|
|
|
1518
1636
|
] });
|
|
1519
1637
|
};
|
|
1520
1638
|
|
|
1639
|
+
// src/components/data-table/component/table-text/index.tsx
|
|
1640
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1641
|
+
var TableText = (props) => {
|
|
1642
|
+
return /* @__PURE__ */ jsx22(
|
|
1643
|
+
"div",
|
|
1644
|
+
{
|
|
1645
|
+
className: cn2(
|
|
1646
|
+
"text-foreground px-0 text-left",
|
|
1647
|
+
props.wrap ? "whitespace-normal wrap-break-word" : "whitespace-nowrap truncate"
|
|
1648
|
+
),
|
|
1649
|
+
children: props.text ?? ""
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1521
1654
|
// src/shadcn/components/dropdown-menu.tsx
|
|
1522
1655
|
import { CheckIcon as CheckIcon3, ChevronRightIcon as ChevronRightIcon2, CircleIcon } from "lucide-react";
|
|
1523
1656
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
1524
|
-
import { jsx as
|
|
1657
|
+
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1525
1658
|
function DropdownMenu({
|
|
1526
1659
|
...props
|
|
1527
1660
|
}) {
|
|
1528
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ jsx23(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1529
1662
|
}
|
|
1530
1663
|
function DropdownMenuPortal({
|
|
1531
1664
|
...props
|
|
1532
1665
|
}) {
|
|
1533
|
-
return /* @__PURE__ */
|
|
1666
|
+
return /* @__PURE__ */ jsx23(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1534
1667
|
}
|
|
1535
1668
|
function DropdownMenuTrigger({
|
|
1536
1669
|
...props
|
|
1537
1670
|
}) {
|
|
1538
|
-
return /* @__PURE__ */
|
|
1671
|
+
return /* @__PURE__ */ jsx23(
|
|
1539
1672
|
DropdownMenuPrimitive.Trigger,
|
|
1540
1673
|
{
|
|
1541
1674
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1548,7 +1681,7 @@ function DropdownMenuContent({
|
|
|
1548
1681
|
sideOffset = 4,
|
|
1549
1682
|
...props
|
|
1550
1683
|
}) {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ jsx23(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
|
|
1552
1685
|
DropdownMenuPrimitive.Content,
|
|
1553
1686
|
{
|
|
1554
1687
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1567,7 +1700,7 @@ function DropdownMenuItem({
|
|
|
1567
1700
|
variant = "default",
|
|
1568
1701
|
...props
|
|
1569
1702
|
}) {
|
|
1570
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsx23(
|
|
1571
1704
|
DropdownMenuPrimitive.Item,
|
|
1572
1705
|
{
|
|
1573
1706
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1587,7 +1720,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1587
1720
|
checked,
|
|
1588
1721
|
...props
|
|
1589
1722
|
}) {
|
|
1590
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ jsxs12(
|
|
1591
1724
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1592
1725
|
{
|
|
1593
1726
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -1598,7 +1731,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1598
1731
|
checked,
|
|
1599
1732
|
...props,
|
|
1600
1733
|
children: [
|
|
1601
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ jsx23("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx23(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx23(CheckIcon3, { className: "size-4" }) }) }),
|
|
1602
1735
|
children
|
|
1603
1736
|
]
|
|
1604
1737
|
}
|
|
@@ -1607,7 +1740,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1607
1740
|
function DropdownMenuSub({
|
|
1608
1741
|
...props
|
|
1609
1742
|
}) {
|
|
1610
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ jsx23(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1611
1744
|
}
|
|
1612
1745
|
function DropdownMenuSubTrigger({
|
|
1613
1746
|
className,
|
|
@@ -1615,7 +1748,7 @@ function DropdownMenuSubTrigger({
|
|
|
1615
1748
|
children,
|
|
1616
1749
|
...props
|
|
1617
1750
|
}) {
|
|
1618
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ jsxs12(
|
|
1619
1752
|
DropdownMenuPrimitive.SubTrigger,
|
|
1620
1753
|
{
|
|
1621
1754
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -1627,7 +1760,7 @@ function DropdownMenuSubTrigger({
|
|
|
1627
1760
|
...props,
|
|
1628
1761
|
children: [
|
|
1629
1762
|
children,
|
|
1630
|
-
/* @__PURE__ */
|
|
1763
|
+
/* @__PURE__ */ jsx23(ChevronRightIcon2, { className: "ml-auto size-4" })
|
|
1631
1764
|
]
|
|
1632
1765
|
}
|
|
1633
1766
|
);
|
|
@@ -1636,7 +1769,7 @@ function DropdownMenuSubContent({
|
|
|
1636
1769
|
className,
|
|
1637
1770
|
...props
|
|
1638
1771
|
}) {
|
|
1639
|
-
return /* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsx23(
|
|
1640
1773
|
DropdownMenuPrimitive.SubContent,
|
|
1641
1774
|
{
|
|
1642
1775
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1652,20 +1785,20 @@ function DropdownMenuSubContent({
|
|
|
1652
1785
|
// src/shadcn/components/sheet.tsx
|
|
1653
1786
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
1654
1787
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
1655
|
-
import { jsx as
|
|
1788
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1656
1789
|
function Sheet({ ...props }) {
|
|
1657
|
-
return /* @__PURE__ */
|
|
1790
|
+
return /* @__PURE__ */ jsx24(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
1658
1791
|
}
|
|
1659
1792
|
function SheetPortal({
|
|
1660
1793
|
...props
|
|
1661
1794
|
}) {
|
|
1662
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ jsx24(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1663
1796
|
}
|
|
1664
1797
|
function SheetOverlay({
|
|
1665
1798
|
className,
|
|
1666
1799
|
...props
|
|
1667
1800
|
}) {
|
|
1668
|
-
return /* @__PURE__ */
|
|
1801
|
+
return /* @__PURE__ */ jsx24(
|
|
1669
1802
|
SheetPrimitive.Overlay,
|
|
1670
1803
|
{
|
|
1671
1804
|
"data-slot": "sheet-overlay",
|
|
@@ -1684,9 +1817,9 @@ function SheetContent({
|
|
|
1684
1817
|
showCloseButton = true,
|
|
1685
1818
|
...props
|
|
1686
1819
|
}) {
|
|
1687
|
-
return /* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
/* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsxs13(SheetPortal, { children: [
|
|
1821
|
+
/* @__PURE__ */ jsx24(SheetOverlay, {}),
|
|
1822
|
+
/* @__PURE__ */ jsxs13(
|
|
1690
1823
|
SheetPrimitive.Content,
|
|
1691
1824
|
{
|
|
1692
1825
|
"data-slot": "sheet-content",
|
|
@@ -1701,9 +1834,9 @@ function SheetContent({
|
|
|
1701
1834
|
...props,
|
|
1702
1835
|
children: [
|
|
1703
1836
|
children,
|
|
1704
|
-
showCloseButton && /* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1706
|
-
/* @__PURE__ */
|
|
1837
|
+
showCloseButton && /* @__PURE__ */ jsxs13(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx24(XIcon2, { className: "size-4" }),
|
|
1839
|
+
/* @__PURE__ */ jsx24("span", { className: "sr-only", children: "Close" })
|
|
1707
1840
|
] })
|
|
1708
1841
|
]
|
|
1709
1842
|
}
|
|
@@ -1711,7 +1844,7 @@ function SheetContent({
|
|
|
1711
1844
|
] });
|
|
1712
1845
|
}
|
|
1713
1846
|
function SheetHeader({ className, ...props }) {
|
|
1714
|
-
return /* @__PURE__ */
|
|
1847
|
+
return /* @__PURE__ */ jsx24(
|
|
1715
1848
|
"div",
|
|
1716
1849
|
{
|
|
1717
1850
|
"data-slot": "sheet-header",
|
|
@@ -1721,7 +1854,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
1721
1854
|
);
|
|
1722
1855
|
}
|
|
1723
1856
|
function SheetFooter({ className, ...props }) {
|
|
1724
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx24(
|
|
1725
1858
|
"div",
|
|
1726
1859
|
{
|
|
1727
1860
|
"data-slot": "sheet-footer",
|
|
@@ -1734,7 +1867,7 @@ function SheetTitle({
|
|
|
1734
1867
|
className,
|
|
1735
1868
|
...props
|
|
1736
1869
|
}) {
|
|
1737
|
-
return /* @__PURE__ */
|
|
1870
|
+
return /* @__PURE__ */ jsx24(
|
|
1738
1871
|
SheetPrimitive.Title,
|
|
1739
1872
|
{
|
|
1740
1873
|
"data-slot": "sheet-title",
|
|
@@ -1745,14 +1878,14 @@ function SheetTitle({
|
|
|
1745
1878
|
}
|
|
1746
1879
|
|
|
1747
1880
|
// src/shadcn/components/table.tsx
|
|
1748
|
-
import { jsx as
|
|
1881
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1749
1882
|
function Table({ className, ...props }) {
|
|
1750
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ jsx25(
|
|
1751
1884
|
"div",
|
|
1752
1885
|
{
|
|
1753
1886
|
"data-slot": "table-container",
|
|
1754
1887
|
className: "relative w-full overflow-x-auto",
|
|
1755
|
-
children: /* @__PURE__ */
|
|
1888
|
+
children: /* @__PURE__ */ jsx25(
|
|
1756
1889
|
"table",
|
|
1757
1890
|
{
|
|
1758
1891
|
"data-slot": "table",
|
|
@@ -1764,7 +1897,7 @@ function Table({ className, ...props }) {
|
|
|
1764
1897
|
);
|
|
1765
1898
|
}
|
|
1766
1899
|
function TableHeader({ className, ...props }) {
|
|
1767
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsx25(
|
|
1768
1901
|
"thead",
|
|
1769
1902
|
{
|
|
1770
1903
|
"data-slot": "table-header",
|
|
@@ -1774,7 +1907,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1774
1907
|
);
|
|
1775
1908
|
}
|
|
1776
1909
|
function TableBody({ className, ...props }) {
|
|
1777
|
-
return /* @__PURE__ */
|
|
1910
|
+
return /* @__PURE__ */ jsx25(
|
|
1778
1911
|
"tbody",
|
|
1779
1912
|
{
|
|
1780
1913
|
"data-slot": "table-body",
|
|
@@ -1784,7 +1917,7 @@ function TableBody({ className, ...props }) {
|
|
|
1784
1917
|
);
|
|
1785
1918
|
}
|
|
1786
1919
|
function TableRow({ className, ...props }) {
|
|
1787
|
-
return /* @__PURE__ */
|
|
1920
|
+
return /* @__PURE__ */ jsx25(
|
|
1788
1921
|
"tr",
|
|
1789
1922
|
{
|
|
1790
1923
|
"data-slot": "table-row",
|
|
@@ -1797,7 +1930,7 @@ function TableRow({ className, ...props }) {
|
|
|
1797
1930
|
);
|
|
1798
1931
|
}
|
|
1799
1932
|
function TableHead({ className, ...props }) {
|
|
1800
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ jsx25(
|
|
1801
1934
|
"th",
|
|
1802
1935
|
{
|
|
1803
1936
|
"data-slot": "table-head",
|
|
@@ -1810,7 +1943,7 @@ function TableHead({ className, ...props }) {
|
|
|
1810
1943
|
);
|
|
1811
1944
|
}
|
|
1812
1945
|
function TableCell({ className, ...props }) {
|
|
1813
|
-
return /* @__PURE__ */
|
|
1946
|
+
return /* @__PURE__ */ jsx25(
|
|
1814
1947
|
"td",
|
|
1815
1948
|
{
|
|
1816
1949
|
"data-slot": "table-cell",
|
|
@@ -1823,97 +1956,6 @@ function TableCell({ className, ...props }) {
|
|
|
1823
1956
|
);
|
|
1824
1957
|
}
|
|
1825
1958
|
|
|
1826
|
-
// src/components/data-table/component/keyword-search-bar/index.tsx
|
|
1827
|
-
import { Fragment, jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1828
|
-
|
|
1829
|
-
// src/shadcn/components/scroll-area.tsx
|
|
1830
|
-
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
1831
|
-
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1832
|
-
function ScrollArea({
|
|
1833
|
-
className,
|
|
1834
|
-
children,
|
|
1835
|
-
...props
|
|
1836
|
-
}) {
|
|
1837
|
-
return /* @__PURE__ */ jsxs12(
|
|
1838
|
-
ScrollAreaPrimitive.Root,
|
|
1839
|
-
{
|
|
1840
|
-
"data-slot": "scroll-area",
|
|
1841
|
-
className: cn("relative", className),
|
|
1842
|
-
...props,
|
|
1843
|
-
children: [
|
|
1844
|
-
/* @__PURE__ */ jsx22(
|
|
1845
|
-
ScrollAreaPrimitive.Viewport,
|
|
1846
|
-
{
|
|
1847
|
-
"data-slot": "scroll-area-viewport",
|
|
1848
|
-
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
1849
|
-
children
|
|
1850
|
-
}
|
|
1851
|
-
),
|
|
1852
|
-
/* @__PURE__ */ jsx22(ScrollBar, {}),
|
|
1853
|
-
/* @__PURE__ */ jsx22(ScrollAreaPrimitive.Corner, {})
|
|
1854
|
-
]
|
|
1855
|
-
}
|
|
1856
|
-
);
|
|
1857
|
-
}
|
|
1858
|
-
function ScrollBar({
|
|
1859
|
-
className,
|
|
1860
|
-
orientation = "vertical",
|
|
1861
|
-
...props
|
|
1862
|
-
}) {
|
|
1863
|
-
return /* @__PURE__ */ jsx22(
|
|
1864
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1865
|
-
{
|
|
1866
|
-
"data-slot": "scroll-area-scrollbar",
|
|
1867
|
-
orientation,
|
|
1868
|
-
className: cn(
|
|
1869
|
-
"flex touch-none p-px transition-colors select-none",
|
|
1870
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
1871
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
1872
|
-
className
|
|
1873
|
-
),
|
|
1874
|
-
...props,
|
|
1875
|
-
children: /* @__PURE__ */ jsx22(
|
|
1876
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
1877
|
-
{
|
|
1878
|
-
"data-slot": "scroll-area-thumb",
|
|
1879
|
-
className: "relative flex-1 rounded-full bg-border"
|
|
1880
|
-
}
|
|
1881
|
-
)
|
|
1882
|
-
}
|
|
1883
|
-
);
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
// src/components/data-table/component/table-form-dialog/index.tsx
|
|
1887
|
-
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1888
|
-
var TableFormDialog = (props) => {
|
|
1889
|
-
const { bodyHeight = "h-100", limitHeight = true } = props;
|
|
1890
|
-
return /* @__PURE__ */ jsxs13(Dialog, { open: props.open, onOpenChange: props.onOpenChange, children: [
|
|
1891
|
-
/* @__PURE__ */ jsx23(DialogTrigger, { asChild: true, children: props.children }),
|
|
1892
|
-
/* @__PURE__ */ jsxs13(DialogContent, { className: "sm:max-w-106.25", children: [
|
|
1893
|
-
/* @__PURE__ */ jsx23(DialogHeader, { children: /* @__PURE__ */ jsx23(DialogTitle, { children: EnumFormModeLabel[props.mode] }) }),
|
|
1894
|
-
/* @__PURE__ */ jsxs13("form", { onSubmit: props.onSubmit, className: "space-y-4", children: [
|
|
1895
|
-
/* @__PURE__ */ jsx23(
|
|
1896
|
-
ScrollArea,
|
|
1897
|
-
{
|
|
1898
|
-
className: cn2(
|
|
1899
|
-
"rounded-md",
|
|
1900
|
-
props.mode !== EnumFormMode.DELETE && limitHeight && (typeof bodyHeight === "number" ? `h-[${bodyHeight}px]` : bodyHeight)
|
|
1901
|
-
),
|
|
1902
|
-
children: /* @__PURE__ */ jsx23("div", { className: "p-2", children: props.renderBody() })
|
|
1903
|
-
}
|
|
1904
|
-
),
|
|
1905
|
-
props.renderFooter()
|
|
1906
|
-
] })
|
|
1907
|
-
] })
|
|
1908
|
-
] });
|
|
1909
|
-
};
|
|
1910
|
-
|
|
1911
|
-
// src/components/data-table/component/table-header-text/index.tsx
|
|
1912
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1913
|
-
|
|
1914
|
-
// src/components/data-table/component/table-text/index.tsx
|
|
1915
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1916
|
-
|
|
1917
1959
|
// src/components/data-table/index.tsx
|
|
1918
1960
|
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1919
1961
|
var buildParams = (page, size, keyword, filters, sorting) => {
|
|
@@ -2117,7 +2159,7 @@ var DataTable = (props) => {
|
|
|
2117
2159
|
{
|
|
2118
2160
|
colSpan: props.columns.length,
|
|
2119
2161
|
className: "h-24 text-center",
|
|
2120
|
-
children: /* @__PURE__ */ jsx26(
|
|
2162
|
+
children: /* @__PURE__ */ jsx26(TableEmpty, {})
|
|
2121
2163
|
}
|
|
2122
2164
|
) }) })
|
|
2123
2165
|
] }) }),
|
|
@@ -2258,7 +2300,7 @@ var DisplayTable = (props) => {
|
|
|
2258
2300
|
{
|
|
2259
2301
|
colSpan: props.columns.length,
|
|
2260
2302
|
className: "h-24 text-center",
|
|
2261
|
-
children: /* @__PURE__ */ jsx28(
|
|
2303
|
+
children: /* @__PURE__ */ jsx28(TableEmpty, {})
|
|
2262
2304
|
}
|
|
2263
2305
|
) }) })
|
|
2264
2306
|
] }) });
|
|
@@ -3386,10 +3428,14 @@ export {
|
|
|
3386
3428
|
FieldText,
|
|
3387
3429
|
FormSelect,
|
|
3388
3430
|
FormTimePicker,
|
|
3431
|
+
KeywordSearchBar,
|
|
3389
3432
|
MediaUploader,
|
|
3390
3433
|
Provider,
|
|
3434
|
+
TableEmpty,
|
|
3391
3435
|
TableFormDialog,
|
|
3436
|
+
TableHeaderText,
|
|
3392
3437
|
TablePagination,
|
|
3438
|
+
TableText,
|
|
3393
3439
|
Text,
|
|
3394
3440
|
boolToText,
|
|
3395
3441
|
cn2 as cn,
|