@openway/ui 1.0.0 → 1.0.1
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/README.md +203 -181
- package/dist/chunk-CJQNI3QX.js +3 -0
- package/dist/chunk-CJQNI3QX.js.map +1 -0
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2642 -1103
- package/dist/index.d.ts +2642 -1103
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/query.cjs +3 -0
- package/dist/query.cjs.map +1 -0
- package/dist/query.d.cts +309 -0
- package/dist/query.d.ts +309 -0
- package/dist/query.js +3 -0
- package/dist/query.js.map +1 -0
- package/dist/useInfiniteScroll-DAlgjUN4.d.cts +325 -0
- package/dist/useInfiniteScroll-DAlgjUN4.d.ts +325 -0
- package/docs/AGENTS.md +144 -0
- package/docs/README.md +150 -0
- package/docs/SKILL.md +54 -0
- package/docs/components/alert.md +246 -0
- package/docs/components/badge.md +238 -0
- package/docs/components/button.md +262 -0
- package/docs/components/carousel.md +354 -0
- package/docs/components/checkbox.md +252 -0
- package/docs/components/collapse.md +318 -0
- package/docs/components/confirm.md +322 -0
- package/docs/components/datepicker.md +259 -0
- package/docs/components/daterangepicker.md +260 -0
- package/docs/components/datetimepicker.md +226 -0
- package/docs/components/datetimerangepicker.md +222 -0
- package/docs/components/dropdown.md +275 -0
- package/docs/components/empty.md +200 -0
- package/docs/components/file-preview.md +180 -0
- package/docs/components/input.md +559 -0
- package/docs/components/modal.md +293 -0
- package/docs/components/popover.md +255 -0
- package/docs/components/radio.md +245 -0
- package/docs/components/select.md +254 -0
- package/docs/components/skeleton.md +150 -0
- package/docs/components/slider.md +346 -0
- package/docs/components/table.md +316 -0
- package/docs/components/tabs.md +432 -0
- package/docs/components/textarea.md +193 -0
- package/docs/components/timepicker.md +242 -0
- package/docs/components/timerangepicker.md +210 -0
- package/docs/components/toast.md +282 -0
- package/docs/components/toggle.md +211 -0
- package/docs/components/tooltip.md +213 -0
- package/docs/components/upload-avatar.md +318 -0
- package/docs/components/upload-file.md +245 -0
- package/docs/components/upload-image.md +126 -0
- package/docs/hooks/useDebounce.md +92 -0
- package/docs/hooks/useInfiniteScroll.md +95 -0
- package/docs/hooks/useSelectInfiniteQuery.md +123 -0
- package/docs/hooks/useTableQuery.md +124 -0
- package/package.json +31 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import react__default, { ButtonHTMLAttributes, Ref, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SVGProps, ReactElement, CSSProperties, HTMLProps, RefObject, MouseEvent } from 'react';
|
|
2
|
+
import react, { ButtonHTMLAttributes, Ref, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SVGProps, ReactElement, CSSProperties, HTMLProps, RefObject, MouseEvent, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
4
3
|
import { TextareaAutosizeProps } from 'react-textarea-autosize';
|
|
5
4
|
import { ToastT, ToasterProps as ToasterProps$1 } from 'sonner';
|
|
6
5
|
import { Placement, ExtendedRefs, ReferenceType, FloatingContext } from '@floating-ui/react';
|
|
6
|
+
import { E as EmptyProps, a as EmptyPresetImage, S as SelectProps, M as MultiSelectProps, b as SelectOptionItem, c as SelectSize, d as SelectVariant, e as SelectColor, f as SelectRadius, g as SelectSearchPlacement, h as SelectFilterField, i as SelectFilterLayout } from './useInfiniteScroll-DAlgjUN4.cjs';
|
|
7
|
+
export { B as BaseSelectProps, j as EmptyLayout, k as EmptySize, l as SelectFilterType, m as SelectSearchMode, n as SingleSelectProps, U as UseInfiniteScrollOptions, o as UseInfiniteScrollReturn, u as useInfiniteScroll } from './useInfiniteScroll-DAlgjUN4.cjs';
|
|
8
|
+
import { Accept, DropzoneRootProps } from 'react-dropzone';
|
|
7
9
|
import { ImageProps } from 'next/image';
|
|
10
|
+
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
11
|
+
import { TableFeatures, FilterFn, RowData, TableOptions, ColumnHelper, ReactTable, ColumnDef, Row, PaginationState, OnChangeFn, SortingState, RowSelectionState, ColumnVisibilityState, FilterFnOption, ColumnFiltersState, Header, Column } from '@tanstack/react-table';
|
|
12
|
+
export { Column, ColumnDef, ColumnFiltersState, ColumnHelper, ColumnVisibilityState, Header, OnChangeFn, PaginationState, ReactTable, Row, RowData, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
13
|
+
import { RankingInfo } from '@tanstack/match-sorter-utils';
|
|
14
|
+
export { RankingInfo } from '@tanstack/match-sorter-utils';
|
|
8
15
|
|
|
9
16
|
type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
10
17
|
type ButtonVariant = "filled" | "soft" | "ghost" | "text" | "outline" | "other";
|
|
@@ -1109,7 +1116,108 @@ type CheckboxColor = "primary" | "secondary" | "error" | "success" | "warning" |
|
|
|
1109
1116
|
type CheckboxRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
1110
1117
|
type CheckboxLabelPlacement = "right" | "left";
|
|
1111
1118
|
type CheckboxGroupOrientation = "horizontal" | "vertical";
|
|
1119
|
+
type CheckboxSearchMode = "client" | "server";
|
|
1120
|
+
/**
|
|
1121
|
+
* Đại diện cho một phần tử tùy chọn checkbox trong danh sách options của CheckboxGroup
|
|
1122
|
+
*/
|
|
1123
|
+
interface CheckboxOptionItem<TData = unknown> {
|
|
1124
|
+
/** Giá trị định danh duy nhất của checkbox */
|
|
1125
|
+
value: string;
|
|
1126
|
+
/** Nhãn hiển thị chính của checkbox */
|
|
1127
|
+
label: ReactNode;
|
|
1128
|
+
/** Đoạn mô tả/chú thích phụ hiển thị bên dưới nhãn */
|
|
1129
|
+
description?: ReactNode;
|
|
1130
|
+
/** Vô hiệu hóa tương tác của ô checkbox này */
|
|
1131
|
+
disabled?: boolean;
|
|
1132
|
+
/** Chế độ chỉ đọc cho ô checkbox này */
|
|
1133
|
+
isReadOnly?: boolean;
|
|
1134
|
+
/** Trạng thái gạch ngang (indeterminate) */
|
|
1135
|
+
indeterminate?: boolean;
|
|
1136
|
+
/** Dữ liệu gốc đính kèm (dùng khi tìm kiếm hoặc lưu trữ ngữ cảnh nâng cao) */
|
|
1137
|
+
data?: TData;
|
|
1138
|
+
/** Cho phép mở rộng các trường tùy biến phục vụ tìm kiếm theo searchField */
|
|
1139
|
+
[key: string]: unknown;
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng của Checkbox
|
|
1143
|
+
*/
|
|
1144
|
+
interface CheckboxConfig {
|
|
1145
|
+
/**
|
|
1146
|
+
* Đánh dấu trường bắt buộc (hiển thị dấu * đỏ cạnh label)
|
|
1147
|
+
* @default false
|
|
1148
|
+
*/
|
|
1149
|
+
isRequired?: boolean;
|
|
1150
|
+
/**
|
|
1151
|
+
* Trạng thái báo lỗi (viền đỏ, aria-invalid="true")
|
|
1152
|
+
* @default false
|
|
1153
|
+
*/
|
|
1154
|
+
isInvalid?: boolean;
|
|
1155
|
+
/**
|
|
1156
|
+
* Trạng thái đang tải (vô hiệu hóa tương tác, aria-busy="true")
|
|
1157
|
+
* @default false
|
|
1158
|
+
*/
|
|
1159
|
+
isLoading?: boolean;
|
|
1160
|
+
/**
|
|
1161
|
+
* Hiển thị biểu tượng xoay spinner khi đang ở trạng thái loading
|
|
1162
|
+
* @default false
|
|
1163
|
+
*/
|
|
1164
|
+
showSpinner?: boolean;
|
|
1165
|
+
/**
|
|
1166
|
+
* Trạng thái trung gian (indeterminate / gạch ngang) - thường dùng cho "Chọn tất cả"
|
|
1167
|
+
* @default false
|
|
1168
|
+
*/
|
|
1169
|
+
indeterminate?: boolean;
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng của CheckboxGroup
|
|
1173
|
+
*/
|
|
1174
|
+
interface CheckboxGroupConfig {
|
|
1175
|
+
/**
|
|
1176
|
+
* Đánh dấu trường bắt buộc chọn
|
|
1177
|
+
* @default false
|
|
1178
|
+
*/
|
|
1179
|
+
isRequired?: boolean;
|
|
1180
|
+
/**
|
|
1181
|
+
* Trạng thái báo lỗi cho cả nhóm
|
|
1182
|
+
* @default false
|
|
1183
|
+
*/
|
|
1184
|
+
isInvalid?: boolean;
|
|
1185
|
+
/**
|
|
1186
|
+
* Trạng thái đang tải cho cả nhóm
|
|
1187
|
+
* @default false
|
|
1188
|
+
*/
|
|
1189
|
+
isLoading?: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* Hiển thị spinner cho các checkbox con đang tải
|
|
1192
|
+
* @default false
|
|
1193
|
+
*/
|
|
1194
|
+
showSpinner?: boolean;
|
|
1195
|
+
/**
|
|
1196
|
+
* Chế độ chỉ đọc cho cả nhóm
|
|
1197
|
+
* @default false
|
|
1198
|
+
*/
|
|
1199
|
+
isReadOnly?: boolean;
|
|
1200
|
+
/**
|
|
1201
|
+
* Kích hoạt thanh tìm kiếm tích hợp
|
|
1202
|
+
* @default false
|
|
1203
|
+
*/
|
|
1204
|
+
searchable?: boolean;
|
|
1205
|
+
/**
|
|
1206
|
+
* Trạng thái đang tải tìm kiếm (Server mode)
|
|
1207
|
+
* @default false
|
|
1208
|
+
*/
|
|
1209
|
+
isSearching?: boolean;
|
|
1210
|
+
/**
|
|
1211
|
+
* Tự động bảo lưu các mục đã chọn khi lọc tìm kiếm
|
|
1212
|
+
* @default true
|
|
1213
|
+
*/
|
|
1214
|
+
preserveSelected?: boolean;
|
|
1215
|
+
}
|
|
1112
1216
|
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
1217
|
+
/**
|
|
1218
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng (isRequired, isInvalid, isLoading, indeterminate,...)
|
|
1219
|
+
*/
|
|
1220
|
+
config?: CheckboxConfig;
|
|
1113
1221
|
/**
|
|
1114
1222
|
* Ref chuyển tiếp đến phần tử HTML input (React 19)
|
|
1115
1223
|
*/
|
|
@@ -1141,29 +1249,9 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "siz
|
|
|
1141
1249
|
/**
|
|
1142
1250
|
* Tùy chỉnh độ bo góc của ô checkbox:
|
|
1143
1251
|
* - 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'
|
|
1144
|
-
* @default
|
|
1252
|
+
* @default 'md'
|
|
1145
1253
|
*/
|
|
1146
1254
|
radius?: CheckboxRadius;
|
|
1147
|
-
/**
|
|
1148
|
-
* Trạng thái trung gian (indeterminate / gạch ngang) - thường dùng cho "Chọn tất cả"
|
|
1149
|
-
* @default false
|
|
1150
|
-
*/
|
|
1151
|
-
indeterminate?: boolean;
|
|
1152
|
-
/**
|
|
1153
|
-
* Trạng thái đang tải (hiển thị spinner và vô hiệu hóa tương tác)
|
|
1154
|
-
* @default false
|
|
1155
|
-
*/
|
|
1156
|
-
isLoading?: boolean;
|
|
1157
|
-
/**
|
|
1158
|
-
* Trạng thái báo lỗi (viền đỏ, aria-invalid="true")
|
|
1159
|
-
* @default false
|
|
1160
|
-
*/
|
|
1161
|
-
isInvalid?: boolean;
|
|
1162
|
-
/**
|
|
1163
|
-
* Đánh dấu trường bắt buộc (hiển thị dấu * đỏ cạnh label)
|
|
1164
|
-
* @default false
|
|
1165
|
-
*/
|
|
1166
|
-
isRequired?: boolean;
|
|
1167
1255
|
/**
|
|
1168
1256
|
* Nhãn văn bản hiển thị cạnh ô checkbox
|
|
1169
1257
|
*/
|
|
@@ -1208,11 +1296,72 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "siz
|
|
|
1208
1296
|
*/
|
|
1209
1297
|
helperClassName?: string;
|
|
1210
1298
|
}
|
|
1211
|
-
interface CheckboxGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1299
|
+
interface CheckboxGroupProps<TData = unknown> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1300
|
+
/**
|
|
1301
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng
|
|
1302
|
+
*/
|
|
1303
|
+
config?: CheckboxGroupConfig;
|
|
1212
1304
|
/**
|
|
1213
1305
|
* Ref chuyển tiếp đến container thẻ div của nhóm (React 19)
|
|
1214
1306
|
*/
|
|
1215
1307
|
ref?: Ref<HTMLDivElement>;
|
|
1308
|
+
/**
|
|
1309
|
+
* Danh sách các tùy chọn checkbox dạng mảng dữ liệu (Data-driven)
|
|
1310
|
+
* @default []
|
|
1311
|
+
*/
|
|
1312
|
+
options?: CheckboxOptionItem<TData>[];
|
|
1313
|
+
/**
|
|
1314
|
+
* Chế độ tìm kiếm: 'client' (lọc tại chỗ) hoặc 'server' (gọi API sau debounce)
|
|
1315
|
+
* @default 'client'
|
|
1316
|
+
*/
|
|
1317
|
+
searchMode?: CheckboxSearchMode;
|
|
1318
|
+
/**
|
|
1319
|
+
* Placeholder hiển thị trong ô tìm kiếm
|
|
1320
|
+
* @default 'Tìm kiếm...'
|
|
1321
|
+
*/
|
|
1322
|
+
searchPlaceholder?: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Giá trị từ khóa tìm kiếm (khi kiểm soát Controlled)
|
|
1325
|
+
*/
|
|
1326
|
+
searchValue?: string;
|
|
1327
|
+
/**
|
|
1328
|
+
* Giá trị từ khóa tìm kiếm mặc định ban đầu (Uncontrolled)
|
|
1329
|
+
*/
|
|
1330
|
+
defaultSearchValue?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* Callback kích hoạt khi từ khóa tìm kiếm thay đổi
|
|
1333
|
+
*/
|
|
1334
|
+
onSearchChange?: (value: string) => void;
|
|
1335
|
+
/**
|
|
1336
|
+
* Tùy biến className cho ô input tìm kiếm
|
|
1337
|
+
*/
|
|
1338
|
+
searchClassName?: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* Trường dữ liệu để so khớp khi tìm kiếm ở mode client.
|
|
1341
|
+
* - Có thể truyền 1 field (string, ví dụ 'label', 'email', 'code')
|
|
1342
|
+
* - Hoặc nhiều fields (string[], ví dụ ['label', 'email', 'description']) để tìm kiếm mở rộng (OR).
|
|
1343
|
+
* @default 'label'
|
|
1344
|
+
*/
|
|
1345
|
+
searchField?: string | string[];
|
|
1346
|
+
/**
|
|
1347
|
+
* Hàm tùy biến lọc dữ liệu ở mode client
|
|
1348
|
+
*/
|
|
1349
|
+
filterFn?: (option: CheckboxOptionItem<TData>, query: string) => boolean;
|
|
1350
|
+
/**
|
|
1351
|
+
* Callback được gọi sau khi debounce khi người dùng gõ tìm kiếm (ở Server mode).
|
|
1352
|
+
* Có thể trả về Promise danh sách options mới hoặc cập nhật prop options từ ngoài.
|
|
1353
|
+
*/
|
|
1354
|
+
onSearch?: (query: string) => void | Promise<CheckboxOptionItem<TData>[] | void>;
|
|
1355
|
+
/**
|
|
1356
|
+
* Thời gian trì hoãn debounce tính theo mili-giây (Server mode).
|
|
1357
|
+
* @default 300
|
|
1358
|
+
*/
|
|
1359
|
+
debounceMs?: number;
|
|
1360
|
+
/**
|
|
1361
|
+
* Nội dung hiển thị khi không có kết quả tìm kiếm
|
|
1362
|
+
* @default 'Không tìm thấy kết quả'
|
|
1363
|
+
*/
|
|
1364
|
+
emptyText?: ReactNode;
|
|
1216
1365
|
/**
|
|
1217
1366
|
* Mảng các giá trị được chọn (Controlled mode)
|
|
1218
1367
|
*/
|
|
@@ -1249,26 +1398,6 @@ interface CheckboxGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
|
|
|
1249
1398
|
* @default false
|
|
1250
1399
|
*/
|
|
1251
1400
|
disabled?: boolean;
|
|
1252
|
-
/**
|
|
1253
|
-
* Chế độ chỉ đọc cho toàn bộ checkbox trong nhóm
|
|
1254
|
-
* @default false
|
|
1255
|
-
*/
|
|
1256
|
-
isReadOnly?: boolean;
|
|
1257
|
-
/**
|
|
1258
|
-
* Trạng thái đang tải cho toàn bộ checkbox trong nhóm
|
|
1259
|
-
* @default false
|
|
1260
|
-
*/
|
|
1261
|
-
isLoading?: boolean;
|
|
1262
|
-
/**
|
|
1263
|
-
* Trạng thái báo lỗi cho cả nhóm
|
|
1264
|
-
* @default false
|
|
1265
|
-
*/
|
|
1266
|
-
isInvalid?: boolean;
|
|
1267
|
-
/**
|
|
1268
|
-
* Đánh dấu nhóm bắt buộc phải chọn
|
|
1269
|
-
* @default false
|
|
1270
|
-
*/
|
|
1271
|
-
isRequired?: boolean;
|
|
1272
1401
|
/**
|
|
1273
1402
|
* Tiêu đề / Nhãn chung cho cả nhóm checkbox
|
|
1274
1403
|
*/
|
|
@@ -1305,40 +1434,42 @@ interface CheckboxGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
|
|
|
1305
1434
|
* Tùy biến className cho helperText hoặc errorMessage của nhóm
|
|
1306
1435
|
*/
|
|
1307
1436
|
helperClassName?: string;
|
|
1308
|
-
/**
|
|
1309
|
-
* Danh sách các component con (thường là các Checkbox)
|
|
1310
|
-
*/
|
|
1311
|
-
children?: ReactNode;
|
|
1312
1437
|
}
|
|
1313
1438
|
|
|
1314
|
-
declare function Checkbox({ size
|
|
1315
|
-
|
|
1316
|
-
declare function CheckboxGroup({ value: valueProp, defaultValue, onChange, size, color, variant, radius, disabled, isReadOnly, isLoading, isInvalid: isInvalidProp, isRequired, label, helperText, errorMessage, orientation, labelPlacement, className, wrapperClassName, labelClassName, helperClassName, children, ref, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
1439
|
+
declare function Checkbox({ size, variant, color, radius, config, label: labelProp, children, helperText, errorMessage, labelPlacement, icon, indeterminateIcon, wrapperClassName, boxClassName, labelClassName, helperClassName, className, checked: checkedProp, defaultChecked, disabled, readOnly, onChange, value, id: idProp, name, ref, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
1317
1440
|
|
|
1318
|
-
|
|
1319
|
-
name?: string;
|
|
1320
|
-
value?: string[];
|
|
1321
|
-
onChange?: (val: string, checked: boolean) => void;
|
|
1322
|
-
size?: CheckboxSize;
|
|
1323
|
-
color?: CheckboxColor;
|
|
1324
|
-
variant?: CheckboxVariant;
|
|
1325
|
-
radius?: CheckboxRadius;
|
|
1326
|
-
disabled?: boolean;
|
|
1327
|
-
isReadOnly?: boolean;
|
|
1328
|
-
isLoading?: boolean;
|
|
1329
|
-
isInvalid?: boolean;
|
|
1330
|
-
isRequired?: boolean;
|
|
1331
|
-
labelPlacement?: CheckboxLabelPlacement;
|
|
1332
|
-
}
|
|
1333
|
-
declare const CheckboxGroupContext: react.Context<CheckboxGroupContextValue | undefined>;
|
|
1334
|
-
declare const useCheckboxGroupContext: () => CheckboxGroupContextValue | undefined;
|
|
1441
|
+
declare function CheckboxGroup<TData = unknown>({ value: valueProp, defaultValue, onChange, size, color, variant, radius, disabled, label, helperText, errorMessage, orientation, labelPlacement, className, wrapperClassName, labelClassName, helperClassName, options, config, searchMode, searchPlaceholder, searchValue: searchValueProp, defaultSearchValue, onSearchChange, searchClassName, searchField, filterFn, onSearch, debounceMs, emptyText, children, ref, ...props }: CheckboxGroupProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1335
1442
|
|
|
1336
1443
|
type RadioSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
1337
1444
|
type RadioVariant = "filled" | "outline" | "soft" | "other";
|
|
1338
1445
|
type RadioColor = "primary" | "secondary" | "error" | "success" | "warning" | "info" | "neutral";
|
|
1339
1446
|
type RadioLabelPlacement = "right" | "left";
|
|
1340
1447
|
type RadioGroupOrientation = "horizontal" | "vertical";
|
|
1448
|
+
/**
|
|
1449
|
+
* Cau hinh tap trung cac co trang thai / tinh nang cua Radio
|
|
1450
|
+
*/
|
|
1451
|
+
interface RadioConfig {
|
|
1452
|
+
/**
|
|
1453
|
+
* Danh dau bat buoc
|
|
1454
|
+
* @default false
|
|
1455
|
+
*/
|
|
1456
|
+
isRequired?: boolean;
|
|
1457
|
+
/**
|
|
1458
|
+
* Trang thai bao loi (vien do)
|
|
1459
|
+
* @default false
|
|
1460
|
+
*/
|
|
1461
|
+
isInvalid?: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* Trang thai dang tai (hien thi spinner va vo hieu hoa tuong tac)
|
|
1464
|
+
* @default false
|
|
1465
|
+
*/
|
|
1466
|
+
isLoading?: boolean;
|
|
1467
|
+
}
|
|
1341
1468
|
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
1469
|
+
/**
|
|
1470
|
+
* Cau hinh tap trung cac co trang thai / tinh nang
|
|
1471
|
+
*/
|
|
1472
|
+
config?: RadioConfig;
|
|
1342
1473
|
/**
|
|
1343
1474
|
* Ref chuyen tiep den phan tu HTML input (React 19)
|
|
1344
1475
|
*/
|
|
@@ -1367,21 +1498,6 @@ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"
|
|
|
1367
1498
|
* @default 'primary'
|
|
1368
1499
|
*/
|
|
1369
1500
|
color?: RadioColor;
|
|
1370
|
-
/**
|
|
1371
|
-
* Trang thai dang tai (hien thi spinner va vo hieu hoa tuong tac)
|
|
1372
|
-
* @default false
|
|
1373
|
-
*/
|
|
1374
|
-
isLoading?: boolean;
|
|
1375
|
-
/**
|
|
1376
|
-
* Trang thai bao loi (vien do, aria-invalid="true")
|
|
1377
|
-
* @default false
|
|
1378
|
-
*/
|
|
1379
|
-
isInvalid?: boolean;
|
|
1380
|
-
/**
|
|
1381
|
-
* Danh dau truong bat buoc (hien thi dau * do canh label)
|
|
1382
|
-
* @default false
|
|
1383
|
-
*/
|
|
1384
|
-
isRequired?: boolean;
|
|
1385
1501
|
/**
|
|
1386
1502
|
* Nhan van ban hien thi canh o radio
|
|
1387
1503
|
*/
|
|
@@ -1422,125 +1538,214 @@ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"
|
|
|
1422
1538
|
*/
|
|
1423
1539
|
helperClassName?: string;
|
|
1424
1540
|
}
|
|
1425
|
-
|
|
1541
|
+
type RadioSearchMode = "client" | "server";
|
|
1542
|
+
interface RadioOptionItem<TData = unknown> {
|
|
1426
1543
|
/**
|
|
1427
|
-
*
|
|
1544
|
+
* Gia tri dinh danh duy nhat cua radio option
|
|
1428
1545
|
*/
|
|
1429
|
-
|
|
1546
|
+
value: string;
|
|
1430
1547
|
/**
|
|
1431
|
-
*
|
|
1548
|
+
* Nhan van ban hoac node hien thi
|
|
1432
1549
|
*/
|
|
1433
|
-
|
|
1550
|
+
label?: ReactNode;
|
|
1434
1551
|
/**
|
|
1435
|
-
*
|
|
1552
|
+
* Doan van ban huong dan/chu thich ben duoi
|
|
1436
1553
|
*/
|
|
1437
|
-
|
|
1554
|
+
description?: ReactNode;
|
|
1438
1555
|
/**
|
|
1439
|
-
*
|
|
1556
|
+
* Vo hieu hoa rieng cho option nay
|
|
1440
1557
|
*/
|
|
1441
|
-
|
|
1558
|
+
disabled?: boolean;
|
|
1442
1559
|
/**
|
|
1443
|
-
*
|
|
1444
|
-
* @default 'md'
|
|
1560
|
+
* Che do chi doc rieng cho option nay
|
|
1445
1561
|
*/
|
|
1446
|
-
|
|
1562
|
+
isReadOnly?: boolean;
|
|
1447
1563
|
/**
|
|
1448
|
-
*
|
|
1449
|
-
* @default 'primary'
|
|
1564
|
+
* Du lieu goc tuy chinh gan kem
|
|
1450
1565
|
*/
|
|
1451
|
-
|
|
1566
|
+
data?: TData;
|
|
1452
1567
|
/**
|
|
1453
|
-
*
|
|
1454
|
-
* @default 'filled'
|
|
1568
|
+
* Ho tro cac truong tuy y khac de phuc vu loc theo searchField
|
|
1455
1569
|
*/
|
|
1456
|
-
|
|
1570
|
+
[key: string]: unknown;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* Cau hinh tap trung cac co trang thai / tinh nang cua RadioGroup
|
|
1574
|
+
*/
|
|
1575
|
+
interface RadioGroupConfig {
|
|
1457
1576
|
/**
|
|
1458
|
-
*
|
|
1577
|
+
* Danh dau bat buoc chon
|
|
1459
1578
|
* @default false
|
|
1460
1579
|
*/
|
|
1461
|
-
|
|
1580
|
+
isRequired?: boolean;
|
|
1462
1581
|
/**
|
|
1463
|
-
*
|
|
1582
|
+
* Trang thai bao loi cua nhom
|
|
1464
1583
|
* @default false
|
|
1465
1584
|
*/
|
|
1466
|
-
|
|
1585
|
+
isInvalid?: boolean;
|
|
1467
1586
|
/**
|
|
1468
|
-
* Trang thai dang tai
|
|
1587
|
+
* Trang thai dang tai cua nhom
|
|
1469
1588
|
* @default false
|
|
1470
1589
|
*/
|
|
1471
1590
|
isLoading?: boolean;
|
|
1472
1591
|
/**
|
|
1473
|
-
*
|
|
1592
|
+
* Che do chi doc cho nhom
|
|
1474
1593
|
* @default false
|
|
1475
1594
|
*/
|
|
1476
|
-
|
|
1595
|
+
isReadOnly?: boolean;
|
|
1477
1596
|
/**
|
|
1478
|
-
*
|
|
1597
|
+
* Bat o tim kiem cho nhom Radio
|
|
1479
1598
|
* @default false
|
|
1480
1599
|
*/
|
|
1481
|
-
|
|
1600
|
+
searchable?: boolean;
|
|
1482
1601
|
/**
|
|
1483
|
-
*
|
|
1602
|
+
* Trang thai dang tai tim kiem (Server mode)
|
|
1603
|
+
* @default false
|
|
1484
1604
|
*/
|
|
1485
|
-
|
|
1605
|
+
isSearching?: boolean;
|
|
1486
1606
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
* - 'horizontal': Sap xep theo chieu ngang
|
|
1490
|
-
* @default 'vertical'
|
|
1607
|
+
* Tu dong bao luu va hien thi muc da chon khi loc tim kiem
|
|
1608
|
+
* @default true
|
|
1491
1609
|
*/
|
|
1492
|
-
|
|
1610
|
+
preserveSelected?: boolean;
|
|
1611
|
+
}
|
|
1612
|
+
interface RadioGroupProps<TData = unknown> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
|
|
1493
1613
|
/**
|
|
1494
|
-
*
|
|
1495
|
-
* @default 'right'
|
|
1614
|
+
* Cau hinh tap trung cac co trang thai / tinh nang
|
|
1496
1615
|
*/
|
|
1497
|
-
|
|
1616
|
+
config?: RadioGroupConfig;
|
|
1498
1617
|
/**
|
|
1499
|
-
*
|
|
1618
|
+
* Ref chuyen tiep den container the div cua nhom (React 19)
|
|
1500
1619
|
*/
|
|
1501
|
-
|
|
1620
|
+
ref?: Ref<HTMLDivElement>;
|
|
1502
1621
|
/**
|
|
1503
|
-
*
|
|
1622
|
+
* Danh sach cac option cua radio group (Data-driven pattern)
|
|
1504
1623
|
*/
|
|
1505
|
-
|
|
1624
|
+
options?: RadioOptionItem<TData>[];
|
|
1506
1625
|
/**
|
|
1507
|
-
*
|
|
1626
|
+
* Gia tri dang duoc chon (Controlled mode) - string don hoac null de bo chon
|
|
1508
1627
|
*/
|
|
1509
|
-
|
|
1628
|
+
value?: string | null;
|
|
1510
1629
|
/**
|
|
1511
|
-
*
|
|
1630
|
+
* Gia tri mac dinh ban dau (Uncontrolled mode)
|
|
1512
1631
|
*/
|
|
1513
|
-
|
|
1632
|
+
defaultValue?: string | null;
|
|
1514
1633
|
/**
|
|
1515
|
-
*
|
|
1634
|
+
* Callback kich hoat khi radio duoc chon thay doi
|
|
1516
1635
|
*/
|
|
1517
|
-
|
|
1636
|
+
onChange?: (value: string | null) => void;
|
|
1518
1637
|
/**
|
|
1519
|
-
*
|
|
1638
|
+
* Placeholder cho o input tim kiem
|
|
1639
|
+
*/
|
|
1640
|
+
searchPlaceholder?: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* Gia tri tim kiem hien tai (Controlled search)
|
|
1643
|
+
*/
|
|
1644
|
+
searchValue?: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* Callback khi gia tri tim kiem thay doi
|
|
1647
|
+
*/
|
|
1648
|
+
onSearchChange?: (val: string) => void;
|
|
1649
|
+
/**
|
|
1650
|
+
* Che do tim kiem:
|
|
1651
|
+
* - 'client': Loc danh sach bang fuzzy matching qua match-sorter-utils (mac dinh)
|
|
1652
|
+
* - 'server': Goi API tim kiem bat dong bo qua onSearch
|
|
1653
|
+
* @default 'client'
|
|
1654
|
+
*/
|
|
1655
|
+
searchMode?: RadioSearchMode;
|
|
1656
|
+
/**
|
|
1657
|
+
* Cac truong du lieu can loc (trong che do client search).
|
|
1658
|
+
* Co the la 1 key hoac mang cac keys (vd: ['label', 'description', 'code'])
|
|
1659
|
+
* @default 'label'
|
|
1660
|
+
*/
|
|
1661
|
+
searchField?: string | string[];
|
|
1662
|
+
/**
|
|
1663
|
+
* Custom filter function cho che do client search
|
|
1664
|
+
*/
|
|
1665
|
+
filterFn?: (item: RadioOptionItem<TData>, query: string) => boolean;
|
|
1666
|
+
/**
|
|
1667
|
+
* Callback tim kiem bat dong bo cho server search mode
|
|
1668
|
+
*/
|
|
1669
|
+
onSearch?: (query: string) => Promise<RadioOptionItem<TData>[]>;
|
|
1670
|
+
/**
|
|
1671
|
+
* Thoi gian debounce khi nguoi dung nhap tu khoa tim kiem (ms)
|
|
1672
|
+
* @default 300
|
|
1673
|
+
*/
|
|
1674
|
+
debounceMs?: number;
|
|
1675
|
+
/**
|
|
1676
|
+
* Thong bao hien thi khi khong tim thay ket qua
|
|
1677
|
+
* @default 'Khong tim thay ket qua'
|
|
1678
|
+
*/
|
|
1679
|
+
emptyText?: ReactNode;
|
|
1680
|
+
/**
|
|
1681
|
+
* Tuy bien className cho khung chua o tim kiem
|
|
1682
|
+
*/
|
|
1683
|
+
searchClassName?: string;
|
|
1684
|
+
/**
|
|
1685
|
+
* Kich thuoc o input tim kiem
|
|
1686
|
+
*/
|
|
1687
|
+
searchInputSize?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
1688
|
+
/**
|
|
1689
|
+
* Kich co ap dung chung cho tat ca cac radio con
|
|
1690
|
+
* @default 'md'
|
|
1520
1691
|
*/
|
|
1521
|
-
children?: ReactNode;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
declare function Radio({ size: sizeProp, variant: variantProp, color: colorProp, isLoading: isLoadingProp, isInvalid: isInvalidProp, isRequired: isRequiredProp, label, helperText, errorMessage, labelPlacement: labelPlacementProp, dotIcon, wrapperClassName, boxClassName, labelClassName, helperClassName, className, checked: checkedProp, defaultChecked, disabled: disabledProp, readOnly: readOnlyProp, onChange, value, id: idProp, name: nameProp, ref, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
1525
|
-
|
|
1526
|
-
declare function RadioGroup({ value: valueProp, defaultValue, onChange, size, color, variant, disabled, isReadOnly, isLoading, isInvalid: isInvalidProp, isRequired, label, helperText, errorMessage, orientation, labelPlacement, className, wrapperClassName, labelClassName, helperClassName, children, ref, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
1527
|
-
|
|
1528
|
-
interface RadioGroupContextValue {
|
|
1529
|
-
name: string;
|
|
1530
|
-
value?: string | null;
|
|
1531
|
-
onChange?: (val: string | null) => void;
|
|
1532
1692
|
size?: RadioSize;
|
|
1693
|
+
/**
|
|
1694
|
+
* Mau sac ap dung chung cho tat ca cac radio con
|
|
1695
|
+
* @default 'primary'
|
|
1696
|
+
*/
|
|
1533
1697
|
color?: RadioColor;
|
|
1698
|
+
/**
|
|
1699
|
+
* Bien the ap dung chung cho tat ca cac radio con
|
|
1700
|
+
* @default 'filled'
|
|
1701
|
+
*/
|
|
1534
1702
|
variant?: RadioVariant;
|
|
1703
|
+
/**
|
|
1704
|
+
* Vo hieu hoa toan bo cac radio trong nhom
|
|
1705
|
+
* @default false
|
|
1706
|
+
*/
|
|
1535
1707
|
disabled?: boolean;
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1708
|
+
/**
|
|
1709
|
+
* Tieu de / Nhan chung cho ca nhom radio
|
|
1710
|
+
*/
|
|
1711
|
+
label?: ReactNode;
|
|
1712
|
+
/**
|
|
1713
|
+
* Huong sap xep cac radio:
|
|
1714
|
+
* - 'vertical': Sap xep theo chieu doc (mac dinh)
|
|
1715
|
+
* - 'horizontal': Sap xep theo chieu ngang
|
|
1716
|
+
* @default 'vertical'
|
|
1717
|
+
*/
|
|
1718
|
+
orientation?: RadioGroupOrientation;
|
|
1719
|
+
/**
|
|
1720
|
+
* Vi tri dat nhan cua cac radio con trong nhom
|
|
1721
|
+
* @default 'right'
|
|
1722
|
+
*/
|
|
1540
1723
|
labelPlacement?: RadioLabelPlacement;
|
|
1724
|
+
/**
|
|
1725
|
+
* Doan van ban huong dan/chu thich cho nhom
|
|
1726
|
+
*/
|
|
1727
|
+
helperText?: ReactNode;
|
|
1728
|
+
/**
|
|
1729
|
+
* Thong bao loi hien thi cho ca nhom (se tu dong kich hoat isInvalid)
|
|
1730
|
+
*/
|
|
1731
|
+
errorMessage?: ReactNode;
|
|
1732
|
+
/**
|
|
1733
|
+
* Tuy bien className cho container boc ngoai cung cua nhom
|
|
1734
|
+
*/
|
|
1735
|
+
wrapperClassName?: string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Tuy bien className cho tieu de nhan cua nhom
|
|
1738
|
+
*/
|
|
1739
|
+
labelClassName?: string;
|
|
1740
|
+
/**
|
|
1741
|
+
* Tuy bien className cho helperText hoac errorMessage cua nhom
|
|
1742
|
+
*/
|
|
1743
|
+
helperClassName?: string;
|
|
1541
1744
|
}
|
|
1542
|
-
|
|
1543
|
-
declare
|
|
1745
|
+
|
|
1746
|
+
declare function Radio({ size, variant, color, disabled, readOnly, config, labelPlacement, label, helperText, errorMessage, dotIcon, wrapperClassName, boxClassName, labelClassName, helperClassName, className, checked: checkedProp, defaultChecked, onChange, value, id: idProp, name, ref, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
1747
|
+
|
|
1748
|
+
declare function RadioGroup<TData = unknown>({ options, value: valueProp, defaultValue, onChange, size, color, variant, disabled, label, helperText, errorMessage, orientation, labelPlacement, className, wrapperClassName, labelClassName, helperClassName, config, searchPlaceholder, searchValue: searchValueProp, onSearchChange, searchMode, searchField, filterFn, onSearch, debounceMs, emptyText, searchClassName, searchInputSize: searchInputSizeProp, ref, ...props }: RadioGroupProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1544
1749
|
|
|
1545
1750
|
type ToggleSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
1546
1751
|
type ToggleVariant = "filled" | "outline" | "soft" | "other";
|
|
@@ -1744,6 +1949,19 @@ declare function TrashIcon({ width, height, className, ...props }: SVGProps<SVGS
|
|
|
1744
1949
|
|
|
1745
1950
|
declare function UploadIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
1746
1951
|
|
|
1952
|
+
interface AvatarIconProps extends SVGProps<SVGSVGElement> {
|
|
1953
|
+
variant?: "solid" | "outline";
|
|
1954
|
+
}
|
|
1955
|
+
declare function AvatarIcon({ width, height, variant, className, ...props }: AvatarIconProps): react_jsx_runtime.JSX.Element;
|
|
1956
|
+
|
|
1957
|
+
declare function ArrowUpDownIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
1958
|
+
|
|
1959
|
+
declare function ArrowUpIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
1960
|
+
|
|
1961
|
+
declare function ArrowDownIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
1962
|
+
|
|
1963
|
+
declare function SlidersHorizontalIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
1964
|
+
|
|
1747
1965
|
/**
|
|
1748
1966
|
* Các kích cỡ tiêu chuẩn của Alert:
|
|
1749
1967
|
* - 'xs': Siêu nhỏ (text-xs, padding p-2)
|
|
@@ -3099,7 +3317,6 @@ interface TabsContextValue {
|
|
|
3099
3317
|
destroyInactiveTabPane: boolean;
|
|
3100
3318
|
onCloseTab?: (key: string | number) => void;
|
|
3101
3319
|
}
|
|
3102
|
-
declare const TabsContext: react.Context<TabsContextValue | null>;
|
|
3103
3320
|
declare function useTabsContext(): TabsContextValue;
|
|
3104
3321
|
|
|
3105
3322
|
/**
|
|
@@ -4323,6 +4540,11 @@ interface CalendarProps {
|
|
|
4323
4540
|
* Class CSS bổ sung cho container lịch
|
|
4324
4541
|
*/
|
|
4325
4542
|
className?: string;
|
|
4543
|
+
/**
|
|
4544
|
+
* Hiển thị viền ngoài của Calendar
|
|
4545
|
+
* @default true
|
|
4546
|
+
*/
|
|
4547
|
+
bordered?: boolean;
|
|
4326
4548
|
}
|
|
4327
4549
|
interface DatePickerConfig {
|
|
4328
4550
|
/**
|
|
@@ -4541,11 +4763,16 @@ interface DatePickerProps {
|
|
|
4541
4763
|
* Class CSS cho popover chứa lịch
|
|
4542
4764
|
*/
|
|
4543
4765
|
popoverClassName?: string;
|
|
4766
|
+
/**
|
|
4767
|
+
* Có render popover thông qua Portal (gắn vào document.body) hay không
|
|
4768
|
+
* @default true
|
|
4769
|
+
*/
|
|
4770
|
+
portal?: boolean;
|
|
4544
4771
|
}
|
|
4545
4772
|
|
|
4546
|
-
declare function DatePicker({ ref, value: controlledValue, defaultValue, onChange, format, displayFormat: customDisplayFormat, defaultView, locale, firstDayOfWeek, minDate, maxDate, isDateDisabled, size, variant, color, radius, label, labelPlacement, placeholder, helperText, errorMessage, name, id, autoComplete, viewTabs, view: controlledView, onViewChange, onClear, placement, disabled, readOnly, config, className, wrapperClassName, inputWrapperClassName, labelClassName, helperClassName, popoverClassName, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
4773
|
+
declare function DatePicker({ ref, value: controlledValue, defaultValue, onChange, format, displayFormat: customDisplayFormat, defaultView, locale, firstDayOfWeek, minDate, maxDate, isDateDisabled, size, variant, color, radius, label, labelPlacement, placeholder, helperText, errorMessage, name, id, autoComplete, viewTabs, view: controlledView, onViewChange, onClear, placement, disabled, readOnly, portal, config, className, wrapperClassName, inputWrapperClassName, labelClassName, helperClassName, popoverClassName, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
4547
4774
|
|
|
4548
|
-
declare function Calendar({ value: selectedDate, onChange, view, onViewChange, minDate, maxDate, isDateDisabled, locale, firstDayOfWeek, showWeekNumbers, showViewTabs, viewTabs, size, color, radius, className, }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4775
|
+
declare function Calendar({ value: selectedDate, onChange, view, onViewChange, minDate, maxDate, isDateDisabled, locale, firstDayOfWeek, showWeekNumbers, showViewTabs, viewTabs, size, color, radius, className, bordered, }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
4549
4776
|
|
|
4550
4777
|
declare function CalendarHeader({ currentMonth, view, onViewChange, onPrevMonth, onNextMonth, onPrevYear, onNextYear, onPrevDecade, onNextDecade, size, color, locale, showMonthButtons, }: CalendarHeaderProps): react_jsx_runtime.JSX.Element;
|
|
4551
4778
|
|
|
@@ -4875,6 +5102,8 @@ interface DateRangeCalendarProps {
|
|
|
4875
5102
|
radius?: DateRangePickerRadius;
|
|
4876
5103
|
/** Custom CSS class cho container */
|
|
4877
5104
|
className?: string;
|
|
5105
|
+
/** Hiển thị viền ngoài của Calendar @default true */
|
|
5106
|
+
bordered?: boolean;
|
|
4878
5107
|
}
|
|
4879
5108
|
/**
|
|
4880
5109
|
* Cấu hình tập trung các cờ tính năng / trạng thái cho DateRangePicker
|
|
@@ -5101,11 +5330,16 @@ interface DateRangePickerProps {
|
|
|
5101
5330
|
* CSS class bổ sung cho khung popover lịch
|
|
5102
5331
|
*/
|
|
5103
5332
|
popoverClassName?: string;
|
|
5333
|
+
/**
|
|
5334
|
+
* Có render popover thông qua Portal (gắn vào document.body) hay không
|
|
5335
|
+
* @default true
|
|
5336
|
+
*/
|
|
5337
|
+
portal?: boolean;
|
|
5104
5338
|
}
|
|
5105
5339
|
|
|
5106
|
-
declare function DateRangePicker({ ref, value: controlledValue, defaultValue, onChange, separator, format, displayFormat: customDisplayFormat, defaultView, locale, firstDayOfWeek, minDate, maxDate, isDateDisabled, size, variant, color, radius, label, labelPlacement, placeholder, helperText, errorMessage, name, id, autoComplete, viewTabs, view: controlledView, onViewChange, onClear, placement, disabled, readOnly, config, className, wrapperClassName, inputWrapperClassName, labelClassName, helperClassName, popoverClassName, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
5340
|
+
declare function DateRangePicker({ ref, value: controlledValue, defaultValue, onChange, separator, format, displayFormat: customDisplayFormat, defaultView, locale, firstDayOfWeek, minDate, maxDate, isDateDisabled, size, variant, color, radius, label, labelPlacement, placeholder, helperText, errorMessage, name, id, autoComplete, viewTabs, view: controlledView, onViewChange, onClear, placement, disabled, readOnly, portal, config, className, wrapperClassName, inputWrapperClassName, labelClassName, helperClassName, popoverClassName, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
5107
5341
|
|
|
5108
|
-
declare function DateRangeCalendar({ value, onChange, view, onViewChange, minDate, maxDate, isDateDisabled, locale, firstDayOfWeek, showWeekNumbers, showViewTabs, viewTabs, size, color, radius, className, }: DateRangeCalendarProps): react_jsx_runtime.JSX.Element;
|
|
5342
|
+
declare function DateRangeCalendar({ value, onChange, view, onViewChange, minDate, maxDate, isDateDisabled, locale, firstDayOfWeek, showWeekNumbers, showViewTabs, viewTabs, size, color, radius, className, bordered, }: DateRangeCalendarProps): react_jsx_runtime.JSX.Element;
|
|
5109
5343
|
|
|
5110
5344
|
declare function DateRangeHeader({ month1, month2, view, onViewChange, onPrevMonth, onNextMonth, onPrevYear, onNextYear, onPrevDecade, onNextDecade, size, color, locale, }: DateRangeHeaderProps): react_jsx_runtime.JSX.Element;
|
|
5111
5345
|
|
|
@@ -6180,80 +6414,6 @@ interface DateTimeRangePickerProps {
|
|
|
6180
6414
|
*/
|
|
6181
6415
|
declare function DateTimeRangePicker({ ref, value: controlledValue, defaultValue, onChange, format: customFormat, displayFormat: customDisplayFormat, separator, startLabel, endLabel, layout, locale, defaultView, firstDayOfWeek, minDate, maxDate, isDateDisabled, viewTabs, use12Hours, showSeconds, hourStep, minuteStep, secondStep, minTime, maxTime, disabledHours, disabledMinutes, disabledSeconds, size, variant, color, radius, label, labelPlacement, placeholder, placeholders, helperText, errorMessage, name, id, autoComplete, disabled, readOnly, config, onClear, placement, className, wrapperClassName, inputWrapperClassName, labelClassName, helperClassName, popoverClassName, }: DateTimeRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
6182
6416
|
|
|
6183
|
-
type EmptySize = "sm" | "md" | "lg";
|
|
6184
|
-
type EmptyPresetImage = "default" | "search" | "error" | "folder" | "simple";
|
|
6185
|
-
type EmptyLayout = "vertical" | "horizontal";
|
|
6186
|
-
interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
6187
|
-
/**
|
|
6188
|
-
* Ref chuyển tiếp đến phần tử HTML div
|
|
6189
|
-
*/
|
|
6190
|
-
ref?: Ref<HTMLDivElement>;
|
|
6191
|
-
/**
|
|
6192
|
-
* Kích cỡ của Empty component:
|
|
6193
|
-
* - 'sm': Nhỏ gọn, thích hợp cho dropdown, popover, bảng nhỏ
|
|
6194
|
-
* - 'md': Tiêu chuẩn, thích hợp cho card, section, modal
|
|
6195
|
-
* - 'lg': Lớn, thích hợp cho toàn trang, dashboard
|
|
6196
|
-
* @default 'md'
|
|
6197
|
-
*/
|
|
6198
|
-
size?: EmptySize;
|
|
6199
|
-
/**
|
|
6200
|
-
* Bố cục hiển thị:
|
|
6201
|
-
* - 'vertical': Xếp dọc ảnh -> tiêu đề -> mô tả -> hành động
|
|
6202
|
-
* - 'horizontal': Dàn ngang ảnh bên trái, nội dung & hành động bên phải
|
|
6203
|
-
* @default 'vertical'
|
|
6204
|
-
*/
|
|
6205
|
-
layout?: EmptyLayout;
|
|
6206
|
-
/**
|
|
6207
|
-
* Ảnh hoặc minh họa:
|
|
6208
|
-
* - Tên preset: 'default' | 'search' | 'error' | 'folder' | 'simple'
|
|
6209
|
-
* - URL hình ảnh (string bắt đầu bằng http://, https://, /, hoặc ./)
|
|
6210
|
-
* - ReactNode tùy biến (SVG icon, custom component, v.v.)
|
|
6211
|
-
* @default 'default'
|
|
6212
|
-
*/
|
|
6213
|
-
image?: EmptyPresetImage | (string & {}) | ReactNode;
|
|
6214
|
-
/**
|
|
6215
|
-
* Kích thước tùy chỉnh cho ảnh / illustration (pixel hoặc chuỗi kích thước CSS)
|
|
6216
|
-
*/
|
|
6217
|
-
imageSize?: number | string;
|
|
6218
|
-
/**
|
|
6219
|
-
* Class tùy biến cho phần bao ngoài của ảnh
|
|
6220
|
-
*/
|
|
6221
|
-
imageClassName?: string;
|
|
6222
|
-
/**
|
|
6223
|
-
* Thuộc tính alt cho hình ảnh khi truyền URL
|
|
6224
|
-
* @default 'Empty'
|
|
6225
|
-
*/
|
|
6226
|
-
imageAlt?: string;
|
|
6227
|
-
/**
|
|
6228
|
-
* Tiêu đề của trạng thái rỗng
|
|
6229
|
-
*/
|
|
6230
|
-
title?: ReactNode;
|
|
6231
|
-
/**
|
|
6232
|
-
* Class tùy biến cho tiêu đề
|
|
6233
|
-
*/
|
|
6234
|
-
titleClassName?: string;
|
|
6235
|
-
/**
|
|
6236
|
-
* Đoạn văn bản mô tả chi tiết hoặc hướng dẫn thao tác
|
|
6237
|
-
*/
|
|
6238
|
-
description?: ReactNode;
|
|
6239
|
-
/**
|
|
6240
|
-
* Class tùy biến cho phần mô tả
|
|
6241
|
-
*/
|
|
6242
|
-
descriptionClassName?: string;
|
|
6243
|
-
/**
|
|
6244
|
-
* Nút bấm hoặc nhóm hành động bên dưới (Call-to-Action)
|
|
6245
|
-
*/
|
|
6246
|
-
actions?: ReactNode;
|
|
6247
|
-
/**
|
|
6248
|
-
* Class tùy biến cho khu vực chứa actions
|
|
6249
|
-
*/
|
|
6250
|
-
actionsClassName?: string;
|
|
6251
|
-
/**
|
|
6252
|
-
* Nội dung bổ sung tùy biến bên dưới hoặc thay thế
|
|
6253
|
-
*/
|
|
6254
|
-
children?: ReactNode;
|
|
6255
|
-
}
|
|
6256
|
-
|
|
6257
6417
|
declare function Empty({ size, layout, image, imageSize, imageClassName, imageAlt, title, titleClassName, description, descriptionClassName, actions, actionsClassName, children, className, role, ref, ...props }: EmptyProps): react_jsx_runtime.JSX.Element;
|
|
6258
6418
|
|
|
6259
6419
|
interface EmptyIllustrationProps extends SVGProps<SVGSVGElement> {
|
|
@@ -6261,185 +6421,40 @@ interface EmptyIllustrationProps extends SVGProps<SVGSVGElement> {
|
|
|
6261
6421
|
}
|
|
6262
6422
|
declare function EmptyIllustration({ preset, ...props }: EmptyIllustrationProps): react_jsx_runtime.JSX.Element;
|
|
6263
6423
|
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
value: string | number;
|
|
6273
|
-
label: string;
|
|
6274
|
-
disabled?: boolean;
|
|
6275
|
-
description?: ReactNode;
|
|
6276
|
-
icon?: ReactNode;
|
|
6277
|
-
data?: TData;
|
|
6278
|
-
}
|
|
6279
|
-
type SelectFilterType = "string" | "text" | "number" | "date" | "date-range" | "checkbox-group" | "custom";
|
|
6280
|
-
interface SelectFilterField<TValue = unknown> {
|
|
6281
|
-
/** Tên định danh trường lọc (dùng làm key trong object filters) */
|
|
6282
|
-
name: string;
|
|
6283
|
-
/** Loại component lọc */
|
|
6284
|
-
type: SelectFilterType;
|
|
6285
|
-
/** Nhãn hiển thị của bộ lọc */
|
|
6286
|
-
label?: ReactNode;
|
|
6287
|
-
/** Placeholder cho input */
|
|
6288
|
-
placeholder?: string;
|
|
6289
|
-
/** Giá trị mặc định */
|
|
6290
|
-
defaultValue?: TValue;
|
|
6291
|
-
/** Giá trị điều khiển */
|
|
6292
|
-
value?: TValue;
|
|
6293
|
-
/** Số cột chiếm trong grid layout (1, 2, 3...) */
|
|
6294
|
-
colSpan?: number;
|
|
6295
|
-
/** Danh sách options (dùng cho checkbox-group hoặc select con) */
|
|
6296
|
-
options?: {
|
|
6297
|
-
label: ReactNode;
|
|
6298
|
-
value: string | number;
|
|
6299
|
-
disabled?: boolean;
|
|
6300
|
-
}[];
|
|
6301
|
-
/** Props truyền thêm vào component tương ứng (InputProps, DatePickerProps, ...) */
|
|
6302
|
-
props?: Record<string, unknown>;
|
|
6303
|
-
/** Custom render khi type="custom" */
|
|
6304
|
-
render?: (fieldState: {
|
|
6305
|
-
value: TValue | undefined;
|
|
6306
|
-
onChange: (val: TValue) => void;
|
|
6307
|
-
}) => ReactNode;
|
|
6308
|
-
}
|
|
6309
|
-
interface BaseSelectProps<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>> {
|
|
6310
|
-
/** Ref chuyển tiếp tới root wrapper element */
|
|
6311
|
-
ref?: Ref<HTMLDivElement>;
|
|
6312
|
-
/** Kích thước: xs, sm, md, lg, xl. Mặc định 'md' */
|
|
6424
|
+
declare function Select<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>>({ ref, options, value, defaultValue, onChange, size, variant, color, radius, id: idProp, label, labelPlacement, placeholder, helperText, errorMessage, isInvalid: isInvalidProp, isDisabled, readOnly, isRequired, name, searchable, searchMode, searchPlacement, searchPlaceholder, searchField, searchValue: searchValueProp, onSearchChange, menuFilters, menuFilterValues: controlledFilterValues, menuFilterLayout, menuFilterGridCols, showResetFilters, resetFiltersText, onMenuFilterChange, menuHeader, menuFooter, listFooter, onSearch, debounceMs, filterFn, isLoading, emptyText, emptyProps, clearable, portal, placement, maxMenuHeight, animated, animationDuration, startContent, endContent, renderValue, renderOption, className, triggerClassName, menuClassName, labelClassName, ...props }: SelectProps<TData, TFilters>): react_jsx_runtime.JSX.Element;
|
|
6425
|
+
|
|
6426
|
+
declare function MultiSelect<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>>({ ref, options, value: valueProp, defaultValue, onChange, size, variant, color, radius, id: idProp, label, labelPlacement, placeholder, helperText, errorMessage, isInvalid: isInvalidProp, isDisabled, readOnly, isRequired, name, maxTagCount, searchable, searchMode, searchPlacement, searchPlaceholder, searchField, preserveSelected, searchValue: searchValueProp, onSearchChange, menuFilters, menuFilterValues: controlledFilterValues, menuFilterLayout, menuFilterGridCols, showResetFilters, resetFiltersText, onMenuFilterChange, menuHeader, menuFooter, listFooter, onSearch, debounceMs, filterFn, isLoading, emptyText, emptyProps, clearable, portal, placement, maxMenuHeight, animated, animationDuration, startContent, endContent, renderValue, renderOption, className, triggerClassName, menuClassName, labelClassName, ...props }: MultiSelectProps<TData, TFilters>): react_jsx_runtime.JSX.Element;
|
|
6427
|
+
|
|
6428
|
+
interface SingleSelectTriggerProps<TData = unknown> {
|
|
6429
|
+
id?: string;
|
|
6430
|
+
selectedOption: SelectOptionItem<TData> | null;
|
|
6431
|
+
isOpen: boolean;
|
|
6313
6432
|
size?: SelectSize;
|
|
6314
|
-
/** Biến thể giao diện: outline, filled, ghost, other. Mặc định 'outline' */
|
|
6315
6433
|
variant?: SelectVariant;
|
|
6316
|
-
/** Chủ đề màu sắc: primary, secondary, error, success, warning, info, neutral. Mặc định 'primary' */
|
|
6317
6434
|
color?: SelectColor;
|
|
6318
|
-
/** Độ bo góc: none, sm, md, lg, xl, full */
|
|
6319
6435
|
radius?: SelectRadius;
|
|
6320
|
-
/** Danh sách các tùy chọn */
|
|
6321
|
-
options: SelectOptionItem<TData>[];
|
|
6322
|
-
/** ID định danh cho Select */
|
|
6323
|
-
id?: string;
|
|
6324
|
-
/** Nhãn tiêu đề của Select */
|
|
6325
|
-
label?: ReactNode;
|
|
6326
|
-
/** Vị trí nhãn: top, left, floating. Mặc định 'top' */
|
|
6327
|
-
labelPlacement?: LabelPlacement;
|
|
6328
|
-
/** Văn bản gợi ý khi chưa chọn */
|
|
6329
6436
|
placeholder?: string;
|
|
6330
|
-
|
|
6331
|
-
helperText?: ReactNode;
|
|
6332
|
-
/** Thông báo lỗi khi không hợp lệ */
|
|
6333
|
-
errorMessage?: ReactNode;
|
|
6334
|
-
/** Trạng thái không hợp lệ */
|
|
6335
|
-
isInvalid?: boolean;
|
|
6336
|
-
/** Bắt buộc chọn */
|
|
6337
|
-
isRequired?: boolean;
|
|
6338
|
-
/** Vô hiệu hóa Select */
|
|
6339
|
-
isDisabled?: boolean;
|
|
6340
|
-
/** Chỉ đọc, không cho phép thay đổi */
|
|
6341
|
-
isReadOnly?: boolean;
|
|
6342
|
-
/** Alias cho isReadOnly */
|
|
6437
|
+
disabled?: boolean;
|
|
6343
6438
|
readOnly?: boolean;
|
|
6344
|
-
|
|
6345
|
-
name?: string;
|
|
6346
|
-
/** Cho phép tìm kiếm. Mặc định false */
|
|
6439
|
+
isInvalid?: boolean;
|
|
6347
6440
|
searchable?: boolean;
|
|
6348
|
-
/** Chế độ tìm kiếm: 'client' (fuzzy search) hoặc 'server' (debounce + API). Mặc định 'client' */
|
|
6349
|
-
searchMode?: SelectSearchMode;
|
|
6350
|
-
/** Vị trí ô tìm kiếm: 'trigger' (trên trigger), 'menu' (trong dropdown), 'both'. Mặc định 'trigger' */
|
|
6351
6441
|
searchPlacement?: SelectSearchPlacement;
|
|
6352
|
-
/** Placeholder cho ô tìm kiếm */
|
|
6353
|
-
searchPlaceholder?: string;
|
|
6354
|
-
/** Giá trị từ khóa tìm kiếm (khi controlled) */
|
|
6355
6442
|
searchValue?: string;
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
/** Cấu hình danh sách các bộ lọc hiển thị bên trong dropdown menu */
|
|
6359
|
-
menuFilters?: SelectFilterField<unknown>[];
|
|
6360
|
-
/** Giá trị điều khiển cho các bộ lọc trong menu */
|
|
6361
|
-
menuFilterValues?: Partial<TFilters>;
|
|
6362
|
-
/** Bố cục danh sách bộ lọc: 'vertical' hoặc 'grid'. Mặc định 'vertical' */
|
|
6363
|
-
menuFilterLayout?: SelectFilterLayout;
|
|
6364
|
-
/** Số cột khi menuFilterLayout='grid'. Mặc định 2 */
|
|
6365
|
-
menuFilterGridCols?: number;
|
|
6366
|
-
/** Hiển thị nút Reset / Xóa bộ lọc. Mặc định true khi có menuFilters */
|
|
6367
|
-
showResetFilters?: boolean;
|
|
6368
|
-
/** Văn bản nút Reset bộ lọc. Mặc định 'Xoá bộ lọc' */
|
|
6369
|
-
resetFiltersText?: ReactNode;
|
|
6370
|
-
/** Callback khi bất kỳ filter nào trong menu thay đổi */
|
|
6371
|
-
onMenuFilterChange?: (filters: TFilters) => void;
|
|
6372
|
-
/** Nội dung tùy biến trên đầu menu (trước hoặc thay thế filter) */
|
|
6373
|
-
menuHeader?: ReactNode;
|
|
6374
|
-
/** Nội dung tùy biến dưới đáy menu */
|
|
6375
|
-
menuFooter?: ReactNode;
|
|
6376
|
-
/** Callback được gọi sau khi debounce khi search query hoặc menu filters thay đổi (ở Server mode) */
|
|
6377
|
-
onSearch?: (query: string, filters: TFilters) => void | Promise<void>;
|
|
6378
|
-
/** Thời gian trì hoãn debounce tính theo ms. Mặc định 300 */
|
|
6379
|
-
debounceMs?: number;
|
|
6380
|
-
/** Hàm custom predicate lọc options ở chế độ client */
|
|
6381
|
-
filterFn?: (option: SelectOptionItem<TData>, query: string, filters: TFilters) => boolean;
|
|
6382
|
-
/** Trạng thái đang tải dữ liệu */
|
|
6383
|
-
loading?: boolean;
|
|
6384
|
-
/** Alias cho loading (chuẩn hoá theo Design System form inputs) */
|
|
6385
|
-
isLoading?: boolean;
|
|
6386
|
-
/** Văn bản hiển thị khi không có dữ liệu */
|
|
6387
|
-
emptyText?: ReactNode;
|
|
6388
|
-
/** Props tùy biến chuyển tiếp đến component Empty */
|
|
6389
|
-
emptyProps?: Partial<EmptyProps>;
|
|
6390
|
-
/** Hiển thị nút xoá nhanh toàn bộ giá trị đã chọn */
|
|
6443
|
+
onSearchChange?: (val: string) => void;
|
|
6444
|
+
onClear?: (e: react.MouseEvent) => void;
|
|
6391
6445
|
clearable?: boolean;
|
|
6392
|
-
|
|
6393
|
-
portal?: boolean;
|
|
6394
|
-
/** Vị trí hiển thị của popup dropdown. Mặc định 'bottom-start' */
|
|
6395
|
-
placement?: Placement;
|
|
6396
|
-
/** Chiều cao tối đa của vùng cuộn menu. Mặc định 280px */
|
|
6397
|
-
maxMenuHeight?: number | string;
|
|
6398
|
-
/** Icon hoặc nội dung ở đầu trigger */
|
|
6446
|
+
isLoading?: boolean;
|
|
6399
6447
|
startContent?: ReactNode;
|
|
6400
|
-
/** Icon hoặc nội dung ở cuối trigger */
|
|
6401
6448
|
endContent?: ReactNode;
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
selected: boolean;
|
|
6407
|
-
active: boolean;
|
|
6408
|
-
}) => ReactNode;
|
|
6409
|
-
/** ClassName tùy biến cho wrapper ngoài cùng */
|
|
6449
|
+
renderValue?: (selected: SelectOptionItem<TData>) => ReactNode;
|
|
6450
|
+
triggerRef: (node: HTMLElement | null) => void;
|
|
6451
|
+
getReferenceProps: (userProps?: Record<string, unknown>) => Record<string, unknown>;
|
|
6452
|
+
onKeyDown?: (e: react.KeyboardEvent<HTMLInputElement>) => void;
|
|
6410
6453
|
className?: string;
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
/** ClassName cho popup dropdown menu */
|
|
6414
|
-
menuClassName?: string;
|
|
6415
|
-
}
|
|
6416
|
-
type SingleSelectProps<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>> = BaseSelectProps<TData, TFilters> & {
|
|
6417
|
-
/** Chế độ chọn đơn */
|
|
6418
|
-
multiple?: false;
|
|
6419
|
-
/** Giá trị đã chọn (controlled) */
|
|
6420
|
-
value?: string | number | null;
|
|
6421
|
-
/** Giá trị mặc định ban đầu (uncontrolled) */
|
|
6422
|
-
defaultValue?: string | number | null;
|
|
6423
|
-
/** Callback khi giá trị thay đổi */
|
|
6424
|
-
onChange?: (value: string | number | null, option?: SelectOptionItem<TData> | null) => void;
|
|
6425
|
-
};
|
|
6426
|
-
type MultiSelectProps<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>> = BaseSelectProps<TData, TFilters> & {
|
|
6427
|
-
/** Chế độ chọn nhiều */
|
|
6428
|
-
multiple: true;
|
|
6429
|
-
/** Danh sách giá trị đã chọn (controlled) */
|
|
6430
|
-
value?: (string | number)[];
|
|
6431
|
-
/** Danh sách giá trị mặc định ban đầu (uncontrolled) */
|
|
6432
|
-
defaultValue?: (string | number)[];
|
|
6433
|
-
/** Callback khi giá trị thay đổi */
|
|
6434
|
-
onChange?: (values: (string | number)[], options?: SelectOptionItem<TData>[]) => void;
|
|
6435
|
-
/** Giới hạn số lượng tag Badge hiển thị trước khi gom thành +N */
|
|
6436
|
-
maxTagCount?: number;
|
|
6437
|
-
};
|
|
6438
|
-
type SelectProps<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>> = SingleSelectProps<TData, TFilters> | MultiSelectProps<TData, TFilters>;
|
|
6439
|
-
|
|
6440
|
-
declare function Select<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>>(props: SelectProps<TData, TFilters>): react_jsx_runtime.JSX.Element;
|
|
6454
|
+
}
|
|
6455
|
+
declare function SingleSelectTrigger<TData = unknown>({ id, selectedOption, isOpen, size, variant, color, radius, placeholder, disabled, readOnly, isInvalid, searchable, searchPlacement, searchValue, onSearchChange, onClear, clearable, isLoading, startContent, endContent, renderValue, triggerRef, getReferenceProps, onKeyDown, className, }: SingleSelectTriggerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
6441
6456
|
|
|
6442
|
-
interface
|
|
6457
|
+
interface MultiSelectTriggerProps<TData = unknown> {
|
|
6443
6458
|
id?: string;
|
|
6444
6459
|
selectedOptions: SelectOptionItem<TData>[];
|
|
6445
6460
|
isOpen: boolean;
|
|
@@ -6451,42 +6466,44 @@ interface SelectTriggerProps<TData = unknown> {
|
|
|
6451
6466
|
disabled?: boolean;
|
|
6452
6467
|
readOnly?: boolean;
|
|
6453
6468
|
isInvalid?: boolean;
|
|
6454
|
-
multiple?: boolean;
|
|
6455
6469
|
maxTagCount?: number;
|
|
6456
6470
|
searchable?: boolean;
|
|
6457
6471
|
searchPlacement?: SelectSearchPlacement;
|
|
6458
6472
|
searchValue?: string;
|
|
6459
6473
|
onSearchChange?: (val: string) => void;
|
|
6460
6474
|
onRemoveTag?: (option: SelectOptionItem<TData>) => void;
|
|
6461
|
-
onClear?: (e:
|
|
6475
|
+
onClear?: (e: react.MouseEvent) => void;
|
|
6462
6476
|
clearable?: boolean;
|
|
6463
|
-
loading?: boolean;
|
|
6464
6477
|
isLoading?: boolean;
|
|
6465
6478
|
startContent?: ReactNode;
|
|
6466
6479
|
endContent?: ReactNode;
|
|
6467
|
-
renderValue?: (selected: SelectOptionItem<TData>
|
|
6480
|
+
renderValue?: (selected: SelectOptionItem<TData>[]) => ReactNode;
|
|
6468
6481
|
triggerRef: (node: HTMLElement | null) => void;
|
|
6469
6482
|
getReferenceProps: (userProps?: Record<string, unknown>) => Record<string, unknown>;
|
|
6470
|
-
onKeyDown?: (e:
|
|
6483
|
+
onKeyDown?: (e: react.KeyboardEvent<HTMLInputElement>) => void;
|
|
6471
6484
|
className?: string;
|
|
6472
6485
|
}
|
|
6473
|
-
declare function
|
|
6486
|
+
declare function MultiSelectTrigger<TData = unknown>({ id, selectedOptions, isOpen, size, variant, color, radius, placeholder, disabled, readOnly, isInvalid, maxTagCount, searchable, searchPlacement, searchValue, onSearchChange, onRemoveTag, onClear, clearable, isLoading, startContent, endContent, renderValue, triggerRef, getReferenceProps, onKeyDown, className, }: MultiSelectTriggerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
6474
6487
|
|
|
6475
6488
|
interface SelectMenuProps<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>> {
|
|
6476
6489
|
isOpen: boolean;
|
|
6490
|
+
isMounted?: boolean;
|
|
6491
|
+
animated?: boolean;
|
|
6492
|
+
transitionStyles?: CSSProperties;
|
|
6477
6493
|
options: SelectOptionItem<TData>[];
|
|
6478
6494
|
selectedValues: (string | number)[];
|
|
6479
6495
|
activeIndex: number | null;
|
|
6480
6496
|
size?: SelectSize;
|
|
6481
6497
|
color?: SelectColor;
|
|
6482
6498
|
radius?: SelectRadius;
|
|
6483
|
-
|
|
6499
|
+
isLoading?: boolean;
|
|
6484
6500
|
portal?: boolean;
|
|
6485
6501
|
maxMenuHeight?: number | string;
|
|
6486
6502
|
emptyText?: ReactNode;
|
|
6487
6503
|
emptyProps?: Partial<EmptyProps>;
|
|
6488
6504
|
menuHeader?: ReactNode;
|
|
6489
6505
|
menuFooter?: ReactNode;
|
|
6506
|
+
listFooter?: ReactNode;
|
|
6490
6507
|
menuFilters?: SelectFilterField<unknown>[];
|
|
6491
6508
|
menuFilterValues?: Partial<TFilters>;
|
|
6492
6509
|
menuFilterLayout?: SelectFilterLayout;
|
|
@@ -6504,10 +6521,10 @@ interface SelectMenuProps<TData = unknown, TFilters extends Record<string, unkno
|
|
|
6504
6521
|
floatingStyles: CSSProperties;
|
|
6505
6522
|
floatingRef: (node: HTMLElement | null) => void;
|
|
6506
6523
|
getFloatingProps: (userProps?: Record<string, unknown>) => Record<string, unknown>;
|
|
6507
|
-
listElementsRef:
|
|
6524
|
+
listElementsRef: react.RefObject<(HTMLElement | null)[]>;
|
|
6508
6525
|
className?: string;
|
|
6509
6526
|
}
|
|
6510
|
-
declare function SelectMenu<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>>({ isOpen, options, selectedValues, activeIndex, size, color, radius,
|
|
6527
|
+
declare function SelectMenu<TData = unknown, TFilters extends Record<string, unknown> = Record<string, unknown>>({ isOpen, isMounted, animated, transitionStyles, options, selectedValues, activeIndex, size, color, radius, isLoading, portal, maxMenuHeight, emptyText, emptyProps, menuHeader, menuFooter, listFooter, menuFilters, menuFilterValues, menuFilterLayout, menuFilterGridCols, showResetFilters, resetFiltersText, onMenuFilterChange, onResetFilters, renderOption, onSelectOption, onOptionMouseEnter, floatingStyles, floatingRef, getFloatingProps, listElementsRef, className, }: SelectMenuProps<TData, TFilters>): react_jsx_runtime.JSX.Element | null;
|
|
6511
6528
|
|
|
6512
6529
|
interface SelectMenuFilterProps<TFilters extends Record<string, unknown> = Record<string, unknown>> {
|
|
6513
6530
|
filters: SelectFilterField<unknown>[];
|
|
@@ -6521,7 +6538,7 @@ interface SelectMenuFilterProps<TFilters extends Record<string, unknown> = Recor
|
|
|
6521
6538
|
color?: SelectColor;
|
|
6522
6539
|
radius?: SelectRadius;
|
|
6523
6540
|
}
|
|
6524
|
-
declare function SelectMenuFilter<TFilters extends Record<string, unknown> = Record<string, unknown>>({ filters, values, onChange, onReset,
|
|
6541
|
+
declare function SelectMenuFilter<TFilters extends Record<string, unknown> = Record<string, unknown>>({ filters, values, onChange, onReset, showReset, resetText, color, radius, }: SelectMenuFilterProps<TFilters>): react_jsx_runtime.JSX.Element | null;
|
|
6525
6542
|
|
|
6526
6543
|
interface SelectOptionProps<TData = unknown> {
|
|
6527
6544
|
option: SelectOptionItem<TData>;
|
|
@@ -6541,6 +6558,14 @@ interface SelectOptionProps<TData = unknown> {
|
|
|
6541
6558
|
}
|
|
6542
6559
|
declare function SelectOption<TData = unknown>({ option, isSelected, isActive, size, color, radius, disabled, renderOption, onClick, onMouseEnter, ref, }: SelectOptionProps<TData>): react_jsx_runtime.JSX.Element;
|
|
6543
6560
|
|
|
6561
|
+
type UseAnimatedErrorOptions = {
|
|
6562
|
+
exitDuration?: number;
|
|
6563
|
+
};
|
|
6564
|
+
declare function useAnimatedError(errorMessage: ReactNode, options?: UseAnimatedErrorOptions): {
|
|
6565
|
+
displayedError: ReactNode;
|
|
6566
|
+
isExiting: boolean;
|
|
6567
|
+
};
|
|
6568
|
+
|
|
6544
6569
|
/**
|
|
6545
6570
|
* Custom hook to debounce a value by a given delay in milliseconds.
|
|
6546
6571
|
*
|
|
@@ -6563,228 +6588,56 @@ declare function useDebouncedCallback<Args extends unknown[], R = void>(callback
|
|
|
6563
6588
|
cancel: () => void;
|
|
6564
6589
|
};
|
|
6565
6590
|
|
|
6566
|
-
|
|
6567
|
-
type UploadImageViewMode = "dropzone" | "card-grid" | "button";
|
|
6568
|
-
type UploadImageSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
6569
|
-
type UploadImageColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
6570
|
-
type UploadImageRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
6571
|
-
type UploadImageVariant = "outline" | "filled" | "ghost" | "other";
|
|
6572
|
-
interface UploadFileItem {
|
|
6573
|
-
id: string;
|
|
6574
|
-
name: string;
|
|
6575
|
-
size?: number;
|
|
6576
|
-
type?: string;
|
|
6577
|
-
url?: string;
|
|
6578
|
-
file?: File;
|
|
6579
|
-
status?: "idle" | "uploading" | "success" | "error";
|
|
6580
|
-
progress?: number;
|
|
6581
|
-
errorMessage?: string;
|
|
6582
|
-
}
|
|
6583
|
-
interface UploadImageProps {
|
|
6584
|
-
/**
|
|
6585
|
-
* List or single file item managed by the component
|
|
6586
|
-
*/
|
|
6587
|
-
value?: UploadFileItem[] | UploadFileItem | string[] | string;
|
|
6588
|
-
/**
|
|
6589
|
-
* Initial default value (uncontrolled)
|
|
6590
|
-
*/
|
|
6591
|
-
defaultValue?: UploadFileItem[] | UploadFileItem | string[] | string;
|
|
6592
|
-
/**
|
|
6593
|
-
* Callback triggered when the file list changes
|
|
6594
|
-
*/
|
|
6595
|
-
onChange?: (items: UploadFileItem[]) => void;
|
|
6596
|
-
/**
|
|
6597
|
-
* Callback triggered when a file item is removed
|
|
6598
|
-
*/
|
|
6599
|
-
onRemove?: (item: UploadFileItem, index: number) => void;
|
|
6600
|
-
/**
|
|
6601
|
-
* Callback triggered when an image preview is requested
|
|
6602
|
-
*/
|
|
6603
|
-
onPreview?: (item: UploadFileItem) => void;
|
|
6604
|
-
/**
|
|
6605
|
-
* Whether to allow multiple file uploads
|
|
6606
|
-
* @default false
|
|
6607
|
-
*/
|
|
6608
|
-
multiple?: boolean;
|
|
6591
|
+
interface UseFloatingTransitionOptions {
|
|
6609
6592
|
/**
|
|
6610
|
-
*
|
|
6611
|
-
*
|
|
6593
|
+
* Transition duration in milliseconds.
|
|
6594
|
+
* Can be a number or an object with `open` and `close` durations.
|
|
6595
|
+
* @default 150
|
|
6612
6596
|
*/
|
|
6613
|
-
|
|
6597
|
+
duration?: number | {
|
|
6598
|
+
open?: number;
|
|
6599
|
+
close?: number;
|
|
6600
|
+
};
|
|
6614
6601
|
/**
|
|
6615
|
-
*
|
|
6616
|
-
*
|
|
6602
|
+
* Distance offset in pixels to translate from initially and when closing.
|
|
6603
|
+
* @default 4
|
|
6617
6604
|
*/
|
|
6618
|
-
|
|
6605
|
+
offset?: number;
|
|
6619
6606
|
/**
|
|
6620
|
-
*
|
|
6621
|
-
* @default
|
|
6607
|
+
* Scale factor when closed / unmounted.
|
|
6608
|
+
* @default 0.96
|
|
6622
6609
|
*/
|
|
6623
|
-
|
|
6610
|
+
scale?: number;
|
|
6624
6611
|
/**
|
|
6625
|
-
*
|
|
6626
|
-
*
|
|
6612
|
+
* Whether transitions should animate. If false, duration is 0.
|
|
6613
|
+
* @default true
|
|
6627
6614
|
*/
|
|
6628
|
-
|
|
6629
|
-
/**
|
|
6630
|
-
* Display mode:
|
|
6631
|
-
* - 'dropzone': Large drag and drop area with title and description
|
|
6632
|
-
* - 'card-grid': Thumbnail card grid (picture wall)
|
|
6633
|
-
* - 'button': Compact trigger button
|
|
6634
|
-
* @default 'dropzone'
|
|
6635
|
-
*/
|
|
6636
|
-
viewMode?: UploadImageViewMode;
|
|
6637
|
-
/**
|
|
6638
|
-
* Shape of the container
|
|
6639
|
-
* @default 'rectangle' for dropzone, 'square' for card-grid
|
|
6640
|
-
*/
|
|
6641
|
-
shape?: UploadImageShape;
|
|
6642
|
-
/**
|
|
6643
|
-
* 5 standard size levels (xs, sm, md, lg, xl)
|
|
6644
|
-
* @default 'md'
|
|
6645
|
-
*/
|
|
6646
|
-
size?: UploadImageSize;
|
|
6647
|
-
/**
|
|
6648
|
-
* Design System color theme (primary, secondary, neutral, error, success, warning, info)
|
|
6649
|
-
* @default 'primary'
|
|
6650
|
-
*/
|
|
6651
|
-
color?: UploadImageColor;
|
|
6652
|
-
/**
|
|
6653
|
-
* Visual variant (outline, filled, ghost, other)
|
|
6654
|
-
* @default 'outline'
|
|
6655
|
-
*/
|
|
6656
|
-
variant?: UploadImageVariant;
|
|
6657
|
-
/**
|
|
6658
|
-
* Corner radius
|
|
6659
|
-
* @default based on size
|
|
6660
|
-
*/
|
|
6661
|
-
radius?: UploadImageRadius;
|
|
6662
|
-
/**
|
|
6663
|
-
* Label text above the upload container
|
|
6664
|
-
*/
|
|
6665
|
-
label?: ReactNode;
|
|
6666
|
-
/**
|
|
6667
|
-
* Helper or instruction text below the upload container
|
|
6668
|
-
*/
|
|
6669
|
-
helperText?: ReactNode;
|
|
6670
|
-
/**
|
|
6671
|
-
* Error message to display
|
|
6672
|
-
*/
|
|
6673
|
-
errorMessage?: ReactNode;
|
|
6674
|
-
/**
|
|
6675
|
-
* Whether the field is in an invalid/error state
|
|
6676
|
-
*/
|
|
6677
|
-
isInvalid?: boolean;
|
|
6678
|
-
/**
|
|
6679
|
-
* Whether the component is disabled
|
|
6680
|
-
* @default false
|
|
6681
|
-
*/
|
|
6682
|
-
disabled?: boolean;
|
|
6683
|
-
/**
|
|
6684
|
-
* Whether the component is in read-only mode
|
|
6685
|
-
* @default false
|
|
6686
|
-
*/
|
|
6687
|
-
readOnly?: boolean;
|
|
6688
|
-
/**
|
|
6689
|
-
* Whether the component is in a loading state
|
|
6690
|
-
* @default false
|
|
6691
|
-
*/
|
|
6692
|
-
isLoading?: boolean;
|
|
6693
|
-
/**
|
|
6694
|
-
* Custom title text inside the Dropzone area
|
|
6695
|
-
*/
|
|
6696
|
-
dropzoneTitle?: ReactNode;
|
|
6697
|
-
/**
|
|
6698
|
-
* Custom description text inside the Dropzone area
|
|
6699
|
-
*/
|
|
6700
|
-
dropzoneDescription?: ReactNode;
|
|
6701
|
-
/**
|
|
6702
|
-
* Custom upload icon
|
|
6703
|
-
*/
|
|
6704
|
-
icon?: ReactNode;
|
|
6705
|
-
/**
|
|
6706
|
-
* Text for button trigger when viewMode="button"
|
|
6707
|
-
*/
|
|
6708
|
-
buttonText?: ReactNode;
|
|
6709
|
-
/**
|
|
6710
|
-
* Custom item renderer for the thumbnail list
|
|
6711
|
-
*/
|
|
6712
|
-
renderItem?: (item: UploadFileItem, index: number, actions: {
|
|
6713
|
-
remove: () => void;
|
|
6714
|
-
preview: () => void;
|
|
6715
|
-
}) => ReactNode;
|
|
6716
|
-
/**
|
|
6717
|
-
* Custom CSS class for outer container
|
|
6718
|
-
*/
|
|
6719
|
-
className?: string;
|
|
6720
|
-
/**
|
|
6721
|
-
* Custom CSS class for Dropzone/Trigger area
|
|
6722
|
-
*/
|
|
6723
|
-
dropzoneClassName?: string;
|
|
6724
|
-
/**
|
|
6725
|
-
* Custom CSS class for preview list
|
|
6726
|
-
*/
|
|
6727
|
-
previewClassName?: string;
|
|
6728
|
-
/**
|
|
6729
|
-
* Accessible aria-label for the interactive area
|
|
6730
|
-
*/
|
|
6731
|
-
ariaLabel?: string;
|
|
6732
|
-
}
|
|
6733
|
-
|
|
6734
|
-
declare function UploadImage({ value, defaultValue, onChange, onRemove, onPreview, multiple, maxCount, maxSize, accept, beforeUpload, viewMode, shape, size, color, variant, radius, label, helperText, errorMessage, isInvalid: isInvalidProp, disabled, readOnly, isLoading, dropzoneTitle, dropzoneDescription, icon, buttonText, renderItem, className, dropzoneClassName, previewClassName, ariaLabel, }: UploadImageProps): react_jsx_runtime.JSX.Element;
|
|
6735
|
-
|
|
6736
|
-
interface UploadImageDropzoneProps {
|
|
6737
|
-
size?: UploadImageSize;
|
|
6738
|
-
color?: UploadImageColor;
|
|
6739
|
-
variant?: UploadImageVariant;
|
|
6740
|
-
radius?: UploadImageRadius;
|
|
6741
|
-
shape?: UploadImageShape;
|
|
6742
|
-
disabled?: boolean;
|
|
6743
|
-
readOnly?: boolean;
|
|
6744
|
-
isLoading?: boolean;
|
|
6745
|
-
isDragging?: boolean;
|
|
6746
|
-
isInvalid?: boolean;
|
|
6747
|
-
dropzoneTitle?: ReactNode;
|
|
6748
|
-
dropzoneDescription?: ReactNode;
|
|
6749
|
-
icon?: ReactNode;
|
|
6750
|
-
onTriggerUpload: () => void;
|
|
6751
|
-
className?: string;
|
|
6752
|
-
describedById?: string;
|
|
6753
|
-
}
|
|
6754
|
-
declare function UploadImageDropzone({ size, color, variant, radius, shape, disabled, readOnly, isLoading, isDragging, isInvalid, dropzoneTitle, dropzoneDescription, icon, onTriggerUpload, className, describedById, }: UploadImageDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
6755
|
-
|
|
6756
|
-
interface UploadImageListProps {
|
|
6757
|
-
items: UploadFileItem[];
|
|
6758
|
-
size: UploadImageSize;
|
|
6759
|
-
color?: UploadImageColor;
|
|
6760
|
-
variant?: UploadImageVariant;
|
|
6761
|
-
radius: UploadImageRadius;
|
|
6762
|
-
disabled?: boolean;
|
|
6763
|
-
readOnly?: boolean;
|
|
6764
|
-
maxCount?: number;
|
|
6765
|
-
onRemove: (item: UploadFileItem, index: number) => void;
|
|
6766
|
-
onPreview: (item: UploadFileItem) => void;
|
|
6767
|
-
onTriggerUpload: () => void;
|
|
6768
|
-
renderItem?: (item: UploadFileItem, index: number, actions: {
|
|
6769
|
-
remove: () => void;
|
|
6770
|
-
preview: () => void;
|
|
6771
|
-
}) => ReactNode;
|
|
6772
|
-
showAddButton?: boolean;
|
|
6773
|
-
className?: string;
|
|
6774
|
-
}
|
|
6775
|
-
declare function UploadImageList({ items, size, radius, disabled, readOnly, maxCount, onRemove, onPreview, onTriggerUpload, renderItem, showAddButton, className, }: UploadImageListProps): react_jsx_runtime.JSX.Element;
|
|
6776
|
-
|
|
6777
|
-
declare function formatBytes(bytes: number, decimals?: number): string;
|
|
6778
|
-
interface ValidateFileOptions {
|
|
6779
|
-
maxSize?: number;
|
|
6780
|
-
accept?: string;
|
|
6615
|
+
animated?: boolean;
|
|
6781
6616
|
}
|
|
6782
|
-
declare function
|
|
6783
|
-
|
|
6784
|
-
|
|
6617
|
+
declare function useFloatingTransition(context: FloatingContext, options?: UseFloatingTransitionOptions): {
|
|
6618
|
+
isMounted: boolean;
|
|
6619
|
+
styles: React.CSSProperties;
|
|
6785
6620
|
};
|
|
6786
|
-
|
|
6787
|
-
|
|
6621
|
+
|
|
6622
|
+
/**
|
|
6623
|
+
* Lấy cấu hình tương ứng theo `key` từ đối tượng `configMap` (sizeConfig, radiusConfig, variantConfig, colorConfig...),
|
|
6624
|
+
* nếu `key` không hợp lệ hoặc không tồn tại trong `configMap`, sẽ trả về giá trị an toàn của `fallbackKey`.
|
|
6625
|
+
*
|
|
6626
|
+
* @param key - Khóa được truyền vào (size, radius, variant... có thể undefined, null hoặc chuỗi bất kỳ)
|
|
6627
|
+
* @param configMap - Đối tượng ánh xạ cấu hình
|
|
6628
|
+
* @param fallbackKey - Khóa dự phòng khi không tìm thấy (fallback an toàn)
|
|
6629
|
+
* @returns Cấu hình tương ứng của khóa đó
|
|
6630
|
+
*/
|
|
6631
|
+
declare function getSafeConfig<TConfig, TKey extends PropertyKey = string>(key: TKey | undefined | null, configMap: Record<TKey, TConfig>, fallbackKey: TKey): TConfig;
|
|
6632
|
+
/**
|
|
6633
|
+
* Lọc và xếp hạng danh sách phần tử theo từ khóa tìm kiếm (Fuzzy Search qua @tanstack/match-sorter-utils).
|
|
6634
|
+
*
|
|
6635
|
+
* @param items - Danh sách các phần tử cần lọc
|
|
6636
|
+
* @param query - Từ khóa tìm kiếm
|
|
6637
|
+
* @param fields - Một trường hoặc danh sách các trường (hoặc hàm accessor) để so khớp
|
|
6638
|
+
* @returns Danh sách phần tử khớp, đã được sắp xếp theo độ tương quan cao nhất
|
|
6639
|
+
*/
|
|
6640
|
+
declare function rankAndFilterItems<T>(items: T[], query: string, fields?: (keyof T | string | ((item: T) => string | undefined | null))[] | (keyof T | string)): T[];
|
|
6788
6641
|
|
|
6789
6642
|
/**
|
|
6790
6643
|
* Các kích thước chiều rộng tiêu chuẩn của Modal:
|
|
@@ -7013,6 +6866,11 @@ interface ToolbarToolsConfig {
|
|
|
7013
6866
|
* @default true
|
|
7014
6867
|
*/
|
|
7015
6868
|
zoomOut?: boolean;
|
|
6869
|
+
/**
|
|
6870
|
+
* Cho phép hiển thị thanh trượt Slider điều chỉnh zoom
|
|
6871
|
+
* @default true
|
|
6872
|
+
*/
|
|
6873
|
+
zoomSlider?: boolean;
|
|
7016
6874
|
/**
|
|
7017
6875
|
* Cho phép hiển thị nút Reset tỉ lệ về 100% (1:1)
|
|
7018
6876
|
* @default true
|
|
@@ -7042,6 +6900,29 @@ interface ImagePreviewToolbarProps {
|
|
|
7042
6900
|
* Mức độ phóng to hiện tại của ảnh (ví dụ: 1 = 100%, 1.5 = 150%)
|
|
7043
6901
|
*/
|
|
7044
6902
|
zoom: number;
|
|
6903
|
+
/**
|
|
6904
|
+
* Mức độ thu nhỏ tối thiểu (mặc định: 0.2 tức 20%)
|
|
6905
|
+
* @default 0.2
|
|
6906
|
+
*/
|
|
6907
|
+
minZoom?: number;
|
|
6908
|
+
/**
|
|
6909
|
+
* Mức độ phóng to tối đa (mặc định: 5 tức 500%)
|
|
6910
|
+
* @default 5
|
|
6911
|
+
*/
|
|
6912
|
+
maxZoom?: number;
|
|
6913
|
+
/**
|
|
6914
|
+
* Bước nhảy khi kéo thanh Slider
|
|
6915
|
+
* @default 0.05
|
|
6916
|
+
*/
|
|
6917
|
+
step?: number;
|
|
6918
|
+
/**
|
|
6919
|
+
* Callback khi giá trị zoom thay đổi qua thanh trượt Slider
|
|
6920
|
+
*/
|
|
6921
|
+
onZoomChange?: (zoom: number) => void;
|
|
6922
|
+
/**
|
|
6923
|
+
* Tùy biến chi tiết các props truyền vào Slider component
|
|
6924
|
+
*/
|
|
6925
|
+
sliderProps?: Partial<SliderProps>;
|
|
7045
6926
|
/**
|
|
7046
6927
|
* Góc xoay hiện tại của ảnh tính theo độ (0, 90, 180, 270)
|
|
7047
6928
|
*/
|
|
@@ -7163,7 +7044,7 @@ interface ServerFile {
|
|
|
7163
7044
|
/**
|
|
7164
7045
|
* Đối tượng File truyền vào xem trước (File đối tượng từ input hoặc ServerFile từ API)
|
|
7165
7046
|
*/
|
|
7166
|
-
type PreviewFile = File | ServerFile;
|
|
7047
|
+
type PreviewFile = File | ServerFile | string;
|
|
7167
7048
|
/**
|
|
7168
7049
|
* Props cho component `<FilePreview>` (Component xác định loại file và chọn component hiển thị tương ứng)
|
|
7169
7050
|
*/
|
|
@@ -7250,721 +7131,2379 @@ interface FileContainerProps {
|
|
|
7250
7131
|
children?: ReactNode;
|
|
7251
7132
|
}
|
|
7252
7133
|
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
type
|
|
7259
|
-
|
|
7134
|
+
/**
|
|
7135
|
+
* Hình dạng khung hiển thị hình ảnh
|
|
7136
|
+
* - 'rectangle': Khung chữ nhật (mặc định cho Dropzone)
|
|
7137
|
+
* - 'square': Khung vuông tỷ lệ 1:1 (mặc định cho Card Grid)
|
|
7138
|
+
*/
|
|
7139
|
+
type UploadImageShape = "rectangle" | "square";
|
|
7140
|
+
/**
|
|
7141
|
+
* Chế độ hiển thị giao diện tải ảnh
|
|
7142
|
+
* - 'dropzone': Khung kéo thả lớn với tiêu đề và mô tả trực quan
|
|
7143
|
+
* - 'card-grid': Lưới thẻ ảnh dạng thumbnail (picture wall)
|
|
7144
|
+
* - 'button': Nút bấm kích hoạt tải ảnh nhỏ gọn
|
|
7145
|
+
*/
|
|
7146
|
+
type UploadImageViewMode = "dropzone" | "card-grid" | "button";
|
|
7147
|
+
/**
|
|
7148
|
+
* 5 mức kích thước chuẩn trong Design System
|
|
7149
|
+
*/
|
|
7150
|
+
type UploadImageSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
7151
|
+
/**
|
|
7152
|
+
* Bảng màu chủ đề trong Design System
|
|
7153
|
+
*/
|
|
7154
|
+
type UploadImageColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
7155
|
+
/**
|
|
7156
|
+
* Độ bo góc theo token hệ thống
|
|
7157
|
+
*/
|
|
7158
|
+
type UploadImageRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
7159
|
+
/**
|
|
7160
|
+
* Biến thể kiểu dáng hiển thị
|
|
7161
|
+
*/
|
|
7162
|
+
type UploadImageVariant = "outline" | "filled" | "ghost" | "other";
|
|
7163
|
+
/**
|
|
7164
|
+
* Kiểu căn chỉnh hiển thị hình ảnh trong khung chứa (CSS object-fit)
|
|
7165
|
+
* - 'contain': Thu phóng giữ nguyên tỷ lệ sao cho toàn bộ hình ảnh nằm trọn trong khung
|
|
7166
|
+
* - 'cover': Lấp đầy khung chứa (có thể bị cắt viền)
|
|
7167
|
+
* - 'fill': Kéo dãn lấp đầy khung chứa
|
|
7168
|
+
* - 'none': Giữ nguyên kích thước gốc của hình ảnh
|
|
7169
|
+
* - 'scale-down': Chọn kích thước nhỏ hơn giữa 'none' và 'contain'
|
|
7170
|
+
*/
|
|
7171
|
+
type UploadImageObjectFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
7172
|
+
/**
|
|
7173
|
+
* Trạng thái kéo thả tệp trên vùng Dropzone
|
|
7174
|
+
* - 'idle': Trạng thái bình thường
|
|
7175
|
+
* - 'active': Đang có tệp hợp lệ được kéo trên vùng Dropzone
|
|
7176
|
+
* - 'reject': Tệp đang kéo bị từ chối do sai định dạng hoặc vượt quá dung lượng
|
|
7177
|
+
*/
|
|
7178
|
+
type UploadImageDragStatus = "idle" | "active" | "reject";
|
|
7179
|
+
/**
|
|
7180
|
+
* Props cho component chính `<UploadImage>`
|
|
7181
|
+
*/
|
|
7182
|
+
interface UploadImageProps {
|
|
7260
7183
|
/**
|
|
7261
|
-
*
|
|
7262
|
-
* @default 1
|
|
7184
|
+
* Danh sách hoặc một mục tệp hình ảnh được quản lý (Controlled mode)
|
|
7263
7185
|
*/
|
|
7264
|
-
|
|
7186
|
+
value?: PreviewFile[] | PreviewFile | null;
|
|
7265
7187
|
/**
|
|
7266
|
-
*
|
|
7267
|
-
* @default 'round' cho circle avatar, 'rect' cho square avatar
|
|
7188
|
+
* Giá trị mặc định ban đầu khi dùng ở chế độ không kiểm soát (Uncontrolled mode)
|
|
7268
7189
|
*/
|
|
7269
|
-
|
|
7190
|
+
defaultValue?: PreviewFile[] | PreviewFile | null;
|
|
7270
7191
|
/**
|
|
7271
|
-
*
|
|
7272
|
-
* @default true
|
|
7192
|
+
* Callback kích hoạt khi danh sách hình ảnh thay đổi (thêm mới, thay thế)
|
|
7273
7193
|
*/
|
|
7274
|
-
|
|
7194
|
+
onChange?: (items: PreviewFile[]) => void;
|
|
7275
7195
|
/**
|
|
7276
|
-
*
|
|
7277
|
-
* @default 1
|
|
7196
|
+
* Callback kích hoạt khi một hình ảnh bị xóa khỏi danh sách
|
|
7278
7197
|
*/
|
|
7279
|
-
|
|
7198
|
+
onRemove?: (item: PreviewFile, index: number) => void;
|
|
7280
7199
|
/**
|
|
7281
|
-
*
|
|
7282
|
-
* @default 4
|
|
7200
|
+
* Callback kích hoạt khi người dùng yêu cầu xem trước (phóng to) hình ảnh
|
|
7283
7201
|
*/
|
|
7284
|
-
|
|
7202
|
+
onPreview?: (item: PreviewFile) => void;
|
|
7285
7203
|
/**
|
|
7286
|
-
*
|
|
7287
|
-
* @default
|
|
7204
|
+
* Cho phép tải lên nhiều hình ảnh cùng lúc hay chỉ tải một ảnh
|
|
7205
|
+
* @default false
|
|
7288
7206
|
*/
|
|
7289
|
-
|
|
7290
|
-
}
|
|
7291
|
-
interface UploadAvatarProps {
|
|
7207
|
+
multiple?: boolean;
|
|
7292
7208
|
/**
|
|
7293
|
-
*
|
|
7209
|
+
* Giới hạn số lượng hình ảnh tối đa được phép tải lên
|
|
7210
|
+
* @default 1 khi multiple=false, không giới hạn khi multiple=true
|
|
7294
7211
|
*/
|
|
7295
|
-
|
|
7212
|
+
maxCount?: number;
|
|
7296
7213
|
/**
|
|
7297
|
-
*
|
|
7298
|
-
*
|
|
7299
|
-
* - 'sm': 64x64px (size-16)
|
|
7300
|
-
* - 'md': 80x80px (size-20 - mặc định)
|
|
7301
|
-
* - 'lg': 96x96px (size-24)
|
|
7302
|
-
* - 'xl': 128x128px (size-32)
|
|
7303
|
-
* @default 'md'
|
|
7214
|
+
* Giới hạn dung lượng tối đa của mỗi tệp hình ảnh (tính theo bytes)
|
|
7215
|
+
* Ví dụ: 5 * 1024 * 1024 tương đương 5MB
|
|
7304
7216
|
*/
|
|
7305
|
-
|
|
7217
|
+
maxSize?: number;
|
|
7306
7218
|
/**
|
|
7307
|
-
*
|
|
7308
|
-
*
|
|
7309
|
-
* - 'filled': nền pastel nhạt, có viền mờ
|
|
7310
|
-
* - 'ghost': trong suốt, viền tối giản
|
|
7311
|
-
* - 'other': không áp dụng style mặc định, tùy biến qua className
|
|
7312
|
-
* @default 'outline'
|
|
7219
|
+
* Các định dạng tệp được chấp nhận (chuỗi MIME/extension hoặc object Accept từ react-dropzone)
|
|
7220
|
+
* @default "image/*"
|
|
7313
7221
|
*/
|
|
7314
|
-
|
|
7222
|
+
accept?: string | Accept;
|
|
7315
7223
|
/**
|
|
7316
|
-
*
|
|
7317
|
-
*
|
|
7224
|
+
* Hook xử lý trước khi tải tệp lên để xác thực hoặc chuyển đổi dữ liệu.
|
|
7225
|
+
* Trả về `true` để tiếp tục, `false` hoặc chuỗi thông báo lỗi để từ chối tệp.
|
|
7318
7226
|
*/
|
|
7319
|
-
|
|
7227
|
+
beforeUpload?: (file: File) => boolean | string | Promise<boolean | string>;
|
|
7320
7228
|
/**
|
|
7321
|
-
*
|
|
7322
|
-
*
|
|
7229
|
+
* Chế độ hiển thị giao diện của component:
|
|
7230
|
+
* - 'dropzone': Vùng kéo thả lớn với tiêu đề và mô tả
|
|
7231
|
+
* - 'card-grid': Lưới thẻ ảnh thu nhỏ (picture wall)
|
|
7232
|
+
* - 'button': Nút bấm kích hoạt tải ảnh nhỏ gọn
|
|
7233
|
+
* @default 'dropzone'
|
|
7323
7234
|
*/
|
|
7324
|
-
|
|
7235
|
+
viewMode?: UploadImageViewMode;
|
|
7325
7236
|
/**
|
|
7326
|
-
*
|
|
7327
|
-
* @default
|
|
7237
|
+
* Hình dạng của khung tải ảnh
|
|
7238
|
+
* @default 'rectangle' cho dropzone, 'square' cho card-grid
|
|
7328
7239
|
*/
|
|
7329
|
-
|
|
7240
|
+
shape?: UploadImageShape;
|
|
7330
7241
|
/**
|
|
7331
|
-
*
|
|
7242
|
+
* Kiểu căn chỉnh hiển thị hình ảnh trong khung chứa (CSS object-fit)
|
|
7243
|
+
* @default 'contain' cho dropzone 1 ảnh, 'cover' cho thumbnail danh sách
|
|
7332
7244
|
*/
|
|
7333
|
-
|
|
7245
|
+
objectFit?: UploadImageObjectFit;
|
|
7334
7246
|
/**
|
|
7335
|
-
*
|
|
7247
|
+
* Kích cỡ của component (áp dụng cho dropzone, thumbnail, font chữ, icon)
|
|
7248
|
+
* @default 'md'
|
|
7336
7249
|
*/
|
|
7337
|
-
|
|
7250
|
+
size?: UploadImageSize;
|
|
7338
7251
|
/**
|
|
7339
|
-
*
|
|
7252
|
+
* Bảng màu chủ đề trong Design System
|
|
7253
|
+
* @default 'primary'
|
|
7340
7254
|
*/
|
|
7341
|
-
|
|
7255
|
+
color?: UploadImageColor;
|
|
7342
7256
|
/**
|
|
7343
|
-
*
|
|
7257
|
+
* Biến thể kiểu dáng hiển thị của khung tải ảnh
|
|
7258
|
+
* @default 'outline'
|
|
7344
7259
|
*/
|
|
7345
|
-
|
|
7260
|
+
variant?: UploadImageVariant;
|
|
7346
7261
|
/**
|
|
7347
|
-
*
|
|
7262
|
+
* Tùy chỉnh độ bo góc của các phần tử (khung dropzone, thumbnail, nút bấm)
|
|
7263
|
+
* @default phụ thuộc vào prop size
|
|
7348
7264
|
*/
|
|
7349
|
-
|
|
7265
|
+
radius?: UploadImageRadius;
|
|
7350
7266
|
/**
|
|
7351
|
-
*
|
|
7267
|
+
* Nhãn văn bản hiển thị phía trên component
|
|
7352
7268
|
*/
|
|
7353
|
-
|
|
7269
|
+
label?: ReactNode;
|
|
7354
7270
|
/**
|
|
7355
|
-
*
|
|
7271
|
+
* Đánh dấu trường bắt buộc nhập (hiển thị dấu * màu đỏ cạnh nhãn)
|
|
7272
|
+
* @default false
|
|
7356
7273
|
*/
|
|
7357
|
-
|
|
7274
|
+
isRequired?: boolean;
|
|
7358
7275
|
/**
|
|
7359
|
-
*
|
|
7360
|
-
* @default "image/*"
|
|
7276
|
+
* Lớp CSS tùy biến cho nhãn văn bản (label)
|
|
7361
7277
|
*/
|
|
7362
|
-
|
|
7278
|
+
labelClassName?: string;
|
|
7363
7279
|
/**
|
|
7364
|
-
*
|
|
7365
|
-
* @default true
|
|
7366
|
-
*/
|
|
7367
|
-
crop?: boolean | UploadAvatarCropOptions;
|
|
7368
|
-
/**
|
|
7369
|
-
* Nhãn hiển thị cho avatar
|
|
7370
|
-
*/
|
|
7371
|
-
label?: ReactNode;
|
|
7372
|
-
/**
|
|
7373
|
-
* Vị trí đặt nhãn: 'top' | 'left'
|
|
7374
|
-
* @default 'top'
|
|
7375
|
-
*/
|
|
7376
|
-
labelPlacement?: UploadAvatarLabelPlacement;
|
|
7377
|
-
/**
|
|
7378
|
-
* Đánh dấu trường bắt buộc nhập (hiển thị dấu * đỏ cạnh label)
|
|
7379
|
-
* @default false
|
|
7380
|
-
*/
|
|
7381
|
-
isRequired?: boolean;
|
|
7382
|
-
/**
|
|
7383
|
-
* Đoạn văn bản hướng dẫn/chú thích bên dưới avatar
|
|
7280
|
+
* Văn bản hướng dẫn hoặc ghi chú phụ trợ hiển thị phía dưới component
|
|
7384
7281
|
*/
|
|
7385
7282
|
helperText?: ReactNode;
|
|
7386
7283
|
/**
|
|
7387
|
-
* Thông báo lỗi hiển thị
|
|
7284
|
+
* Thông báo lỗi tùy chỉnh hiển thị khi trường không hợp lệ
|
|
7388
7285
|
*/
|
|
7389
7286
|
errorMessage?: ReactNode;
|
|
7390
7287
|
/**
|
|
7391
|
-
* Trạng thái báo lỗi (viền
|
|
7288
|
+
* Trạng thái báo lỗi cho trường nhập (hiển thị viền màu đỏ)
|
|
7392
7289
|
* @default false
|
|
7393
7290
|
*/
|
|
7394
7291
|
isInvalid?: boolean;
|
|
7395
7292
|
/**
|
|
7396
|
-
*
|
|
7397
|
-
* @default false
|
|
7398
|
-
*/
|
|
7399
|
-
isLoading?: boolean;
|
|
7400
|
-
/**
|
|
7401
|
-
* Vô hiệu hóa toàn bộ tương tác
|
|
7293
|
+
* Vô hiệu hóa toàn bộ tương tác tải ảnh và xóa ảnh
|
|
7402
7294
|
* @default false
|
|
7403
7295
|
*/
|
|
7404
7296
|
disabled?: boolean;
|
|
7405
7297
|
/**
|
|
7406
|
-
* Chế độ chỉ đọc
|
|
7298
|
+
* Chế độ chỉ đọc (cho phép xem trước nhưng không cho phép tải thêm hoặc xóa ảnh)
|
|
7407
7299
|
* @default false
|
|
7408
7300
|
*/
|
|
7409
7301
|
readOnly?: boolean;
|
|
7410
7302
|
/**
|
|
7411
|
-
*
|
|
7303
|
+
* Trạng thái đang tải dữ liệu (hiển thị hiệu ứng xoay spinner và vô hiệu hóa tương tác)
|
|
7412
7304
|
* @default false
|
|
7413
7305
|
*/
|
|
7414
|
-
|
|
7415
|
-
/**
|
|
7416
|
-
* Icon placeholder tùy biến khi chưa có ảnh
|
|
7417
|
-
*/
|
|
7418
|
-
icon?: ReactNode;
|
|
7306
|
+
isLoading?: boolean;
|
|
7419
7307
|
/**
|
|
7420
|
-
*
|
|
7308
|
+
* Tiêu đề chính tùy chỉnh bên trong khung Dropzone
|
|
7309
|
+
* @default "Kéo thả hình ảnh vào đây, hoặc nhấn để duyệt file"
|
|
7421
7310
|
*/
|
|
7422
|
-
|
|
7311
|
+
dropzoneTitle?: ReactNode;
|
|
7423
7312
|
/**
|
|
7424
|
-
*
|
|
7313
|
+
* Mô tả phụ tùy chỉnh bên trong khung Dropzone
|
|
7314
|
+
* @default "Hỗ trợ định dạng PNG, JPG, WEBP, GIF"
|
|
7425
7315
|
*/
|
|
7426
|
-
|
|
7316
|
+
dropzoneDescription?: ReactNode;
|
|
7427
7317
|
/**
|
|
7428
|
-
*
|
|
7429
|
-
* @default false
|
|
7318
|
+
* Biểu tượng tùy chỉnh hiển thị ở vị trí icon trung tâm
|
|
7430
7319
|
*/
|
|
7431
|
-
|
|
7320
|
+
icon?: ReactNode;
|
|
7432
7321
|
/**
|
|
7433
|
-
*
|
|
7322
|
+
* Nhãn chữ của nút bấm khi viewMode="button"
|
|
7323
|
+
* @default "Tải ảnh lên"
|
|
7434
7324
|
*/
|
|
7435
|
-
|
|
7325
|
+
buttonText?: ReactNode;
|
|
7436
7326
|
/**
|
|
7437
|
-
*
|
|
7327
|
+
* Render prop tùy biến giao diện hiển thị cho từng mục hình ảnh trong danh sách
|
|
7438
7328
|
*/
|
|
7439
|
-
|
|
7329
|
+
renderItem?: (item: PreviewFile, index: number, actions: {
|
|
7330
|
+
remove: () => void;
|
|
7331
|
+
preview: () => void;
|
|
7332
|
+
}) => ReactNode;
|
|
7440
7333
|
/**
|
|
7441
|
-
*
|
|
7334
|
+
* Lớp CSS tùy biến cho container bao ngoài cùng của component
|
|
7442
7335
|
*/
|
|
7443
|
-
|
|
7336
|
+
className?: string;
|
|
7444
7337
|
/**
|
|
7445
|
-
*
|
|
7338
|
+
* Lớp CSS tùy biến cho vùng Dropzone hoặc vùng kích hoạt
|
|
7446
7339
|
*/
|
|
7447
|
-
|
|
7340
|
+
dropzoneClassName?: string;
|
|
7448
7341
|
/**
|
|
7449
|
-
*
|
|
7342
|
+
* Lớp CSS tùy biến cho danh sách xem trước hình ảnh (UploadImageList)
|
|
7450
7343
|
*/
|
|
7451
|
-
|
|
7344
|
+
previewClassName?: string;
|
|
7452
7345
|
/**
|
|
7453
|
-
*
|
|
7346
|
+
* Lớp CSS tùy biến cho thông báo trợ giúp/báo lỗi (HelperErrorText)
|
|
7454
7347
|
*/
|
|
7455
7348
|
helperClassName?: string;
|
|
7456
|
-
/**
|
|
7457
|
-
* Nhãn accessibility cho khu vực upload avatar
|
|
7458
|
-
*/
|
|
7459
|
-
ariaLabel?: string;
|
|
7460
|
-
}
|
|
7461
|
-
|
|
7462
|
-
declare function UploadAvatar({ size, variant, color, shape, radius, value, defaultValue, onChange, onRemove, onPreview, onClear, maxSize, accept, crop, label, labelPlacement, isRequired, helperText, errorMessage, isInvalid, isLoading, disabled, readOnly, isClearable, icon, name, id, isFullWidth, className, wrapperClassName, avatarClassName, avatarWrapperClassName, labelClassName, helperClassName, ariaLabel, ref, }: UploadAvatarProps): react_jsx_runtime.JSX.Element;
|
|
7463
|
-
|
|
7464
|
-
interface UploadAvatarCropContentProps {
|
|
7465
|
-
imageSrc: string;
|
|
7466
|
-
fileName?: string;
|
|
7467
|
-
fileType?: string;
|
|
7468
|
-
aspectRatio?: number;
|
|
7469
|
-
cropShape?: "round" | "rect";
|
|
7470
|
-
showGrid?: boolean;
|
|
7471
|
-
minZoom?: number;
|
|
7472
|
-
maxZoom?: number;
|
|
7473
|
-
onApply: (croppedFile: File) => void;
|
|
7474
|
-
onCancel?: () => void;
|
|
7475
7349
|
}
|
|
7476
|
-
type UploadAvatarCropModalProps = UploadAvatarCropContentProps & {
|
|
7477
|
-
open?: boolean;
|
|
7478
|
-
modalTitle?: string;
|
|
7479
|
-
onClose?: () => void;
|
|
7480
|
-
};
|
|
7481
|
-
declare function UploadAvatarCropContent({ imageSrc: initialImageSrc, fileName: initialFileName, fileType: initialFileType, aspectRatio, cropShape, showGrid, minZoom, maxZoom, onApply, onCancel, }: UploadAvatarCropContentProps): react_jsx_runtime.JSX.Element;
|
|
7482
|
-
declare function UploadAvatarCropModal({ open, modalTitle, onClose, onCancel, onApply, ...restProps }: UploadAvatarCropModalProps): react_jsx_runtime.JSX.Element;
|
|
7483
|
-
|
|
7484
|
-
/**
|
|
7485
|
-
* Các kích thước chiều rộng tiêu chuẩn của Confirm:
|
|
7486
|
-
* - 'xs': 320px (nhỏ gọn, dành cho thông báo ngắn)
|
|
7487
|
-
* - 'sm': 380px (dành cho câu hỏi xác nhận đơn giản)
|
|
7488
|
-
* - 'md': 440px (chuẩn mặc định cho đa số hộp thoại xác nhận)
|
|
7489
|
-
* - 'lg': 520px (dành cho thông báo cảnh báo chi tiết)
|
|
7490
|
-
* - 'xl': 600px (dành cho nội dung phức tạp hoặc danh sách)
|
|
7491
|
-
*/
|
|
7492
|
-
type ConfirmSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
7493
|
-
/**
|
|
7494
|
-
* Các chủ đề màu sắc biểu thị mức độ quan trọng hoặc loại hành động của Confirm:
|
|
7495
|
-
* - 'warning': Cảnh báo hành động có rủi ro (vàng/cam)
|
|
7496
|
-
* - 'error': Hành động nguy hiểm / phá hủy / xóa dữ liệu (đỏ)
|
|
7497
|
-
* - 'primary': Hành động nghiệp vụ chính (xanh dương)
|
|
7498
|
-
* - 'secondary': Hành động phụ (nâu đồng)
|
|
7499
|
-
* - 'neutral': Thông báo trung tính (xám)
|
|
7500
|
-
* - 'success': Xác nhận hoàn thành hoặc kích hoạt thành công (xanh lá)
|
|
7501
|
-
* - 'info': Thông tin cần người dùng lưu ý (xanh lơ)
|
|
7502
|
-
*/
|
|
7503
|
-
type ConfirmColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
7504
|
-
/**
|
|
7505
|
-
* Các mức bo góc của khung hộp thoại Confirm:
|
|
7506
|
-
* - 'none': Không bo góc (vuông vức)
|
|
7507
|
-
* - 'sm': Bo góc nhẹ (rounded-sm)
|
|
7508
|
-
* - 'md': Bo góc vừa (rounded-md)
|
|
7509
|
-
* - 'lg': Bo góc lớn (rounded-lg)
|
|
7510
|
-
* - 'xl': Bo góc rất lớn (rounded-xl)
|
|
7511
|
-
* - 'full': Bo tròn hoàn toàn (rounded-2xl)
|
|
7512
|
-
*/
|
|
7513
|
-
type ConfirmRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
7514
7350
|
/**
|
|
7515
|
-
* Props cho component `<
|
|
7351
|
+
* Props cho sub-component `<UploadImageDropzone>`
|
|
7516
7352
|
*/
|
|
7517
|
-
interface
|
|
7518
|
-
/**
|
|
7519
|
-
* Ref chuyển tiếp (forwardRef) trỏ trực tiếp đến thẻ div hộp thoại
|
|
7520
|
-
*/
|
|
7521
|
-
ref?: Ref<HTMLDivElement>;
|
|
7353
|
+
interface UploadImageDropzoneProps {
|
|
7522
7354
|
/**
|
|
7523
|
-
* Kích
|
|
7355
|
+
* Kích cỡ của khung Dropzone
|
|
7524
7356
|
* @default 'md'
|
|
7525
7357
|
*/
|
|
7526
|
-
size?:
|
|
7358
|
+
size?: UploadImageSize;
|
|
7527
7359
|
/**
|
|
7528
|
-
*
|
|
7529
|
-
* @default '
|
|
7360
|
+
* Màu sắc chủ đề khi hover và kéo thả
|
|
7361
|
+
* @default 'primary'
|
|
7530
7362
|
*/
|
|
7531
|
-
color?:
|
|
7363
|
+
color?: UploadImageColor;
|
|
7532
7364
|
/**
|
|
7533
|
-
*
|
|
7534
|
-
*
|
|
7535
|
-
* - 'sm': bo góc nhỏ
|
|
7536
|
-
* - 'md': bo góc vừa
|
|
7537
|
-
* - 'lg': bo góc lớn
|
|
7538
|
-
* - 'xl': bo góc rất lớn
|
|
7539
|
-
* - 'full': bo tròn hoàn toàn
|
|
7540
|
-
* @default 'rounded-lg'
|
|
7365
|
+
* Biến thể kiểu dáng viền/nền của khung Dropzone
|
|
7366
|
+
* @default 'outline'
|
|
7541
7367
|
*/
|
|
7542
|
-
|
|
7368
|
+
variant?: UploadImageVariant;
|
|
7543
7369
|
/**
|
|
7544
|
-
*
|
|
7370
|
+
* Tùy biến độ bo góc của khung Dropzone
|
|
7371
|
+
* @default phụ thuộc vào size
|
|
7545
7372
|
*/
|
|
7546
|
-
|
|
7373
|
+
radius?: UploadImageRadius;
|
|
7547
7374
|
/**
|
|
7548
|
-
*
|
|
7549
|
-
*
|
|
7375
|
+
* Hình dạng của khung Dropzone ('rectangle' hoặc 'square')
|
|
7376
|
+
* @default 'rectangle'
|
|
7550
7377
|
*/
|
|
7551
|
-
|
|
7552
|
-
}
|
|
7553
|
-
/**
|
|
7554
|
-
* Props cho component `<ConfirmHeader>` (Phần đầu của hộp thoại Confirm)
|
|
7555
|
-
*/
|
|
7556
|
-
interface ConfirmHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
7378
|
+
shape?: UploadImageShape;
|
|
7557
7379
|
/**
|
|
7558
|
-
*
|
|
7559
|
-
* @default '
|
|
7380
|
+
* Kiểu căn chỉnh hiển thị hình ảnh trong khung Dropzone (CSS object-fit)
|
|
7381
|
+
* @default 'contain'
|
|
7560
7382
|
*/
|
|
7561
|
-
|
|
7383
|
+
objectFit?: UploadImageObjectFit;
|
|
7562
7384
|
/**
|
|
7563
|
-
*
|
|
7564
|
-
* @default
|
|
7385
|
+
* Vô hiệu hóa khung kéo thả và chọn tệp
|
|
7386
|
+
* @default false
|
|
7565
7387
|
*/
|
|
7566
|
-
|
|
7388
|
+
disabled?: boolean;
|
|
7567
7389
|
/**
|
|
7568
|
-
*
|
|
7569
|
-
* @default
|
|
7390
|
+
* Chế độ chỉ đọc, không cho phép kích hoạt chọn tệp mới
|
|
7391
|
+
* @default false
|
|
7570
7392
|
*/
|
|
7571
|
-
|
|
7393
|
+
readOnly?: boolean;
|
|
7572
7394
|
/**
|
|
7573
|
-
*
|
|
7395
|
+
* Trạng thái đang tải tệp hoặc xử lý hình ảnh
|
|
7396
|
+
* @default false
|
|
7574
7397
|
*/
|
|
7575
|
-
|
|
7398
|
+
isLoading?: boolean;
|
|
7576
7399
|
/**
|
|
7577
|
-
*
|
|
7400
|
+
* Trạng thái kéo thả tệp trên vùng Dropzone ('idle' | 'active' | 'reject')
|
|
7401
|
+
* @default 'idle'
|
|
7578
7402
|
*/
|
|
7579
|
-
|
|
7403
|
+
dragStatus?: UploadImageDragStatus;
|
|
7580
7404
|
/**
|
|
7581
|
-
*
|
|
7405
|
+
* Trạng thái hiển thị viền lỗi
|
|
7406
|
+
* @default false
|
|
7582
7407
|
*/
|
|
7583
|
-
|
|
7408
|
+
isInvalid?: boolean;
|
|
7584
7409
|
/**
|
|
7585
|
-
*
|
|
7586
|
-
* @default false
|
|
7410
|
+
* Tiêu đề hiển thị bên trong khung Dropzone
|
|
7587
7411
|
*/
|
|
7588
|
-
|
|
7412
|
+
dropzoneTitle?: ReactNode;
|
|
7589
7413
|
/**
|
|
7590
|
-
*
|
|
7591
|
-
* Tự động kết hợp hiệu ứng Exit Animation của ConfirmContainer.
|
|
7414
|
+
* Mô tả phụ hiển thị bên trong khung Dropzone
|
|
7592
7415
|
*/
|
|
7593
|
-
|
|
7416
|
+
dropzoneDescription?: ReactNode;
|
|
7594
7417
|
/**
|
|
7595
|
-
*
|
|
7418
|
+
* Biểu tượng tùy chỉnh trong khung Dropzone
|
|
7596
7419
|
*/
|
|
7597
|
-
|
|
7420
|
+
icon?: ReactNode;
|
|
7598
7421
|
/**
|
|
7599
|
-
*
|
|
7422
|
+
* Mục hình ảnh đã tải lên để hiển thị trực tiếp trong khung khi ở chế độ 1 ảnh
|
|
7600
7423
|
*/
|
|
7601
|
-
|
|
7424
|
+
item?: PreviewFile | null;
|
|
7602
7425
|
/**
|
|
7603
|
-
*
|
|
7426
|
+
* Callback xóa ảnh khi nhấn nút Xóa ảnh ở góc trên bên phải
|
|
7604
7427
|
*/
|
|
7605
|
-
|
|
7606
|
-
}
|
|
7607
|
-
/**
|
|
7608
|
-
* Props cho component `<ConfirmBody>` (Phần thân chứa nội dung mô tả của Confirm)
|
|
7609
|
-
*/
|
|
7610
|
-
interface ConfirmBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
7428
|
+
onRemove?: () => void;
|
|
7611
7429
|
/**
|
|
7612
|
-
*
|
|
7613
|
-
* @default 'md'
|
|
7430
|
+
* Callback mở lightbox xem trước khi nhấn vào thân hình ảnh
|
|
7614
7431
|
*/
|
|
7615
|
-
|
|
7432
|
+
onPreview?: () => void;
|
|
7616
7433
|
/**
|
|
7617
|
-
*
|
|
7434
|
+
* Callback mở hộp thoại chọn tệp của trình duyệt (hoặc khi nhấn nút Thay đổi ảnh)
|
|
7618
7435
|
*/
|
|
7619
|
-
|
|
7436
|
+
onTriggerUpload?: () => void;
|
|
7620
7437
|
/**
|
|
7621
|
-
*
|
|
7438
|
+
* Hàm gắn thuộc tính accessibility và sự kiện kéo thả từ react-dropzone
|
|
7622
7439
|
*/
|
|
7623
|
-
|
|
7440
|
+
getRootProps?: <T extends DropzoneRootProps>(props?: T) => T;
|
|
7624
7441
|
/**
|
|
7625
|
-
*
|
|
7442
|
+
* Lớp CSS tùy biến bổ sung cho khung Dropzone
|
|
7626
7443
|
*/
|
|
7627
7444
|
className?: string;
|
|
7628
7445
|
/**
|
|
7629
|
-
*
|
|
7446
|
+
* ID phần tử chứa văn bản hướng dẫn/mô tả hỗ trợ accessibility (aria-describedby)
|
|
7630
7447
|
*/
|
|
7631
|
-
|
|
7448
|
+
describedById?: string;
|
|
7632
7449
|
}
|
|
7633
7450
|
/**
|
|
7634
|
-
* Props cho component `<
|
|
7451
|
+
* Props cho sub-component `<UploadImageList>`
|
|
7635
7452
|
*/
|
|
7636
|
-
interface
|
|
7453
|
+
interface UploadImageListProps {
|
|
7637
7454
|
/**
|
|
7638
|
-
*
|
|
7639
|
-
* @default 'md'
|
|
7455
|
+
* Danh sách các mục hình ảnh cần hiển thị
|
|
7640
7456
|
*/
|
|
7641
|
-
|
|
7457
|
+
items: PreviewFile[];
|
|
7642
7458
|
/**
|
|
7643
|
-
*
|
|
7644
|
-
* @default '
|
|
7459
|
+
* Kích cỡ của thumbnail hình ảnh
|
|
7460
|
+
* @default 'md'
|
|
7645
7461
|
*/
|
|
7646
|
-
|
|
7462
|
+
size: UploadImageSize;
|
|
7647
7463
|
/**
|
|
7648
|
-
*
|
|
7649
|
-
* @default '
|
|
7464
|
+
* Màu sắc chủ đề cho các nút thao tác
|
|
7465
|
+
* @default 'primary'
|
|
7650
7466
|
*/
|
|
7651
|
-
|
|
7467
|
+
color?: UploadImageColor;
|
|
7652
7468
|
/**
|
|
7653
|
-
* Biến thể
|
|
7654
|
-
* @default '
|
|
7469
|
+
* Biến thể hiển thị
|
|
7470
|
+
* @default 'outline'
|
|
7655
7471
|
*/
|
|
7656
|
-
|
|
7472
|
+
variant?: UploadImageVariant;
|
|
7657
7473
|
/**
|
|
7658
|
-
*
|
|
7659
|
-
* @default 'outline'
|
|
7474
|
+
* Độ bo góc của từng thumbnail ảnh trong danh sách
|
|
7660
7475
|
*/
|
|
7661
|
-
|
|
7476
|
+
radius: UploadImageRadius;
|
|
7662
7477
|
/**
|
|
7663
|
-
*
|
|
7478
|
+
* Kiểu căn chỉnh hiển thị hình ảnh trong thumbnail (CSS object-fit)
|
|
7479
|
+
* @default 'cover'
|
|
7664
7480
|
*/
|
|
7665
|
-
|
|
7481
|
+
objectFit?: UploadImageObjectFit;
|
|
7666
7482
|
/**
|
|
7667
|
-
*
|
|
7668
|
-
* @default
|
|
7483
|
+
* Vô hiệu hóa các nút tương tác trong danh sách
|
|
7484
|
+
* @default false
|
|
7669
7485
|
*/
|
|
7670
|
-
|
|
7486
|
+
disabled?: boolean;
|
|
7671
7487
|
/**
|
|
7672
|
-
*
|
|
7488
|
+
* Chế độ chỉ đọc (ẩn nút xóa và nút thêm ảnh)
|
|
7489
|
+
* @default false
|
|
7673
7490
|
*/
|
|
7674
|
-
|
|
7491
|
+
readOnly?: boolean;
|
|
7675
7492
|
/**
|
|
7676
|
-
*
|
|
7493
|
+
* Số lượng hình ảnh tối đa cho phép (dùng để ẩn nút thêm ảnh khi đã đạt giới hạn)
|
|
7677
7494
|
*/
|
|
7678
|
-
|
|
7495
|
+
maxCount?: number;
|
|
7679
7496
|
/**
|
|
7680
|
-
* Callback
|
|
7497
|
+
* Callback khi nhấn nút xóa một mục hình ảnh
|
|
7681
7498
|
*/
|
|
7682
|
-
|
|
7499
|
+
onRemove: (item: PreviewFile, index: number) => void;
|
|
7683
7500
|
/**
|
|
7684
|
-
*
|
|
7501
|
+
* Callback khi nhấn nút xem trước một mục hình ảnh
|
|
7685
7502
|
*/
|
|
7686
|
-
|
|
7503
|
+
onPreview: (item: PreviewFile) => void;
|
|
7687
7504
|
/**
|
|
7688
|
-
*
|
|
7505
|
+
* Callback mở hộp thoại tải ảnh khi nhấn nút thêm (+)
|
|
7689
7506
|
*/
|
|
7690
|
-
|
|
7507
|
+
onTriggerUpload: () => void;
|
|
7691
7508
|
/**
|
|
7692
|
-
*
|
|
7509
|
+
* Render prop tùy biến giao diện từng mục hình ảnh trong danh sách
|
|
7510
|
+
*/
|
|
7511
|
+
renderItem?: (item: PreviewFile, index: number, actions: {
|
|
7512
|
+
remove: () => void;
|
|
7513
|
+
preview: () => void;
|
|
7514
|
+
}) => ReactNode;
|
|
7515
|
+
/**
|
|
7516
|
+
* Cho phép hiển thị nút thêm (+) ở cuối danh sách hay không
|
|
7517
|
+
* @default true
|
|
7518
|
+
*/
|
|
7519
|
+
showAddButton?: boolean;
|
|
7520
|
+
/**
|
|
7521
|
+
* Lớp CSS tùy biến cho container danh sách
|
|
7522
|
+
*/
|
|
7523
|
+
className?: string;
|
|
7524
|
+
}
|
|
7525
|
+
|
|
7526
|
+
declare function UploadImage({ value, defaultValue, onChange, onRemove, onPreview, multiple, maxCount, maxSize, accept, beforeUpload, viewMode, shape, objectFit, size, color, variant, radius, label, isRequired, labelClassName, helperText, errorMessage, isInvalid: isInvalidProp, disabled, readOnly, isLoading, dropzoneTitle, dropzoneDescription, icon, buttonText, renderItem, className, dropzoneClassName, previewClassName, helperClassName, }: UploadImageProps): react_jsx_runtime.JSX.Element;
|
|
7527
|
+
|
|
7528
|
+
declare function UploadImageDropzone({ size, color, variant, radius, shape, objectFit, disabled, readOnly, isLoading, dragStatus, isInvalid, dropzoneTitle, dropzoneDescription, icon, item, onRemove, onPreview, onTriggerUpload, getRootProps, className, describedById, }: UploadImageDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
7529
|
+
|
|
7530
|
+
declare function UploadImageList({ items, size, radius, objectFit, disabled, readOnly, maxCount, onRemove, onPreview, onTriggerUpload, renderItem, showAddButton, className, }: UploadImageListProps): react_jsx_runtime.JSX.Element;
|
|
7531
|
+
|
|
7532
|
+
declare function formatBytes(bytes?: number, decimals?: number): string;
|
|
7533
|
+
|
|
7534
|
+
type UploadAvatarShape = "circle" | "square";
|
|
7535
|
+
type UploadAvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
7536
|
+
type UploadAvatarColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
7537
|
+
type UploadAvatarRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
7538
|
+
type UploadAvatarVariant = "outline" | "filled" | "ghost" | "other";
|
|
7539
|
+
type UploadAvatarLabelPlacement = "top" | "left";
|
|
7540
|
+
interface UploadAvatarCropOptions {
|
|
7541
|
+
/**
|
|
7542
|
+
* Tỷ lệ khung hình khi cắt ảnh (mặc định 1 cho avatar 1:1)
|
|
7543
|
+
* @default 1
|
|
7544
|
+
*/
|
|
7545
|
+
aspectRatio?: number;
|
|
7546
|
+
/**
|
|
7547
|
+
* Hình dạng vùng cắt ảnh
|
|
7548
|
+
* @default 'round' cho circle avatar, 'rect' cho square avatar
|
|
7549
|
+
*/
|
|
7550
|
+
cropShape?: "round" | "rect";
|
|
7551
|
+
/**
|
|
7552
|
+
* Hiển thị lưới căn chỉnh
|
|
7553
|
+
* @default true
|
|
7554
|
+
*/
|
|
7555
|
+
showGrid?: boolean;
|
|
7556
|
+
/**
|
|
7557
|
+
* Tỷ lệ thu phóng tối thiểu
|
|
7558
|
+
* @default 1
|
|
7559
|
+
*/
|
|
7560
|
+
minZoom?: number;
|
|
7561
|
+
/**
|
|
7562
|
+
* Tỷ lệ thu phóng tối đa
|
|
7563
|
+
* @default 4
|
|
7564
|
+
*/
|
|
7565
|
+
maxZoom?: number;
|
|
7566
|
+
/**
|
|
7567
|
+
* Tiêu đề modal cắt ảnh
|
|
7568
|
+
* @default "Cắt ảnh đại diện"
|
|
7569
|
+
*/
|
|
7570
|
+
modalTitle?: string;
|
|
7571
|
+
}
|
|
7572
|
+
interface UploadAvatarConfig {
|
|
7573
|
+
/**
|
|
7574
|
+
* Đánh dấu trường bắt buộc nhập (hiển thị dấu * đỏ cạnh label)
|
|
7575
|
+
* @default false
|
|
7576
|
+
*/
|
|
7577
|
+
isRequired?: boolean;
|
|
7578
|
+
/**
|
|
7579
|
+
* Trạng thái báo lỗi (viền đỏ, aria-invalid="true")
|
|
7580
|
+
* @default false
|
|
7581
|
+
*/
|
|
7582
|
+
isInvalid?: boolean;
|
|
7583
|
+
/**
|
|
7584
|
+
* Trạng thái đang tải (vô hiệu hóa tương tác)
|
|
7585
|
+
* @default false
|
|
7586
|
+
*/
|
|
7587
|
+
isLoading?: boolean;
|
|
7588
|
+
/**
|
|
7589
|
+
* Hiển thị biểu tượng xoay spinner khi đang ở trạng thái loading
|
|
7590
|
+
* @default false
|
|
7591
|
+
*/
|
|
7592
|
+
showSpinner?: boolean;
|
|
7593
|
+
/**
|
|
7594
|
+
* Cho phép hiển thị nút xóa nhanh
|
|
7595
|
+
* @default false
|
|
7596
|
+
*/
|
|
7597
|
+
isClearable?: boolean;
|
|
7598
|
+
/**
|
|
7599
|
+
* Mở rộng chiếm toàn bộ chiều rộng 100% của container cha
|
|
7600
|
+
* @default false
|
|
7601
|
+
*/
|
|
7602
|
+
isFullWidth?: boolean;
|
|
7603
|
+
}
|
|
7604
|
+
interface UploadAvatarProps {
|
|
7605
|
+
/**
|
|
7606
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng
|
|
7607
|
+
*/
|
|
7608
|
+
config?: UploadAvatarConfig;
|
|
7609
|
+
/**
|
|
7610
|
+
* Ref chuyển tiếp đến thẻ input file ẩn (React 19)
|
|
7611
|
+
*/
|
|
7612
|
+
ref?: Ref<HTMLInputElement>;
|
|
7613
|
+
/**
|
|
7614
|
+
* Kích cỡ của avatar:
|
|
7615
|
+
* - 'xs': 48x48px (size-12)
|
|
7616
|
+
* - 'sm': 64x64px (size-16)
|
|
7617
|
+
* - 'md': 80x80px (size-20 - mặc định)
|
|
7618
|
+
* - 'lg': 96x96px (size-24)
|
|
7619
|
+
* - 'xl': 128x128px (size-32)
|
|
7620
|
+
* @default 'md'
|
|
7621
|
+
*/
|
|
7622
|
+
size?: UploadAvatarSize;
|
|
7623
|
+
/**
|
|
7624
|
+
* Biến thể giao diện của avatar:
|
|
7625
|
+
* - 'outline': viền nét quanh avatar (mặc định)
|
|
7626
|
+
* - 'filled': nền pastel nhạt, có viền mờ
|
|
7627
|
+
* - 'ghost': trong suốt, viền tối giản
|
|
7628
|
+
* - 'other': không áp dụng style mặc định, tùy biến qua className
|
|
7629
|
+
* @default 'outline'
|
|
7630
|
+
*/
|
|
7631
|
+
variant?: UploadAvatarVariant;
|
|
7632
|
+
/**
|
|
7633
|
+
* Chủ đề màu sắc
|
|
7634
|
+
* @default 'primary'
|
|
7635
|
+
*/
|
|
7636
|
+
color?: UploadAvatarColor;
|
|
7637
|
+
/**
|
|
7638
|
+
* Hình dạng avatar: 'circle' (tròn) hoặc 'square' (vuông)
|
|
7639
|
+
* @default 'circle'
|
|
7640
|
+
*/
|
|
7641
|
+
shape?: UploadAvatarShape;
|
|
7642
|
+
/**
|
|
7643
|
+
* Tùy chỉnh độ bo góc khi shape="square"
|
|
7644
|
+
* @default theo từng size (xs: rounded, sm: rounded-md, md: rounded-lg, lg: rounded-xl, xl: rounded-2xl)
|
|
7645
|
+
*/
|
|
7646
|
+
radius?: UploadAvatarRadius;
|
|
7647
|
+
/**
|
|
7648
|
+
* Giá trị ảnh avatar (PreviewFile = File | ServerFile hoặc chuỗi URL)
|
|
7649
|
+
*/
|
|
7650
|
+
value?: PreviewFile | string | null;
|
|
7651
|
+
/**
|
|
7652
|
+
* Giá trị mặc định ban đầu khi khởi tạo (Uncontrolled)
|
|
7653
|
+
*/
|
|
7654
|
+
defaultValue?: PreviewFile | string | null;
|
|
7655
|
+
/**
|
|
7656
|
+
* Callback khi ảnh avatar thay đổi (hoặc bị xóa với null)
|
|
7657
|
+
*/
|
|
7658
|
+
onChange?: (item: PreviewFile | null) => void;
|
|
7659
|
+
/**
|
|
7660
|
+
* Callback khi ảnh avatar bị xóa
|
|
7661
|
+
*/
|
|
7662
|
+
onRemove?: (item: PreviewFile) => void;
|
|
7663
|
+
/**
|
|
7664
|
+
* Callback khi mở xem trước ảnh phóng to (lightbox preview)
|
|
7665
|
+
*/
|
|
7666
|
+
onPreview?: (item: PreviewFile) => void;
|
|
7667
|
+
/**
|
|
7668
|
+
* Callback khi người dùng nhấn nút xóa nhanh nội dung
|
|
7669
|
+
*/
|
|
7670
|
+
onClear?: () => void;
|
|
7671
|
+
/**
|
|
7672
|
+
* Dung lượng file tối đa cho phép (bytes, ví dụ: 2 * 1024 * 1024 = 2MB)
|
|
7673
|
+
*/
|
|
7674
|
+
maxSize?: number;
|
|
7675
|
+
/**
|
|
7676
|
+
* Định dạng MIME type hoặc phần mở rộng được chấp nhận (chuỗi hoặc đối tượng Accept từ react-dropzone)
|
|
7677
|
+
* @default "image/*"
|
|
7678
|
+
*/
|
|
7679
|
+
accept?: string | Accept;
|
|
7680
|
+
/**
|
|
7681
|
+
* Bật modal cắt xén ảnh (crop) trước khi áp dụng
|
|
7682
|
+
* @default true
|
|
7683
|
+
*/
|
|
7684
|
+
crop?: boolean | UploadAvatarCropOptions;
|
|
7685
|
+
/**
|
|
7686
|
+
* Nhãn hiển thị cho avatar
|
|
7687
|
+
*/
|
|
7688
|
+
label?: ReactNode;
|
|
7689
|
+
/**
|
|
7690
|
+
* Vị trí đặt nhãn: 'top' | 'left'
|
|
7691
|
+
* @default 'top'
|
|
7692
|
+
*/
|
|
7693
|
+
labelPlacement?: UploadAvatarLabelPlacement;
|
|
7694
|
+
/**
|
|
7695
|
+
* Đoạn văn bản hướng dẫn/chú thích bên dưới avatar
|
|
7696
|
+
*/
|
|
7697
|
+
helperText?: ReactNode;
|
|
7698
|
+
/**
|
|
7699
|
+
* Thông báo lỗi hiển thị bên dưới avatar (khi có lỗi sẽ kích hoạt trạng thái báo lỗi và viền đỏ)
|
|
7700
|
+
*/
|
|
7701
|
+
errorMessage?: ReactNode;
|
|
7702
|
+
/**
|
|
7703
|
+
* Vô hiệu hóa toàn bộ tương tác
|
|
7704
|
+
* @default false
|
|
7705
|
+
*/
|
|
7706
|
+
disabled?: boolean;
|
|
7707
|
+
/**
|
|
7708
|
+
* Chế độ chỉ đọc
|
|
7709
|
+
* @default false
|
|
7710
|
+
*/
|
|
7711
|
+
readOnly?: boolean;
|
|
7712
|
+
/**
|
|
7713
|
+
* Icon placeholder tùy biến khi chưa có ảnh
|
|
7714
|
+
*/
|
|
7715
|
+
icon?: ReactNode;
|
|
7716
|
+
/**
|
|
7717
|
+
* Tên trường form input
|
|
7718
|
+
*/
|
|
7719
|
+
name?: string;
|
|
7720
|
+
/**
|
|
7721
|
+
* ID phần tử input
|
|
7722
|
+
*/
|
|
7723
|
+
id?: string;
|
|
7724
|
+
/**
|
|
7725
|
+
* Tùy biến className cho container bọc ngoài cùng (bao gồm label, avatar, helper/error text)
|
|
7726
|
+
*/
|
|
7727
|
+
className?: string;
|
|
7728
|
+
/**
|
|
7729
|
+
* Tùy biến className cho container bọc ngoài cùng (giống Input)
|
|
7730
|
+
*/
|
|
7731
|
+
wrapperClassName?: string;
|
|
7732
|
+
/**
|
|
7733
|
+
* Tùy biến className cho khung viền của riêng avatar
|
|
7734
|
+
*/
|
|
7735
|
+
avatarClassName?: string;
|
|
7736
|
+
/**
|
|
7737
|
+
* Tùy biến className cho khung viền của riêng avatar (alias giống inputWrapperClassName)
|
|
7738
|
+
*/
|
|
7739
|
+
avatarWrapperClassName?: string;
|
|
7740
|
+
/**
|
|
7741
|
+
* Tùy biến className cho phần tử <label>
|
|
7742
|
+
*/
|
|
7743
|
+
labelClassName?: string;
|
|
7744
|
+
/**
|
|
7745
|
+
* Tùy biến className cho đoạn văn bản helperText hoặc errorMessage
|
|
7746
|
+
*/
|
|
7747
|
+
helperClassName?: string;
|
|
7748
|
+
/**
|
|
7749
|
+
* Nhãn accessibility cho khu vực upload avatar
|
|
7750
|
+
*/
|
|
7751
|
+
ariaLabel?: string;
|
|
7752
|
+
}
|
|
7753
|
+
|
|
7754
|
+
declare function UploadAvatar({ size, variant, color, shape, radius, value, defaultValue, onChange, onRemove, onPreview, onClear, maxSize, accept, crop, label, labelPlacement, config, helperText, errorMessage, disabled, readOnly, icon, name, id, className, wrapperClassName, avatarClassName, avatarWrapperClassName, labelClassName, helperClassName, ref, }: UploadAvatarProps): react_jsx_runtime.JSX.Element;
|
|
7755
|
+
|
|
7756
|
+
interface UploadAvatarCropContentProps {
|
|
7757
|
+
imageSrc?: string;
|
|
7758
|
+
file?: File | null;
|
|
7759
|
+
fileName?: string;
|
|
7760
|
+
fileType?: string;
|
|
7761
|
+
aspectRatio?: number;
|
|
7762
|
+
cropShape?: "round" | "rect";
|
|
7763
|
+
showGrid?: boolean;
|
|
7764
|
+
minZoom?: number;
|
|
7765
|
+
maxZoom?: number;
|
|
7766
|
+
onApply: (croppedFile: File) => void;
|
|
7767
|
+
onCancel?: () => void;
|
|
7768
|
+
}
|
|
7769
|
+
type UploadAvatarCropModalProps = UploadAvatarCropContentProps & {
|
|
7770
|
+
open?: boolean;
|
|
7771
|
+
modalTitle?: string;
|
|
7772
|
+
onClose?: () => void;
|
|
7773
|
+
};
|
|
7774
|
+
declare function UploadAvatarCropContent({ imageSrc: initialImageSrc, file, fileName: initialFileName, fileType: initialFileType, aspectRatio, cropShape, showGrid, minZoom, maxZoom, onApply, onCancel, }: UploadAvatarCropContentProps): react_jsx_runtime.JSX.Element;
|
|
7775
|
+
declare function UploadAvatarCropModal({ open, modalTitle, onClose, onCancel, onApply, ...restProps }: UploadAvatarCropModalProps): react_jsx_runtime.JSX.Element;
|
|
7776
|
+
|
|
7777
|
+
/**
|
|
7778
|
+
* Hình dạng khung hiển thị tệp tin
|
|
7779
|
+
* - 'rectangle': Khung chữ nhật (mặc định cho Dropzone)
|
|
7780
|
+
* - 'square': Khung vuông tỷ lệ 1:1
|
|
7781
|
+
*/
|
|
7782
|
+
type UploadFileShape = "rectangle" | "square";
|
|
7783
|
+
/**
|
|
7784
|
+
* Chế độ hiển thị giao diện tải tệp tin
|
|
7785
|
+
* - 'dropzone': Khung kéo thả lớn kèm tiêu đề và mô tả trực quan
|
|
7786
|
+
* - 'button': Nút bấm kích hoạt tải tệp gọn gàng
|
|
7787
|
+
* - 'compact': Khung kéo thả thu nhỏ dạng thanh ngang
|
|
7788
|
+
*/
|
|
7789
|
+
type UploadFileViewMode = "dropzone" | "button" | "compact";
|
|
7790
|
+
/**
|
|
7791
|
+
* Kiểu hiển thị danh sách tệp tin
|
|
7792
|
+
* - 'list': Danh sách dạng hàng ngang chi tiết (tên, icon, dung lượng, hành động)
|
|
7793
|
+
* - 'grid': Dạng thẻ card gọn gàng bố cục lưới
|
|
7794
|
+
*/
|
|
7795
|
+
type UploadFileListType = "list" | "grid";
|
|
7796
|
+
/**
|
|
7797
|
+
* 5 mức kích thước chuẩn trong Design System
|
|
7798
|
+
*/
|
|
7799
|
+
type UploadFileSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
7800
|
+
/**
|
|
7801
|
+
* Bảng màu chủ đề trong Design System
|
|
7802
|
+
*/
|
|
7803
|
+
type UploadFileColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
7804
|
+
/**
|
|
7805
|
+
* Độ bo góc theo token hệ thống
|
|
7806
|
+
*/
|
|
7807
|
+
type UploadFileRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
7808
|
+
/**
|
|
7809
|
+
* Biến thể kiểu dáng hiển thị
|
|
7810
|
+
*/
|
|
7811
|
+
type UploadFileVariant = "outline" | "filled" | "ghost" | "other";
|
|
7812
|
+
/**
|
|
7813
|
+
* Trạng thái kéo thả tệp trên vùng Dropzone
|
|
7814
|
+
* - 'idle': Trạng thái bình thường
|
|
7815
|
+
* - 'active': Đang có tệp hợp lệ được kéo trên vùng Dropzone
|
|
7816
|
+
* - 'reject': Tệp đang kéo bị từ chối do sai định dạng hoặc vượt quá dung lượng
|
|
7817
|
+
*/
|
|
7818
|
+
type UploadFileDragStatus = "idle" | "active" | "reject";
|
|
7819
|
+
/**
|
|
7820
|
+
* Phân loại định dạng tệp tin cho icon và màu sắc huy hiệu
|
|
7821
|
+
*/
|
|
7822
|
+
type FileCategory = "pdf" | "word" | "excel" | "powerpoint" | "archive" | "text" | "image" | "audio" | "video" | "code" | "other";
|
|
7823
|
+
/**
|
|
7824
|
+
* Props cho component `<FileIcon>`
|
|
7825
|
+
*/
|
|
7826
|
+
interface FileIconProps {
|
|
7827
|
+
/**
|
|
7828
|
+
* Đối tượng tệp tin (File, ServerFile, hoặc chuỗi src)
|
|
7829
|
+
*/
|
|
7830
|
+
file?: PreviewFile;
|
|
7831
|
+
/**
|
|
7832
|
+
* Tên tệp hoặc phần mở rộng tệp cụ thể (tự động phân loại nếu không truyền file)
|
|
7833
|
+
*/
|
|
7834
|
+
fileName?: string;
|
|
7835
|
+
/**
|
|
7836
|
+
* Chỉ định danh mục định dạng cụ thể (ghi đè tự động nhận diện)
|
|
7837
|
+
*/
|
|
7838
|
+
category?: FileCategory;
|
|
7839
|
+
/**
|
|
7840
|
+
* Kích thước icon
|
|
7841
|
+
* @default 'md'
|
|
7842
|
+
*/
|
|
7843
|
+
size?: UploadFileSize | number;
|
|
7844
|
+
/**
|
|
7845
|
+
* Class tùy biến CSS
|
|
7846
|
+
*/
|
|
7847
|
+
className?: string;
|
|
7848
|
+
}
|
|
7849
|
+
/**
|
|
7850
|
+
* Props cho component hiển thị từng mục tệp tin `<UploadFileItemRow>`
|
|
7851
|
+
*/
|
|
7852
|
+
interface UploadFileItemRowProps {
|
|
7853
|
+
/**
|
|
7854
|
+
* Đối tượng tệp tin (PreviewFile: File | ServerFile | string)
|
|
7855
|
+
*/
|
|
7856
|
+
item: PreviewFile;
|
|
7857
|
+
/**
|
|
7858
|
+
* Vị trí index trong danh sách
|
|
7859
|
+
*/
|
|
7860
|
+
index: number;
|
|
7861
|
+
/**
|
|
7862
|
+
* Kiểu hiển thị danh sách
|
|
7863
|
+
* @default 'list'
|
|
7864
|
+
*/
|
|
7865
|
+
listType?: UploadFileListType;
|
|
7866
|
+
/**
|
|
7867
|
+
* Kích thước giao diện
|
|
7868
|
+
* @default 'md'
|
|
7869
|
+
*/
|
|
7870
|
+
size?: UploadFileSize;
|
|
7871
|
+
/**
|
|
7872
|
+
* Bo góc theo token
|
|
7873
|
+
*/
|
|
7874
|
+
radius?: UploadFileRadius;
|
|
7875
|
+
/**
|
|
7876
|
+
* Màu chủ đề
|
|
7877
|
+
*/
|
|
7878
|
+
color?: UploadFileColor;
|
|
7879
|
+
/**
|
|
7880
|
+
* Vô hiệu hóa tương tác
|
|
7881
|
+
*/
|
|
7882
|
+
disabled?: boolean;
|
|
7883
|
+
/**
|
|
7884
|
+
* Chế độ chỉ đọc (không thể xóa)
|
|
7885
|
+
*/
|
|
7886
|
+
readOnly?: boolean;
|
|
7887
|
+
/**
|
|
7888
|
+
* Hiển thị nút xem trước
|
|
7889
|
+
* @default true
|
|
7890
|
+
*/
|
|
7891
|
+
showPreviewButton?: boolean;
|
|
7892
|
+
/**
|
|
7893
|
+
* Hiển thị nút tải xuống
|
|
7894
|
+
* @default true
|
|
7895
|
+
*/
|
|
7896
|
+
showDownloadButton?: boolean;
|
|
7897
|
+
/**
|
|
7898
|
+
* Hiển thị nút xóa
|
|
7899
|
+
* @default true
|
|
7900
|
+
*/
|
|
7901
|
+
showRemoveButton?: boolean;
|
|
7902
|
+
/**
|
|
7903
|
+
* Callback khi người dùng xóa tệp
|
|
7904
|
+
*/
|
|
7905
|
+
onRemove?: (item: PreviewFile, index: number) => void;
|
|
7906
|
+
/**
|
|
7907
|
+
* Callback khi người dùng xem trước tệp
|
|
7908
|
+
*/
|
|
7909
|
+
onPreview?: (item: PreviewFile) => void;
|
|
7910
|
+
/**
|
|
7911
|
+
* Callback khi người dùng tải xuống tệp
|
|
7912
|
+
*/
|
|
7913
|
+
onDownload?: (item: PreviewFile) => void;
|
|
7914
|
+
/**
|
|
7915
|
+
* Callback khi người dùng bấm thử lại tải lên (nếu có lỗi)
|
|
7916
|
+
*/
|
|
7917
|
+
onRetry?: (item: PreviewFile, index: number) => void;
|
|
7918
|
+
/**
|
|
7919
|
+
* Hàm render tùy chỉnh cho từng mục tệp
|
|
7920
|
+
*/
|
|
7921
|
+
renderItem?: (item: PreviewFile, index: number, actions: {
|
|
7922
|
+
remove: () => void;
|
|
7923
|
+
preview: () => void;
|
|
7924
|
+
download: () => void;
|
|
7925
|
+
}) => ReactNode;
|
|
7926
|
+
/**
|
|
7927
|
+
* Class tùy biến CSS
|
|
7928
|
+
*/
|
|
7929
|
+
className?: string;
|
|
7930
|
+
}
|
|
7931
|
+
/**
|
|
7932
|
+
* Props cho danh sách tệp tin `<UploadFileList>`
|
|
7933
|
+
*/
|
|
7934
|
+
interface UploadFileListProps {
|
|
7935
|
+
/**
|
|
7936
|
+
* Danh sách các tệp tin đã tải lên
|
|
7937
|
+
*/
|
|
7938
|
+
items: PreviewFile[];
|
|
7939
|
+
/**
|
|
7940
|
+
* Kiểu hiển thị danh sách tệp tin
|
|
7941
|
+
* @default 'list'
|
|
7942
|
+
*/
|
|
7943
|
+
listType?: UploadFileListType;
|
|
7944
|
+
/**
|
|
7945
|
+
* Kích thước hiển thị
|
|
7946
|
+
*/
|
|
7947
|
+
size: UploadFileSize;
|
|
7948
|
+
/**
|
|
7949
|
+
* Màu chủ đề
|
|
7950
|
+
*/
|
|
7951
|
+
color?: UploadFileColor;
|
|
7952
|
+
/**
|
|
7953
|
+
* Biến thể hiển thị
|
|
7954
|
+
*/
|
|
7955
|
+
variant?: UploadFileVariant;
|
|
7956
|
+
/**
|
|
7957
|
+
* Bo góc
|
|
7958
|
+
*/
|
|
7959
|
+
radius: UploadFileRadius;
|
|
7960
|
+
/**
|
|
7961
|
+
* Trạng thái vô hiệu hóa
|
|
7962
|
+
*/
|
|
7963
|
+
disabled?: boolean;
|
|
7964
|
+
/**
|
|
7965
|
+
* Trạng thái chỉ đọc
|
|
7966
|
+
*/
|
|
7967
|
+
readOnly?: boolean;
|
|
7968
|
+
/**
|
|
7969
|
+
* Số lượng tệp tối đa
|
|
7970
|
+
*/
|
|
7971
|
+
maxCount?: number;
|
|
7972
|
+
/**
|
|
7973
|
+
* Hiển thị nút xem trước
|
|
7974
|
+
* @default true
|
|
7975
|
+
*/
|
|
7976
|
+
showPreviewButton?: boolean;
|
|
7977
|
+
/**
|
|
7978
|
+
* Hiển thị nút tải xuống
|
|
7979
|
+
* @default true
|
|
7980
|
+
*/
|
|
7981
|
+
showDownloadButton?: boolean;
|
|
7982
|
+
/**
|
|
7983
|
+
* Hiển thị nút xóa
|
|
7984
|
+
* @default true
|
|
7985
|
+
*/
|
|
7986
|
+
showRemoveButton?: boolean;
|
|
7987
|
+
/**
|
|
7988
|
+
* Callback khi xóa tệp
|
|
7989
|
+
*/
|
|
7990
|
+
onRemove: (item: PreviewFile, index: number) => void;
|
|
7991
|
+
/**
|
|
7992
|
+
* Callback khi xem trước tệp
|
|
7993
|
+
*/
|
|
7994
|
+
onPreview: (item: PreviewFile) => void;
|
|
7995
|
+
/**
|
|
7996
|
+
* Callback khi tải xuống tệp
|
|
7997
|
+
*/
|
|
7998
|
+
onDownload?: (item: PreviewFile) => void;
|
|
7999
|
+
/**
|
|
8000
|
+
* Callback khi thử lại tải lên
|
|
8001
|
+
*/
|
|
8002
|
+
onRetry?: (item: PreviewFile, index: number) => void;
|
|
8003
|
+
/**
|
|
8004
|
+
* Hàm render tùy biến giao diện item
|
|
8005
|
+
*/
|
|
8006
|
+
renderItem?: (item: PreviewFile, index: number, actions: {
|
|
8007
|
+
remove: () => void;
|
|
8008
|
+
preview: () => void;
|
|
8009
|
+
download: () => void;
|
|
8010
|
+
}) => ReactNode;
|
|
8011
|
+
/**
|
|
8012
|
+
* Class tùy biến CSS
|
|
8013
|
+
*/
|
|
8014
|
+
className?: string;
|
|
8015
|
+
}
|
|
8016
|
+
/**
|
|
8017
|
+
* Props cho vùng kéo thả `<UploadFileDropzone>`
|
|
8018
|
+
*/
|
|
8019
|
+
interface UploadFileDropzoneProps {
|
|
8020
|
+
/**
|
|
8021
|
+
* Kích thước giao diện
|
|
8022
|
+
* @default 'md'
|
|
8023
|
+
*/
|
|
8024
|
+
size?: UploadFileSize;
|
|
8025
|
+
/**
|
|
8026
|
+
* Bảng màu chủ đề
|
|
8027
|
+
* @default 'primary'
|
|
8028
|
+
*/
|
|
8029
|
+
color?: UploadFileColor;
|
|
8030
|
+
/**
|
|
8031
|
+
* Biến thể kiểu dáng
|
|
8032
|
+
* @default 'outline'
|
|
8033
|
+
*/
|
|
8034
|
+
variant?: UploadFileVariant;
|
|
8035
|
+
/**
|
|
8036
|
+
* Độ bo góc
|
|
8037
|
+
*/
|
|
8038
|
+
radius?: UploadFileRadius;
|
|
8039
|
+
/**
|
|
8040
|
+
* Hình dạng khung dropzone ('rectangle' hoặc 'square')
|
|
8041
|
+
* @default 'rectangle'
|
|
8042
|
+
*/
|
|
8043
|
+
shape?: UploadFileShape;
|
|
8044
|
+
/**
|
|
8045
|
+
* Chế độ thu gọn dạng thanh ngang
|
|
8046
|
+
* @default false
|
|
8047
|
+
*/
|
|
8048
|
+
compact?: boolean;
|
|
8049
|
+
/**
|
|
8050
|
+
* Trạng thái vô hiệu hóa
|
|
8051
|
+
*/
|
|
8052
|
+
disabled?: boolean;
|
|
8053
|
+
/**
|
|
8054
|
+
* Trạng thái chỉ đọc
|
|
8055
|
+
*/
|
|
8056
|
+
readOnly?: boolean;
|
|
8057
|
+
/**
|
|
8058
|
+
* Trạng thái đang tải / xử lý
|
|
8059
|
+
*/
|
|
8060
|
+
isLoading?: boolean;
|
|
8061
|
+
/**
|
|
8062
|
+
* Hiển thị biểu tượng xoay spinner khi đang ở trạng thái loading
|
|
8063
|
+
* @default false
|
|
8064
|
+
*/
|
|
8065
|
+
showSpinner?: boolean;
|
|
8066
|
+
/**
|
|
8067
|
+
* Trạng thái kéo thả tệp
|
|
8068
|
+
*/
|
|
8069
|
+
dragStatus?: UploadFileDragStatus;
|
|
8070
|
+
/**
|
|
8071
|
+
* Trạng thái không hợp lệ
|
|
8072
|
+
*/
|
|
8073
|
+
isInvalid?: boolean;
|
|
8074
|
+
/**
|
|
8075
|
+
* Tiêu đề chính của vùng kéo thả
|
|
8076
|
+
*/
|
|
8077
|
+
dropzoneTitle?: ReactNode;
|
|
8078
|
+
/**
|
|
8079
|
+
* Đoạn mô tả phụ trợ của vùng kéo thả
|
|
8080
|
+
*/
|
|
8081
|
+
dropzoneDescription?: ReactNode;
|
|
8082
|
+
/**
|
|
8083
|
+
* Icon hiển thị ở trung tâm vùng kéo thả
|
|
8084
|
+
*/
|
|
8085
|
+
icon?: ReactNode;
|
|
8086
|
+
/**
|
|
8087
|
+
* Hàm kích hoạt hộp thoại chọn tệp
|
|
8088
|
+
*/
|
|
8089
|
+
onTriggerUpload?: () => void;
|
|
8090
|
+
/**
|
|
8091
|
+
* Props gốc từ useDropzone
|
|
8092
|
+
*/
|
|
8093
|
+
getRootProps?: <T extends DropzoneRootProps>(props?: T) => T;
|
|
8094
|
+
/**
|
|
8095
|
+
* Class tùy biến CSS
|
|
8096
|
+
*/
|
|
8097
|
+
className?: string;
|
|
8098
|
+
/**
|
|
8099
|
+
* ID phần tử mô tả lỗi/trợ giúp (A11y)
|
|
8100
|
+
*/
|
|
8101
|
+
describedById?: string;
|
|
8102
|
+
}
|
|
8103
|
+
/**
|
|
8104
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng boolean cho `<UploadFile>`
|
|
8105
|
+
*/
|
|
8106
|
+
interface UploadFileConfig {
|
|
8107
|
+
/**
|
|
8108
|
+
* Đánh dấu trường bắt buộc nhập (hiển thị dấu * màu đỏ cạnh nhãn)
|
|
8109
|
+
* @default false
|
|
8110
|
+
*/
|
|
8111
|
+
isRequired?: boolean;
|
|
8112
|
+
/**
|
|
8113
|
+
* Đánh dấu trường đang trong trạng thái lỗi/không hợp lệ
|
|
8114
|
+
* @default false
|
|
8115
|
+
*/
|
|
8116
|
+
isInvalid?: boolean;
|
|
8117
|
+
/**
|
|
8118
|
+
* Trạng thái đang tải dữ liệu hoặc đang upload
|
|
8119
|
+
* @default false
|
|
8120
|
+
*/
|
|
8121
|
+
isLoading?: boolean;
|
|
8122
|
+
/**
|
|
8123
|
+
* Hiển thị biểu tượng xoay spinner khi đang ở trạng thái loading
|
|
8124
|
+
* @default false
|
|
8125
|
+
*/
|
|
8126
|
+
showSpinner?: boolean;
|
|
8127
|
+
/**
|
|
8128
|
+
* Cho phép tải lên nhiều tệp tin cùng lúc
|
|
8129
|
+
* @default false
|
|
8130
|
+
*/
|
|
8131
|
+
multiple?: boolean;
|
|
8132
|
+
/**
|
|
8133
|
+
* Cho phép hiển thị danh sách các tệp tin đã tải lên bên dưới
|
|
8134
|
+
* @default true
|
|
8135
|
+
*/
|
|
8136
|
+
showFileList?: boolean;
|
|
8137
|
+
/**
|
|
8138
|
+
* Hiển thị nút xem trước trên từng tệp tin
|
|
8139
|
+
* @default true
|
|
8140
|
+
*/
|
|
8141
|
+
showPreviewButton?: boolean;
|
|
8142
|
+
/**
|
|
8143
|
+
* Hiển thị nút tải xuống trên từng tệp tin
|
|
8144
|
+
* @default true
|
|
8145
|
+
*/
|
|
8146
|
+
showDownloadButton?: boolean;
|
|
8147
|
+
/**
|
|
8148
|
+
* Hiển thị nút xóa trên từng tệp tin
|
|
8149
|
+
* @default true
|
|
8150
|
+
*/
|
|
8151
|
+
showRemoveButton?: boolean;
|
|
8152
|
+
}
|
|
8153
|
+
/**
|
|
8154
|
+
* Props chính cho component `<UploadFile>`
|
|
8155
|
+
*/
|
|
8156
|
+
interface UploadFileProps {
|
|
8157
|
+
/**
|
|
8158
|
+
* Cấu hình tập trung các cờ trạng thái / tính năng boolean
|
|
8159
|
+
*/
|
|
8160
|
+
config?: UploadFileConfig;
|
|
8161
|
+
/**
|
|
8162
|
+
* Danh sách hoặc một mục tệp tin được quản lý (Controlled mode)
|
|
8163
|
+
*/
|
|
8164
|
+
value?: PreviewFile[] | PreviewFile | null;
|
|
8165
|
+
/**
|
|
8166
|
+
* Giá trị mặc định ban đầu khi dùng ở chế độ không kiểm soát (Uncontrolled mode)
|
|
8167
|
+
*/
|
|
8168
|
+
defaultValue?: PreviewFile[] | PreviewFile | null;
|
|
8169
|
+
/**
|
|
8170
|
+
* Callback kích hoạt khi danh sách tệp tin thay đổi
|
|
8171
|
+
*/
|
|
8172
|
+
onChange?: (items: PreviewFile[]) => void;
|
|
8173
|
+
/**
|
|
8174
|
+
* Callback kích hoạt khi một tệp tin bị xóa khỏi danh sách
|
|
8175
|
+
*/
|
|
8176
|
+
onRemove?: (item: PreviewFile, index: number) => void;
|
|
8177
|
+
/**
|
|
8178
|
+
* Callback kích hoạt khi người dùng yêu cầu xem trước tệp tin
|
|
8179
|
+
*/
|
|
8180
|
+
onPreview?: (item: PreviewFile) => void;
|
|
8181
|
+
/**
|
|
8182
|
+
* Callback kích hoạt khi người dùng bấm nút tải xuống tệp tin
|
|
8183
|
+
*/
|
|
8184
|
+
onDownload?: (item: PreviewFile) => void;
|
|
8185
|
+
/**
|
|
8186
|
+
* Callback kích hoạt khi người dùng bấm thử lại tải lên (khi có lỗi)
|
|
8187
|
+
*/
|
|
8188
|
+
onRetry?: (item: PreviewFile, index: number) => void;
|
|
8189
|
+
/**
|
|
8190
|
+
* Giới hạn số lượng tệp tin tối đa được phép tải lên
|
|
8191
|
+
* @default 1 khi multiple=false, không giới hạn khi multiple=true
|
|
8192
|
+
*/
|
|
8193
|
+
maxCount?: number;
|
|
8194
|
+
/**
|
|
8195
|
+
* Dung lượng tệp tối đa (tính theo bytes)
|
|
8196
|
+
*/
|
|
8197
|
+
maxSize?: number;
|
|
8198
|
+
/**
|
|
8199
|
+
* Dung lượng tệp tối thiểu (tính theo bytes)
|
|
8200
|
+
*/
|
|
8201
|
+
minSize?: number;
|
|
8202
|
+
/**
|
|
8203
|
+
* Định dạng tệp tin chấp nhận tải lên (chuỗi extension như ".pdf,.docx,.xlsx" hoặc MIME type)
|
|
8204
|
+
*/
|
|
8205
|
+
accept?: string | Accept;
|
|
8206
|
+
/**
|
|
8207
|
+
* Hook xử lý hoặc xác thực tệp trước khi chấp nhận tải lên
|
|
8208
|
+
* Trả về false hoặc chuỗi thông báo lỗi để từ chối tệp
|
|
8209
|
+
*/
|
|
8210
|
+
beforeUpload?: (file: File) => boolean | string | Promise<boolean | string>;
|
|
8211
|
+
/**
|
|
8212
|
+
* Chế độ hiển thị giao diện tải tệp
|
|
8213
|
+
* - 'dropzone': Khung kéo thả lớn kèm tiêu đề và mô tả
|
|
8214
|
+
* - 'button': Nút bấm kích hoạt tải tệp
|
|
8215
|
+
* - 'compact': Khung kéo thả dạng thanh ngang thu nhỏ
|
|
8216
|
+
* @default 'dropzone'
|
|
8217
|
+
*/
|
|
8218
|
+
viewMode?: UploadFileViewMode;
|
|
8219
|
+
/**
|
|
8220
|
+
* Kiểu hiển thị danh sách tệp tin
|
|
8221
|
+
* - 'list': Dạng hàng ngang chi tiết
|
|
8222
|
+
* - 'grid': Dạng thẻ card trên lưới
|
|
8223
|
+
* @default 'list'
|
|
8224
|
+
*/
|
|
8225
|
+
listType?: UploadFileListType;
|
|
8226
|
+
/**
|
|
8227
|
+
* Hình dạng của khung tải tệp ('rectangle' hoặc 'square')
|
|
8228
|
+
* @default 'rectangle'
|
|
8229
|
+
*/
|
|
8230
|
+
shape?: UploadFileShape;
|
|
8231
|
+
/**
|
|
8232
|
+
* 5 mức kích thước chuẩn trong Design System
|
|
8233
|
+
* @default 'md'
|
|
8234
|
+
*/
|
|
8235
|
+
size?: UploadFileSize;
|
|
8236
|
+
/**
|
|
8237
|
+
* Bảng màu chủ đề
|
|
8238
|
+
* @default 'primary'
|
|
8239
|
+
*/
|
|
8240
|
+
color?: UploadFileColor;
|
|
8241
|
+
/**
|
|
8242
|
+
* Biến thể kiểu dáng
|
|
8243
|
+
* @default 'outline'
|
|
8244
|
+
*/
|
|
8245
|
+
variant?: UploadFileVariant;
|
|
8246
|
+
/**
|
|
8247
|
+
* Độ bo góc theo token hệ thống
|
|
8248
|
+
*/
|
|
8249
|
+
radius?: UploadFileRadius;
|
|
8250
|
+
/**
|
|
8251
|
+
* Tiêu đề nhãn của trường form
|
|
8252
|
+
*/
|
|
8253
|
+
label?: ReactNode;
|
|
8254
|
+
/**
|
|
8255
|
+
* Lớp CSS tùy biến cho nhãn văn bản (label)
|
|
8256
|
+
*/
|
|
8257
|
+
labelClassName?: string;
|
|
8258
|
+
/**
|
|
8259
|
+
* Đoạn văn bản trợ giúp hiển thị bên dưới
|
|
8260
|
+
*/
|
|
8261
|
+
helperText?: ReactNode;
|
|
8262
|
+
/**
|
|
8263
|
+
* Thông báo lỗi hiển thị bên dưới trường khi không hợp lệ
|
|
8264
|
+
*/
|
|
8265
|
+
errorMessage?: ReactNode;
|
|
8266
|
+
/**
|
|
8267
|
+
* Vô hiệu hóa toàn bộ tương tác
|
|
8268
|
+
* @default false
|
|
8269
|
+
*/
|
|
8270
|
+
disabled?: boolean;
|
|
8271
|
+
/**
|
|
8272
|
+
* Trạng thái chỉ đọc (không thể thêm mới hoặc xóa tệp)
|
|
8273
|
+
* @default false
|
|
8274
|
+
*/
|
|
8275
|
+
readOnly?: boolean;
|
|
8276
|
+
/**
|
|
8277
|
+
* Tiêu đề hiển thị trong khung Dropzone
|
|
8278
|
+
*/
|
|
8279
|
+
dropzoneTitle?: ReactNode;
|
|
8280
|
+
/**
|
|
8281
|
+
* Mô tả phụ hiển thị trong khung Dropzone
|
|
8282
|
+
*/
|
|
8283
|
+
dropzoneDescription?: ReactNode;
|
|
8284
|
+
/**
|
|
8285
|
+
* Nhãn văn bản hiển thị trên nút bấm khi viewMode='button'
|
|
8286
|
+
* @default 'Tải tệp lên'
|
|
8287
|
+
*/
|
|
8288
|
+
buttonText?: ReactNode;
|
|
8289
|
+
/**
|
|
8290
|
+
* Icon tùy biến cho vùng Dropzone
|
|
8291
|
+
*/
|
|
8292
|
+
icon?: ReactNode;
|
|
8293
|
+
/**
|
|
8294
|
+
* Hàm render tùy biến hoàn toàn giao diện từng mục tệp tin trong danh sách
|
|
8295
|
+
*/
|
|
8296
|
+
renderItem?: (item: PreviewFile, index: number, actions: {
|
|
8297
|
+
remove: () => void;
|
|
8298
|
+
preview: () => void;
|
|
8299
|
+
download: () => void;
|
|
8300
|
+
}) => ReactNode;
|
|
8301
|
+
/**
|
|
8302
|
+
* Class tùy biến CSS cho container ngoài cùng
|
|
8303
|
+
*/
|
|
8304
|
+
className?: string;
|
|
8305
|
+
/**
|
|
8306
|
+
* Class tùy biến CSS cho khung Dropzone
|
|
8307
|
+
*/
|
|
8308
|
+
dropzoneClassName?: string;
|
|
8309
|
+
/**
|
|
8310
|
+
* Class tùy biến CSS cho danh sách tệp tin
|
|
8311
|
+
*/
|
|
8312
|
+
listClassName?: string;
|
|
8313
|
+
/**
|
|
8314
|
+
* Class tùy biến CSS cho danh sách xem trước (UploadFileList)
|
|
8315
|
+
*/
|
|
8316
|
+
previewClassName?: string;
|
|
8317
|
+
/**
|
|
8318
|
+
* Class tùy biến CSS cho vùng Helper/Error Text
|
|
8319
|
+
*/
|
|
8320
|
+
helperClassName?: string;
|
|
8321
|
+
}
|
|
8322
|
+
|
|
8323
|
+
declare function UploadFile({ value, defaultValue, onChange, onRemove, onPreview, onDownload, onRetry, maxCount, maxSize, minSize, accept, beforeUpload, viewMode, listType, shape, size, color, variant, radius, label, labelClassName, helperText, errorMessage, disabled, readOnly, dropzoneTitle, dropzoneDescription, buttonText, icon, renderItem, className, dropzoneClassName, listClassName, previewClassName, helperClassName, config, }: UploadFileProps): react_jsx_runtime.JSX.Element;
|
|
8324
|
+
|
|
8325
|
+
declare function UploadFileDropzone({ size, color, variant, radius, shape, compact, disabled, readOnly, isLoading, showSpinner, dragStatus, isInvalid, dropzoneTitle, dropzoneDescription, icon, onTriggerUpload, getRootProps, className, describedById, }: UploadFileDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
8326
|
+
|
|
8327
|
+
declare function UploadFileList({ items, listType, size, color, radius, disabled, readOnly, showPreviewButton, showDownloadButton, showRemoveButton, onRemove, onPreview, onDownload, onRetry, renderItem, className, }: UploadFileListProps): react_jsx_runtime.JSX.Element | null;
|
|
8328
|
+
|
|
8329
|
+
declare function UploadFileItemRow({ item, index, listType, size, radius, disabled, readOnly, showPreviewButton, showDownloadButton, showRemoveButton, onRemove, onPreview, onDownload, onRetry, renderItem, className, }: UploadFileItemRowProps): react_jsx_runtime.JSX.Element;
|
|
8330
|
+
|
|
8331
|
+
declare function FileIcon({ file, fileName, category: explicitCategory, size, className, }: FileIconProps): react_jsx_runtime.JSX.Element;
|
|
8332
|
+
|
|
8333
|
+
/**
|
|
8334
|
+
* Phân loại định dạng tệp tin dựa trên phần mở rộng hoặc MIME type
|
|
8335
|
+
*/
|
|
8336
|
+
declare function getFileCategory(itemOrName?: PreviewFile | string | null): FileCategory;
|
|
8337
|
+
|
|
8338
|
+
/**
|
|
8339
|
+
* Các kích thước chiều rộng tiêu chuẩn của Confirm:
|
|
8340
|
+
* - 'xs': 320px (nhỏ gọn, dành cho thông báo ngắn)
|
|
8341
|
+
* - 'sm': 380px (dành cho câu hỏi xác nhận đơn giản)
|
|
8342
|
+
* - 'md': 440px (chuẩn mặc định cho đa số hộp thoại xác nhận)
|
|
8343
|
+
* - 'lg': 520px (dành cho thông báo cảnh báo chi tiết)
|
|
8344
|
+
* - 'xl': 600px (dành cho nội dung phức tạp hoặc danh sách)
|
|
8345
|
+
*/
|
|
8346
|
+
type ConfirmSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
8347
|
+
/**
|
|
8348
|
+
* Các chủ đề màu sắc biểu thị mức độ quan trọng hoặc loại hành động của Confirm:
|
|
8349
|
+
* - 'warning': Cảnh báo hành động có rủi ro (vàng/cam)
|
|
8350
|
+
* - 'error': Hành động nguy hiểm / phá hủy / xóa dữ liệu (đỏ)
|
|
8351
|
+
* - 'primary': Hành động nghiệp vụ chính (xanh dương)
|
|
8352
|
+
* - 'secondary': Hành động phụ (nâu đồng)
|
|
8353
|
+
* - 'neutral': Thông báo trung tính (xám)
|
|
8354
|
+
* - 'success': Xác nhận hoàn thành hoặc kích hoạt thành công (xanh lá)
|
|
8355
|
+
* - 'info': Thông tin cần người dùng lưu ý (xanh lơ)
|
|
8356
|
+
*/
|
|
8357
|
+
type ConfirmColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
|
|
8358
|
+
/**
|
|
8359
|
+
* Các mức bo góc của khung hộp thoại Confirm:
|
|
8360
|
+
* - 'none': Không bo góc (vuông vức)
|
|
8361
|
+
* - 'sm': Bo góc nhẹ (rounded-sm)
|
|
8362
|
+
* - 'md': Bo góc vừa (rounded-md)
|
|
8363
|
+
* - 'lg': Bo góc lớn (rounded-lg)
|
|
8364
|
+
* - 'xl': Bo góc rất lớn (rounded-xl)
|
|
8365
|
+
* - 'full': Bo tròn hoàn toàn (rounded-2xl)
|
|
8366
|
+
*/
|
|
8367
|
+
type ConfirmRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
8368
|
+
/**
|
|
8369
|
+
* Props cho component `<Confirm>` (Khung giao diện hộp thoại xác nhận - Pure Compound Dialog Box)
|
|
8370
|
+
*/
|
|
8371
|
+
interface ConfirmProps extends HTMLAttributes<HTMLDivElement> {
|
|
8372
|
+
/**
|
|
8373
|
+
* Ref chuyển tiếp (forwardRef) trỏ trực tiếp đến thẻ div hộp thoại
|
|
8374
|
+
*/
|
|
8375
|
+
ref?: Ref<HTMLDivElement>;
|
|
8376
|
+
/**
|
|
8377
|
+
* Kích thước chiều rộng của hộp thoại (được kế thừa tự động bởi ConfirmHeader, ConfirmBody, ConfirmFooter)
|
|
8378
|
+
* @default 'md'
|
|
8379
|
+
*/
|
|
8380
|
+
size?: ConfirmSize;
|
|
8381
|
+
/**
|
|
8382
|
+
* Chủ đề màu sắc cho hộp thoại (được kế thừa tự động bởi ConfirmHeader và ConfirmFooter)
|
|
8383
|
+
* @default 'warning'
|
|
8384
|
+
*/
|
|
8385
|
+
color?: ConfirmColor;
|
|
8386
|
+
/**
|
|
8387
|
+
* Tùy chỉnh độ bo góc của hộp thoại:
|
|
8388
|
+
* - 'none': không bo góc
|
|
8389
|
+
* - 'sm': bo góc nhỏ
|
|
8390
|
+
* - 'md': bo góc vừa
|
|
8391
|
+
* - 'lg': bo góc lớn
|
|
8392
|
+
* - 'xl': bo góc rất lớn
|
|
8393
|
+
* - 'full': bo tròn hoàn toàn
|
|
8394
|
+
* @default 'rounded-lg'
|
|
8395
|
+
*/
|
|
8396
|
+
radius?: ConfirmRadius;
|
|
8397
|
+
/**
|
|
8398
|
+
* Class tùy biến CSS cho container bao ngoài hộp thoại
|
|
8399
|
+
*/
|
|
8400
|
+
className?: string;
|
|
8401
|
+
/**
|
|
8402
|
+
* Các sub-component con bên trong hộp thoại:
|
|
8403
|
+
* `<ConfirmHeader>`, `<ConfirmBody>`, `<ConfirmFooter>`
|
|
8404
|
+
*/
|
|
8405
|
+
children?: ReactNode;
|
|
8406
|
+
}
|
|
8407
|
+
/**
|
|
8408
|
+
* Props cho component `<ConfirmHeader>` (Phần đầu của hộp thoại Confirm)
|
|
8409
|
+
*/
|
|
8410
|
+
interface ConfirmHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
8411
|
+
/**
|
|
8412
|
+
* Kích thước áp dụng cho tiêu đề, icon và khoảng cách padding trong header
|
|
8413
|
+
* @default 'md'
|
|
8414
|
+
*/
|
|
8415
|
+
size?: ConfirmSize;
|
|
8416
|
+
/**
|
|
8417
|
+
* Chủ đề màu sắc cho icon badge
|
|
8418
|
+
* @default 'warning'
|
|
8419
|
+
*/
|
|
8420
|
+
color?: ConfirmColor;
|
|
8421
|
+
/**
|
|
8422
|
+
* Icon hiển thị cạnh tiêu đề (`true`: icon mặc định theo màu, `false`: ẩn icon, `ReactNode`: icon tùy chỉnh)
|
|
8423
|
+
* @default true
|
|
8424
|
+
*/
|
|
8425
|
+
icon?: ReactNode | boolean;
|
|
8426
|
+
/**
|
|
8427
|
+
* Tiêu đề chính của hộp thoại Confirm
|
|
8428
|
+
*/
|
|
8429
|
+
title?: ReactNode;
|
|
8430
|
+
/**
|
|
8431
|
+
* Class CSS tùy biến cho container bao ngoài icon badge
|
|
8432
|
+
*/
|
|
8433
|
+
iconClassName?: string;
|
|
8434
|
+
/**
|
|
8435
|
+
* Class CSS tùy biến cho tiêu đề
|
|
8436
|
+
*/
|
|
8437
|
+
titleClassName?: string;
|
|
8438
|
+
/**
|
|
8439
|
+
* Cho phép hiển thị nút đóng (X) ở góc phải của header
|
|
8440
|
+
* @default false
|
|
8441
|
+
*/
|
|
8442
|
+
showCloseButton?: boolean;
|
|
8443
|
+
/**
|
|
8444
|
+
* Callback tùy biến khi click nút đóng (X).
|
|
8445
|
+
* Tự động kết hợp hiệu ứng Exit Animation của ConfirmContainer.
|
|
8446
|
+
*/
|
|
8447
|
+
onClose?: () => void;
|
|
8448
|
+
/**
|
|
8449
|
+
* Class CSS tùy biến cho nút đóng (X)
|
|
8450
|
+
*/
|
|
8451
|
+
closeButtonClassName?: string;
|
|
8452
|
+
/**
|
|
8453
|
+
* Class CSS tùy biến cho toàn bộ header
|
|
8454
|
+
*/
|
|
8455
|
+
className?: string;
|
|
8456
|
+
/**
|
|
8457
|
+
* Nội dung ReactNode tùy chỉnh bên trong header
|
|
8458
|
+
*/
|
|
8459
|
+
children?: ReactNode;
|
|
8460
|
+
}
|
|
8461
|
+
/**
|
|
8462
|
+
* Props cho component `<ConfirmBody>` (Phần thân chứa nội dung mô tả của Confirm)
|
|
8463
|
+
*/
|
|
8464
|
+
interface ConfirmBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
8465
|
+
/**
|
|
8466
|
+
* Kích thước áp dụng cho cỡ chữ và padding của body
|
|
8467
|
+
* @default 'md'
|
|
8468
|
+
*/
|
|
8469
|
+
size?: ConfirmSize;
|
|
8470
|
+
/**
|
|
8471
|
+
* Đoạn văn bản mô tả ngắn (sẽ được bọc trong thẻ `<p>`)
|
|
8472
|
+
*/
|
|
8473
|
+
description?: ReactNode;
|
|
8474
|
+
/**
|
|
8475
|
+
* Class CSS tùy biến riêng cho thẻ `<p>` mô tả
|
|
8476
|
+
*/
|
|
8477
|
+
descriptionClassName?: string;
|
|
8478
|
+
/**
|
|
8479
|
+
* Class CSS tùy biến cho toàn bộ body
|
|
8480
|
+
*/
|
|
8481
|
+
className?: string;
|
|
8482
|
+
/**
|
|
8483
|
+
* Nội dung con tùy biến bên trong body
|
|
8484
|
+
*/
|
|
8485
|
+
children?: ReactNode;
|
|
8486
|
+
}
|
|
8487
|
+
/**
|
|
8488
|
+
* Props cho component `<ConfirmFooter>` (Phần chân chứa các nút hành động xác nhận và hủy)
|
|
8489
|
+
*/
|
|
8490
|
+
interface ConfirmFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
8491
|
+
/**
|
|
8492
|
+
* Kích thước áp dụng cho padding và kích thước các nút bấm
|
|
8493
|
+
* @default 'md'
|
|
8494
|
+
*/
|
|
8495
|
+
size?: ConfirmSize;
|
|
8496
|
+
/**
|
|
8497
|
+
* Nhãn văn bản cho nút Xác nhận
|
|
8498
|
+
* @default 'Xác nhận'
|
|
8499
|
+
*/
|
|
8500
|
+
confirmText?: ReactNode;
|
|
8501
|
+
/**
|
|
8502
|
+
* Nhãn văn bản cho nút Hủy (truyền `false` để ẩn nút Hủy)
|
|
8503
|
+
* @default 'Hủy'
|
|
8504
|
+
*/
|
|
8505
|
+
cancelText?: ReactNode | false;
|
|
8506
|
+
/**
|
|
8507
|
+
* Biến thể của nút Xác nhận ('filled', 'outline', 'soft', ...)
|
|
8508
|
+
* @default 'filled'
|
|
8509
|
+
*/
|
|
8510
|
+
confirmVariant?: ButtonVariant;
|
|
8511
|
+
/**
|
|
8512
|
+
* Biến thể của nút Hủy ('filled', 'outline', 'soft', ...)
|
|
8513
|
+
* @default 'outline'
|
|
8514
|
+
*/
|
|
8515
|
+
cancelVariant?: ButtonVariant;
|
|
8516
|
+
/**
|
|
8517
|
+
* Màu nút Xác nhận tùy chỉnh (mặc định lấy theo `color`)
|
|
8518
|
+
*/
|
|
8519
|
+
confirmColor?: ButtonColor;
|
|
8520
|
+
/**
|
|
8521
|
+
* Màu nút Hủy
|
|
8522
|
+
* @default 'secondary'
|
|
8523
|
+
*/
|
|
8524
|
+
cancelColor?: ButtonColor;
|
|
8525
|
+
/**
|
|
8526
|
+
* Callback khi người dùng bấm nút Xác nhận (trả về void hoặc Promise)
|
|
8527
|
+
*/
|
|
8528
|
+
onConfirm?: () => void | Promise<unknown>;
|
|
8529
|
+
/**
|
|
8530
|
+
* Callback khi người dùng bấm nút Hủy
|
|
8531
|
+
*/
|
|
8532
|
+
onCancel?: () => void;
|
|
8533
|
+
/**
|
|
8534
|
+
* Callback đóng hộp thoại
|
|
8535
|
+
*/
|
|
8536
|
+
onClose?: () => void;
|
|
8537
|
+
/**
|
|
8538
|
+
* Props bổ sung truyền trực tiếp cho component Button Xác nhận
|
|
8539
|
+
*/
|
|
8540
|
+
confirmButtonProps?: Partial<ButtonProps>;
|
|
8541
|
+
/**
|
|
8542
|
+
* Props bổ sung truyền trực tiếp cho component Button Hủy
|
|
8543
|
+
*/
|
|
8544
|
+
cancelButtonProps?: Partial<ButtonProps>;
|
|
8545
|
+
/**
|
|
8546
|
+
* Class CSS tùy biến cho khối footer
|
|
8547
|
+
*/
|
|
8548
|
+
className?: string;
|
|
8549
|
+
/**
|
|
8550
|
+
* Các nút bấm tùy chỉnh bên trong footer (khi dùng Pure Compound Pattern)
|
|
8551
|
+
*/
|
|
8552
|
+
children?: ReactNode;
|
|
8553
|
+
}
|
|
8554
|
+
/**
|
|
8555
|
+
* Props cho component `<ConfirmContainer>` (Tầng Wrapper quản lý Overlay Backdrop, Native Dialog, ESC & Animation)
|
|
8556
|
+
*/
|
|
8557
|
+
interface ConfirmContainerProps extends HTMLAttributes<HTMLDialogElement> {
|
|
8558
|
+
/**
|
|
8559
|
+
* Trạng thái hiển thị mở/đóng Confirm (Controlled State)
|
|
8560
|
+
* @default false
|
|
8561
|
+
*/
|
|
8562
|
+
open?: boolean;
|
|
8563
|
+
/**
|
|
8564
|
+
* Callback được kích hoạt khi Confirm đóng (click ra ngoài backdrop, nhấn phím ESC, hoặc click nút đóng X)
|
|
8565
|
+
*/
|
|
8566
|
+
onClose?: () => void;
|
|
8567
|
+
/**
|
|
8568
|
+
* Kích thước tổng thể của Confirm (truyền xuống context để đồng bộ kích thước cho Confirm, Header, Body, Footer)
|
|
8569
|
+
* @default 'md'
|
|
8570
|
+
*/
|
|
8571
|
+
size?: ConfirmSize;
|
|
8572
|
+
/**
|
|
8573
|
+
* Chủ đề màu sắc tổng thể của Confirm (truyền xuống context để đồng bộ cho Confirm, Header, Footer)
|
|
8574
|
+
* @default 'warning'
|
|
8575
|
+
*/
|
|
8576
|
+
color?: ConfirmColor;
|
|
8577
|
+
/**
|
|
8578
|
+
* Trạng thái đang tải / xử lý (Loading).
|
|
8579
|
+
* Khi `isLoading = true`:
|
|
8580
|
+
* - Chặn đóng Confirm khi click vào vùng backdrop overlay (`closeOnOverlayClick`)
|
|
8581
|
+
* - Chặn đóng Confirm khi nhấn phím ESC (`closeOnEsc`)
|
|
8582
|
+
* - Chặn đóng Confirm từ nút đóng (X) và component `<ConfirmClose>`
|
|
8583
|
+
* @default false
|
|
8584
|
+
*/
|
|
8585
|
+
isLoading?: boolean;
|
|
8586
|
+
/**
|
|
8587
|
+
* Cho phép tự động đóng Confirm khi người dùng click vào vùng backdrop overlay bên ngoài
|
|
8588
|
+
* @default true
|
|
8589
|
+
*/
|
|
8590
|
+
closeOnOverlayClick?: boolean;
|
|
8591
|
+
/**
|
|
8592
|
+
* Cho phép tự động đóng Confirm khi người dùng nhấn phím ESC (Escape) trên bàn phím
|
|
8593
|
+
* @default true
|
|
8594
|
+
*/
|
|
8595
|
+
closeOnEsc?: boolean;
|
|
8596
|
+
/**
|
|
8597
|
+
* Tự động khóa cuộn trang (body scroll lock) khi Confirm đang hiển thị
|
|
8598
|
+
* @default true
|
|
8599
|
+
*/
|
|
8600
|
+
lockScroll?: boolean;
|
|
8601
|
+
/**
|
|
8602
|
+
* Class tùy biến CSS cho lớp nền backdrop mờ toàn màn hình
|
|
8603
|
+
*/
|
|
8604
|
+
overlayClassName?: string;
|
|
8605
|
+
/**
|
|
8606
|
+
* Class tùy biến CSS cho container bao ngoài dialog
|
|
8607
|
+
*/
|
|
8608
|
+
className?: string;
|
|
8609
|
+
/**
|
|
8610
|
+
* Nội dung bên trong container (thường là component `<Confirm>`)
|
|
8611
|
+
*/
|
|
8612
|
+
children?: ReactNode;
|
|
8613
|
+
}
|
|
8614
|
+
/**
|
|
8615
|
+
* Props cho component `<ConfirmClose>` (Wrapper tự động kích hoạt đóng Confirm có Exit Animation cho bất kỳ nút bấm nào)
|
|
8616
|
+
*/
|
|
8617
|
+
interface ConfirmCloseProps extends HTMLAttributes<HTMLElement> {
|
|
8618
|
+
/**
|
|
8619
|
+
* Component con cần bọc để kích hoạt sự kiện đóng (thường là `<Button>`)
|
|
8620
|
+
*/
|
|
8621
|
+
children?: ReactNode;
|
|
8622
|
+
/**
|
|
8623
|
+
* Tự động truyền thẳng sự kiện onClick và props vào phần tử con (cloneElement) thay vì bọc ngoài bằng thẻ div
|
|
8624
|
+
* @default true
|
|
8625
|
+
*/
|
|
8626
|
+
asChild?: boolean;
|
|
8627
|
+
}
|
|
8628
|
+
|
|
8629
|
+
/**
|
|
8630
|
+
* Khung giao diện hộp thoại xác nhận (Confirm Dialog Box).
|
|
8631
|
+
* Thiết kế theo mô hình Pure Compound Pattern giống Modal:
|
|
8632
|
+
* Nhận size/color từ ConfirmContainer qua Context và render {children}.
|
|
8633
|
+
*/
|
|
8634
|
+
declare function Confirm({ size, radius, className, children, ref, ...props }: ConfirmProps): react_jsx_runtime.JSX.Element;
|
|
8635
|
+
|
|
8636
|
+
declare function ConfirmContainer({ open, size, color, isLoading, closeOnOverlayClick, closeOnEsc, lockScroll, overlayClassName, className, children, onClose, ...props }: ConfirmContainerProps): react_jsx_runtime.JSX.Element | null;
|
|
8637
|
+
|
|
8638
|
+
/**
|
|
8639
|
+
* Phần đầu của hộp thoại Confirm (Hiển thị icon badge, tiêu đề và nút đóng X)
|
|
8640
|
+
*/
|
|
8641
|
+
declare function ConfirmHeader({ size, color, icon, title, iconClassName, titleClassName, showCloseButton, onClose, closeButtonClassName, className, children, ...props }: ConfirmHeaderProps): react_jsx_runtime.JSX.Element;
|
|
8642
|
+
|
|
8643
|
+
/**
|
|
8644
|
+
* Phần thân của hộp thoại Confirm (Hiển thị nội dung mô tả hoặc nội dung tùy biến)
|
|
8645
|
+
*/
|
|
8646
|
+
declare function ConfirmBody({ size, description, descriptionClassName, className, children, ...props }: ConfirmBodyProps): react_jsx_runtime.JSX.Element;
|
|
8647
|
+
|
|
8648
|
+
/**
|
|
8649
|
+
* Phần chân của hộp thoại Confirm (Chứa các nút hành động Xác nhận, Hủy, hoặc các nút tùy chỉnh)
|
|
8650
|
+
*/
|
|
8651
|
+
declare function ConfirmFooter({ size, confirmText, cancelText, confirmVariant, cancelVariant, confirmColor, cancelColor, onConfirm, onCancel, onClose, confirmButtonProps, cancelButtonProps, className, children, ...props }: ConfirmFooterProps): react_jsx_runtime.JSX.Element;
|
|
8652
|
+
|
|
8653
|
+
/**
|
|
8654
|
+
* Component wrapper kích hoạt đóng Confirm kèm hiệu ứng thoát (Exit Animation)
|
|
8655
|
+
* Tự động vô hiệu hóa (`disabled`) khi `isLoading = true`.
|
|
8656
|
+
*/
|
|
8657
|
+
declare function ConfirmClose({ children, asChild, onClick, ...props }: ConfirmCloseProps): react_jsx_runtime.JSX.Element;
|
|
8658
|
+
|
|
8659
|
+
/**
|
|
8660
|
+
* Giá trị được chia sẻ từ `<ConfirmContainer>` và `<Confirm>` xuống các sub-component con thông qua Context
|
|
8661
|
+
*/
|
|
8662
|
+
interface ConfirmContextValue {
|
|
8663
|
+
/**
|
|
8664
|
+
* Callback kích hoạt đóng Confirm kèm hiệu ứng thoát (Exit Animation)
|
|
8665
|
+
*/
|
|
8666
|
+
onClose: () => void;
|
|
8667
|
+
/**
|
|
8668
|
+
* Trạng thái đang tải / xử lý (Loading).
|
|
8669
|
+
* Khi `true`, sẽ chặn đóng hộp thoại và tự động vô hiệu hóa các nút đóng / hủy.
|
|
8670
|
+
*/
|
|
8671
|
+
isLoading?: boolean;
|
|
8672
|
+
/**
|
|
8673
|
+
* Kích thước chiều rộng của Confirm
|
|
8674
|
+
*/
|
|
8675
|
+
size?: ConfirmSize;
|
|
8676
|
+
/**
|
|
8677
|
+
* Chủ đề màu sắc của Confirm
|
|
8678
|
+
*/
|
|
8679
|
+
color?: ConfirmColor;
|
|
8680
|
+
}
|
|
8681
|
+
/**
|
|
8682
|
+
* Hook truy xuất context của Confirm từ bên trong `<ConfirmContainer>` hoặc `<Confirm>`
|
|
8683
|
+
*/
|
|
8684
|
+
declare const useConfirmContext: () => ConfirmContextValue | null;
|
|
8685
|
+
|
|
8686
|
+
declare function Modal({ size, radius, className, children, ref, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
8687
|
+
|
|
8688
|
+
declare function ModalContainer({ open, id, size, isLoading, closeOnOverlayClick, closeOnEsc, lockScroll, overlayClassName, className, children, onClose, ...props }: ModalContainerProps): react_jsx_runtime.JSX.Element | null;
|
|
8689
|
+
|
|
8690
|
+
declare function ModalHeader({ size, title, description, titleClassName, descriptionClassName, showCloseButton, onClose, closeButtonClassName, className, children, ...props }: ModalHeaderProps): react_jsx_runtime.JSX.Element;
|
|
8691
|
+
|
|
8692
|
+
declare function ModalBody({ size, className, children, ...props }: ModalBodyProps): react_jsx_runtime.JSX.Element;
|
|
8693
|
+
|
|
8694
|
+
declare function ModalFooter({ size, className, children, ...props }: ModalFooterProps): react_jsx_runtime.JSX.Element;
|
|
8695
|
+
|
|
8696
|
+
declare function ModalClose({ children, asChild, onClick, ...props }: ModalCloseProps): react_jsx_runtime.JSX.Element;
|
|
8697
|
+
|
|
8698
|
+
interface ModalContextValue {
|
|
8699
|
+
onClose: () => void;
|
|
8700
|
+
isLoading?: boolean;
|
|
8701
|
+
size?: ModalSize;
|
|
8702
|
+
}
|
|
8703
|
+
declare const useModalContext: () => ModalContextValue | null;
|
|
8704
|
+
|
|
8705
|
+
/**
|
|
8706
|
+
* Component `<FilePreview>`: Nhận file và headerTitle qua useFileContext(),
|
|
8707
|
+
* tự động xác định loại file và chọn component hiển thị tương ứng.
|
|
8708
|
+
*/
|
|
8709
|
+
declare function FilePreview({ onDownload, imageProps, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
|
|
8710
|
+
|
|
8711
|
+
/**
|
|
8712
|
+
* Component `<FileContainer>`: Hộp thoại bọc Modal Dialog quản lý Backdrop, Top Layer, ESC và Lock Scroll
|
|
8713
|
+
* Nhận prop `file` và truyền xuống `<FilePreview />` qua `FileContext`.
|
|
8714
|
+
*/
|
|
8715
|
+
declare function FileContainer({ open, onClose, file, title, description, size, radius, showCloseButton, closeOnOverlayClick, closeOnEsc, lockScroll, className, overlayClassName, children, }: FileContainerProps): react_jsx_runtime.JSX.Element;
|
|
8716
|
+
|
|
8717
|
+
interface FileContextValue {
|
|
8718
|
+
file?: PreviewFile;
|
|
8719
|
+
headerTitle?: ReactNode;
|
|
8720
|
+
}
|
|
8721
|
+
declare const useFileContext: () => FileContextValue | null;
|
|
8722
|
+
|
|
8723
|
+
declare const IMAGE_EXTENSIONS: string[];
|
|
8724
|
+
declare const PDF_EXTENSIONS: string[];
|
|
8725
|
+
declare const VIDEO_EXTENSIONS: string[];
|
|
8726
|
+
declare const AUDIO_EXTENSIONS: string[];
|
|
8727
|
+
declare const DOCUMENT_EXTENSIONS: string[];
|
|
8728
|
+
|
|
8729
|
+
declare function getFileName(input?: PreviewFile | string | null): string;
|
|
8730
|
+
declare function getFileExtension(filenameOrSrc?: string): string;
|
|
8731
|
+
declare function getFileType(filenameOrSrc?: string): FileType;
|
|
8732
|
+
declare function normalizePreviewFile(input?: PreviewFile | null): {
|
|
8733
|
+
file: File | undefined;
|
|
8734
|
+
serverFile: ServerFile | undefined;
|
|
8735
|
+
name: string;
|
|
8736
|
+
type: FileType;
|
|
8737
|
+
};
|
|
8738
|
+
declare function downloadFile(src: string, filename?: string): void;
|
|
8739
|
+
|
|
8740
|
+
declare function ImagePreview({ src, name, minZoom, maxZoom, showToolbar, toolbarProps, children, }: ImagePreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
8741
|
+
|
|
8742
|
+
declare function ImagePreviewToolbar({ zoom, minZoom, maxZoom, step, onZoomChange, sliderProps, onZoomIn, onZoomOut, onRotateCw, onRotateCcw, onFlipHorizontal, onReset, currentImage, tools, className, }: ImagePreviewToolbarProps): react_jsx_runtime.JSX.Element;
|
|
8743
|
+
|
|
8744
|
+
type SkeletonVariant = "pulse" | "wave" | "none";
|
|
8745
|
+
type SkeletonRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
8746
|
+
type SkeletonShape = "rectangle" | "circle";
|
|
8747
|
+
type SkeletonObjectFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
8748
|
+
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
8749
|
+
/**
|
|
8750
|
+
* Ref trỏ tới phần tử div bên ngoài.
|
|
8751
|
+
*/
|
|
8752
|
+
ref?: Ref<HTMLDivElement>;
|
|
8753
|
+
/**
|
|
8754
|
+
* Kiểu animation hiển thị:
|
|
8755
|
+
* - 'pulse': nhịp thở opacity (mặc định)
|
|
8756
|
+
* - 'wave': shimmer chạy từ góc trên-trái xuống góc dưới-phải
|
|
8757
|
+
* - 'none': không animation (static placeholder)
|
|
8758
|
+
* @default 'pulse'
|
|
8759
|
+
*/
|
|
8760
|
+
variant?: SkeletonVariant;
|
|
8761
|
+
/**
|
|
8762
|
+
* Hình dạng của skeleton:
|
|
8763
|
+
* - 'rectangle': hình chữ nhật, kết hợp với `radius` để bo góc (mặc định)
|
|
8764
|
+
* - 'circle': hình tròn hoàn toàn, `width` === `height`, bỏ qua `radius`
|
|
8765
|
+
* @default 'rectangle'
|
|
8766
|
+
*/
|
|
8767
|
+
shape?: SkeletonShape;
|
|
8768
|
+
/**
|
|
8769
|
+
* Độ bo góc, chỉ áp dụng khi `shape === 'rectangle'`
|
|
8770
|
+
* @default 'md'
|
|
8771
|
+
*/
|
|
8772
|
+
radius?: SkeletonRadius;
|
|
8773
|
+
/**
|
|
8774
|
+
* Chiều rộng (CSS string hoặc số px)
|
|
8775
|
+
* @example "100%", "200px", 200
|
|
8776
|
+
*/
|
|
8777
|
+
width?: string | number;
|
|
8778
|
+
/**
|
|
8779
|
+
* Chiều cao (CSS string hoặc số px)
|
|
8780
|
+
* @example "1rem", "40px", 40
|
|
8781
|
+
* @default "1rem"
|
|
8782
|
+
*/
|
|
8783
|
+
height?: string | number;
|
|
8784
|
+
/**
|
|
8785
|
+
* Số lượng dòng skeleton xếp theo cột.
|
|
8786
|
+
* Khi > 1, dòng cuối cùng sẽ tự động thu hẹp còn 60% width để mô phỏng đoạn văn tự nhiên.
|
|
8787
|
+
* @default 1
|
|
8788
|
+
*/
|
|
8789
|
+
lines?: number;
|
|
8790
|
+
/**
|
|
8791
|
+
* Khoảng cách giữa các dòng khi `lines > 1` (CSS string hoặc số px)
|
|
8792
|
+
* @default "0.5rem"
|
|
8793
|
+
*/
|
|
8794
|
+
gap?: string | number;
|
|
8795
|
+
}
|
|
8796
|
+
interface LoadingImageProps extends Omit<ImageProps, "onLoad" | "onError" | "alt" | "src" | "onClick"> {
|
|
8797
|
+
/**
|
|
8798
|
+
* Đường dẫn ảnh, đối tượng File / Blob hoặc ServerFile ({ src/url, name, ... }). Tùy chọn khi chỉ hiển thị skeleton placeholder.
|
|
8799
|
+
*/
|
|
8800
|
+
src?: ImageProps["src"] | File | Blob | ServerFile;
|
|
8801
|
+
/**
|
|
8802
|
+
* Văn bản thay thế cho ảnh. Mặc định là chuỗi rỗng.
|
|
8803
|
+
* @default ""
|
|
8804
|
+
*/
|
|
8805
|
+
alt?: string;
|
|
8806
|
+
/**
|
|
8807
|
+
* Kiểu animation của skeleton khi đang tải ảnh.
|
|
8808
|
+
* @default 'pulse'
|
|
8809
|
+
*/
|
|
8810
|
+
skeletonVariant?: SkeletonVariant;
|
|
8811
|
+
/**
|
|
8812
|
+
* Độ bo góc áp dụng đồng thời cho skeleton placeholder và ảnh.
|
|
8813
|
+
* @default 'md'
|
|
8814
|
+
*/
|
|
8815
|
+
radius?: SkeletonRadius;
|
|
8816
|
+
/**
|
|
8817
|
+
* Kiểu căn chỉnh hiển thị ảnh (object-fit).
|
|
8818
|
+
* @default 'cover'
|
|
8819
|
+
*/
|
|
8820
|
+
objectFit?: SkeletonObjectFit;
|
|
8821
|
+
/**
|
|
8822
|
+
* Bật tính năng click vào ảnh để xem trước phóng to qua FilePreview (trong FileContainer modal).
|
|
8823
|
+
* @default true
|
|
8824
|
+
*/
|
|
8825
|
+
preview?: boolean;
|
|
8826
|
+
/**
|
|
8827
|
+
* Class CSS tuỳ thêm cho wrapper bên ngoài.
|
|
8828
|
+
*/
|
|
8829
|
+
wrapperClassName?: string;
|
|
8830
|
+
/**
|
|
8831
|
+
* Inline style tuỳ thêm cho wrapper bên ngoài.
|
|
8832
|
+
*/
|
|
8833
|
+
wrapperStyle?: React.CSSProperties;
|
|
8834
|
+
/**
|
|
8835
|
+
* Callback khi người dùng click vào ảnh / wrapper.
|
|
8836
|
+
*/
|
|
8837
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
8838
|
+
/**
|
|
8839
|
+
* Callback được gọi khi ảnh tải thành công.
|
|
8840
|
+
*/
|
|
8841
|
+
onLoad?: ImageProps["onLoad"];
|
|
8842
|
+
/**
|
|
8843
|
+
* Callback được gọi khi ảnh gặp lỗi tải.
|
|
8844
|
+
*/
|
|
8845
|
+
onError?: ImageProps["onError"];
|
|
8846
|
+
/**
|
|
8847
|
+
* Ref trỏ tới phần tử wrapper div bên ngoài.
|
|
8848
|
+
*/
|
|
8849
|
+
ref?: Ref<HTMLDivElement>;
|
|
8850
|
+
}
|
|
8851
|
+
|
|
8852
|
+
declare function Skeleton({ ref, variant, shape, radius, width, height, lines, gap, className, style, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
8853
|
+
|
|
8854
|
+
declare function LoadingImage({ src, alt, width, height, fill, skeletonVariant, radius, objectFit, preview, className, wrapperClassName, style, wrapperStyle, onLoad, onError, onClick, ref, ...imageProps }: LoadingImageProps): react_jsx_runtime.JSX.Element;
|
|
8855
|
+
|
|
8856
|
+
interface FuzzyFilterMeta {
|
|
8857
|
+
itemRank?: RankingInfo;
|
|
8858
|
+
}
|
|
8859
|
+
type FuzzyFeatures = TableFeatures & {
|
|
8860
|
+
filterMeta: FuzzyFilterMeta;
|
|
8861
|
+
};
|
|
8862
|
+
/**
|
|
8863
|
+
* Thuật toán lọc Fuzzy (Fuzzy Filter) sử dụng `@tanstack/match-sorter-utils`.
|
|
8864
|
+
*
|
|
8865
|
+
* Tính năng:
|
|
8866
|
+
* - Chuẩn hóa và so khớp gần đúng (Equal, StartsWith, WordStartsWith, Contains, Acronym, Matches)
|
|
8867
|
+
* - Tự động loại bỏ dấu tiếng Việt / diacritics
|
|
8868
|
+
* - Không phân biệt chữ hoa / chữ thường (Case-insensitive)
|
|
8869
|
+
* - Đính kèm thông tin `RankingInfo` vào metadata qua `addMeta` để hỗ trợ sắp xếp theo độ liên quan
|
|
8870
|
+
*/
|
|
8871
|
+
declare const fuzzyFilter: FilterFn<FuzzyFeatures, RowData>;
|
|
8872
|
+
|
|
8873
|
+
/**
|
|
8874
|
+
* Bộ features tiêu chuẩn của @openway/ui dành cho TanStack Table v9.
|
|
8875
|
+
* Bao gồm: Sắp xếp (Sorting), Phân trang (Pagination), Chọn dòng (Row Selection),
|
|
8876
|
+
* Lọc cột & Lọc toàn bảng (Column & Global Filtering), Ẩn/hiện cột (Visibility),
|
|
8877
|
+
* Ghim cột (Pinning), và Sắp xếp thứ tự cột (Column Ordering).
|
|
8878
|
+
*/
|
|
8879
|
+
declare const defaultTableFeatures: {
|
|
8880
|
+
rowSortingFeature: _tanstack_react_table.TableFeature;
|
|
8881
|
+
rowPaginationFeature: _tanstack_react_table.TableFeature;
|
|
8882
|
+
rowSelectionFeature: _tanstack_react_table.TableFeature;
|
|
8883
|
+
columnFilteringFeature: _tanstack_react_table.TableFeature;
|
|
8884
|
+
globalFilteringFeature: _tanstack_react_table.TableFeature;
|
|
8885
|
+
columnVisibilityFeature: _tanstack_react_table.TableFeature;
|
|
8886
|
+
columnPinningFeature: _tanstack_react_table.TableFeature;
|
|
8887
|
+
columnOrderingFeature: _tanstack_react_table.TableFeature;
|
|
8888
|
+
sortedRowModel: (table: _tanstack_react_table.Table<any, any>) => () => _tanstack_react_table.RowModel<any, any>;
|
|
8889
|
+
paginatedRowModel: (table: _tanstack_react_table.Table<any, any>) => () => _tanstack_react_table.RowModel<any, any>;
|
|
8890
|
+
filteredRowModel: (table: _tanstack_react_table.Table<any, any>) => () => _tanstack_react_table.RowModel<any, any>;
|
|
8891
|
+
filterFns: {
|
|
8892
|
+
fuzzy: _tanstack_react_table.FilterFn<FuzzyFeatures, RowData>;
|
|
8893
|
+
};
|
|
8894
|
+
};
|
|
8895
|
+
type DefaultTableFeatures = typeof defaultTableFeatures;
|
|
8896
|
+
/**
|
|
8897
|
+
* Helper tạo định nghĩa cột (column definitions) có type-safety đầy đủ
|
|
8898
|
+
* gắn liền với DefaultTableFeatures của TanStack Table v9.
|
|
8899
|
+
*/
|
|
8900
|
+
declare function createTableColumnHelper<TData extends RowData = RowData>(): ColumnHelper<DefaultTableFeatures, TData>;
|
|
8901
|
+
type UseDataTableOptions<TData extends RowData = RowData> = Omit<TableOptions<DefaultTableFeatures, TData>, "features" | "columns"> & {
|
|
8902
|
+
features?: DefaultTableFeatures;
|
|
8903
|
+
columns: TableOptions<DefaultTableFeatures, TData>["columns"] | ReturnType<ColumnHelper<DefaultTableFeatures, TData>["columns"]>;
|
|
8904
|
+
};
|
|
8905
|
+
/**
|
|
8906
|
+
* Hook `useDataTable` bọc `useTable` của TanStack Table v9 với cấu hình
|
|
8907
|
+
* tính năng mặc định tối ưu sẵn cho @openway/ui.
|
|
8908
|
+
*/
|
|
8909
|
+
declare function useDataTable<TData extends RowData = RowData>(options: UseDataTableOptions<TData>): ReactTable<DefaultTableFeatures, TData>;
|
|
8910
|
+
|
|
8911
|
+
/**
|
|
8912
|
+
* Kiểu trạng thái thứ tự các cột: danh sách ID của các cột
|
|
8913
|
+
*/
|
|
8914
|
+
type ColumnOrderState = string[];
|
|
8915
|
+
/**
|
|
8916
|
+
* Kích cỡ hiển thị của Table:
|
|
8917
|
+
* - 'sm': Nhỏ gọn (dense), padding hẹp (px-3 py-2), font chữ text-xs, phù hợp bảng nhiều dữ liệu hoặc màn hình nhỏ
|
|
8918
|
+
* - 'md': Tiêu chuẩn (mặc định), padding cân đối (px-4 py-3), font chữ text-sm, phù hợp hầu hết giao diện quản trị
|
|
8919
|
+
* - 'lg': Thoáng đãng, padding rộng (px-5 py-4), font chữ text-base, phù hợp bảng dữ liệu chính, báo cáo hoặc dashboard
|
|
8920
|
+
*/
|
|
8921
|
+
type TableSize = "sm" | "md" | "lg";
|
|
8922
|
+
/**
|
|
8923
|
+
* Biến thể kiểu dáng giao diện của Table:
|
|
8924
|
+
* - 'default': Bảng phẳng với đường kẻ phân cách viền mờ thanh lịch, nền header xám nhạt trung tính
|
|
8925
|
+
* - 'striped': Bảng kẻ sọc xen kẽ (Zebra stripes), các dòng chẵn mang nền xám nhạt giúp tăng khả năng đọc lướt
|
|
8926
|
+
* - 'bordered': Viền đầy đủ bao quanh từng ô và toàn bộ khung bao ngoài của bảng
|
|
8927
|
+
*/
|
|
8928
|
+
type TableVariant = "default" | "striped" | "bordered";
|
|
8929
|
+
/**
|
|
8930
|
+
* Hướng căn lề nội dung của các ô trong Table:
|
|
8931
|
+
* - 'left': Căn lề trái (mặc định cho văn bản, tên, mô tả, nội dung dài)
|
|
8932
|
+
* - 'center': Căn giữa (phù hợp cho mã định danh ID, trạng thái, ngày tháng, checkbox)
|
|
8933
|
+
* - 'right': Căn lề phải (chuẩn cho số tiền, số lượng, phần trăm, cột hành động thao tác)
|
|
8934
|
+
*/
|
|
8935
|
+
type TableAlign = "left" | "center" | "right";
|
|
8936
|
+
/**
|
|
8937
|
+
* Thuộc tính của component bọc ngoài `<Table />` (`<table>`)
|
|
8938
|
+
*/
|
|
8939
|
+
interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
8940
|
+
/**
|
|
8941
|
+
* Ref chuyển tiếp trực tiếp đến phần tử HTML table (React 19)
|
|
8942
|
+
*/
|
|
8943
|
+
ref?: Ref<HTMLTableElement>;
|
|
8944
|
+
/**
|
|
8945
|
+
* Biến thể kiểu dáng hiển thị của bảng
|
|
8946
|
+
* @default 'default'
|
|
8947
|
+
*/
|
|
8948
|
+
variant?: TableVariant;
|
|
8949
|
+
/**
|
|
8950
|
+
* Kích cỡ hiển thị của bảng (khoảng đệm và kích thước chữ)
|
|
8951
|
+
* @default 'md'
|
|
8952
|
+
*/
|
|
8953
|
+
size?: TableSize;
|
|
8954
|
+
/**
|
|
8955
|
+
* Class tùy biến cho khung container bao ngoài thẻ table (khung xử lý cuộn ngang overflow-x-auto)
|
|
8956
|
+
*/
|
|
8957
|
+
containerClassName?: string;
|
|
8958
|
+
/**
|
|
8959
|
+
* Props truyền bổ sung vào thẻ div wrapper bao ngoài
|
|
8960
|
+
*/
|
|
8961
|
+
wrapperProps?: HTMLAttributes<HTMLDivElement>;
|
|
8962
|
+
/**
|
|
8963
|
+
* Nội dung các phần tử bảng bên trong (TableHeader, TableBody, TableFooter, TableCaption...)
|
|
8964
|
+
*/
|
|
8965
|
+
children?: ReactNode;
|
|
8966
|
+
}
|
|
8967
|
+
/**
|
|
8968
|
+
* Thuộc tính của component phần đầu bảng `<TableHeader />` (`<thead>`)
|
|
8969
|
+
*/
|
|
8970
|
+
interface TableHeaderProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
8971
|
+
/**
|
|
8972
|
+
* Ref chuyển tiếp đến phần tử HTML thead
|
|
8973
|
+
*/
|
|
8974
|
+
ref?: Ref<HTMLTableSectionElement>;
|
|
8975
|
+
/**
|
|
8976
|
+
* Nội dung dòng tiêu đề bên trong thẻ thead
|
|
8977
|
+
*/
|
|
8978
|
+
children?: ReactNode;
|
|
8979
|
+
}
|
|
8980
|
+
/**
|
|
8981
|
+
* Thuộc tính của component thân bảng `<TableBody />` (`<tbody>`)
|
|
8982
|
+
*/
|
|
8983
|
+
interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
8984
|
+
/**
|
|
8985
|
+
* Ref chuyển tiếp đến phần tử HTML tbody
|
|
8986
|
+
*/
|
|
8987
|
+
ref?: Ref<HTMLTableSectionElement>;
|
|
8988
|
+
/**
|
|
8989
|
+
* Nội dung các dòng dữ liệu bên trong thẻ tbody
|
|
8990
|
+
*/
|
|
8991
|
+
children?: ReactNode;
|
|
8992
|
+
}
|
|
8993
|
+
/**
|
|
8994
|
+
* Thuộc tính của component chân bảng `<TableFooter />` (`<tfoot>`)
|
|
8995
|
+
*/
|
|
8996
|
+
interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
8997
|
+
/**
|
|
8998
|
+
* Ref chuyển tiếp đến phần tử HTML tfoot
|
|
8999
|
+
*/
|
|
9000
|
+
ref?: Ref<HTMLTableSectionElement>;
|
|
9001
|
+
/**
|
|
9002
|
+
* Nội dung tổng kết hoặc thông tin thống kê ở chân bảng
|
|
9003
|
+
*/
|
|
9004
|
+
children?: ReactNode;
|
|
9005
|
+
}
|
|
9006
|
+
/**
|
|
9007
|
+
* Thuộc tính của component dòng `<TableRow />` (`<tr>`)
|
|
9008
|
+
*/
|
|
9009
|
+
interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
9010
|
+
/**
|
|
9011
|
+
* Ref chuyển tiếp đến phần tử HTML tr
|
|
9012
|
+
*/
|
|
9013
|
+
ref?: Ref<HTMLTableRowElement>;
|
|
9014
|
+
/**
|
|
9015
|
+
* Đánh dấu dòng đang được chọn (áp dụng background highlight và thuộc tính aria-selected)
|
|
9016
|
+
* @default false
|
|
9017
|
+
*/
|
|
9018
|
+
isSelected?: boolean;
|
|
9019
|
+
/**
|
|
9020
|
+
* Bật hiệu ứng đổi màu nền nhẹ khi rê chuột qua dòng
|
|
9021
|
+
* @default true
|
|
9022
|
+
*/
|
|
9023
|
+
isHoverable?: boolean;
|
|
9024
|
+
/**
|
|
9025
|
+
* Nội dung các ô dữ liệu bên trong dòng (TableCell hoặc TableHead)
|
|
9026
|
+
*/
|
|
9027
|
+
children?: ReactNode;
|
|
9028
|
+
}
|
|
9029
|
+
/**
|
|
9030
|
+
* Thuộc tính của ô tiêu đề `<TableHead />` (`<th>`)
|
|
9031
|
+
*/
|
|
9032
|
+
interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
9033
|
+
/**
|
|
9034
|
+
* Ref chuyển tiếp đến phần tử HTML th
|
|
9035
|
+
*/
|
|
9036
|
+
ref?: Ref<HTMLTableCellElement>;
|
|
9037
|
+
/**
|
|
9038
|
+
* Hướng căn lề nội dung tiêu đề ('left', 'center', 'right')
|
|
9039
|
+
* @default 'left'
|
|
9040
|
+
*/
|
|
9041
|
+
align?: TableAlign;
|
|
9042
|
+
/**
|
|
9043
|
+
* Nội dung hiển thị bên trong ô tiêu đề
|
|
9044
|
+
*/
|
|
9045
|
+
children?: ReactNode;
|
|
9046
|
+
}
|
|
9047
|
+
/**
|
|
9048
|
+
* Thuộc tính của ô dữ liệu `<TableCell />` (`<td>`)
|
|
9049
|
+
*/
|
|
9050
|
+
interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
9051
|
+
/**
|
|
9052
|
+
* Ref chuyển tiếp đến phần tử HTML td
|
|
9053
|
+
*/
|
|
9054
|
+
ref?: Ref<HTMLTableCellElement>;
|
|
9055
|
+
/**
|
|
9056
|
+
* Hướng căn lề nội dung ô ('left', 'center', 'right')
|
|
9057
|
+
* @default 'left'
|
|
9058
|
+
*/
|
|
9059
|
+
align?: TableAlign;
|
|
9060
|
+
/**
|
|
9061
|
+
* Nội dung hiển thị bên trong ô dữ liệu
|
|
9062
|
+
*/
|
|
9063
|
+
children?: ReactNode;
|
|
9064
|
+
}
|
|
9065
|
+
/**
|
|
9066
|
+
* Thuộc tính của chú thích bảng `<TableCaption />` (`<caption>`)
|
|
9067
|
+
*/
|
|
9068
|
+
interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
|
|
9069
|
+
/**
|
|
9070
|
+
* Ref chuyển tiếp đến phần tử HTML caption
|
|
9071
|
+
*/
|
|
9072
|
+
ref?: Ref<HTMLTableCaptionElement>;
|
|
9073
|
+
/**
|
|
9074
|
+
* Văn bản mô tả hoặc chú thích phụ bên dưới bảng
|
|
9075
|
+
*/
|
|
9076
|
+
children?: ReactNode;
|
|
9077
|
+
}
|
|
9078
|
+
/**
|
|
9079
|
+
* Thuộc tính của component tiêu đề cột tương tác sắp xếp `<TableColumnHeader />`
|
|
9080
|
+
*/
|
|
9081
|
+
interface TableColumnHeaderProps<TData extends RowData = RowData, TValue = unknown> extends HTMLAttributes<HTMLDivElement> {
|
|
9082
|
+
/**
|
|
9083
|
+
* Đối tượng cột TanStack Table v9
|
|
9084
|
+
*/
|
|
9085
|
+
column: Column<DefaultTableFeatures, TData, TValue>;
|
|
9086
|
+
/**
|
|
9087
|
+
* Tên tiêu đề hiển thị của cột
|
|
9088
|
+
*/
|
|
9089
|
+
title: string;
|
|
9090
|
+
}
|
|
9091
|
+
/**
|
|
9092
|
+
* Thuộc tính của component tiêu đề cột hỗ trợ kéo thả sắp xếp `<DraggableTableHead />`
|
|
9093
|
+
*/
|
|
9094
|
+
interface DraggableTableHeadProps<TData extends RowData = RowData, TValue = unknown> {
|
|
9095
|
+
/**
|
|
9096
|
+
* Đối tượng Header TanStack Table v9 đại diện cho cột
|
|
9097
|
+
*/
|
|
9098
|
+
header: Header<DefaultTableFeatures, TData, TValue>;
|
|
9099
|
+
/**
|
|
9100
|
+
* Cho phép sắp xếp dữ liệu cột khi click vào tiêu đề
|
|
9101
|
+
*/
|
|
9102
|
+
canSort?: boolean;
|
|
9103
|
+
/**
|
|
9104
|
+
* Nội dung React hiển thị bên trong ô header
|
|
9105
|
+
*/
|
|
9106
|
+
headerContent?: ReactNode;
|
|
9107
|
+
/**
|
|
9108
|
+
* Trạng thái sắp xếp WAI-ARIA ('ascending' | 'descending' | 'none')
|
|
9109
|
+
*/
|
|
9110
|
+
ariaSort?: "ascending" | "descending" | "none";
|
|
9111
|
+
/**
|
|
9112
|
+
* Vô hiệu hóa tính năng kéo thả cho cột này (ví dụ cột Checkbox `_select`)
|
|
9113
|
+
* @default false
|
|
9114
|
+
*/
|
|
9115
|
+
disabled?: boolean;
|
|
9116
|
+
/**
|
|
9117
|
+
* Class tùy biến cho phần tử `<th>`
|
|
9118
|
+
*/
|
|
9119
|
+
className?: string;
|
|
9120
|
+
}
|
|
9121
|
+
/**
|
|
9122
|
+
* Thuộc tính của thanh điều hướng phân trang `<TablePagination />`
|
|
9123
|
+
*/
|
|
9124
|
+
interface TablePaginationProps<TData extends RowData = RowData> {
|
|
9125
|
+
/**
|
|
9126
|
+
* Instance của bảng ReactTable từ hook TanStack Table v9 (`useDataTable` hoặc `useTable`)
|
|
9127
|
+
*/
|
|
9128
|
+
table: ReactTable<DefaultTableFeatures, TData>;
|
|
9129
|
+
/**
|
|
9130
|
+
* Danh sách tùy chọn số dòng hiển thị trên mỗi trang trong dropdown
|
|
9131
|
+
* @default [10, 20, 50, 100]
|
|
9132
|
+
*/
|
|
9133
|
+
pageSizeOptions?: number[];
|
|
9134
|
+
/**
|
|
9135
|
+
* Hiển thị dropdown lựa chọn số dòng trên mỗi trang
|
|
9136
|
+
* @default true
|
|
9137
|
+
*/
|
|
9138
|
+
showPageSizeSelector?: boolean;
|
|
9139
|
+
/**
|
|
9140
|
+
* Hiển thị ô nhảy nhanh đến trang chỉ định
|
|
9141
|
+
* @default false
|
|
9142
|
+
*/
|
|
9143
|
+
showPageJump?: boolean;
|
|
9144
|
+
/**
|
|
9145
|
+
* Class tùy biến cho thanh phân trang
|
|
7693
9146
|
*/
|
|
7694
9147
|
className?: string;
|
|
9148
|
+
}
|
|
9149
|
+
/**
|
|
9150
|
+
* Kiểu hiển thị của bộ lọc trong TableToolbar / DataTable (đồng nhất với SelectFilterType)
|
|
9151
|
+
*/
|
|
9152
|
+
type TableFilterType = "string" | "text" | "number" | "date" | "date-range" | "checkbox-group" | "select" | "custom";
|
|
9153
|
+
/**
|
|
9154
|
+
* Tùy chọn dành cho bộ lọc dạng select / checkbox-group
|
|
9155
|
+
*/
|
|
9156
|
+
interface TableFilterOption {
|
|
9157
|
+
label: ReactNode;
|
|
9158
|
+
value: string | number | boolean;
|
|
9159
|
+
disabled?: boolean;
|
|
9160
|
+
}
|
|
9161
|
+
/**
|
|
9162
|
+
* Định nghĩa cấu hình bộ lọc cho DataTable / TableToolbar (đồng nhất với SelectFilterField)
|
|
9163
|
+
*/
|
|
9164
|
+
interface TableFilterDef<TValue = unknown> {
|
|
9165
|
+
/**
|
|
9166
|
+
* Tên định danh trường lọc (dùng làm key trong object filters, đồng nhất với SelectFilterField)
|
|
9167
|
+
*/
|
|
9168
|
+
name: string;
|
|
9169
|
+
/**
|
|
9170
|
+
* Tên hiển thị của bộ lọc trên giao diện (ví dụ: "Trạng thái", "Ngày tạo")
|
|
9171
|
+
*/
|
|
9172
|
+
label?: ReactNode;
|
|
9173
|
+
/**
|
|
9174
|
+
* Kiểu hiển thị bộ lọc: 'string' | 'text' | 'number' | 'date' | 'date-range' | 'checkbox-group' | 'select' | 'custom'
|
|
9175
|
+
*/
|
|
9176
|
+
type: TableFilterType;
|
|
9177
|
+
/**
|
|
9178
|
+
* Danh sách options dành cho kiểu 'select' hoặc 'checkbox-group'
|
|
9179
|
+
*/
|
|
9180
|
+
options?: TableFilterOption[];
|
|
9181
|
+
/**
|
|
9182
|
+
* Placeholder gợi ý trong editor
|
|
9183
|
+
*/
|
|
9184
|
+
placeholder?: string;
|
|
9185
|
+
/**
|
|
9186
|
+
* Giá trị mặc định khi khởi tạo
|
|
9187
|
+
*/
|
|
9188
|
+
defaultValue?: TValue;
|
|
9189
|
+
/**
|
|
9190
|
+
* Giá trị điều khiển
|
|
9191
|
+
*/
|
|
9192
|
+
value?: TValue;
|
|
9193
|
+
/**
|
|
9194
|
+
* Thuộc tính tùy biến truyền bổ sung vào component editor (DateRangePicker, DatePicker, CheckboxGroup...)
|
|
9195
|
+
*/
|
|
9196
|
+
props?: Record<string, unknown>;
|
|
9197
|
+
/**
|
|
9198
|
+
* Hàm render component tùy biến khi `type: 'custom'`
|
|
9199
|
+
*/
|
|
9200
|
+
render?: (props: {
|
|
9201
|
+
value: TValue;
|
|
9202
|
+
onChange: (val: TValue) => void;
|
|
9203
|
+
}) => ReactNode;
|
|
9204
|
+
}
|
|
9205
|
+
/**
|
|
9206
|
+
* Thuộc tính của thanh công cụ bảng `<TableToolbar />`
|
|
9207
|
+
*/
|
|
9208
|
+
interface TableToolbarProps<TData extends RowData = RowData> {
|
|
9209
|
+
/**
|
|
9210
|
+
* Instance của bảng ReactTable từ hook TanStack Table v9
|
|
9211
|
+
*/
|
|
9212
|
+
table: ReactTable<DefaultTableFeatures, TData>;
|
|
9213
|
+
/**
|
|
9214
|
+
* Placeholder gợi ý cho ô tìm kiếm toàn bảng
|
|
9215
|
+
* @default 'Tìm kiếm trong bảng...'
|
|
9216
|
+
*/
|
|
9217
|
+
searchPlaceholder?: string;
|
|
9218
|
+
/**
|
|
9219
|
+
* Bật ô tìm kiếm toàn bảng (Global Filter)
|
|
9220
|
+
* @default true
|
|
9221
|
+
*/
|
|
9222
|
+
enableGlobalFilter?: boolean;
|
|
9223
|
+
/**
|
|
9224
|
+
* Bật menu Popover cho phép người dùng ẩn/hiện từng cột
|
|
9225
|
+
* @default true
|
|
9226
|
+
*/
|
|
9227
|
+
enableColumnVisibility?: boolean;
|
|
9228
|
+
/**
|
|
9229
|
+
* Bật nút làm mới dữ liệu trên thanh công cụ (Refresh button)
|
|
9230
|
+
* @default false
|
|
9231
|
+
*/
|
|
9232
|
+
isRefresh?: boolean;
|
|
7695
9233
|
/**
|
|
7696
|
-
*
|
|
9234
|
+
* Callback được gọi khi người dùng click vào nút làm mới trên thanh công cụ
|
|
7697
9235
|
*/
|
|
7698
|
-
|
|
9236
|
+
onRefresh?: () => void;
|
|
9237
|
+
/**
|
|
9238
|
+
* Các nút hành động tùy biến hiển thị ở góc phải thanh công cụ (ví dụ: Thêm mới, Bộ lọc nâng cao, Xuất file...)
|
|
9239
|
+
*/
|
|
9240
|
+
actions?: ReactNode;
|
|
9241
|
+
/**
|
|
9242
|
+
* Hàm render các nút hành động hàng loạt khi có ít nhất 1 dòng được chọn (Bulk Actions)
|
|
9243
|
+
*/
|
|
9244
|
+
selectedActions?: (selectedRows: Row<DefaultTableFeatures, TData>[]) => ReactNode;
|
|
9245
|
+
/**
|
|
9246
|
+
* Danh sách cấu hình các bộ lọc menu hiển thị trên thanh công cụ
|
|
9247
|
+
*/
|
|
9248
|
+
filters?: TableFilterDef[];
|
|
9249
|
+
/**
|
|
9250
|
+
* Giá trị hiện tại của các bộ lọc: `{ [name]: value }`
|
|
9251
|
+
*/
|
|
9252
|
+
filterValues?: Record<string, unknown>;
|
|
9253
|
+
/**
|
|
9254
|
+
* Callback khi một bộ lọc thay đổi giá trị
|
|
9255
|
+
*/
|
|
9256
|
+
onFilterChange?: (name: string, value: unknown) => void;
|
|
9257
|
+
/**
|
|
9258
|
+
* Callback khi người dùng bấm "Đặt lại bộ lọc" (Reset all)
|
|
9259
|
+
*/
|
|
9260
|
+
onFilterReset?: () => void;
|
|
9261
|
+
/**
|
|
9262
|
+
* Class tùy biến cho thanh công cụ
|
|
9263
|
+
*/
|
|
9264
|
+
className?: string;
|
|
7699
9265
|
}
|
|
7700
9266
|
/**
|
|
7701
|
-
*
|
|
9267
|
+
* Thuộc tính của component bảng hoàn chỉnh `<DataTable />`
|
|
9268
|
+
* Tích hợp sẵn toàn bộ tính năng của TanStack Table v9.
|
|
7702
9269
|
*/
|
|
7703
|
-
interface
|
|
9270
|
+
interface DataTableProps<TData extends RowData = RowData> {
|
|
7704
9271
|
/**
|
|
7705
|
-
*
|
|
7706
|
-
* @default false
|
|
9272
|
+
* Danh sách định nghĩa các cột dữ liệu (sử dụng helper `createTableColumnHelper` để tạo)
|
|
7707
9273
|
*/
|
|
7708
|
-
|
|
9274
|
+
columns: ColumnDef<DefaultTableFeatures, TData, unknown>[] | ReturnType<ColumnHelper<DefaultTableFeatures, TData>["columns"]>;
|
|
7709
9275
|
/**
|
|
7710
|
-
*
|
|
9276
|
+
* Mảng dữ liệu nguồn hiển thị trong bảng
|
|
7711
9277
|
*/
|
|
7712
|
-
|
|
9278
|
+
data: TData[];
|
|
7713
9279
|
/**
|
|
7714
|
-
*
|
|
7715
|
-
*
|
|
9280
|
+
* Biến thể giao diện của bảng:
|
|
9281
|
+
* - 'default': Viền ngang mờ thanh lịch
|
|
9282
|
+
* - 'striped': Dòng xen kẽ màu (Zebra stripes)
|
|
9283
|
+
* - 'bordered': Viền lưới đầy đủ bao quanh từng ô
|
|
9284
|
+
* @default 'default'
|
|
7716
9285
|
*/
|
|
7717
|
-
|
|
9286
|
+
variant?: TableVariant;
|
|
7718
9287
|
/**
|
|
7719
|
-
*
|
|
7720
|
-
* @default '
|
|
9288
|
+
* Kích thước bảng ('sm' nhỏ gọn, 'md' chuẩn, 'lg' thoáng đãng)
|
|
9289
|
+
* @default 'md'
|
|
7721
9290
|
*/
|
|
7722
|
-
|
|
9291
|
+
size?: TableSize;
|
|
7723
9292
|
/**
|
|
7724
|
-
* Trạng thái đang tải
|
|
7725
|
-
* Khi `isLoading = true`:
|
|
7726
|
-
* - Chặn đóng Confirm khi click vào vùng backdrop overlay (`closeOnOverlayClick`)
|
|
7727
|
-
* - Chặn đóng Confirm khi nhấn phím ESC (`closeOnEsc`)
|
|
7728
|
-
* - Chặn đóng Confirm từ nút đóng (X) và component `<ConfirmClose>`
|
|
9293
|
+
* Trạng thái đang tải dữ liệu (tự động hiển thị các dòng Skeleton animation)
|
|
7729
9294
|
* @default false
|
|
7730
9295
|
*/
|
|
7731
9296
|
isLoading?: boolean;
|
|
7732
9297
|
/**
|
|
7733
|
-
*
|
|
9298
|
+
* Bật nút làm mới dữ liệu trên thanh công cụ (Refresh button)
|
|
9299
|
+
* @default false
|
|
9300
|
+
*/
|
|
9301
|
+
isRefresh?: boolean;
|
|
9302
|
+
/**
|
|
9303
|
+
* Callback được gọi khi người dùng click vào nút làm mới trên thanh công cụ
|
|
9304
|
+
*/
|
|
9305
|
+
onRefresh?: () => void;
|
|
9306
|
+
/**
|
|
9307
|
+
* Số dòng Skeleton hiển thị khi đang tải (`isLoading={true}`)
|
|
9308
|
+
* @default 5
|
|
9309
|
+
*/
|
|
9310
|
+
loadingRowsCount?: number;
|
|
9311
|
+
/**
|
|
9312
|
+
* Văn bản hiển thị khi bảng không có dữ liệu
|
|
9313
|
+
* @default 'Không có dữ liệu hiển thị'
|
|
9314
|
+
*/
|
|
9315
|
+
emptyText?: string;
|
|
9316
|
+
/**
|
|
9317
|
+
* Hình ảnh hoặc component minh họa tùy biến khi bảng không có dữ liệu (thay thế Empty mặc định)
|
|
9318
|
+
*/
|
|
9319
|
+
emptyIllustration?: ReactNode;
|
|
9320
|
+
/**
|
|
9321
|
+
* Bật tính năng sắp xếp (Sorting) khi click vào tiêu đề cột
|
|
7734
9322
|
* @default true
|
|
7735
9323
|
*/
|
|
7736
|
-
|
|
9324
|
+
enableSorting?: boolean;
|
|
7737
9325
|
/**
|
|
7738
|
-
*
|
|
9326
|
+
* Bật ô tìm kiếm toàn bảng (Global Filter) trên thanh công cụ
|
|
7739
9327
|
* @default true
|
|
7740
9328
|
*/
|
|
7741
|
-
|
|
9329
|
+
enableFiltering?: boolean;
|
|
7742
9330
|
/**
|
|
7743
|
-
*
|
|
9331
|
+
* Bật thanh phân trang (Pagination) ở chân bảng
|
|
7744
9332
|
* @default true
|
|
7745
9333
|
*/
|
|
7746
|
-
|
|
9334
|
+
enablePagination?: boolean;
|
|
7747
9335
|
/**
|
|
7748
|
-
*
|
|
9336
|
+
* Bật tính năng chọn dòng (tự động chèn cột Checkbox chọn dòng và chọn tất cả)
|
|
9337
|
+
* @default false
|
|
7749
9338
|
*/
|
|
7750
|
-
|
|
9339
|
+
enableRowSelection?: boolean;
|
|
7751
9340
|
/**
|
|
7752
|
-
*
|
|
9341
|
+
* Bật menu Popover cho phép người dùng chủ động ẩn/hiện từng cột
|
|
9342
|
+
* @default true
|
|
7753
9343
|
*/
|
|
7754
|
-
|
|
9344
|
+
enableColumnVisibility?: boolean;
|
|
7755
9345
|
/**
|
|
7756
|
-
*
|
|
9346
|
+
* Bật tính năng kéo thả thay đổi thứ tự các cột (Column Ordering / Dnd)
|
|
9347
|
+
* @default false
|
|
7757
9348
|
*/
|
|
7758
|
-
|
|
7759
|
-
}
|
|
7760
|
-
/**
|
|
7761
|
-
* Props cho component `<ConfirmClose>` (Wrapper tự động kích hoạt đóng Confirm có Exit Animation cho bất kỳ nút bấm nào)
|
|
7762
|
-
*/
|
|
7763
|
-
interface ConfirmCloseProps extends HTMLAttributes<HTMLElement> {
|
|
9349
|
+
enableColumnOrdering?: boolean;
|
|
7764
9350
|
/**
|
|
7765
|
-
*
|
|
9351
|
+
* Văn bản gợi ý placeholder cho ô tìm kiếm
|
|
9352
|
+
* @default 'Tìm kiếm trong bảng...'
|
|
7766
9353
|
*/
|
|
7767
|
-
|
|
9354
|
+
searchPlaceholder?: string;
|
|
7768
9355
|
/**
|
|
7769
|
-
*
|
|
7770
|
-
* @default true
|
|
9356
|
+
* Các nút hành động tùy biến đặt ở góc phải thanh công cụ (ví dụ: Nút thêm mới, Export...)
|
|
7771
9357
|
*/
|
|
7772
|
-
|
|
7773
|
-
}
|
|
7774
|
-
|
|
7775
|
-
/**
|
|
7776
|
-
* Khung giao diện hộp thoại xác nhận (Confirm Dialog Box).
|
|
7777
|
-
* Thiết kế theo mô hình Pure Compound Pattern giống Modal:
|
|
7778
|
-
* Nhận size/color từ ConfirmContainer qua Context và render {children}.
|
|
7779
|
-
*/
|
|
7780
|
-
declare function Confirm({ size, radius, className, children, ref, ...props }: ConfirmProps): react_jsx_runtime.JSX.Element;
|
|
7781
|
-
|
|
7782
|
-
declare function ConfirmContainer({ open, size, color, isLoading, closeOnOverlayClick, closeOnEsc, lockScroll, overlayClassName, className, children, onClose, ...props }: ConfirmContainerProps): react_jsx_runtime.JSX.Element | null;
|
|
7783
|
-
|
|
7784
|
-
/**
|
|
7785
|
-
* Phần đầu của hộp thoại Confirm (Hiển thị icon badge, tiêu đề và nút đóng X)
|
|
7786
|
-
*/
|
|
7787
|
-
declare function ConfirmHeader({ size, color, icon, title, iconClassName, titleClassName, showCloseButton, onClose, closeButtonClassName, className, children, ...props }: ConfirmHeaderProps): react_jsx_runtime.JSX.Element;
|
|
7788
|
-
|
|
7789
|
-
/**
|
|
7790
|
-
* Phần thân của hộp thoại Confirm (Hiển thị nội dung mô tả hoặc nội dung tùy biến)
|
|
7791
|
-
*/
|
|
7792
|
-
declare function ConfirmBody({ size, description, descriptionClassName, className, children, ...props }: ConfirmBodyProps): react_jsx_runtime.JSX.Element;
|
|
7793
|
-
|
|
7794
|
-
/**
|
|
7795
|
-
* Phần chân của hộp thoại Confirm (Chứa các nút hành động Xác nhận, Hủy, hoặc các nút tùy chỉnh)
|
|
7796
|
-
*/
|
|
7797
|
-
declare function ConfirmFooter({ size, confirmText, cancelText, confirmVariant, cancelVariant, confirmColor, cancelColor, onConfirm, onCancel, onClose, confirmButtonProps, cancelButtonProps, className, children, ...props }: ConfirmFooterProps): react_jsx_runtime.JSX.Element;
|
|
7798
|
-
|
|
7799
|
-
/**
|
|
7800
|
-
* Component wrapper kích hoạt đóng Confirm kèm hiệu ứng thoát (Exit Animation)
|
|
7801
|
-
* Tự động vô hiệu hóa (`disabled`) khi `isLoading = true`.
|
|
7802
|
-
*/
|
|
7803
|
-
declare function ConfirmClose({ children, asChild, onClick, ...props }: ConfirmCloseProps): react_jsx_runtime.JSX.Element;
|
|
7804
|
-
|
|
7805
|
-
/**
|
|
7806
|
-
* Giá trị được chia sẻ từ `<ConfirmContainer>` và `<Confirm>` xuống các sub-component con thông qua Context
|
|
7807
|
-
*/
|
|
7808
|
-
interface ConfirmContextValue {
|
|
9358
|
+
toolbarActions?: ReactNode;
|
|
7809
9359
|
/**
|
|
7810
|
-
*
|
|
9360
|
+
* Render các nút thao tác hàng loạt khi có dòng được chọn (ví dụ: Xóa, Đổi trạng thái, Xuất dữ liệu...)
|
|
7811
9361
|
*/
|
|
7812
|
-
|
|
9362
|
+
renderBulkActions?: (selectedRows: Row<DefaultTableFeatures, TData>[]) => ReactNode;
|
|
7813
9363
|
/**
|
|
7814
|
-
*
|
|
7815
|
-
*
|
|
9364
|
+
* Danh sách các tùy chọn số lượng dòng trên mỗi trang
|
|
9365
|
+
* @default [10, 20, 50, 100]
|
|
7816
9366
|
*/
|
|
7817
|
-
|
|
9367
|
+
pageSizeOptions?: number[];
|
|
7818
9368
|
/**
|
|
7819
|
-
*
|
|
9369
|
+
* Số lượng dòng hiển thị mặc định mỗi trang khi khởi tạo
|
|
9370
|
+
* @default 10
|
|
7820
9371
|
*/
|
|
7821
|
-
|
|
9372
|
+
initialPageSize?: number;
|
|
7822
9373
|
/**
|
|
7823
|
-
*
|
|
9374
|
+
* Bật chế độ phân trang thủ công từ server (dữ liệu đã được cắt sẵn theo trang từ API)
|
|
9375
|
+
* @default false
|
|
7824
9376
|
*/
|
|
7825
|
-
|
|
7826
|
-
}
|
|
7827
|
-
/**
|
|
7828
|
-
* Hook truy xuất context của Confirm từ bên trong `<ConfirmContainer>` hoặc `<Confirm>`
|
|
7829
|
-
*/
|
|
7830
|
-
declare const useConfirmContext: () => ConfirmContextValue | null;
|
|
7831
|
-
|
|
7832
|
-
declare function Modal({ size, radius, className, children, ref, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
7833
|
-
|
|
7834
|
-
declare function ModalContainer({ open, id, size, isLoading, closeOnOverlayClick, closeOnEsc, lockScroll, overlayClassName, className, children, onClose, ...props }: ModalContainerProps): react_jsx_runtime.JSX.Element | null;
|
|
7835
|
-
|
|
7836
|
-
declare function ModalHeader({ size, title, description, titleClassName, descriptionClassName, showCloseButton, onClose, closeButtonClassName, className, children, ...props }: ModalHeaderProps): react_jsx_runtime.JSX.Element;
|
|
7837
|
-
|
|
7838
|
-
declare function ModalBody({ size, className, children, ...props }: ModalBodyProps): react_jsx_runtime.JSX.Element;
|
|
7839
|
-
|
|
7840
|
-
declare function ModalFooter({ size, className, children, ...props }: ModalFooterProps): react_jsx_runtime.JSX.Element;
|
|
7841
|
-
|
|
7842
|
-
declare function ModalClose({ children, asChild, onClick, ...props }: ModalCloseProps): react_jsx_runtime.JSX.Element;
|
|
7843
|
-
|
|
7844
|
-
interface ModalContextValue {
|
|
7845
|
-
onClose: () => void;
|
|
7846
|
-
isLoading?: boolean;
|
|
7847
|
-
size?: ModalSize;
|
|
7848
|
-
}
|
|
7849
|
-
declare const useModalContext: () => ModalContextValue | null;
|
|
7850
|
-
|
|
7851
|
-
/**
|
|
7852
|
-
* Component `<FilePreview>`: Nhận file và headerTitle qua useFileContext(),
|
|
7853
|
-
* tự động xác định loại file và chọn component hiển thị tương ứng.
|
|
7854
|
-
*/
|
|
7855
|
-
declare function FilePreview({ onDownload, imageProps, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
|
|
7856
|
-
|
|
7857
|
-
/**
|
|
7858
|
-
* Component `<FileContainer>`: Hộp thoại bọc Modal Dialog quản lý Backdrop, Top Layer, ESC và Lock Scroll
|
|
7859
|
-
* Nhận prop `file` và truyền xuống `<FilePreview />` qua `FileContext`.
|
|
7860
|
-
*/
|
|
7861
|
-
declare function FileContainer({ open, onClose, file, title, description, size, radius, showCloseButton, closeOnOverlayClick, closeOnEsc, lockScroll, className, overlayClassName, children, }: FileContainerProps): react_jsx_runtime.JSX.Element;
|
|
7862
|
-
|
|
7863
|
-
interface FileContextValue {
|
|
7864
|
-
file?: PreviewFile;
|
|
7865
|
-
headerTitle?: ReactNode;
|
|
7866
|
-
}
|
|
7867
|
-
declare const useFileContext: () => FileContextValue | null;
|
|
7868
|
-
|
|
7869
|
-
declare const IMAGE_EXTENSIONS: string[];
|
|
7870
|
-
declare const PDF_EXTENSIONS: string[];
|
|
7871
|
-
declare const VIDEO_EXTENSIONS: string[];
|
|
7872
|
-
declare const AUDIO_EXTENSIONS: string[];
|
|
7873
|
-
declare const DOCUMENT_EXTENSIONS: string[];
|
|
7874
|
-
|
|
7875
|
-
declare function getFileName(filenameOrSrc?: string): string;
|
|
7876
|
-
declare function getFileExtension(filenameOrSrc?: string): string;
|
|
7877
|
-
declare function getFileType(filenameOrSrc?: string): FileType;
|
|
7878
|
-
declare function normalizePreviewFile(input?: PreviewFile): {
|
|
7879
|
-
file: File | undefined;
|
|
7880
|
-
serverFile: ServerFile | undefined;
|
|
7881
|
-
name: string;
|
|
7882
|
-
type: FileType;
|
|
7883
|
-
};
|
|
7884
|
-
declare function downloadFile(src: string, filename?: string): void;
|
|
7885
|
-
|
|
7886
|
-
declare function ImagePreview({ src, name, minZoom, maxZoom, showToolbar, toolbarProps, children, }: ImagePreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
7887
|
-
|
|
7888
|
-
declare function ImagePreviewToolbar({ zoom, onZoomIn, onZoomOut, onRotateCw, onRotateCcw, onFlipHorizontal, onReset, currentImage, tools, className, }: ImagePreviewToolbarProps): react_jsx_runtime.JSX.Element;
|
|
7889
|
-
|
|
7890
|
-
type SkeletonVariant = "pulse" | "wave" | "none";
|
|
7891
|
-
type SkeletonRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
7892
|
-
type SkeletonShape = "rectangle" | "circle";
|
|
7893
|
-
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
9377
|
+
manualPagination?: boolean;
|
|
7894
9378
|
/**
|
|
7895
|
-
*
|
|
7896
|
-
*
|
|
7897
|
-
* - 'wave': shimmer chạy từ góc trên-trái xuống góc dưới-phải
|
|
7898
|
-
* - 'none': không animation (static placeholder)
|
|
7899
|
-
* @default 'pulse'
|
|
9379
|
+
* Bật chế độ sắp xếp thủ công từ server (truyền tham số sort lên API)
|
|
9380
|
+
* @default false
|
|
7900
9381
|
*/
|
|
7901
|
-
|
|
9382
|
+
manualSorting?: boolean;
|
|
7902
9383
|
/**
|
|
7903
|
-
*
|
|
7904
|
-
*
|
|
7905
|
-
* - 'circle': hình tròn hoàn toàn, `width` === `height`, bỏ qua `radius`
|
|
7906
|
-
* @default 'rectangle'
|
|
9384
|
+
* Bật chế độ tìm kiếm/lọc thủ công từ server (truyền từ khóa filter lên API)
|
|
9385
|
+
* @default false
|
|
7907
9386
|
*/
|
|
7908
|
-
|
|
9387
|
+
manualFiltering?: boolean;
|
|
7909
9388
|
/**
|
|
7910
|
-
*
|
|
7911
|
-
* @default 'md'
|
|
9389
|
+
* Tổng số trang trả về từ máy chủ (bắt buộc khi dùng `manualPagination={true}`)
|
|
7912
9390
|
*/
|
|
7913
|
-
|
|
9391
|
+
pageCount?: number;
|
|
7914
9392
|
/**
|
|
7915
|
-
*
|
|
7916
|
-
* @example "100%", "200px", 200
|
|
9393
|
+
* Tổng số lượng bản ghi thực tế từ máy chủ
|
|
7917
9394
|
*/
|
|
7918
|
-
|
|
9395
|
+
rowCount?: number;
|
|
7919
9396
|
/**
|
|
7920
|
-
*
|
|
7921
|
-
* @example "1rem", "40px", 40
|
|
7922
|
-
* @default "1rem"
|
|
9397
|
+
* Trạng thái phân trang điều khiển ngoài: `{ pageIndex, pageSize }`
|
|
7923
9398
|
*/
|
|
7924
|
-
|
|
9399
|
+
pagination?: PaginationState;
|
|
7925
9400
|
/**
|
|
7926
|
-
*
|
|
7927
|
-
* Khi > 1, dòng cuối cùng sẽ tự động thu hẹp còn 60% width để mô phỏng đoạn văn tự nhiên.
|
|
7928
|
-
* @default 1
|
|
9401
|
+
* Callback khi trạng thái phân trang thay đổi
|
|
7929
9402
|
*/
|
|
7930
|
-
|
|
9403
|
+
onPaginationChange?: ((pagination: PaginationState) => void) | OnChangeFn<PaginationState>;
|
|
7931
9404
|
/**
|
|
7932
|
-
*
|
|
7933
|
-
* @default "0.5rem"
|
|
9405
|
+
* Trạng thái sắp xếp điều khiển ngoài: `Array<{ id, desc }>`
|
|
7934
9406
|
*/
|
|
7935
|
-
|
|
7936
|
-
}
|
|
7937
|
-
interface LoadingImageProps extends Omit<ImageProps, "onLoad" | "onError"> {
|
|
9407
|
+
sorting?: SortingState;
|
|
7938
9408
|
/**
|
|
7939
|
-
*
|
|
7940
|
-
* @default 'pulse'
|
|
9409
|
+
* Callback khi trạng thái sắp xếp thay đổi
|
|
7941
9410
|
*/
|
|
7942
|
-
|
|
9411
|
+
onSortingChange?: ((sorting: SortingState) => void) | OnChangeFn<SortingState>;
|
|
7943
9412
|
/**
|
|
7944
|
-
*
|
|
7945
|
-
* @default 'md'
|
|
9413
|
+
* Trạng thái dòng được chọn điều khiển ngoài: `Record<rowId, boolean>`
|
|
7946
9414
|
*/
|
|
7947
|
-
|
|
9415
|
+
rowSelection?: RowSelectionState;
|
|
7948
9416
|
/**
|
|
7949
|
-
*
|
|
9417
|
+
* Callback khi danh sách dòng được chọn thay đổi
|
|
7950
9418
|
*/
|
|
7951
|
-
|
|
9419
|
+
onRowSelectionChange?: ((selection: RowSelectionState) => void) | OnChangeFn<RowSelectionState>;
|
|
7952
9420
|
/**
|
|
7953
|
-
*
|
|
9421
|
+
* Trạng thái hiển thị cột điều khiển ngoài: `Record<columnId, boolean>`
|
|
7954
9422
|
*/
|
|
7955
|
-
|
|
9423
|
+
columnVisibility?: ColumnVisibilityState;
|
|
7956
9424
|
/**
|
|
7957
|
-
* Callback
|
|
9425
|
+
* Callback khi trạng thái hiển thị cột thay đổi
|
|
7958
9426
|
*/
|
|
7959
|
-
|
|
9427
|
+
onColumnVisibilityChange?: ((visibility: ColumnVisibilityState) => void) | OnChangeFn<ColumnVisibilityState>;
|
|
7960
9428
|
/**
|
|
7961
|
-
*
|
|
9429
|
+
* Trạng thái thứ tự các cột điều khiển ngoài (mảng danh sách ID cột)
|
|
7962
9430
|
*/
|
|
7963
|
-
|
|
7964
|
-
|
|
9431
|
+
columnOrder?: string[];
|
|
9432
|
+
/**
|
|
9433
|
+
* Callback khi thứ tự cột thay đổi
|
|
9434
|
+
*/
|
|
9435
|
+
onColumnOrderChange?: ((order: string[]) => void) | OnChangeFn<string[]>;
|
|
9436
|
+
/**
|
|
9437
|
+
* Từ khóa tìm kiếm toàn bảng điều khiển ngoài
|
|
9438
|
+
*/
|
|
9439
|
+
globalFilter?: string;
|
|
9440
|
+
/**
|
|
9441
|
+
* Callback khi từ khóa tìm kiếm toàn bảng thay đổi
|
|
9442
|
+
*/
|
|
9443
|
+
onGlobalFilterChange?: (filter: string) => void;
|
|
9444
|
+
/**
|
|
9445
|
+
* Hàm hoặc tên bộ lọc toàn bảng tùy biến (FilterFn hoặc 'fuzzy').
|
|
9446
|
+
* Mặc định DataTable sử dụng `fuzzyFilter` (Fuzzy Search từ @tanstack/match-sorter-utils).
|
|
9447
|
+
*/
|
|
9448
|
+
globalFilterFn?: FilterFnOption<DefaultTableFeatures, TData>;
|
|
9449
|
+
/**
|
|
9450
|
+
* Danh sách cấu hình các bộ lọc menu hiển thị dạng SelectMenuFilter trên thanh công cụ
|
|
9451
|
+
*/
|
|
9452
|
+
filters?: TableFilterDef[];
|
|
9453
|
+
/**
|
|
9454
|
+
* Trạng thái bộ lọc cột điều khiển ngoài (ColumnFiltersState của TanStack Table)
|
|
9455
|
+
*/
|
|
9456
|
+
columnFilters?: ColumnFiltersState;
|
|
9457
|
+
/**
|
|
9458
|
+
* Callback khi trạng thái bộ lọc cột thay đổi (trả về mảng ColumnFiltersState của TanStack Table)
|
|
9459
|
+
*/
|
|
9460
|
+
onColumnFiltersChange?: ((filters: ColumnFiltersState) => void) | OnChangeFn<ColumnFiltersState>;
|
|
9461
|
+
/**
|
|
9462
|
+
* Callback được kích hoạt khi người dùng click vào một dòng trong bảng
|
|
9463
|
+
*/
|
|
9464
|
+
onRowClick?: (row: Row<DefaultTableFeatures, TData>) => void;
|
|
9465
|
+
/**
|
|
9466
|
+
* Class tùy biến cho phần tử bọc ngoài toàn bộ component (gồm toolbar + table + pagination)
|
|
9467
|
+
*/
|
|
9468
|
+
className?: string;
|
|
9469
|
+
/**
|
|
9470
|
+
* Class tùy biến cho khung container bao quanh trực tiếp thẻ table
|
|
9471
|
+
*/
|
|
9472
|
+
containerClassName?: string;
|
|
9473
|
+
}
|
|
9474
|
+
|
|
9475
|
+
declare const tableVariantConfig: Record<TableVariant, {
|
|
9476
|
+
container: string;
|
|
9477
|
+
table: string;
|
|
9478
|
+
head: string;
|
|
9479
|
+
row: string;
|
|
9480
|
+
cell: string;
|
|
9481
|
+
}>;
|
|
9482
|
+
declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
9483
|
+
declare const DEFAULT_PAGE_SIZE = 10;
|
|
9484
|
+
|
|
9485
|
+
interface TableContextValue {
|
|
9486
|
+
size: TableSize;
|
|
9487
|
+
variantStyles: (typeof tableVariantConfig)[TableVariant];
|
|
9488
|
+
}
|
|
9489
|
+
declare const useTableStyles: () => TableContextValue;
|
|
9490
|
+
declare function Table({ variant, size, className, containerClassName, wrapperProps, children, ref, ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
9491
|
+
declare function TableHeader({ className, children, ref, ...props }: TableHeaderProps): react_jsx_runtime.JSX.Element;
|
|
9492
|
+
declare function TableBody({ className, children, ref, ...props }: TableBodyProps): react_jsx_runtime.JSX.Element;
|
|
9493
|
+
declare function TableFooter({ className, children, ref, ...props }: TableFooterProps): react_jsx_runtime.JSX.Element;
|
|
9494
|
+
declare function TableRow({ isSelected, isHoverable, className, children, ref, ...props }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
9495
|
+
declare function TableHead({ align, className, children, ref, ...props }: TableHeadProps & {
|
|
9496
|
+
ref?: Ref<HTMLTableCellElement>;
|
|
9497
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9498
|
+
declare function TableCell({ align, className, children, ref, ...props }: TableCellProps): react_jsx_runtime.JSX.Element;
|
|
9499
|
+
declare function TableCaption({ className, children, ref, ...props }: TableCaptionProps): react_jsx_runtime.JSX.Element;
|
|
9500
|
+
|
|
9501
|
+
declare function TableColumnHeader<TData extends RowData = RowData, TValue = unknown>({ column, title, className, ...props }: TableColumnHeaderProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
9502
|
+
|
|
9503
|
+
declare function TablePagination<TData extends RowData = RowData>({ table, pageSizeOptions, showPageSizeSelector, className, }: TablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
|
|
7965
9504
|
|
|
7966
|
-
declare function
|
|
9505
|
+
declare function TableToolbar<TData extends RowData = RowData>({ table, searchPlaceholder, enableGlobalFilter, enableColumnVisibility, isRefresh, onRefresh, actions, selectedActions, filters, filterValues, onFilterChange, onFilterReset, className, }: TableToolbarProps<TData>): react_jsx_runtime.JSX.Element;
|
|
7967
9506
|
|
|
7968
|
-
declare function
|
|
9507
|
+
declare function DataTable<TData extends RowData = RowData>({ columns, data, variant, size, isLoading, isRefresh, onRefresh, loadingRowsCount, emptyText, emptyIllustration, enableSorting, enableFiltering, enablePagination, enableRowSelection, enableColumnVisibility, enableColumnOrdering, filters, searchPlaceholder, toolbarActions, renderBulkActions, pageSizeOptions, initialPageSize, manualPagination, manualSorting, manualFiltering, pageCount, rowCount, pagination: controlledPagination, onPaginationChange, sorting: controlledSorting, onSortingChange, rowSelection: controlledRowSelection, onRowSelectionChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, columnOrder: controlledColumnOrder, onColumnOrderChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, globalFilterFn: controlledGlobalFilterFn, columnFilters: controlledColumnFilters, onColumnFiltersChange, onRowClick, className, containerClassName, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
7969
9508
|
|
|
7970
|
-
export { AUDIO_EXTENSIONS, Alert, AlertCircleIcon, type AlertColor, type AlertProps, type AlertRadius, type AlertSize, AlertTriangleIcon, type AlertVariant, Badge, type BadgeColor, type BadgeProps, type BadgeRadius, type BadgeSize, type BadgeVariant, type BaseSelectProps, Button, type ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Calendar, type CalendarDay, CalendarHeader, type CalendarHeaderProps, CalendarIcon, type CalendarProps, type CalendarView, Carousel, type CarouselArrowPosition, CarouselContent, type CarouselContentProps, type CarouselContextValue, type CarouselNavigationProps, type CarouselNavigationVariant, CarouselNext, CarouselPagination, type CarouselPaginationProps, type CarouselPaginationType, CarouselPrevious, type CarouselProps, type CarouselRadius, type CarouselSize, CarouselSlide, type CarouselSlideProps, CheckCircleIcon, CheckIcon, Checkbox, type CheckboxColor, CheckboxGroup, CheckboxGroupContext, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxProps, type CheckboxRadius, type CheckboxSize, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ClockIcon, CloseIcon, Collapse, type CollapseActiveKey, type CollapseColor, CollapseContent, type CollapseContentProps, type CollapseContextValue$1 as CollapseContextValue, type CollapseExpandIconPosition, CollapseHeader, type CollapseHeaderProps, CollapsePanel, type CollapsePanelContextValue$1 as CollapsePanelContextValue, type CollapsePanelProps, type CollapseProps, type CollapseRadius, type CollapseSize, type CollapseVariant, Collapsible, type CollapsibleProps, Confirm, ConfirmBody, type ConfirmBodyProps, ConfirmClose, type ConfirmCloseProps, type ConfirmColor, ConfirmContainer, type ConfirmContainerProps, ConfirmFooter, type ConfirmFooterProps, ConfirmHeader, type ConfirmHeaderProps, type ConfirmProps, type ConfirmRadius, type ConfirmSize, CropIcon, DEFAULT_TOAST_DURATION, DOCUMENT_EXTENSIONS, DatePicker, type DatePickerColor, type DatePickerConfig, type DatePickerProps, type DatePickerRadius, type DatePickerSize, type DatePickerVariant, type DateRange, DateRangeCalendar, type DateRangeCalendarDay, type DateRangeCalendarProps, DateRangeDayGrid, type DateRangeDayGridProps, DateRangeHeader, type DateRangeHeaderProps, DateRangeMonthGrid, type DateRangeMonthGridProps, DateRangePicker, type DateRangePickerColor, type DateRangePickerConfig, type DateRangePickerProps, type DateRangePickerRadius, type DateRangePickerSize, type DateRangePickerVariant, type DateRangeValue, DateRangeYearGrid, type DateRangeYearGridProps, DateTimePicker, type DateTimePickerColor, type DateTimePickerConfig, type DateTimePickerLayout, type DateTimePickerProps, type DateTimePickerRadius, type DateTimePickerSize, type DateTimePickerVariant, type DateTimeRange, DateTimeRangePicker, type DateTimeRangePickerColor, type DateTimeRangePickerConfig, type DateTimeRangePickerLayout, type DateTimeRangePickerProps, type DateTimeRangePickerRadius, type DateTimeRangePickerSize, type DateTimeRangePickerVariant, type DateTimeRangeValue, type DateTimeValue, type DateValue, DayGrid, type DayGridProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadIcon, Dropdown, type DropdownColor, type DropdownContextValue, DropdownGroup, type DropdownGroupProps, DropdownHeader, type DropdownHeaderProps, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, type DropdownPlacement, type DropdownProps, type DropdownRadius, DropdownSeparator, type DropdownSeparatorProps, type DropdownSize, DropdownTrigger, type DropdownTriggerProps, type DropdownTriggerType, Empty, EmptyDefaultIcon, EmptyErrorIcon, EmptyFolderIcon, EmptyIllustration, type EmptyLayout, type EmptyPresetImage, type EmptyProps, EmptySearchIcon, EmptySimpleIcon, type EmptySize, EyeIcon, FileContainer, type FileContainerProps, FilePreview, type FilePreviewProps, type FileType, FlipHorizontalIcon, IMAGE_EXTENSIONS, IconButton, type IconButtonProps, ImageIcon, type ImageItem, ImagePreview, type ImagePreviewProps, ImagePreviewToolbar, type ImagePreviewToolbarProps, InfoCircleIcon, Input, type InputColor, type InputConfig, type InputProps, type InputRadius, type InputSize, type InputVariant, type LabelPlacement, LoadingImage, type LoadingImageProps, type LocaleConfig, MinusIcon, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContainer, type ModalContainerProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalRadius, type ModalSize, MonthGrid, type MonthGridProps, MultiInput, type MultiInputConfig, type MultiInputProps, type MultiSelectProps, NumberInput, type NumberInputProps, OtpInput, type OtpInputConfig, type OtpInputProps, type OtpInputRef, type OtpInputType, PDF_EXTENSIONS, PasswordInput, type PasswordInputProps, PlusIcon, Popover, PopoverBody, type PopoverBodyProps, PopoverClose, type PopoverCloseProps, type PopoverColor, PopoverContent, type PopoverContentProps, type PopoverContextValue, PopoverFooter, type PopoverFooterProps, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type PopoverRadius, type PopoverSize, PopoverTrigger, type PopoverTriggerProps, type PopoverTriggerType, type PreviewFile, Radio, type RadioColor, RadioDotIcon, RadioGroup, RadioGroupContext, type RadioGroupOrientation, type RadioGroupProps, type RadioLabelPlacement, type RadioProps, type RadioSize, type RadioVariant, ResetIcon, RotateCcwIcon, RotateCwIcon, SearchIcon, Select, type SelectColor, Select as SelectComponent, type SelectFilterField, type SelectFilterLayout, type SelectFilterType, SelectMenu, SelectMenuFilter, SelectOption, type SelectOptionItem, type SelectProps, type SelectRadius, type SelectSearchMode, type SelectSearchPlacement, type SelectSize, SelectTrigger, type SelectVariant, type ServerFile, type SingleSelectProps, Skeleton, type SkeletonProps, type SkeletonRadius, type SkeletonShape, type SkeletonVariant, Slider, type SliderColor, type SliderConfig, type SliderLabelPlacement, type SliderMark, SliderMarks, type SliderOrientation, type SliderProps, type SliderRadius, type SliderSize, SliderStepDots, SliderThumb, type SliderTooltipMode, type SliderTooltipPlacement, type SliderValue, type SliderVariant, Spinner, Tab, type TabColor, TabList, type TabListProps, type TabOrientation, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabPlacement, type TabProps, type TabRadius, type TabSize, type TabVariant, Tabs, TabsContext, type TabsProps, type TagRenderProps, TextArea, type TextAreaColor, type TextAreaConfig, type TextAreaLabelPlacement, type TextAreaProps, type TextAreaRadius, type TextAreaResize, type TextAreaSize, type TextAreaVariant, TimeColumn, type TimeColumnItem, type TimeColumnProps, type TimeObject, type TimePeriod, TimePicker, type TimePickerColor, type TimePickerConfig, type TimePickerProps, type TimePickerRadius, type TimePickerSize, type TimePickerVariant, type TimeRange, TimeRangePicker, type TimeRangePickerColor, type TimeRangePickerConfig, type TimeRangePickerProps, type TimeRangePickerRadius, type TimeRangePickerSize, type TimeRangePickerVariant, type TimeRangeValue, type TimeValue, TimeView, type TimeViewProps, type ToastMessageObject, type ToastMessageResult, type ToastOptions, type ToastPosition, type ToastPromiseFunction, type ToastPromiseOptions, Toaster, type ToasterProps, Toggle, type ToggleColor, type ToggleConfig, type ToggleLabelPlacement, type ToggleProps, type ToggleRadius, type ToggleSize, type ToggleVariant, type ToolbarToolsConfig, Tooltip, type TooltipColor, type TooltipPlacement, type TooltipProps, type TooltipRadius, type TooltipSize, type TooltipVariant, TrashIcon, UploadAvatar, type UploadAvatarColor, UploadAvatarCropContent, UploadAvatarCropModal, type UploadAvatarCropOptions, type UploadAvatarLabelPlacement, type UploadAvatarProps, type UploadAvatarRadius, type UploadAvatarShape, type UploadAvatarSize, type UploadAvatarVariant, type UploadFileItem, UploadIcon, UploadImage, type UploadImageColor, UploadImageDropzone, UploadImageList, type UploadImageProps, type UploadImageRadius, type UploadImageShape, type UploadImageSize, type UploadImageVariant, type UploadImageViewMode, VIDEO_EXTENSIONS, YearGrid, type YearGridProps, ZoomInIcon, ZoomOutIcon, checkIsDisabled, clamp, combineDateTime, createDateWithTime, createFileItem, downloadFile, formatBytes, formatDate, formatDateTime, formatNumberString, formatTime, generateCalendarGrid, generateRangeCalendarGrid, getDefaultDateTimeFormat, getDefaultFormat, getFileExtension, getFileName, getFileType, getISOWeekNumber, getPercentage, isDateAfter, isDateBefore, isSameDay, isSameMonth, isSameTime, isTimeAfter, isTimeBefore, isTimeInRange, isValidOtpChar, normalizePreviewFile, padZero, parseDate, parseDateTime, parseNumber, parseRawNumberString, parseTimeToDate, resolveLocale, revokeFileItem, sanitizeOtpString, splitTagsFromText, toDate, toDateTime, toTimeObject, toast, useCarousel, useCarouselContext, useCheckboxGroupContext, useCollapseContext, useCollapsePanelContext, useConfirmContext, useDebounce, useDebouncedCallback, useDropdownContext, useFileContext, useModalContext, usePopoverContext, useRadioGroupContext, useTabsContext, validateFile };
|
|
9509
|
+
export { AUDIO_EXTENSIONS, Alert, AlertCircleIcon, type AlertColor, type AlertProps, type AlertRadius, type AlertSize, AlertTriangleIcon, type AlertVariant, ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon, AvatarIcon, type AvatarIconProps, Badge, type BadgeColor, type BadgeProps, type BadgeRadius, type BadgeSize, type BadgeVariant, Button, type ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Calendar, type CalendarDay, CalendarHeader, type CalendarHeaderProps, CalendarIcon, type CalendarProps, type CalendarView, Carousel, type CarouselArrowPosition, CarouselContent, type CarouselContentProps, type CarouselContextValue, type CarouselNavigationProps, type CarouselNavigationVariant, CarouselNext, CarouselPagination, type CarouselPaginationProps, type CarouselPaginationType, CarouselPrevious, type CarouselProps, type CarouselRadius, type CarouselSize, CarouselSlide, type CarouselSlideProps, CheckCircleIcon, CheckIcon, Checkbox, type CheckboxColor, type CheckboxConfig, CheckboxGroup, type CheckboxGroupConfig, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxOptionItem, type CheckboxProps, type CheckboxRadius, type CheckboxSearchMode, type CheckboxSize, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ClockIcon, CloseIcon, Collapse, type CollapseActiveKey, type CollapseColor, CollapseContent, type CollapseContentProps, type CollapseContextValue$1 as CollapseContextValue, type CollapseExpandIconPosition, CollapseHeader, type CollapseHeaderProps, CollapsePanel, type CollapsePanelContextValue$1 as CollapsePanelContextValue, type CollapsePanelProps, type CollapseProps, type CollapseRadius, type CollapseSize, type CollapseVariant, Collapsible, type CollapsibleProps, type ColumnOrderState, Confirm, ConfirmBody, type ConfirmBodyProps, ConfirmClose, type ConfirmCloseProps, type ConfirmColor, ConfirmContainer, type ConfirmContainerProps, ConfirmFooter, type ConfirmFooterProps, ConfirmHeader, type ConfirmHeaderProps, type ConfirmProps, type ConfirmRadius, type ConfirmSize, CropIcon, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_TOAST_DURATION, DOCUMENT_EXTENSIONS, DataTable, type DataTableProps, DatePicker, type DatePickerColor, type DatePickerConfig, type DatePickerProps, type DatePickerRadius, type DatePickerSize, type DatePickerVariant, type DateRange, DateRangeCalendar, type DateRangeCalendarDay, type DateRangeCalendarProps, DateRangeDayGrid, type DateRangeDayGridProps, DateRangeHeader, type DateRangeHeaderProps, DateRangeMonthGrid, type DateRangeMonthGridProps, DateRangePicker, type DateRangePickerColor, type DateRangePickerConfig, type DateRangePickerProps, type DateRangePickerRadius, type DateRangePickerSize, type DateRangePickerVariant, type DateRangeValue, DateRangeYearGrid, type DateRangeYearGridProps, DateTimePicker, type DateTimePickerColor, type DateTimePickerConfig, type DateTimePickerLayout, type DateTimePickerProps, type DateTimePickerRadius, type DateTimePickerSize, type DateTimePickerVariant, type DateTimeRange, DateTimeRangePicker, type DateTimeRangePickerColor, type DateTimeRangePickerConfig, type DateTimeRangePickerLayout, type DateTimeRangePickerProps, type DateTimeRangePickerRadius, type DateTimeRangePickerSize, type DateTimeRangePickerVariant, type DateTimeRangeValue, type DateTimeValue, type DateValue, DayGrid, type DayGridProps, type DefaultTableFeatures, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadIcon, type DraggableTableHeadProps, Dropdown, type DropdownColor, type DropdownContextValue, DropdownGroup, type DropdownGroupProps, DropdownHeader, type DropdownHeaderProps, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, type DropdownPlacement, type DropdownProps, type DropdownRadius, DropdownSeparator, type DropdownSeparatorProps, type DropdownSize, DropdownTrigger, type DropdownTriggerProps, type DropdownTriggerType, Empty, EmptyDefaultIcon, EmptyErrorIcon, EmptyFolderIcon, EmptyIllustration, EmptyPresetImage, EmptyProps, EmptySearchIcon, EmptySimpleIcon, EyeIcon, type FileCategory, FileContainer, type FileContainerProps, FileIcon, type FileIconProps, FilePreview, type FilePreviewProps, type FileType, FlipHorizontalIcon, IMAGE_EXTENSIONS, IconButton, type IconButtonProps, ImageIcon, type ImageItem, ImagePreview, type ImagePreviewProps, ImagePreviewToolbar, type ImagePreviewToolbarProps, InfoCircleIcon, Input, type InputColor, type InputConfig, type InputProps, type InputRadius, type InputSize, type InputVariant, type LabelPlacement, LoadingImage, type LoadingImageProps, type LocaleConfig, MinusIcon, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContainer, type ModalContainerProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalRadius, type ModalSize, MonthGrid, type MonthGridProps, MultiInput, type MultiInputConfig, type MultiInputProps, MultiSelect, MultiSelectProps, MultiSelectTrigger, NumberInput, type NumberInputProps, OtpInput, type OtpInputConfig, type OtpInputProps, type OtpInputRef, type OtpInputType, PDF_EXTENSIONS, PasswordInput, type PasswordInputProps, PlusIcon, Popover, PopoverBody, type PopoverBodyProps, PopoverClose, type PopoverCloseProps, type PopoverColor, PopoverContent, type PopoverContentProps, type PopoverContextValue, PopoverFooter, type PopoverFooterProps, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type PopoverRadius, type PopoverSize, PopoverTrigger, type PopoverTriggerProps, type PopoverTriggerType, type PreviewFile, Radio, type RadioColor, type RadioConfig, RadioDotIcon, RadioGroup, type RadioGroupConfig, type RadioGroupOrientation, type RadioGroupProps, type RadioLabelPlacement, type RadioOptionItem, type RadioProps, type RadioSearchMode, type RadioSize, type RadioVariant, ResetIcon, RotateCcwIcon, RotateCwIcon, SearchIcon, Select, SelectColor, Select as SelectComponent, SelectFilterField, SelectFilterLayout, SelectMenu, SelectMenuFilter, SelectOption, SelectOptionItem, SelectProps, SelectRadius, SelectSearchPlacement, SelectSize, SingleSelectTrigger as SelectTrigger, SelectVariant, type ServerFile, SingleSelectTrigger, Skeleton, type SkeletonObjectFit, type SkeletonProps, type SkeletonRadius, type SkeletonShape, type SkeletonVariant, Slider, type SliderColor, type SliderConfig, type SliderLabelPlacement, type SliderMark, SliderMarks, type SliderOrientation, type SliderProps, type SliderRadius, type SliderSize, SliderStepDots, SliderThumb, type SliderTooltipMode, type SliderTooltipPlacement, type SliderValue, type SliderVariant, SlidersHorizontalIcon, Spinner, Tab, type TabColor, TabList, type TabListProps, type TabOrientation, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabPlacement, type TabProps, type TabRadius, type TabSize, type TabVariant, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableColumnHeader, type TableColumnHeaderProps, type TableFilterDef, type TableFilterOption, type TableFilterType, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, type TableSize, TableToolbar, type TableToolbarProps, type TableVariant, Tabs, type TabsProps, type TagRenderProps, TextArea, type TextAreaColor, type TextAreaConfig, type TextAreaLabelPlacement, type TextAreaProps, type TextAreaRadius, type TextAreaResize, type TextAreaSize, type TextAreaVariant, TimeColumn, type TimeColumnItem, type TimeColumnProps, type TimeObject, type TimePeriod, TimePicker, type TimePickerColor, type TimePickerConfig, type TimePickerProps, type TimePickerRadius, type TimePickerSize, type TimePickerVariant, type TimeRange, TimeRangePicker, type TimeRangePickerColor, type TimeRangePickerConfig, type TimeRangePickerProps, type TimeRangePickerRadius, type TimeRangePickerSize, type TimeRangePickerVariant, type TimeRangeValue, type TimeValue, TimeView, type TimeViewProps, type ToastMessageObject, type ToastMessageResult, type ToastOptions, type ToastPosition, type ToastPromiseFunction, type ToastPromiseOptions, Toaster, type ToasterProps, Toggle, type ToggleColor, type ToggleConfig, type ToggleLabelPlacement, type ToggleProps, type ToggleRadius, type ToggleSize, type ToggleVariant, type ToolbarToolsConfig, Tooltip, type TooltipColor, type TooltipPlacement, type TooltipProps, type TooltipRadius, type TooltipSize, type TooltipVariant, TrashIcon, UploadAvatar, type UploadAvatarColor, type UploadAvatarConfig, UploadAvatarCropContent, UploadAvatarCropModal, type UploadAvatarCropOptions, type UploadAvatarLabelPlacement, type UploadAvatarProps, type UploadAvatarRadius, type UploadAvatarShape, type UploadAvatarSize, type UploadAvatarVariant, UploadFile, type UploadFileColor, type UploadFileConfig, type UploadFileDragStatus, UploadFileDropzone, type UploadFileDropzoneProps, UploadFileItemRow, type UploadFileItemRowProps, UploadFileList, type UploadFileListProps, type UploadFileListType, type UploadFileProps, type UploadFileRadius, type UploadFileShape, type UploadFileSize, type UploadFileVariant, type UploadFileViewMode, UploadIcon, UploadImage, type UploadImageColor, type UploadImageDragStatus, UploadImageDropzone, type UploadImageDropzoneProps, UploadImageList, type UploadImageListProps, type UploadImageObjectFit, type UploadImageProps, type UploadImageRadius, type UploadImageShape, type UploadImageSize, type UploadImageVariant, type UploadImageViewMode, type UseDataTableOptions, type UseFloatingTransitionOptions, VIDEO_EXTENSIONS, YearGrid, type YearGridProps, ZoomInIcon, ZoomOutIcon, checkIsDisabled, clamp, combineDateTime, createDateWithTime, createTableColumnHelper, defaultTableFeatures, downloadFile, formatBytes, formatDate, formatDateTime, formatNumberString, formatTime, fuzzyFilter, generateCalendarGrid, generateRangeCalendarGrid, getDefaultDateTimeFormat, getDefaultFormat, getFileCategory, getFileExtension, getFileName, getFileType, getISOWeekNumber, getPercentage, getSafeConfig, isDateAfter, isDateBefore, isSameDay, isSameMonth, isSameTime, isTimeAfter, isTimeBefore, isTimeInRange, isValidOtpChar, normalizePreviewFile, padZero, parseDate, parseDateTime, parseNumber, parseRawNumberString, parseTimeToDate, rankAndFilterItems, resolveLocale, sanitizeOtpString, splitTagsFromText, toDate, toDateTime, toTimeObject, toast, useAnimatedError, useCarousel, useCarouselContext, useCollapseContext, useCollapsePanelContext, useConfirmContext, useDataTable, useDebounce, useDebouncedCallback, useDropdownContext, useFileContext, useFloatingTransition, useModalContext, usePopoverContext, useTableStyles, useTabsContext };
|