@lucasvu/scope-ui 0.1.4 → 0.1.6
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/AI_SETUP.md +1 -1
- package/RULES.md +52 -0
- package/bin/copy-theme-assets.mjs +1 -1
- package/dist/{chunk-CL3F2TWE.js → chunk-QBAHQOOH.js} +1 -7
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +5716 -5721
- package/dist/index.d.cts +990 -1316
- package/dist/index.d.ts +990 -1316
- package/dist/index.js +5792 -5793
- package/dist/styles.css +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,95 +1,56 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ReactNode, CSSProperties, SVGProps, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, RefObject, ElementType } from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode, CSSProperties, SVGProps, HTMLAttributes, ElementType, ButtonHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, RefObject } from 'react';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
6
|
export { ColorMode, ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, UiAiComponentDescriptor, UiAiComponentProp, UiScreenBriefField, UiScreenKind, UiThemeLayerAsset, UiThemePreset, UiThemeToken, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets } from './core/index.js';
|
|
7
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
8
8
|
|
|
9
9
|
type ComponentSize = 'sm' | 'md' | 'lg';
|
|
10
10
|
interface SharedComponentProps {
|
|
11
11
|
/**
|
|
12
|
-
* Nhãn hiển thị phía trên component hoặc control.
|
|
13
12
|
* Visible label rendered above the component or control.
|
|
14
|
-
* 显示在组件或控件上方的标签。
|
|
15
13
|
*/
|
|
16
14
|
label?: ReactNode;
|
|
17
15
|
/**
|
|
18
|
-
* Nội dung hỗ trợ nằm dưới control khi không có lỗi.
|
|
19
16
|
* Helper content shown below the control when there is no error.
|
|
20
|
-
* 没有错误时显示在控件下方的辅助说明。
|
|
21
17
|
*/
|
|
22
18
|
helperText?: ReactNode;
|
|
23
19
|
/**
|
|
24
|
-
* Nội dung lỗi hiển thị ưu tiên dưới control.
|
|
25
20
|
* Error content displayed below the control with higher priority.
|
|
26
|
-
* 优先显示在控件下方的错误信息。
|
|
27
21
|
*/
|
|
28
22
|
errorMessage?: ReactNode;
|
|
29
23
|
/**
|
|
30
|
-
* Trạng thái đang xử lý dữ liệu hoặc gọi API.
|
|
31
24
|
* Loading state while the component is processing or waiting for data.
|
|
32
|
-
* 组件处理中或等待数据时的加载状态。
|
|
33
25
|
*/
|
|
34
26
|
loading?: boolean;
|
|
35
27
|
/**
|
|
36
|
-
* Trạng thái vô hiệu hóa tương tác.
|
|
37
28
|
* Disables user interaction with the component.
|
|
38
|
-
* 禁用组件交互。
|
|
39
29
|
*/
|
|
40
30
|
disabled?: boolean;
|
|
41
31
|
/**
|
|
42
|
-
* Kích thước hiển thị chung của component.
|
|
43
32
|
* Shared visual size of the component.
|
|
44
|
-
* 组件的通用显示尺寸。
|
|
45
33
|
*/
|
|
46
34
|
size?: ComponentSize;
|
|
47
35
|
/**
|
|
48
|
-
* Class bổ sung để mở rộng style từ bên ngoài.
|
|
49
36
|
* Extra class names for extending styles from the outside.
|
|
50
|
-
* 用于从外部扩展样式的额外 class。
|
|
51
37
|
*/
|
|
52
38
|
className?: string;
|
|
53
39
|
/**
|
|
54
|
-
* Inline style áp trực tiếp vào wrapper gốc của component.
|
|
55
40
|
* Inline styles applied directly to the component root wrapper.
|
|
56
|
-
* 直接作用于组件根容器的内联样式。
|
|
57
41
|
*/
|
|
58
42
|
style?: CSSProperties;
|
|
59
43
|
}
|
|
60
44
|
declare const spinnerSizes: Record<'xs' | 'sm' | 'md' | 'lg', string>;
|
|
61
45
|
interface LoadingSpinnerProps extends SVGProps<SVGSVGElement> {
|
|
62
46
|
/**
|
|
63
|
-
* Kích thước của icon loading.
|
|
64
47
|
* Visual size of the loading spinner icon.
|
|
65
|
-
* 加载图标的显示尺寸。
|
|
66
48
|
*/
|
|
67
49
|
size?: keyof typeof spinnerSizes;
|
|
68
50
|
}
|
|
69
51
|
|
|
70
|
-
declare const alertVariants: (props?: ({
|
|
71
|
-
variant?: "default" | "info" | "success" | "warning" | "destructive" | null | undefined;
|
|
72
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
73
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
74
|
-
type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;
|
|
75
|
-
type AlertTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
76
|
-
interface AlertProps extends SharedComponentProps {
|
|
77
|
-
description?: ReactNode;
|
|
78
|
-
icon?: ReactNode;
|
|
79
|
-
tone?: AlertTone;
|
|
80
|
-
variant?: AlertVariant;
|
|
81
|
-
title?: ReactNode;
|
|
82
|
-
children?: ReactNode;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Status-aware alert panel with selectable variants, helper text, and optional iconography.
|
|
86
|
-
* @remarks
|
|
87
|
-
* Use `variant` (default/info/success/warning/destructive) and `size` (sm/md/lg) to tune the tone, show `description` or `helperText`, and decorate with a spinner via `loading`.
|
|
88
|
-
*/
|
|
89
|
-
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
90
|
-
|
|
91
52
|
declare const badgeVariants: (props?: ({
|
|
92
|
-
variant?: "
|
|
53
|
+
variant?: "solid" | "outline" | "success" | "warning" | "destructive" | null | undefined;
|
|
93
54
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
94
55
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
95
56
|
type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
|
|
@@ -105,130 +66,161 @@ interface BadgeProps extends SharedComponentProps {
|
|
|
105
66
|
*/
|
|
106
67
|
declare function Badge({ variant, size, label, helperText, errorMessage, loading, disabled, className, style, text, children, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
107
68
|
|
|
108
|
-
type
|
|
69
|
+
type SidebarItem$1 = {
|
|
109
70
|
/**
|
|
110
|
-
*
|
|
111
|
-
* Visible content of the breadcrumb item.
|
|
112
|
-
* 面包屑项的显示内容。
|
|
71
|
+
* Unique identifier of the sidebar item.
|
|
113
72
|
*/
|
|
114
|
-
|
|
73
|
+
id: string;
|
|
115
74
|
/**
|
|
116
|
-
*
|
|
117
|
-
* Callback fired when the item is clicked as a button.
|
|
118
|
-
* 当该项以按钮形式点击时触发的回调。
|
|
75
|
+
* Title rendered directly in the menu.
|
|
119
76
|
*/
|
|
120
|
-
|
|
77
|
+
title?: string;
|
|
121
78
|
/**
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
* i18n key when the title is translated outside this component.
|
|
80
|
+
*/
|
|
81
|
+
titleKey?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Item icon, either a ReactNode or a component type.
|
|
84
|
+
*/
|
|
85
|
+
icon?: ReactNode | ElementType;
|
|
86
|
+
/**
|
|
87
|
+
* Navigation target when the item is clicked.
|
|
125
88
|
*/
|
|
126
89
|
href?: string;
|
|
127
90
|
/**
|
|
128
|
-
*
|
|
129
|
-
* Marks the item as the current location.
|
|
130
|
-
* 标记该项为当前位置。
|
|
91
|
+
* Required permission(s) for the item to be visible.
|
|
131
92
|
*/
|
|
132
|
-
|
|
93
|
+
permission?: string | string[];
|
|
94
|
+
/**
|
|
95
|
+
* Nested child items.
|
|
96
|
+
*/
|
|
97
|
+
children?: SidebarItem$1[];
|
|
133
98
|
};
|
|
134
|
-
type
|
|
99
|
+
type PermissionChecker = (permission: string | string[] | undefined, userPermissions?: string[]) => boolean;
|
|
100
|
+
interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
135
101
|
/**
|
|
136
|
-
*
|
|
137
|
-
* List of breadcrumb items.
|
|
138
|
-
* 面包屑项列表。
|
|
102
|
+
* Full item tree rendered inside the sidebar.
|
|
139
103
|
*/
|
|
140
|
-
items:
|
|
104
|
+
items: SidebarItem$1[];
|
|
141
105
|
/**
|
|
142
|
-
*
|
|
143
|
-
* Extra class names for the `nav` element.
|
|
144
|
-
* `nav` 元素的额外 class。
|
|
106
|
+
* Current permission list of the active user.
|
|
145
107
|
*/
|
|
146
|
-
|
|
108
|
+
userPermissions?: string[];
|
|
147
109
|
/**
|
|
148
|
-
*
|
|
149
|
-
* Character or node used to separate items.
|
|
150
|
-
* 用于分隔各项的字符或节点。
|
|
110
|
+
* Custom permission checking function.
|
|
151
111
|
*/
|
|
152
|
-
|
|
112
|
+
permissionChecker?: PermissionChecker;
|
|
113
|
+
/**
|
|
114
|
+
* `id` of the currently active item.
|
|
115
|
+
*/
|
|
116
|
+
activeItemId?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Callback fired when the user clicks an item.
|
|
119
|
+
*/
|
|
120
|
+
onItemClick?: (item: SidebarItem$1) => void;
|
|
121
|
+
/**
|
|
122
|
+
* Extra class names for the top-level list.
|
|
123
|
+
*/
|
|
124
|
+
listClassName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Extra class names for nested lists.
|
|
127
|
+
*/
|
|
128
|
+
nestedListClassName?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Extra class names applied to each item.
|
|
131
|
+
*/
|
|
132
|
+
itemClassName?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Indentation size for each nested level.
|
|
135
|
+
*/
|
|
136
|
+
indentSize?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Accessibility label for the `nav` element.
|
|
139
|
+
*/
|
|
140
|
+
ariaLabel?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Enables collapsing and expanding the sidebar.
|
|
143
|
+
*/
|
|
144
|
+
collapsible?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Controlled collapsed state from the parent.
|
|
147
|
+
*/
|
|
148
|
+
collapsed?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Default collapsed state in uncontrolled mode.
|
|
151
|
+
*/
|
|
152
|
+
defaultCollapsed?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Callback fired when the collapsed state changes.
|
|
155
|
+
*/
|
|
156
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Sidebar width when collapsed.
|
|
159
|
+
*/
|
|
160
|
+
collapsedWidth?: number | string;
|
|
161
|
+
/**
|
|
162
|
+
* Sidebar width when expanded.
|
|
163
|
+
*/
|
|
164
|
+
expandedWidth?: number | string;
|
|
165
|
+
/**
|
|
166
|
+
* Accessibility label for the collapse/expand button.
|
|
167
|
+
*/
|
|
168
|
+
collapseButtonLabel?: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
type ArgonSidebarHeaderRender = (state: {
|
|
172
|
+
collapsed: boolean;
|
|
173
|
+
hoverExpanded: boolean;
|
|
174
|
+
}) => React.ReactNode;
|
|
175
|
+
type ArgonSidebarProps = SidebarProps & {
|
|
176
|
+
/**
|
|
177
|
+
* Callback fired when hover-expansion state changes.
|
|
178
|
+
*/
|
|
179
|
+
onHoverChange?: (hovered: boolean) => void;
|
|
180
|
+
/**
|
|
181
|
+
* Header content or a render function for dynamic header content.
|
|
182
|
+
*/
|
|
183
|
+
header?: React.ReactNode | ArgonSidebarHeaderRender;
|
|
153
184
|
};
|
|
154
|
-
|
|
185
|
+
/**
|
|
186
|
+
* Argon-style sidebar for legacy `main-fe` with collapse and permission filtering.
|
|
187
|
+
*/
|
|
188
|
+
declare function ArgonSidebar({ items, userPermissions, permissionChecker, activeItemId, onItemClick, listClassName, nestedListClassName, itemClassName, indentSize, ariaLabel, className, collapsible, collapsed, defaultCollapsed, onCollapseChange, collapsedWidth, expandedWidth, collapseButtonLabel, style, onHoverChange, header, ...rest }: ArgonSidebarProps): react_jsx_runtime.JSX.Element;
|
|
155
189
|
|
|
156
190
|
declare const buttonVariants$1: (props?: ({
|
|
157
|
-
variant?: "link" | "
|
|
191
|
+
variant?: "link" | "outline" | "destructive" | "default" | "confirm" | "secondary" | "ghost" | "create" | null | undefined;
|
|
158
192
|
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
159
193
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
160
194
|
type ButtonVariant$1 = VariantProps<typeof buttonVariants$1>['variant'];
|
|
161
195
|
type ButtonSize$1 = 'sm' | 'md' | 'lg' | 'icon';
|
|
162
196
|
interface ButtonProps$1 extends Omit<SharedComponentProps, 'size'>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'className'> {
|
|
197
|
+
/**
|
|
198
|
+
* Visual variant of the button.
|
|
199
|
+
*/
|
|
163
200
|
variant?: ButtonVariant$1;
|
|
201
|
+
/**
|
|
202
|
+
* Visual size of the button.
|
|
203
|
+
*/
|
|
164
204
|
size?: ButtonSize$1;
|
|
165
|
-
|
|
205
|
+
/**
|
|
206
|
+
* Icon rendered before the main content.
|
|
207
|
+
*/
|
|
166
208
|
startIcon?: ReactNode;
|
|
209
|
+
/**
|
|
210
|
+
* Icon rendered after the main content.
|
|
211
|
+
*/
|
|
167
212
|
endIcon?: ReactNode;
|
|
213
|
+
/**
|
|
214
|
+
* Custom button content.
|
|
215
|
+
*/
|
|
168
216
|
children?: ReactNode;
|
|
169
217
|
}
|
|
170
218
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* Support `variant` (default/destructive/outline/secondary/ghost/link) and `size` (sm/md/lg), adorn with icons, and surface helper or error text without needing custom wrappers.
|
|
219
|
+
* Button theo visual style legacy `main-fe`.
|
|
220
|
+
* Legacy `main-fe` styled button.
|
|
174
221
|
*/
|
|
175
222
|
declare const Button$1: react.ForwardRefExoticComponent<ButtonProps$1 & react.RefAttributes<HTMLButtonElement>>;
|
|
176
223
|
|
|
177
|
-
declare const inputVariants$1: (props?: ({
|
|
178
|
-
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
179
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
180
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
181
|
-
type InputVariant$1 = VariantProps<typeof inputVariants$1>['variant'];
|
|
182
|
-
interface InputProps$1 extends SharedComponentProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'prefix'> {
|
|
183
|
-
variant?: InputVariant$1;
|
|
184
|
-
prefix?: ReactNode;
|
|
185
|
-
suffix?: ReactNode;
|
|
186
|
-
inputClassName?: string;
|
|
187
|
-
onValueChange?: (value: string) => void;
|
|
188
|
-
showPasswordToggle?: boolean;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Accessible input surface with shadcn styling, optional prefix/suffix, and helpers for feedback.
|
|
192
|
-
* @remarks
|
|
193
|
-
* Swap `variant` (default/ghost/outline) and `size` (sm/md/lg), keep adornments with `prefix`/`suffix`, display helper/error text, and show a spinner via `loading`.
|
|
194
|
-
*/
|
|
195
|
-
declare const Input$1: react.ForwardRefExoticComponent<InputProps$1 & react.RefAttributes<HTMLInputElement>>;
|
|
196
|
-
|
|
197
|
-
type FormatOnBlur = 'trim' | 'fixed' | 'none';
|
|
198
|
-
type NumericMode = 'integer' | 'decimal';
|
|
199
|
-
type DecimalSeparator = '.' | ',' | 'auto';
|
|
200
|
-
|
|
201
|
-
interface NumericInputProps extends Omit<InputProps$1, 'type' | 'inputMode' | 'value' | 'defaultValue' | 'onChange' | 'onValueChange'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'onFocus' | 'name'> {
|
|
202
|
-
value?: string | number;
|
|
203
|
-
defaultValue?: string | number;
|
|
204
|
-
onValueChange?: (raw: string) => void;
|
|
205
|
-
onNumberChange?: (num: number | null) => void;
|
|
206
|
-
mode?: NumericMode;
|
|
207
|
-
decimalScale?: number;
|
|
208
|
-
maxDecimalScale?: number;
|
|
209
|
-
scale?: number;
|
|
210
|
-
min?: number;
|
|
211
|
-
max?: number;
|
|
212
|
-
allowNegative?: boolean;
|
|
213
|
-
decimalSeparator?: DecimalSeparator;
|
|
214
|
-
formatOnBlur?: FormatOnBlur;
|
|
215
|
-
clampOnBlur?: boolean;
|
|
216
|
-
}
|
|
217
|
-
declare const NumericInput: react.ForwardRefExoticComponent<NumericInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
218
|
-
|
|
219
|
-
declare const textareaVariants: (props?: ({
|
|
220
|
-
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
221
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
222
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
223
|
-
type TextareaVariant = VariantProps<typeof textareaVariants>['variant'];
|
|
224
|
-
interface TextareaProps extends SharedComponentProps, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
|
|
225
|
-
variant?: TextareaVariant;
|
|
226
|
-
textareaClassName?: string;
|
|
227
|
-
onValueChange?: (value: string) => void;
|
|
228
|
-
suffix?: ReactNode;
|
|
229
|
-
}
|
|
230
|
-
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
231
|
-
|
|
232
224
|
declare function Card$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
233
225
|
declare function CardHeader$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
234
226
|
declare function CardTitle$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
@@ -238,230 +230,297 @@ declare function CardContent$1({ className, ...props }: react.ComponentProps<'di
|
|
|
238
230
|
declare function CardFooter$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
239
231
|
|
|
240
232
|
type ComboboxOption$2 = {
|
|
233
|
+
/**
|
|
234
|
+
* Visible label shown in the input and dropdown.
|
|
235
|
+
*/
|
|
241
236
|
label: string;
|
|
237
|
+
/**
|
|
238
|
+
* Actual value of the option.
|
|
239
|
+
*/
|
|
242
240
|
value: string | number;
|
|
241
|
+
/**
|
|
242
|
+
* Secondary description for the option when the UI needs extra context.
|
|
243
|
+
*/
|
|
243
244
|
description?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Alternate value used specifically for searching.
|
|
247
|
+
*/
|
|
244
248
|
searchValue?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Marks the option as unavailable for selection.
|
|
251
|
+
*/
|
|
245
252
|
disabled?: boolean;
|
|
246
253
|
};
|
|
254
|
+
type ComboboxAsyncConfig = {
|
|
255
|
+
/**
|
|
256
|
+
* Remote search callback fired when the user types.
|
|
257
|
+
*/
|
|
258
|
+
onSearch?: (value: string) => void;
|
|
259
|
+
/**
|
|
260
|
+
* Callback for loading more data when the dropdown reaches the end.
|
|
261
|
+
*/
|
|
262
|
+
onLoadMore?: () => void;
|
|
263
|
+
/**
|
|
264
|
+
* Indicates whether more remote data is available.
|
|
265
|
+
*/
|
|
266
|
+
hasMore?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Whether to reset the search term when the field is focused again.
|
|
269
|
+
*/
|
|
270
|
+
resetSearchOnFocus?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Whether to restore the selected option on blur if nothing new is chosen.
|
|
273
|
+
*/
|
|
274
|
+
restoreSelectedOnBlur?: boolean;
|
|
275
|
+
};
|
|
247
276
|
interface ComboboxProps$1 extends SharedComponentProps {
|
|
277
|
+
/**
|
|
278
|
+
* Option list rendered in the dropdown.
|
|
279
|
+
*/
|
|
248
280
|
options: ComboboxOption$2[];
|
|
281
|
+
/**
|
|
282
|
+
* Currently selected value.
|
|
283
|
+
*/
|
|
249
284
|
value?: string | number;
|
|
285
|
+
/**
|
|
286
|
+
* Placeholder shown when no value is selected.
|
|
287
|
+
*/
|
|
250
288
|
placeholder?: string;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
allowClear?: boolean;
|
|
259
|
-
onClear?: () => void;
|
|
260
|
-
portal?: boolean;
|
|
261
|
-
}
|
|
262
|
-
declare const Combobox$1: react.ForwardRefExoticComponent<ComboboxProps$1 & react.RefAttributes<HTMLInputElement>>;
|
|
263
|
-
|
|
264
|
-
type ComboboxOption$1 = {
|
|
265
|
-
label: string;
|
|
266
|
-
value: string | number;
|
|
267
|
-
description?: string;
|
|
268
|
-
searchValue?: string;
|
|
269
|
-
disabled?: boolean;
|
|
270
|
-
};
|
|
271
|
-
interface AsyncComboboxProps extends SharedComponentProps {
|
|
272
|
-
options: ComboboxOption$1[];
|
|
273
|
-
value?: string | number;
|
|
274
|
-
placeholder?: string;
|
|
275
|
-
onChange?: (value: ComboboxOption$1['value']) => void;
|
|
289
|
+
/**
|
|
290
|
+
* Callback fired when the user selects an option.
|
|
291
|
+
*/
|
|
292
|
+
onChange?: (value: ComboboxOption$2['value']) => void;
|
|
293
|
+
/**
|
|
294
|
+
* Callback fired when the input text changes.
|
|
295
|
+
*/
|
|
276
296
|
onInputChange?: (value: string) => void;
|
|
277
|
-
|
|
278
|
-
|
|
297
|
+
/**
|
|
298
|
+
* Manual callback for loading more items at the end of the list.
|
|
299
|
+
*/
|
|
300
|
+
onLoadMore?: () => void;
|
|
301
|
+
/**
|
|
302
|
+
* Indicates whether more data can be loaded.
|
|
303
|
+
*/
|
|
304
|
+
hasMore?: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Configuration for async or remote-search behavior.
|
|
307
|
+
*/
|
|
308
|
+
asyncConfig?: ComboboxAsyncConfig;
|
|
309
|
+
/**
|
|
310
|
+
* Loading state while data is being fetched.
|
|
311
|
+
*/
|
|
279
312
|
loading?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Disables the entire combobox.
|
|
315
|
+
*/
|
|
280
316
|
disabled?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Placeholder specifically for the search input.
|
|
319
|
+
*/
|
|
281
320
|
searchPlaceholder?: string;
|
|
321
|
+
/**
|
|
322
|
+
* `id` used by helper text for accessibility linkage.
|
|
323
|
+
*/
|
|
282
324
|
helperId?: string;
|
|
325
|
+
/**
|
|
326
|
+
* `id` used by error text for accessibility linkage.
|
|
327
|
+
*/
|
|
283
328
|
errorId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Enables a button for clearing the current value.
|
|
331
|
+
*/
|
|
284
332
|
allowClear?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Callback fired when the current value is cleared.
|
|
335
|
+
*/
|
|
285
336
|
onClear?: () => void;
|
|
337
|
+
/**
|
|
338
|
+
* Renders the dropdown in a portal outside the current layout.
|
|
339
|
+
*/
|
|
286
340
|
portal?: boolean;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
placeholder?: string;
|
|
300
|
-
onChange?: (value: Array<MultiSelectOption['value']>) => void;
|
|
301
|
-
onSearch?: (value: string) => void;
|
|
302
|
-
loading?: boolean;
|
|
303
|
-
disabled?: boolean;
|
|
304
|
-
searchable?: boolean;
|
|
305
|
-
searchPlaceholder?: string;
|
|
306
|
-
}
|
|
307
|
-
declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Vertical form wrapper that keeps consistent spacing between fields.
|
|
311
|
-
* @remarks
|
|
312
|
-
* Extend `className` or pass native form props while maintaining consistent letter spacing for each child row.
|
|
313
|
-
*/
|
|
314
|
-
declare function Form({ className, ...props }: FormHTMLAttributes<HTMLFormElement>): react_jsx_runtime.JSX.Element;
|
|
315
|
-
interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
316
|
-
children: ReactNode;
|
|
317
|
-
label?: ReactNode;
|
|
318
|
-
helperText?: ReactNode;
|
|
319
|
-
errorMessage?: ReactNode;
|
|
320
|
-
required?: boolean;
|
|
321
|
-
htmlFor?: string;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Grid-aligned form field wrapper for label/control/description clusters.
|
|
325
|
-
*/
|
|
326
|
-
declare const FormField: react.ForwardRefExoticComponent<FormFieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
327
|
-
/**
|
|
328
|
-
* Container for a single form item to stack label, control, and messages vertically.
|
|
329
|
-
*/
|
|
330
|
-
declare const FormItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
331
|
-
/**
|
|
332
|
-
* Styled label with strong typography and surface-aware coloring.
|
|
333
|
-
*/
|
|
334
|
-
declare const FormLabel: react.ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & react.RefAttributes<HTMLLabelElement>>;
|
|
335
|
-
/**
|
|
336
|
-
* Flex container that aligns inputs and accessory controls horizontally.
|
|
337
|
-
*/
|
|
338
|
-
declare const FormControl: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
339
|
-
/**
|
|
340
|
-
* Neutral description text for a form field.
|
|
341
|
-
*/
|
|
342
|
-
declare const FormDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
343
|
-
/**
|
|
344
|
-
* Inline error message text for destructive validation states.
|
|
345
|
-
*/
|
|
346
|
-
declare const FormMessage: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
347
|
-
|
|
348
|
-
type SelectOption = {
|
|
349
|
-
label: ReactNode;
|
|
350
|
-
value: string | number;
|
|
351
|
-
disabled?: boolean;
|
|
352
|
-
};
|
|
353
|
-
type Option = SelectOption;
|
|
354
|
-
declare const triggerVariants$1: (props?: ({
|
|
355
|
-
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
356
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
357
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
358
|
-
type SelectVariant$1 = VariantProps<typeof triggerVariants$1>['variant'];
|
|
359
|
-
interface SelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
360
|
-
options: SelectOption[];
|
|
361
|
-
value?: string | number;
|
|
362
|
-
defaultValue?: string | number;
|
|
363
|
-
placeholder?: string;
|
|
364
|
-
onChange?: (value: SelectOption['value']) => void;
|
|
365
|
-
variant?: SelectVariant$1;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Select field powered by Radix primitives with customizable trigger variants and accessible helpers.
|
|
369
|
-
* @remarks
|
|
370
|
-
* Provide `options`, manage `value`/`defaultValue`, and style via `variant` (default/outline/ghost) plus `size` (sm/md/lg); show helper/error text and `loading`.
|
|
371
|
-
*/
|
|
372
|
-
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
373
|
-
|
|
374
|
-
type SearchableSelectOption = {
|
|
375
|
-
label: ReactNode;
|
|
376
|
-
value: string | number;
|
|
377
|
-
disabled?: boolean;
|
|
378
|
-
searchValue?: string;
|
|
379
|
-
};
|
|
380
|
-
declare const triggerVariants: (props?: ({
|
|
381
|
-
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
382
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
383
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
384
|
-
type SelectVariant = VariantProps<typeof triggerVariants>['variant'];
|
|
385
|
-
interface SearchableSelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
386
|
-
options: SearchableSelectOption[];
|
|
387
|
-
value?: string | number;
|
|
388
|
-
defaultValue?: string | number;
|
|
389
|
-
placeholder?: string;
|
|
390
|
-
onChange?: (value: SearchableSelectOption['value']) => void;
|
|
391
|
-
variant?: SelectVariant;
|
|
392
|
-
onSearch?: (query: string) => void;
|
|
393
|
-
loading?: boolean;
|
|
394
|
-
size?: 'sm' | 'md' | 'lg';
|
|
395
|
-
searchPlaceholder?: string;
|
|
396
|
-
}
|
|
397
|
-
declare const SearchableSelect: react.ForwardRefExoticComponent<SearchableSelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
398
|
-
|
|
399
|
-
type Trend = 'up' | 'down' | 'flat';
|
|
400
|
-
interface StatProps extends SharedComponentProps {
|
|
401
|
-
value: ReactNode;
|
|
402
|
-
helper?: ReactNode;
|
|
403
|
-
delta?: ReactNode;
|
|
404
|
-
trend?: Trend;
|
|
341
|
+
/**
|
|
342
|
+
* Extra class names for the dropdown menu.
|
|
343
|
+
*/
|
|
344
|
+
dropdownClassName?: string;
|
|
345
|
+
/**
|
|
346
|
+
* Overrides the maximum height of the dropdown.
|
|
347
|
+
*/
|
|
348
|
+
dropdownMaxHeight?: number;
|
|
349
|
+
/**
|
|
350
|
+
* Keeps error styling without rendering the error text below the field.
|
|
351
|
+
*/
|
|
352
|
+
hideErrorMessage?: boolean;
|
|
405
353
|
}
|
|
406
354
|
/**
|
|
407
|
-
*
|
|
408
|
-
* @remarks
|
|
409
|
-
* Accepts `size` (sm/md/lg), shows `helper` or helper text, and can render `loading`/`disabled` states while aligning helper/error messaging.
|
|
355
|
+
* Legacy `main-fe` combobox with remote search and load-more support.
|
|
410
356
|
*/
|
|
411
|
-
declare
|
|
357
|
+
declare const Combobox$1: react.ForwardRefExoticComponent<ComboboxProps$1 & react.RefAttributes<HTMLInputElement>>;
|
|
412
358
|
|
|
413
359
|
type DataTableSortDirection$1 = 'asc' | 'desc';
|
|
414
360
|
type DataTableAlign$1 = 'left' | 'center' | 'right';
|
|
415
361
|
type DataTableSortState$1 = {
|
|
362
|
+
/**
|
|
363
|
+
* `key` of the column currently being sorted.
|
|
364
|
+
*/
|
|
416
365
|
key: string;
|
|
366
|
+
/**
|
|
367
|
+
* Current sort direction.
|
|
368
|
+
*/
|
|
417
369
|
direction: DataTableSortDirection$1;
|
|
418
370
|
};
|
|
419
371
|
type DataTableColumn$1<T> = {
|
|
372
|
+
/**
|
|
373
|
+
* Unique identifier of the column.
|
|
374
|
+
*/
|
|
420
375
|
key: string;
|
|
376
|
+
/**
|
|
377
|
+
* Visible header content of the column.
|
|
378
|
+
*/
|
|
421
379
|
title: ReactNode;
|
|
380
|
+
/**
|
|
381
|
+
* Record field used as the default data source.
|
|
382
|
+
*/
|
|
422
383
|
dataIndex?: keyof T;
|
|
384
|
+
/**
|
|
385
|
+
* Fixed or relative width of the column.
|
|
386
|
+
*/
|
|
423
387
|
width?: number | string;
|
|
388
|
+
/**
|
|
389
|
+
* Custom renderer for the cell content.
|
|
390
|
+
*/
|
|
424
391
|
render?: (value: T[keyof T] | undefined, record: T, index: number) => ReactNode;
|
|
392
|
+
/**
|
|
393
|
+
* Enables or disables sorting for the column.
|
|
394
|
+
*/
|
|
425
395
|
sortable?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Custom comparator used for client-side sorting.
|
|
398
|
+
*/
|
|
426
399
|
sorter?: (a: T, b: T) => number;
|
|
400
|
+
/**
|
|
401
|
+
* Function that returns a dedicated value for sorting.
|
|
402
|
+
*/
|
|
427
403
|
sortValue?: (record: T) => string | number | Date | null | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* Per-column header alignment override.
|
|
406
|
+
*/
|
|
428
407
|
headerAlign?: DataTableAlign$1;
|
|
408
|
+
/**
|
|
409
|
+
* Per-column cell alignment override.
|
|
410
|
+
*/
|
|
429
411
|
cellAlign?: DataTableAlign$1;
|
|
430
412
|
};
|
|
431
413
|
type DataTablePagination$1 = {
|
|
414
|
+
/**
|
|
415
|
+
* Current page.
|
|
416
|
+
*/
|
|
432
417
|
page: number;
|
|
418
|
+
/**
|
|
419
|
+
* Number of rows per page.
|
|
420
|
+
*/
|
|
433
421
|
pageSize: number;
|
|
422
|
+
/**
|
|
423
|
+
* Total number of records.
|
|
424
|
+
*/
|
|
434
425
|
total: number;
|
|
426
|
+
/**
|
|
427
|
+
* Callback fired when the page changes.
|
|
428
|
+
*/
|
|
435
429
|
onChange: (page: number) => void;
|
|
430
|
+
/**
|
|
431
|
+
* Page-size options shown in the dropdown.
|
|
432
|
+
*/
|
|
436
433
|
pageSizeOptions?: number[];
|
|
434
|
+
/**
|
|
435
|
+
* Callback fired when page size changes.
|
|
436
|
+
*/
|
|
437
437
|
onPageSizeChange?: (pageSize: number) => void;
|
|
438
438
|
};
|
|
439
439
|
type RowKey$1 = string | number;
|
|
440
440
|
type DataTableRowSelection$1 = {
|
|
441
|
+
/**
|
|
442
|
+
* Row keys that are currently selected.
|
|
443
|
+
*/
|
|
441
444
|
selectedRowKeys: Array<RowKey$1>;
|
|
445
|
+
/**
|
|
446
|
+
* Callback fired when the selected rows change.
|
|
447
|
+
*/
|
|
442
448
|
onChange: (selectedRowKeys: Array<RowKey$1>) => void;
|
|
443
449
|
};
|
|
444
450
|
type DataTableProps$1<T> = {
|
|
451
|
+
/**
|
|
452
|
+
* Column configuration of the table.
|
|
453
|
+
*/
|
|
445
454
|
columns: Array<DataTableColumn$1<T>>;
|
|
455
|
+
/**
|
|
456
|
+
* Source data rendered by the table.
|
|
457
|
+
*/
|
|
446
458
|
data: T[];
|
|
459
|
+
/**
|
|
460
|
+
* How to resolve a unique key for each row.
|
|
461
|
+
*/
|
|
447
462
|
rowKey: keyof T | ((record: T) => RowKey$1);
|
|
463
|
+
/**
|
|
464
|
+
* Loading state of the table.
|
|
465
|
+
*/
|
|
448
466
|
loading?: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Content shown when the table has no data.
|
|
469
|
+
*/
|
|
449
470
|
emptyText?: ReactNode;
|
|
471
|
+
/**
|
|
472
|
+
* Pagination configuration.
|
|
473
|
+
*/
|
|
450
474
|
pagination?: DataTablePagination$1;
|
|
475
|
+
/**
|
|
476
|
+
* Current sort state when controlled from the parent.
|
|
477
|
+
*/
|
|
451
478
|
sort?: DataTableSortState$1 | null;
|
|
479
|
+
/**
|
|
480
|
+
* Callback fired when sort state changes.
|
|
481
|
+
*/
|
|
452
482
|
onSortChange?: (sort: DataTableSortState$1 | null) => void;
|
|
483
|
+
/**
|
|
484
|
+
* Sorting mode handled on the client or server.
|
|
485
|
+
*/
|
|
453
486
|
sortMode?: 'client' | 'server';
|
|
487
|
+
/**
|
|
488
|
+
* Callback fired when a row is clicked.
|
|
489
|
+
*/
|
|
454
490
|
onRowClick?: (record: T) => void;
|
|
491
|
+
/**
|
|
492
|
+
* Row-selection configuration.
|
|
493
|
+
*/
|
|
455
494
|
rowSelection?: DataTableRowSelection$1;
|
|
495
|
+
/**
|
|
496
|
+
* Renderer for the per-row action column.
|
|
497
|
+
*/
|
|
456
498
|
renderActions?: (record: T) => ReactNode;
|
|
499
|
+
/**
|
|
500
|
+
* Width of the action column.
|
|
501
|
+
*/
|
|
502
|
+
actionColumnWidth?: number | string;
|
|
503
|
+
/**
|
|
504
|
+
* Extra class names for the table wrapper.
|
|
505
|
+
*/
|
|
457
506
|
className?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Default alignment for all headers.
|
|
509
|
+
*/
|
|
458
510
|
headerAlign?: DataTableAlign$1;
|
|
511
|
+
/**
|
|
512
|
+
* Default alignment for all cells.
|
|
513
|
+
*/
|
|
459
514
|
cellAlign?: DataTableAlign$1;
|
|
515
|
+
/**
|
|
516
|
+
* Sticky offset for header or fixed columns when the layout has a top bar.
|
|
517
|
+
*/
|
|
460
518
|
stickyOffset?: number;
|
|
461
|
-
/** When false, table container does not scroll (overflow-visible). Default true. */
|
|
462
|
-
scrollable?: boolean;
|
|
463
519
|
};
|
|
464
|
-
|
|
520
|
+
/**
|
|
521
|
+
* Legacy `main-fe` data table with sorting, selection, actions, and pagination.
|
|
522
|
+
*/
|
|
523
|
+
declare function DataTable$1<T>({ columns, data, rowKey, loading, emptyText, pagination, sort, onSortChange, sortMode, onRowClick, rowSelection, renderActions, actionColumnWidth, className, headerAlign, stickyOffset, }: DataTableProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
465
524
|
declare const Table$1: react.ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
466
525
|
declare const TableHeader$1: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
467
526
|
declare const TableBody$1: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -470,1342 +529,957 @@ declare const TableCell$1: react.ForwardRefExoticComponent<TdHTMLAttributes<HTML
|
|
|
470
529
|
as?: "td" | "th";
|
|
471
530
|
} & react.RefAttributes<HTMLTableCellElement>>;
|
|
472
531
|
|
|
473
|
-
type
|
|
474
|
-
page: number;
|
|
475
|
-
pageSize: number;
|
|
476
|
-
total: number;
|
|
477
|
-
totalPages: number;
|
|
478
|
-
showingStart: number;
|
|
479
|
-
showingEnd: number;
|
|
480
|
-
};
|
|
481
|
-
type PaginationProps = {
|
|
482
|
-
page: number;
|
|
483
|
-
pageSize: number;
|
|
484
|
-
total: number;
|
|
485
|
-
onChange: (page: number) => void;
|
|
486
|
-
pageSizeOptions?: number[];
|
|
487
|
-
onPageSizeChange?: (pageSize: number) => void;
|
|
488
|
-
className?: string;
|
|
489
|
-
showFirstLast?: boolean;
|
|
490
|
-
label?: (info: PaginationInfo) => ReactNode;
|
|
491
|
-
};
|
|
492
|
-
declare const Pagination: ({ page, pageSize, total, onChange, pageSizeOptions, onPageSizeChange, className, showFirstLast, label, }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
493
|
-
|
|
494
|
-
type PageTitleProps = {
|
|
495
|
-
/**
|
|
496
|
-
* Tiêu đề chính của trang.
|
|
497
|
-
* Main title of the page.
|
|
498
|
-
* 页面主标题。
|
|
499
|
-
*/
|
|
500
|
-
title: string;
|
|
501
|
-
/**
|
|
502
|
-
* Mô tả ngắn nằm dưới tiêu đề.
|
|
503
|
-
* Short description shown below the title.
|
|
504
|
-
* 显示在标题下方的简短描述。
|
|
505
|
-
*/
|
|
506
|
-
subtitle?: string;
|
|
532
|
+
type DateRangePickerValue = {
|
|
507
533
|
/**
|
|
508
|
-
*
|
|
509
|
-
* Visual density of the page header.
|
|
510
|
-
* 页面头部的显示密度。
|
|
534
|
+
* Start date in string or ISO format.
|
|
511
535
|
*/
|
|
512
|
-
|
|
536
|
+
startDate?: string | null;
|
|
513
537
|
/**
|
|
514
|
-
*
|
|
515
|
-
* Slot rendered on the right side of the header.
|
|
516
|
-
* 显示在头部右侧的插槽。
|
|
538
|
+
* End date in string or ISO format.
|
|
517
539
|
*/
|
|
518
|
-
|
|
540
|
+
endDate?: string | null;
|
|
519
541
|
};
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
type SectionTitleProps = {
|
|
542
|
+
interface DateRangePickerProps {
|
|
523
543
|
/**
|
|
524
|
-
*
|
|
525
|
-
* Main title of the section.
|
|
526
|
-
* 区块主标题。
|
|
544
|
+
* Current date range value of the component.
|
|
527
545
|
*/
|
|
528
|
-
|
|
546
|
+
value?: DateRangePickerValue;
|
|
529
547
|
/**
|
|
530
|
-
*
|
|
531
|
-
* Short description that explains the section.
|
|
532
|
-
* 用于说明该区块的简短描述。
|
|
548
|
+
* Callback fired when the user confirms a new date range.
|
|
533
549
|
*/
|
|
534
|
-
|
|
550
|
+
onChange: (next: Required<DateRangePickerValue>) => void;
|
|
535
551
|
/**
|
|
536
|
-
*
|
|
537
|
-
* Icon displayed to the left of the title.
|
|
538
|
-
* 显示在标题左侧的图标。
|
|
552
|
+
* Label shown above the picker.
|
|
539
553
|
*/
|
|
540
|
-
|
|
554
|
+
label?: string;
|
|
541
555
|
/**
|
|
542
|
-
*
|
|
543
|
-
* Custom class for the icon wrapper.
|
|
544
|
-
* 图标容器的自定义 class。
|
|
556
|
+
* Placeholder shown before a range is selected.
|
|
545
557
|
*/
|
|
546
|
-
|
|
558
|
+
placeholder?: string;
|
|
547
559
|
/**
|
|
548
|
-
*
|
|
549
|
-
* Slot rendered on the right side of the section title.
|
|
550
|
-
* 显示在区块标题右侧的插槽。
|
|
560
|
+
* Extra class names for the picker wrapper.
|
|
551
561
|
*/
|
|
552
|
-
rightSlot?: ReactNode;
|
|
553
|
-
};
|
|
554
|
-
declare function SectionTitle$1({ title, subtitle, icon, iconClassName, rightSlot, }: SectionTitleProps): react_jsx_runtime.JSX.Element;
|
|
555
|
-
|
|
556
|
-
interface TabItem {
|
|
557
|
-
value: string;
|
|
558
|
-
label: ReactNode;
|
|
559
|
-
content: ReactNode;
|
|
560
|
-
badge?: ReactNode;
|
|
561
|
-
}
|
|
562
|
-
interface TabsProps {
|
|
563
|
-
items: TabItem[];
|
|
564
|
-
defaultValue?: string;
|
|
565
|
-
onChange?: (value: string) => void;
|
|
566
562
|
className?: string;
|
|
567
|
-
listClassName?: string;
|
|
568
|
-
contentClassName?: string;
|
|
569
|
-
}
|
|
570
|
-
declare function Tabs({ items, defaultValue, onChange, className, listClassName, contentClassName, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
571
|
-
|
|
572
|
-
interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
573
|
-
label?: ReactNode;
|
|
574
|
-
size?: LoadingSpinnerProps['size'];
|
|
575
563
|
}
|
|
576
|
-
|
|
564
|
+
/**
|
|
565
|
+
* Date-range picker for legacy `main-fe` screens.
|
|
566
|
+
*/
|
|
567
|
+
declare function DateRangePicker({ value, onChange, label, placeholder, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
577
568
|
|
|
578
|
-
type
|
|
579
|
-
type TooltipAlign$2 = 'start' | 'center' | 'end';
|
|
580
|
-
type TooltipProps = {
|
|
569
|
+
type QuickOption = {
|
|
581
570
|
/**
|
|
582
|
-
*
|
|
583
|
-
* Tooltip content shown on hover or focus.
|
|
584
|
-
* 悬停或聚焦时显示的 tooltip 内容。
|
|
571
|
+
* Visible label of the quick option.
|
|
585
572
|
*/
|
|
586
|
-
|
|
573
|
+
label: string;
|
|
587
574
|
/**
|
|
588
|
-
*
|
|
589
|
-
* Trigger element for the tooltip.
|
|
590
|
-
* tooltip 的触发元素。
|
|
575
|
+
* Value applied to the picker when the quick option is chosen.
|
|
591
576
|
*/
|
|
592
|
-
|
|
577
|
+
value: string;
|
|
578
|
+
};
|
|
579
|
+
interface DateTimePickerProps {
|
|
593
580
|
/**
|
|
594
|
-
*
|
|
595
|
-
* Tooltip side relative to the trigger.
|
|
596
|
-
* tooltip 相对触发元素的位置。
|
|
581
|
+
* Label shown above the picker.
|
|
597
582
|
*/
|
|
598
|
-
|
|
583
|
+
label?: ReactNode;
|
|
599
584
|
/**
|
|
600
|
-
*
|
|
601
|
-
* Tooltip alignment on the secondary axis.
|
|
602
|
-
* tooltip 在次轴上的对齐方式。
|
|
585
|
+
* Placeholder shown when no value is set.
|
|
603
586
|
*/
|
|
604
|
-
|
|
587
|
+
placeholder?: string;
|
|
605
588
|
/**
|
|
606
|
-
*
|
|
607
|
-
* Extra class names for the trigger wrapper.
|
|
608
|
-
* 触发器容器的额外 class。
|
|
589
|
+
* Current value of the picker.
|
|
609
590
|
*/
|
|
610
|
-
|
|
591
|
+
value?: string;
|
|
611
592
|
/**
|
|
612
|
-
*
|
|
613
|
-
* Extra class names for the tooltip panel.
|
|
614
|
-
* tooltip 面板的额外 class。
|
|
593
|
+
* Callback fired when the date-time value changes.
|
|
615
594
|
*/
|
|
616
|
-
|
|
595
|
+
onChange: (value: string) => void;
|
|
617
596
|
/**
|
|
618
|
-
*
|
|
619
|
-
* Allows tooltip content to wrap onto multiple lines.
|
|
620
|
-
* 是否允许 tooltip 内容换行。
|
|
597
|
+
* Disables the entire picker.
|
|
621
598
|
*/
|
|
622
|
-
|
|
599
|
+
disabled?: boolean;
|
|
623
600
|
/**
|
|
624
|
-
*
|
|
625
|
-
* Renders the tooltip through a portal into `document.body`.
|
|
626
|
-
* 通过 portal 将 tooltip 渲染到 `document.body`。
|
|
601
|
+
* Error message shown below the field.
|
|
627
602
|
*/
|
|
628
|
-
|
|
629
|
-
};
|
|
630
|
-
declare function Tooltip({ content, children, side, align, className, contentClassName, wrap, portal, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
631
|
-
|
|
632
|
-
type TooltipSide$1 = 'top' | 'right' | 'bottom' | 'left';
|
|
633
|
-
type TooltipAlign$1 = 'start' | 'center' | 'end';
|
|
634
|
-
type OverflowTooltipProps = {
|
|
635
|
-
content: ReactNode;
|
|
636
|
-
children: ReactNode;
|
|
637
|
-
targetRef?: RefObject<HTMLElement | null>;
|
|
638
|
-
side?: TooltipSide$1;
|
|
639
|
-
align?: TooltipAlign$1;
|
|
640
|
-
className?: string;
|
|
641
|
-
contentClassName?: string;
|
|
642
|
-
wrap?: boolean;
|
|
643
|
-
portal?: boolean;
|
|
644
|
-
disabled?: boolean;
|
|
645
|
-
watch?: ReadonlyArray<unknown>;
|
|
646
|
-
};
|
|
647
|
-
declare function OverflowTooltip({ content, children, targetRef, side, align, className, contentClassName, wrap, portal, disabled, watch, }: OverflowTooltipProps): react_jsx_runtime.JSX.Element;
|
|
648
|
-
|
|
649
|
-
type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
|
|
650
|
-
type TooltipAlign = 'start' | 'center' | 'end';
|
|
651
|
-
type LineClampTooltipProps = {
|
|
652
|
-
text: string;
|
|
653
|
-
lineClamp?: number;
|
|
654
|
-
className?: string;
|
|
655
|
-
side?: TooltipSide;
|
|
656
|
-
align?: TooltipAlign;
|
|
657
|
-
wrap?: boolean;
|
|
658
|
-
portal?: boolean;
|
|
659
|
-
};
|
|
660
|
-
declare function LineClampTooltip({ text, lineClamp, className, side, align, wrap, portal, }: LineClampTooltipProps): react_jsx_runtime.JSX.Element;
|
|
661
|
-
|
|
662
|
-
type TruncatedTextProps = {
|
|
663
|
-
email: string;
|
|
664
|
-
};
|
|
665
|
-
declare function TruncatedText({ email, }: TruncatedTextProps): react_jsx_runtime.JSX.Element;
|
|
666
|
-
|
|
667
|
-
type SidebarItem$1 = {
|
|
603
|
+
errorMessage?: string;
|
|
668
604
|
/**
|
|
669
|
-
*
|
|
670
|
-
* Unique identifier of the sidebar item.
|
|
671
|
-
* 侧边栏项的唯一标识。
|
|
605
|
+
* Extra class names for the picker wrapper.
|
|
672
606
|
*/
|
|
673
|
-
|
|
607
|
+
className?: string;
|
|
674
608
|
/**
|
|
675
|
-
*
|
|
676
|
-
* Title rendered directly in the menu.
|
|
677
|
-
* 菜单中直接显示的标题。
|
|
609
|
+
* Format used to parse the incoming `value`.
|
|
678
610
|
*/
|
|
679
|
-
|
|
611
|
+
parseFormat?: string;
|
|
680
612
|
/**
|
|
681
|
-
*
|
|
682
|
-
* i18n key when the title is translated outside this component.
|
|
683
|
-
* 当标题由外部国际化处理时使用的 i18n key。
|
|
613
|
+
* Format used for outgoing values passed to `onChange`.
|
|
684
614
|
*/
|
|
685
|
-
|
|
615
|
+
outputFormat?: string;
|
|
686
616
|
/**
|
|
687
|
-
*
|
|
688
|
-
* Item icon, either a ReactNode or a component type.
|
|
689
|
-
* 菜单项图标,可传 ReactNode 或组件类型。
|
|
617
|
+
* Display format for the text shown in the trigger.
|
|
690
618
|
*/
|
|
691
|
-
|
|
619
|
+
displayFormat?: string;
|
|
692
620
|
/**
|
|
693
|
-
*
|
|
694
|
-
* Navigation target when the item is clicked.
|
|
695
|
-
* 点击菜单项后的跳转地址。
|
|
621
|
+
* Minimum selectable date-time.
|
|
696
622
|
*/
|
|
697
|
-
|
|
623
|
+
minDateTime?: Date;
|
|
698
624
|
/**
|
|
699
|
-
*
|
|
700
|
-
* Required permission(s) for the item to be visible.
|
|
701
|
-
* 显示该菜单项所需的权限。
|
|
625
|
+
* List of quick-select options.
|
|
702
626
|
*/
|
|
703
|
-
|
|
627
|
+
quickOptions?: QuickOption[];
|
|
704
628
|
/**
|
|
705
|
-
*
|
|
706
|
-
* Nested child items.
|
|
707
|
-
* 子菜单项列表。
|
|
629
|
+
* Callback fired when a quick option is selected.
|
|
708
630
|
*/
|
|
709
|
-
|
|
710
|
-
};
|
|
711
|
-
type PermissionChecker = (permission: string | string[] | undefined, userPermissions?: string[]) => boolean;
|
|
712
|
-
interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
631
|
+
onQuickSelect?: (value: string) => void;
|
|
713
632
|
/**
|
|
714
|
-
*
|
|
715
|
-
* Full item tree rendered inside the sidebar.
|
|
716
|
-
* 侧边栏中要渲染的完整菜单树。
|
|
633
|
+
* Callback fired when the current value is cleared.
|
|
717
634
|
*/
|
|
718
|
-
|
|
635
|
+
onClear?: () => void;
|
|
719
636
|
/**
|
|
720
|
-
*
|
|
721
|
-
* Current permission list of the active user.
|
|
722
|
-
* 当前用户的权限列表。
|
|
637
|
+
* Title for the quick-range section.
|
|
723
638
|
*/
|
|
724
|
-
|
|
639
|
+
quickRangesLabel?: string;
|
|
725
640
|
/**
|
|
726
|
-
*
|
|
727
|
-
* Custom permission checking function.
|
|
728
|
-
* 自定义权限校验函数。
|
|
641
|
+
* Label shown for the clear action.
|
|
729
642
|
*/
|
|
730
|
-
|
|
643
|
+
clearLabel?: string;
|
|
731
644
|
/**
|
|
732
|
-
*
|
|
733
|
-
* `id` of the currently active item.
|
|
734
|
-
* 当前激活菜单项的 `id`。
|
|
645
|
+
* Renders the picker panel in a portal outside the current layout.
|
|
735
646
|
*/
|
|
736
|
-
|
|
647
|
+
portal?: boolean;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Legacy `main-fe` date-time picker with quick options and custom formats.
|
|
651
|
+
*/
|
|
652
|
+
declare function DateTimePicker({ label, placeholder, value, onChange, disabled, errorMessage, className, parseFormat, outputFormat, displayFormat, minDateTime, quickOptions, onQuickSelect, onClear, quickRangesLabel, clearLabel, portal, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
653
|
+
|
|
654
|
+
declare const inputVariants$1: (props?: ({
|
|
655
|
+
variant?: "outline" | "default" | "ghost" | null | undefined;
|
|
656
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
657
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
658
|
+
type InputVariant$1 = VariantProps<typeof inputVariants$1>['variant'];
|
|
659
|
+
interface InputProps$1 extends SharedComponentProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'prefix'> {
|
|
737
660
|
/**
|
|
738
|
-
*
|
|
739
|
-
* Callback fired when the user clicks an item.
|
|
740
|
-
* 用户点击菜单项时触发的回调。
|
|
661
|
+
* Visual variant of the input.
|
|
741
662
|
*/
|
|
742
|
-
|
|
663
|
+
variant?: InputVariant$1;
|
|
743
664
|
/**
|
|
744
|
-
*
|
|
745
|
-
* Extra class names for the top-level list.
|
|
746
|
-
* 顶层列表的额外 class。
|
|
665
|
+
* Content rendered on the left side of the input.
|
|
747
666
|
*/
|
|
748
|
-
|
|
667
|
+
prefix?: ReactNode;
|
|
749
668
|
/**
|
|
750
|
-
*
|
|
751
|
-
* Extra class names for nested lists.
|
|
752
|
-
* 嵌套列表的额外 class。
|
|
669
|
+
* Content rendered on the right side of the input.
|
|
753
670
|
*/
|
|
754
|
-
|
|
671
|
+
suffix?: ReactNode;
|
|
755
672
|
/**
|
|
756
|
-
* Class
|
|
757
|
-
* Extra class names applied to each item.
|
|
758
|
-
* 每个菜单项的额外 class。
|
|
673
|
+
* Class names applied directly to the `<input>` element.
|
|
759
674
|
*/
|
|
760
|
-
|
|
675
|
+
inputClassName?: string;
|
|
761
676
|
/**
|
|
762
|
-
*
|
|
763
|
-
* Indentation size for each nested level.
|
|
764
|
-
* 每一级嵌套的缩进宽度。
|
|
677
|
+
* Callback that returns the current string value of the input.
|
|
765
678
|
*/
|
|
766
|
-
|
|
679
|
+
onValueChange?: (value: string) => void;
|
|
767
680
|
/**
|
|
768
|
-
*
|
|
769
|
-
* Accessibility label for the `nav` element.
|
|
770
|
-
* `nav` 元素的无障碍标签。
|
|
681
|
+
* Enables or disables the password visibility toggle when `type="password"`.
|
|
771
682
|
*/
|
|
772
|
-
|
|
683
|
+
showPasswordToggle?: boolean;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Legacy `main-fe` input with prefix/suffix plus helper/error support.
|
|
687
|
+
*/
|
|
688
|
+
declare const Input$1: react.ForwardRefExoticComponent<InputProps$1 & react.RefAttributes<HTMLInputElement>>;
|
|
689
|
+
|
|
690
|
+
type MultiTabItem = {
|
|
773
691
|
/**
|
|
774
|
-
*
|
|
775
|
-
* Enables collapsing and expanding the sidebar.
|
|
776
|
-
* 是否允许侧边栏折叠/展开。
|
|
692
|
+
* Visible label rendered on the tab.
|
|
777
693
|
*/
|
|
778
|
-
|
|
694
|
+
label: ReactNode;
|
|
779
695
|
/**
|
|
780
|
-
*
|
|
781
|
-
* Controlled collapsed state from the parent.
|
|
782
|
-
* 由外部控制的折叠状态。
|
|
696
|
+
* Identifier value of the tab.
|
|
783
697
|
*/
|
|
784
|
-
|
|
698
|
+
value: string;
|
|
699
|
+
};
|
|
700
|
+
interface MultiTabsProps {
|
|
785
701
|
/**
|
|
786
|
-
*
|
|
787
|
-
* Default collapsed state in uncontrolled mode.
|
|
788
|
-
* 非受控模式下的默认折叠状态。
|
|
702
|
+
* List of tabs to render.
|
|
789
703
|
*/
|
|
790
|
-
|
|
704
|
+
items: MultiTabItem[];
|
|
791
705
|
/**
|
|
792
|
-
*
|
|
793
|
-
* Callback fired when the collapsed state changes.
|
|
794
|
-
* 折叠状态变化时触发的回调。
|
|
706
|
+
* Currently selected tab value.
|
|
795
707
|
*/
|
|
796
|
-
|
|
708
|
+
value: string;
|
|
797
709
|
/**
|
|
798
|
-
*
|
|
799
|
-
* Sidebar width when collapsed.
|
|
800
|
-
* 折叠时的侧边栏宽度。
|
|
710
|
+
* Callback fired when the user switches tabs.
|
|
801
711
|
*/
|
|
802
|
-
|
|
712
|
+
onChange: (value: string) => void;
|
|
803
713
|
/**
|
|
804
|
-
*
|
|
805
|
-
* Sidebar width when expanded.
|
|
806
|
-
* 展开时的侧边栏宽度。
|
|
714
|
+
* Extra class names for the tab group wrapper.
|
|
807
715
|
*/
|
|
808
|
-
|
|
716
|
+
className?: string;
|
|
809
717
|
/**
|
|
810
|
-
*
|
|
811
|
-
* Accessibility label for the collapse/expand button.
|
|
812
|
-
* 折叠/展开按钮的无障碍标签。
|
|
718
|
+
* Inline styles for the tab group wrapper.
|
|
813
719
|
*/
|
|
814
|
-
|
|
720
|
+
style?: CSSProperties;
|
|
815
721
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
item: SidebarItem$1;
|
|
821
|
-
depth: number;
|
|
822
|
-
activeItemId?: string;
|
|
823
|
-
onItemClick?: (item: SidebarItem$1) => void;
|
|
824
|
-
indentSize?: number;
|
|
825
|
-
nestedListClassName?: string;
|
|
826
|
-
itemClassName?: string;
|
|
827
|
-
collapsed?: boolean;
|
|
828
|
-
};
|
|
829
|
-
declare function SidebarItem({ item, depth, activeItemId, onItemClick, indentSize, nestedListClassName, itemClassName, collapsed, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
830
|
-
|
|
831
|
-
declare const defaultPermissionChecker: PermissionChecker;
|
|
832
|
-
declare function filterSidebarItems(items: SidebarItem$1[], userPermissions: string[] | undefined, permissionChecker?: PermissionChecker): SidebarItem$1[];
|
|
833
|
-
declare function hasActiveDescendant(item: SidebarItem$1, activeItemId?: string): boolean;
|
|
834
|
-
|
|
835
|
-
type ArgonSidebarHeaderRender = (state: {
|
|
836
|
-
collapsed: boolean;
|
|
837
|
-
hoverExpanded: boolean;
|
|
838
|
-
}) => React.ReactNode;
|
|
839
|
-
type ArgonSidebarProps = SidebarProps & {
|
|
840
|
-
/**
|
|
841
|
-
* Callback khi trạng thái hover mở rộng thay đổi.
|
|
842
|
-
* Callback fired when hover-expansion state changes.
|
|
843
|
-
* 悬停展开状态变化时触发的回调。
|
|
844
|
-
*/
|
|
845
|
-
onHoverChange?: (hovered: boolean) => void;
|
|
846
|
-
/**
|
|
847
|
-
* Nội dung header hoặc hàm render header động.
|
|
848
|
-
* Header content or a render function for dynamic header content.
|
|
849
|
-
* 头部内容,或用于动态渲染头部的函数。
|
|
850
|
-
*/
|
|
851
|
-
header?: React.ReactNode | ArgonSidebarHeaderRender;
|
|
852
|
-
};
|
|
853
|
-
declare function ArgonSidebar({ items, userPermissions, permissionChecker, activeItemId, onItemClick, listClassName, nestedListClassName, itemClassName, indentSize, ariaLabel, className, collapsible, collapsed, defaultCollapsed, onCollapseChange, collapsedWidth, expandedWidth, collapseButtonLabel, style, onHoverChange, header, ...rest }: ArgonSidebarProps): react_jsx_runtime.JSX.Element;
|
|
722
|
+
/**
|
|
723
|
+
* Segmented tab control for legacy `main-fe` screens.
|
|
724
|
+
*/
|
|
725
|
+
declare function MultiTabs({ items, value, onChange, className, style, }: MultiTabsProps): react_jsx_runtime.JSX.Element;
|
|
854
726
|
|
|
855
727
|
type MainFePageTitleProps = {
|
|
856
728
|
/**
|
|
857
|
-
* Tiêu đề chính của trang.
|
|
858
729
|
* Main title of the page.
|
|
859
|
-
* 页面主标题。
|
|
860
730
|
*/
|
|
861
731
|
title: string;
|
|
862
732
|
/**
|
|
863
|
-
* Mô tả ngắn nằm dưới tiêu đề.
|
|
864
733
|
* Short description shown below the title.
|
|
865
|
-
* 显示在标题下方的简短描述。
|
|
866
734
|
*/
|
|
867
735
|
subtitle?: string;
|
|
868
736
|
/**
|
|
869
|
-
* Mật độ hiển thị của header trang.
|
|
870
737
|
* Visual density of the page header.
|
|
871
|
-
* 页面头部的显示密度。
|
|
872
738
|
*/
|
|
873
739
|
size?: 'default' | 'compact';
|
|
874
740
|
/**
|
|
875
|
-
* Slot hiển thị phía trên title, thường dùng cho breadcrumb hoặc status.
|
|
876
741
|
* Slot rendered above the title, commonly used for breadcrumbs or status tags.
|
|
877
|
-
* 显示在标题上方的插槽,常用于面包屑或状态标签。
|
|
878
742
|
*/
|
|
879
743
|
topSlot?: ReactNode;
|
|
880
744
|
/**
|
|
881
|
-
* Slot hiển thị phía bên phải phần header.
|
|
882
745
|
* Slot rendered on the right side of the header.
|
|
883
|
-
* 显示在头部右侧的插槽。
|
|
884
746
|
*/
|
|
885
747
|
rightSlot?: ReactNode;
|
|
886
748
|
};
|
|
887
|
-
|
|
749
|
+
/**
|
|
750
|
+
* Legacy page header for `main-fe` screens.
|
|
751
|
+
*/
|
|
752
|
+
declare function PageTitle$1({ title, subtitle, size, topSlot, rightSlot, }: MainFePageTitleProps): react_jsx_runtime.JSX.Element;
|
|
753
|
+
|
|
754
|
+
type RemoteLoadingProps = {
|
|
755
|
+
/**
|
|
756
|
+
* Extra class names for the full-page loading wrapper.
|
|
757
|
+
*/
|
|
758
|
+
className?: string;
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Full-area loading state for remote or legacy screens.
|
|
762
|
+
*/
|
|
763
|
+
declare function RemoteLoading({ className }: RemoteLoadingProps): react_jsx_runtime.JSX.Element;
|
|
888
764
|
|
|
889
765
|
type MainFeSectionTitleProps = {
|
|
890
766
|
/**
|
|
891
|
-
* Tiêu đề chính của section.
|
|
892
767
|
* Main title of the section.
|
|
893
|
-
* 区块主标题。
|
|
894
768
|
*/
|
|
895
769
|
title: string;
|
|
896
770
|
/**
|
|
897
|
-
* Mô tả ngắn giải thích section.
|
|
898
771
|
* Short description that explains the section.
|
|
899
|
-
* 用于说明该区块的简短描述。
|
|
900
772
|
*/
|
|
901
773
|
subtitle?: string;
|
|
902
774
|
/**
|
|
903
|
-
* Icon hiển thị bên trái title.
|
|
904
775
|
* Icon displayed to the left of the title.
|
|
905
|
-
* 显示在标题左侧的图标。
|
|
906
776
|
*/
|
|
907
777
|
icon?: ReactNode;
|
|
908
778
|
/**
|
|
909
|
-
* Class tùy chỉnh cho wrapper của icon.
|
|
910
779
|
* Custom class for the icon wrapper.
|
|
911
|
-
* 图标容器的自定义 class。
|
|
912
780
|
*/
|
|
913
781
|
iconClassName?: string;
|
|
914
782
|
/**
|
|
915
|
-
* Slot hiển thị bên phải section title.
|
|
916
783
|
* Slot rendered on the right side of the section title.
|
|
917
|
-
* 显示在区块标题右侧的插槽。
|
|
918
784
|
*/
|
|
919
785
|
rightSlot?: ReactNode;
|
|
920
786
|
};
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
* Nhãn hiển thị trên tab.
|
|
926
|
-
* Visible label rendered on the tab.
|
|
927
|
-
* Tab 上显示的标签文本。
|
|
928
|
-
*/
|
|
929
|
-
label: ReactNode;
|
|
930
|
-
/**
|
|
931
|
-
* Giá trị định danh của tab.
|
|
932
|
-
* Identifier value of the tab.
|
|
933
|
-
* Tab 的标识值。
|
|
934
|
-
*/
|
|
935
|
-
value: string;
|
|
936
|
-
};
|
|
937
|
-
interface MultiTabsProps {
|
|
938
|
-
/**
|
|
939
|
-
* Danh sách tab cần render.
|
|
940
|
-
* List of tabs to render.
|
|
941
|
-
* 需要渲染的 tab 列表。
|
|
942
|
-
*/
|
|
943
|
-
items: MultiTabItem[];
|
|
944
|
-
/**
|
|
945
|
-
* Giá trị tab đang được chọn.
|
|
946
|
-
* Currently selected tab value.
|
|
947
|
-
* 当前选中的 tab 值。
|
|
948
|
-
*/
|
|
949
|
-
value: string;
|
|
950
|
-
/**
|
|
951
|
-
* Callback khi người dùng đổi tab.
|
|
952
|
-
* Callback fired when the user switches tabs.
|
|
953
|
-
* 用户切换 tab 时触发的回调。
|
|
954
|
-
*/
|
|
955
|
-
onChange: (value: string) => void;
|
|
956
|
-
/**
|
|
957
|
-
* Class bổ sung cho wrapper của nhóm tab.
|
|
958
|
-
* Extra class names for the tab group wrapper.
|
|
959
|
-
* tab 组容器的额外 class。
|
|
960
|
-
*/
|
|
961
|
-
className?: string;
|
|
962
|
-
/**
|
|
963
|
-
* Inline style cho wrapper của nhóm tab.
|
|
964
|
-
* Inline styles for the tab group wrapper.
|
|
965
|
-
* tab 组容器的内联样式。
|
|
966
|
-
*/
|
|
967
|
-
style?: CSSProperties;
|
|
968
|
-
}
|
|
969
|
-
declare function MultiTabs({ items, value, onChange, className, style, }: MultiTabsProps): react_jsx_runtime.JSX.Element;
|
|
787
|
+
/**
|
|
788
|
+
* Section header for legacy `main-fe` cards and panels.
|
|
789
|
+
*/
|
|
790
|
+
declare function SectionTitle$1({ title, subtitle, icon, iconClassName, rightSlot, }: MainFeSectionTitleProps): react_jsx_runtime.JSX.Element;
|
|
970
791
|
|
|
971
792
|
type StatTone = 'emerald' | 'sky' | 'violet' | 'rose';
|
|
972
793
|
type StatCardProps = {
|
|
973
794
|
/**
|
|
974
|
-
* Nhãn mô tả ý nghĩa của chỉ số.
|
|
975
795
|
* Label describing what the metric represents.
|
|
976
|
-
* 用于说明指标含义的标签。
|
|
977
796
|
*/
|
|
978
797
|
label: ReactNode;
|
|
979
798
|
/**
|
|
980
|
-
* Giá trị chính cần nhấn mạnh.
|
|
981
799
|
* Primary value that should be emphasized.
|
|
982
|
-
* 需要重点展示的主数值。
|
|
983
800
|
*/
|
|
984
801
|
value: ReactNode;
|
|
985
802
|
/**
|
|
986
|
-
* Tông màu chủ đạo của card.
|
|
987
803
|
* Primary visual tone of the card.
|
|
988
|
-
* 卡片的主视觉色调。
|
|
989
804
|
*/
|
|
990
805
|
tone?: StatTone;
|
|
991
806
|
/**
|
|
992
|
-
* Icon hiển thị ở góc phải card.
|
|
993
807
|
* Icon displayed in the right corner of the card.
|
|
994
|
-
* 显示在卡片右侧的图标。
|
|
995
808
|
*/
|
|
996
809
|
icon?: ReactNode;
|
|
997
810
|
/**
|
|
998
|
-
* Class bổ sung cho wrapper của card.
|
|
999
811
|
* Extra class names for the card wrapper.
|
|
1000
|
-
* 卡片容器的额外 class。
|
|
1001
812
|
*/
|
|
1002
813
|
className?: string;
|
|
1003
814
|
};
|
|
815
|
+
/**
|
|
816
|
+
* Metric card for highlighted stats in legacy dashboards or lists.
|
|
817
|
+
*/
|
|
1004
818
|
declare function StatCard({ label, value, tone, icon, className, }: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
1005
819
|
|
|
1006
|
-
type
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
*/
|
|
1012
|
-
className?: string;
|
|
820
|
+
type StatusAction = {
|
|
821
|
+
label: ReactNode;
|
|
822
|
+
color?: string;
|
|
823
|
+
href?: string;
|
|
824
|
+
onClick?: () => void;
|
|
1013
825
|
};
|
|
1014
|
-
|
|
826
|
+
type StatusOption = {
|
|
827
|
+
value: string | number;
|
|
828
|
+
label: ReactNode;
|
|
829
|
+
color?: string;
|
|
830
|
+
action?: StatusAction;
|
|
831
|
+
};
|
|
832
|
+
type StatusPresentation = {
|
|
833
|
+
label: ReactNode;
|
|
834
|
+
color?: string;
|
|
835
|
+
action?: StatusAction;
|
|
836
|
+
};
|
|
837
|
+
declare function getStatusPresentation(status: string | number | null | undefined, options: StatusOption[]): StatusPresentation | null;
|
|
1015
838
|
|
|
1016
|
-
type
|
|
839
|
+
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'className' | 'onChange'> {
|
|
1017
840
|
/**
|
|
1018
|
-
*
|
|
1019
|
-
* Start date in string or ISO format.
|
|
1020
|
-
* 字符串/ISO 格式的开始日期。
|
|
841
|
+
* Extra class names for the outer switch wrapper.
|
|
1021
842
|
*/
|
|
1022
|
-
|
|
843
|
+
className?: string;
|
|
1023
844
|
/**
|
|
1024
|
-
*
|
|
1025
|
-
* End date in string or ISO format.
|
|
1026
|
-
* 字符串/ISO 格式的结束日期。
|
|
845
|
+
* Custom class for the switch track.
|
|
1027
846
|
*/
|
|
1028
|
-
|
|
1029
|
-
};
|
|
1030
|
-
interface DateRangePickerProps {
|
|
847
|
+
trackClassName?: string;
|
|
1031
848
|
/**
|
|
1032
|
-
*
|
|
1033
|
-
* Current date range value of the component.
|
|
1034
|
-
* 组件当前的日期区间值。
|
|
849
|
+
* Custom class for the switch thumb.
|
|
1035
850
|
*/
|
|
1036
|
-
|
|
851
|
+
thumbClassName?: string;
|
|
1037
852
|
/**
|
|
1038
|
-
* Callback
|
|
1039
|
-
* Callback fired when the user confirms a new date range.
|
|
1040
|
-
* 用户确认新的日期区间时触发的回调。
|
|
853
|
+
* Callback that returns the next checked state.
|
|
1041
854
|
*/
|
|
1042
|
-
|
|
855
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Legacy `main-fe` styled switch.
|
|
859
|
+
*/
|
|
860
|
+
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
|
|
861
|
+
|
|
862
|
+
declare const alertVariants: (props?: ({
|
|
863
|
+
variant?: "success" | "warning" | "destructive" | "default" | "info" | null | undefined;
|
|
864
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
865
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
866
|
+
type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;
|
|
867
|
+
type AlertTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
868
|
+
interface AlertProps extends SharedComponentProps {
|
|
869
|
+
description?: ReactNode;
|
|
870
|
+
icon?: ReactNode;
|
|
871
|
+
tone?: AlertTone;
|
|
872
|
+
variant?: AlertVariant;
|
|
873
|
+
title?: ReactNode;
|
|
874
|
+
children?: ReactNode;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Status-aware alert panel with selectable variants, helper text, and optional iconography.
|
|
878
|
+
* @remarks
|
|
879
|
+
* Use `variant` (default/info/success/warning/destructive) and `size` (sm/md/lg) to tune the tone, show `description` or `helperText`, and decorate with a spinner via `loading`.
|
|
880
|
+
*/
|
|
881
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
882
|
+
|
|
883
|
+
type BreadcrumbItem = {
|
|
1043
884
|
/**
|
|
1044
|
-
*
|
|
1045
|
-
* Label shown above the picker.
|
|
1046
|
-
* 显示在选择器上方的标签。
|
|
885
|
+
* Visible content of the breadcrumb item.
|
|
1047
886
|
*/
|
|
1048
|
-
label
|
|
887
|
+
label: ReactNode;
|
|
1049
888
|
/**
|
|
1050
|
-
*
|
|
1051
|
-
* Placeholder shown before a range is selected.
|
|
1052
|
-
* 未选择日期时显示的占位文本。
|
|
889
|
+
* Callback fired when the item is clicked as a button.
|
|
1053
890
|
*/
|
|
1054
|
-
|
|
891
|
+
onClick?: () => void;
|
|
1055
892
|
/**
|
|
1056
|
-
*
|
|
1057
|
-
* Extra class names for the picker wrapper.
|
|
1058
|
-
* 选择器容器的额外 class。
|
|
1059
|
-
*/
|
|
1060
|
-
className?: string;
|
|
1061
|
-
}
|
|
1062
|
-
declare function DateRangePicker({ value, onChange, label, placeholder, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1063
|
-
|
|
1064
|
-
type QuickOption = {
|
|
1065
|
-
/**
|
|
1066
|
-
* Nhãn hiển thị của lựa chọn nhanh.
|
|
1067
|
-
* Visible label of the quick option.
|
|
1068
|
-
* 快捷选项的显示标签。
|
|
893
|
+
* Navigation URL when the item behaves as a link.
|
|
1069
894
|
*/
|
|
1070
|
-
|
|
895
|
+
href?: string;
|
|
1071
896
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
* Value applied to the picker when the quick option is chosen.
|
|
1074
|
-
* 选择快捷项时写入 picker 的值。
|
|
897
|
+
* Marks the item as the current location.
|
|
1075
898
|
*/
|
|
1076
|
-
|
|
899
|
+
current?: boolean;
|
|
1077
900
|
};
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* Nhãn hiển thị phía trên picker.
|
|
1081
|
-
* Label shown above the picker.
|
|
1082
|
-
* 显示在选择器上方的标签。
|
|
1083
|
-
*/
|
|
1084
|
-
label?: ReactNode;
|
|
1085
|
-
/**
|
|
1086
|
-
* Placeholder khi chưa có giá trị.
|
|
1087
|
-
* Placeholder shown when no value is set.
|
|
1088
|
-
* 未设置值时显示的占位文本。
|
|
1089
|
-
*/
|
|
1090
|
-
placeholder?: string;
|
|
1091
|
-
/**
|
|
1092
|
-
* Giá trị hiện tại của picker.
|
|
1093
|
-
* Current value of the picker.
|
|
1094
|
-
* picker 当前值。
|
|
1095
|
-
*/
|
|
1096
|
-
value?: string;
|
|
1097
|
-
/**
|
|
1098
|
-
* Callback khi giá trị ngày giờ thay đổi.
|
|
1099
|
-
* Callback fired when the date-time value changes.
|
|
1100
|
-
* 日期时间值变化时触发的回调。
|
|
1101
|
-
*/
|
|
1102
|
-
onChange: (value: string) => void;
|
|
1103
|
-
/**
|
|
1104
|
-
* Vô hiệu hóa toàn bộ picker.
|
|
1105
|
-
* Disables the entire picker.
|
|
1106
|
-
* 禁用整个选择器。
|
|
1107
|
-
*/
|
|
1108
|
-
disabled?: boolean;
|
|
901
|
+
type BreadcrumbProps = {
|
|
1109
902
|
/**
|
|
1110
|
-
*
|
|
1111
|
-
* Error message shown below the field.
|
|
1112
|
-
* 显示在字段下方的错误信息。
|
|
903
|
+
* List of breadcrumb items.
|
|
1113
904
|
*/
|
|
1114
|
-
|
|
905
|
+
items: BreadcrumbItem[];
|
|
1115
906
|
/**
|
|
1116
|
-
*
|
|
1117
|
-
* Extra class names for the picker wrapper.
|
|
1118
|
-
* 选择器容器的额外 class。
|
|
907
|
+
* Extra class names for the `nav` element.
|
|
1119
908
|
*/
|
|
1120
909
|
className?: string;
|
|
1121
910
|
/**
|
|
1122
|
-
*
|
|
1123
|
-
* Format used to parse the incoming `value`.
|
|
1124
|
-
* 用于解析输入 `value` 的格式。
|
|
1125
|
-
*/
|
|
1126
|
-
parseFormat?: string;
|
|
1127
|
-
/**
|
|
1128
|
-
* Format dùng để trả dữ liệu ra ngoài qua `onChange`.
|
|
1129
|
-
* Format used for outgoing values passed to `onChange`.
|
|
1130
|
-
* 通过 `onChange` 输出时使用的格式。
|
|
1131
|
-
*/
|
|
1132
|
-
outputFormat?: string;
|
|
1133
|
-
/**
|
|
1134
|
-
* Format hiển thị cho phần text trong trigger.
|
|
1135
|
-
* Display format for the text shown in the trigger.
|
|
1136
|
-
* 触发器中显示文本所使用的格式。
|
|
1137
|
-
*/
|
|
1138
|
-
displayFormat?: string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Mốc ngày giờ nhỏ nhất được phép chọn.
|
|
1141
|
-
* Minimum selectable date-time.
|
|
1142
|
-
* 可选择的最小日期时间。
|
|
1143
|
-
*/
|
|
1144
|
-
minDateTime?: Date;
|
|
1145
|
-
/**
|
|
1146
|
-
* Danh sách lựa chọn nhanh.
|
|
1147
|
-
* List of quick-select options.
|
|
1148
|
-
* 快捷选择项列表。
|
|
1149
|
-
*/
|
|
1150
|
-
quickOptions?: QuickOption[];
|
|
1151
|
-
/**
|
|
1152
|
-
* Callback khi người dùng chọn một quick option.
|
|
1153
|
-
* Callback fired when a quick option is selected.
|
|
1154
|
-
* 用户选择快捷项时触发的回调。
|
|
1155
|
-
*/
|
|
1156
|
-
onQuickSelect?: (value: string) => void;
|
|
1157
|
-
/**
|
|
1158
|
-
* Callback khi người dùng xóa giá trị hiện tại.
|
|
1159
|
-
* Callback fired when the current value is cleared.
|
|
1160
|
-
* 用户清空当前值时触发的回调。
|
|
1161
|
-
*/
|
|
1162
|
-
onClear?: () => void;
|
|
1163
|
-
/**
|
|
1164
|
-
* Tiêu đề cho nhóm quick ranges.
|
|
1165
|
-
* Title for the quick-range section.
|
|
1166
|
-
* 快捷范围分组标题。
|
|
1167
|
-
*/
|
|
1168
|
-
quickRangesLabel?: string;
|
|
1169
|
-
/**
|
|
1170
|
-
* Nhãn hiển thị cho hành động clear.
|
|
1171
|
-
* Label shown for the clear action.
|
|
1172
|
-
* 清空操作显示的标签。
|
|
1173
|
-
*/
|
|
1174
|
-
clearLabel?: string;
|
|
1175
|
-
/**
|
|
1176
|
-
* Render panel bằng portal ra ngoài layout hiện tại.
|
|
1177
|
-
* Renders the picker panel in a portal outside the current layout.
|
|
1178
|
-
* 通过 portal 在当前布局外渲染面板。
|
|
911
|
+
* Character or node used to separate items.
|
|
1179
912
|
*/
|
|
1180
|
-
|
|
1181
|
-
}
|
|
1182
|
-
declare function
|
|
913
|
+
separator?: ReactNode;
|
|
914
|
+
};
|
|
915
|
+
declare function Breadcrumb({ items, className, separator, }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
1183
916
|
|
|
1184
917
|
declare const buttonVariants: (props?: ({
|
|
1185
|
-
variant?: "link" | "
|
|
918
|
+
variant?: "link" | "outline" | "destructive" | "default" | "confirm" | "secondary" | "ghost" | "create" | null | undefined;
|
|
1186
919
|
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
1187
920
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1188
921
|
type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
1189
922
|
type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
1190
923
|
interface ButtonProps extends Omit<SharedComponentProps, 'size'>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'className'> {
|
|
1191
|
-
/**
|
|
1192
|
-
* Biến thể giao diện của button.
|
|
1193
|
-
* Visual variant of the button.
|
|
1194
|
-
* 按钮的视觉变体。
|
|
1195
|
-
*/
|
|
1196
924
|
variant?: ButtonVariant;
|
|
1197
|
-
/**
|
|
1198
|
-
* Kích thước hiển thị của button.
|
|
1199
|
-
* Visual size of the button.
|
|
1200
|
-
* 按钮的显示尺寸。
|
|
1201
|
-
*/
|
|
1202
925
|
size?: ButtonSize;
|
|
1203
|
-
|
|
1204
|
-
* Icon hiển thị trước nội dung chính.
|
|
1205
|
-
* Icon rendered before the main content.
|
|
1206
|
-
* 显示在主要内容前面的图标。
|
|
1207
|
-
*/
|
|
926
|
+
block?: boolean;
|
|
1208
927
|
startIcon?: ReactNode;
|
|
1209
|
-
/**
|
|
1210
|
-
* Icon hiển thị sau nội dung chính.
|
|
1211
|
-
* Icon rendered after the main content.
|
|
1212
|
-
* 显示在主要内容后面的图标。
|
|
1213
|
-
*/
|
|
1214
928
|
endIcon?: ReactNode;
|
|
1215
|
-
/**
|
|
1216
|
-
* Nội dung custom của button.
|
|
1217
|
-
* Custom button content.
|
|
1218
|
-
* 按钮的自定义内容。
|
|
1219
|
-
*/
|
|
1220
929
|
children?: ReactNode;
|
|
1221
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Primary action button with shadcn-inspired variants, helper text, and optional loading rewards.
|
|
933
|
+
* @remarks
|
|
934
|
+
* Support `variant` (default/destructive/outline/secondary/ghost/link) and `size` (sm/md/lg), adorn with icons, and surface helper or error text without needing custom wrappers.
|
|
935
|
+
*/
|
|
1222
936
|
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1223
937
|
|
|
1224
938
|
declare const inputVariants: (props?: ({
|
|
1225
|
-
variant?: "
|
|
939
|
+
variant?: "outline" | "default" | "ghost" | null | undefined;
|
|
1226
940
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1227
941
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1228
942
|
type InputVariant = VariantProps<typeof inputVariants>['variant'];
|
|
1229
943
|
interface InputProps extends SharedComponentProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'prefix'> {
|
|
1230
|
-
/**
|
|
1231
|
-
* Biến thể giao diện của input.
|
|
1232
|
-
* Visual variant of the input.
|
|
1233
|
-
* 输入框的视觉变体。
|
|
1234
|
-
*/
|
|
1235
944
|
variant?: InputVariant;
|
|
1236
|
-
/**
|
|
1237
|
-
* Nội dung hiển thị ở mép trái input.
|
|
1238
|
-
* Content rendered on the left side of the input.
|
|
1239
|
-
* 显示在输入框左侧的内容。
|
|
1240
|
-
*/
|
|
1241
945
|
prefix?: ReactNode;
|
|
1242
|
-
/**
|
|
1243
|
-
* Nội dung hiển thị ở mép phải input.
|
|
1244
|
-
* Content rendered on the right side of the input.
|
|
1245
|
-
* 显示在输入框右侧的内容。
|
|
1246
|
-
*/
|
|
1247
946
|
suffix?: ReactNode;
|
|
1248
|
-
/**
|
|
1249
|
-
* Class áp trực tiếp lên thẻ `<input>`.
|
|
1250
|
-
* Class names applied directly to the `<input>` element.
|
|
1251
|
-
* 直接作用于 `<input>` 元素的 class。
|
|
1252
|
-
*/
|
|
1253
947
|
inputClassName?: string;
|
|
1254
|
-
/**
|
|
1255
|
-
* Callback trả về giá trị string hiện tại của input.
|
|
1256
|
-
* Callback that returns the current string value of the input.
|
|
1257
|
-
* 返回当前输入字符串值的回调。
|
|
1258
|
-
*/
|
|
1259
948
|
onValueChange?: (value: string) => void;
|
|
1260
|
-
/**
|
|
1261
|
-
* Bật hoặc tắt nút hiện/ẩn mật khẩu khi `type="password"`.
|
|
1262
|
-
* Enables or disables the password visibility toggle when `type="password"`.
|
|
1263
|
-
* 当 `type="password"` 时启用或禁用密码显隐切换按钮。
|
|
1264
|
-
*/
|
|
1265
949
|
showPasswordToggle?: boolean;
|
|
1266
950
|
}
|
|
951
|
+
/**
|
|
952
|
+
* Accessible input surface with shadcn styling, optional prefix/suffix, and helpers for feedback.
|
|
953
|
+
* @remarks
|
|
954
|
+
* Swap `variant` (default/ghost/outline) and `size` (sm/md/lg), keep adornments with `prefix`/`suffix`, display helper/error text, and show a spinner via `loading`.
|
|
955
|
+
*/
|
|
1267
956
|
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1268
957
|
|
|
1269
|
-
type
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
958
|
+
type FormatOnBlur = 'trim' | 'fixed' | 'none';
|
|
959
|
+
type NumericMode = 'integer' | 'decimal';
|
|
960
|
+
type DecimalSeparator = '.' | ',' | 'auto';
|
|
961
|
+
|
|
962
|
+
interface NumericInputProps extends Omit<InputProps, 'type' | 'inputMode' | 'value' | 'defaultValue' | 'onChange' | 'onValueChange'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'onFocus' | 'name'> {
|
|
963
|
+
value?: string | number;
|
|
964
|
+
defaultValue?: string | number;
|
|
965
|
+
onValueChange?: (raw: string) => void;
|
|
966
|
+
onNumberChange?: (num: number | null) => void;
|
|
967
|
+
mode?: NumericMode;
|
|
968
|
+
decimalScale?: number;
|
|
969
|
+
maxDecimalScale?: number;
|
|
970
|
+
scale?: number;
|
|
971
|
+
min?: number;
|
|
972
|
+
max?: number;
|
|
973
|
+
allowNegative?: boolean;
|
|
974
|
+
decimalSeparator?: DecimalSeparator;
|
|
975
|
+
formatOnBlur?: FormatOnBlur;
|
|
976
|
+
clampOnBlur?: boolean;
|
|
977
|
+
}
|
|
978
|
+
declare const NumericInput: react.ForwardRefExoticComponent<NumericInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
979
|
+
|
|
980
|
+
declare const textareaVariants: (props?: ({
|
|
981
|
+
variant?: "outline" | "default" | "ghost" | null | undefined;
|
|
982
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
983
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
984
|
+
type TextareaVariant = VariantProps<typeof textareaVariants>['variant'];
|
|
985
|
+
interface TextareaProps extends SharedComponentProps, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
|
|
986
|
+
variant?: TextareaVariant;
|
|
987
|
+
textareaClassName?: string;
|
|
988
|
+
onValueChange?: (value: string) => void;
|
|
989
|
+
suffix?: ReactNode;
|
|
990
|
+
}
|
|
991
|
+
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
992
|
+
|
|
993
|
+
declare function Card({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
994
|
+
declare function CardHeader({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
995
|
+
declare function CardTitle({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
996
|
+
declare function CardDescription({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
997
|
+
declare function CardAction({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
998
|
+
declare function CardContent({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
999
|
+
declare function CardFooter({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
1000
|
+
|
|
1001
|
+
type ComboboxOption$1 = {
|
|
1275
1002
|
label: string;
|
|
1276
|
-
/**
|
|
1277
|
-
* Giá trị thật của option.
|
|
1278
|
-
* Actual value of the option.
|
|
1279
|
-
* 选项的实际值。
|
|
1280
|
-
*/
|
|
1281
1003
|
value: string | number;
|
|
1282
|
-
/**
|
|
1283
|
-
* Mô tả phụ của option nếu UI muốn hiển thị thêm.
|
|
1284
|
-
* Secondary description for the option when the UI needs extra context.
|
|
1285
|
-
* 当界面需要更多说明时可显示的次级描述。
|
|
1286
|
-
*/
|
|
1287
1004
|
description?: string;
|
|
1288
|
-
/**
|
|
1289
|
-
* Giá trị dùng riêng cho việc tìm kiếm.
|
|
1290
|
-
* Alternate value used specifically for searching.
|
|
1291
|
-
* 专门用于搜索匹配的值。
|
|
1292
|
-
*/
|
|
1293
1005
|
searchValue?: string;
|
|
1294
|
-
/**
|
|
1295
|
-
* Đánh dấu option không thể chọn.
|
|
1296
|
-
* Marks the option as unavailable for selection.
|
|
1297
|
-
* 标记该选项不可选。
|
|
1298
|
-
*/
|
|
1299
1006
|
disabled?: boolean;
|
|
1300
1007
|
};
|
|
1301
|
-
type ComboboxAsyncConfig = {
|
|
1302
|
-
/**
|
|
1303
|
-
* Callback tìm kiếm từ xa mỗi khi người dùng nhập.
|
|
1304
|
-
* Remote search callback fired when the user types.
|
|
1305
|
-
* 用户输入时触发的远程搜索回调。
|
|
1306
|
-
*/
|
|
1307
|
-
onSearch?: (value: string) => void;
|
|
1308
|
-
/**
|
|
1309
|
-
* Callback tải thêm dữ liệu khi dropdown chạm cuối.
|
|
1310
|
-
* Callback for loading more data when the dropdown reaches the end.
|
|
1311
|
-
* 下拉列表滚动到底部时加载更多数据的回调。
|
|
1312
|
-
*/
|
|
1313
|
-
onLoadMore?: () => void;
|
|
1314
|
-
/**
|
|
1315
|
-
* Cho biết còn dữ liệu để tải thêm hay không.
|
|
1316
|
-
* Indicates whether more remote data is available.
|
|
1317
|
-
* 是否还有更多远程数据可加载。
|
|
1318
|
-
*/
|
|
1319
|
-
hasMore?: boolean;
|
|
1320
|
-
/**
|
|
1321
|
-
* Có reset từ khóa tìm kiếm khi focus lại hay không.
|
|
1322
|
-
* Whether to reset the search term when the field is focused again.
|
|
1323
|
-
* 再次聚焦时是否重置搜索词。
|
|
1324
|
-
*/
|
|
1325
|
-
resetSearchOnFocus?: boolean;
|
|
1326
|
-
/**
|
|
1327
|
-
* Có khôi phục option đã chọn khi blur mà chưa chọn mới hay không.
|
|
1328
|
-
* Whether to restore the selected option on blur if nothing new is chosen.
|
|
1329
|
-
* 失焦且未选择新值时是否恢复已选项。
|
|
1330
|
-
*/
|
|
1331
|
-
restoreSelectedOnBlur?: boolean;
|
|
1332
|
-
};
|
|
1333
1008
|
interface ComboboxProps extends SharedComponentProps {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1009
|
+
options: ComboboxOption$1[];
|
|
1010
|
+
value?: string | number;
|
|
1011
|
+
placeholder?: string;
|
|
1012
|
+
onChange?: (value: ComboboxOption$1['value']) => void;
|
|
1013
|
+
onInputChange?: (value: string) => void;
|
|
1014
|
+
loading?: boolean;
|
|
1015
|
+
disabled?: boolean;
|
|
1016
|
+
searchPlaceholder?: string;
|
|
1017
|
+
helperId?: string;
|
|
1018
|
+
errorId?: string;
|
|
1019
|
+
allowClear?: boolean;
|
|
1020
|
+
onClear?: () => void;
|
|
1021
|
+
portal?: boolean;
|
|
1022
|
+
}
|
|
1023
|
+
declare const Combobox: react.ForwardRefExoticComponent<ComboboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
1024
|
+
|
|
1025
|
+
type ComboboxOption = {
|
|
1026
|
+
label: string;
|
|
1027
|
+
value: string | number;
|
|
1028
|
+
description?: string;
|
|
1029
|
+
searchValue?: string;
|
|
1030
|
+
disabled?: boolean;
|
|
1031
|
+
};
|
|
1032
|
+
interface AsyncComboboxProps extends SharedComponentProps {
|
|
1339
1033
|
options: ComboboxOption[];
|
|
1340
|
-
/**
|
|
1341
|
-
* Giá trị đang được chọn.
|
|
1342
|
-
* Currently selected value.
|
|
1343
|
-
* 当前选中的值。
|
|
1344
|
-
*/
|
|
1345
1034
|
value?: string | number;
|
|
1346
|
-
/**
|
|
1347
|
-
* Placeholder hiển thị khi chưa có giá trị.
|
|
1348
|
-
* Placeholder shown when no value is selected.
|
|
1349
|
-
* 未选择值时显示的占位文本。
|
|
1350
|
-
*/
|
|
1351
1035
|
placeholder?: string;
|
|
1352
|
-
/**
|
|
1353
|
-
* Callback khi người dùng chọn một option.
|
|
1354
|
-
* Callback fired when the user selects an option.
|
|
1355
|
-
* 用户选择某个选项时触发的回调。
|
|
1356
|
-
*/
|
|
1357
1036
|
onChange?: (value: ComboboxOption['value']) => void;
|
|
1358
|
-
/**
|
|
1359
|
-
* Callback khi nội dung nhập thay đổi.
|
|
1360
|
-
* Callback fired when the input text changes.
|
|
1361
|
-
* 输入内容变化时触发的回调。
|
|
1362
|
-
*/
|
|
1363
1037
|
onInputChange?: (value: string) => void;
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
* Manual callback for loading more items at the end of the list.
|
|
1367
|
-
* 列表末尾手动加载更多的回调。
|
|
1368
|
-
*/
|
|
1369
|
-
onLoadMore?: () => void;
|
|
1370
|
-
/**
|
|
1371
|
-
* Cho biết còn dữ liệu để load thêm hay không.
|
|
1372
|
-
* Indicates whether more data can be loaded.
|
|
1373
|
-
* 是否还有更多数据可加载。
|
|
1374
|
-
*/
|
|
1375
|
-
hasMore?: boolean;
|
|
1376
|
-
/**
|
|
1377
|
-
* Cấu hình cho chế độ async/remote search.
|
|
1378
|
-
* Configuration for async or remote-search behavior.
|
|
1379
|
-
* 异步/远程搜索模式的配置。
|
|
1380
|
-
*/
|
|
1381
|
-
asyncConfig?: ComboboxAsyncConfig;
|
|
1382
|
-
/**
|
|
1383
|
-
* Trạng thái đang tải dữ liệu.
|
|
1384
|
-
* Loading state while data is being fetched.
|
|
1385
|
-
* 数据加载中的状态。
|
|
1386
|
-
*/
|
|
1038
|
+
onInputFocus?: () => void;
|
|
1039
|
+
onScrollEnd?: () => void;
|
|
1387
1040
|
loading?: boolean;
|
|
1388
|
-
/**
|
|
1389
|
-
* Vô hiệu hóa toàn bộ combobox.
|
|
1390
|
-
* Disables the entire combobox.
|
|
1391
|
-
* 禁用整个 combobox。
|
|
1392
|
-
*/
|
|
1393
1041
|
disabled?: boolean;
|
|
1394
|
-
/**
|
|
1395
|
-
* Placeholder dành riêng cho ô search.
|
|
1396
|
-
* Placeholder specifically for the search input.
|
|
1397
|
-
* 搜索输入框专用的占位文本。
|
|
1398
|
-
*/
|
|
1399
1042
|
searchPlaceholder?: string;
|
|
1400
|
-
/**
|
|
1401
|
-
* `id` dùng cho helper text để liên kết accessibility.
|
|
1402
|
-
* `id` used by helper text for accessibility linkage.
|
|
1403
|
-
* 用于辅助文本无障碍关联的 `id`。
|
|
1404
|
-
*/
|
|
1405
1043
|
helperId?: string;
|
|
1406
|
-
/**
|
|
1407
|
-
* `id` dùng cho error text để liên kết accessibility.
|
|
1408
|
-
* `id` used by error text for accessibility linkage.
|
|
1409
|
-
* 用于错误文本无障碍关联的 `id`。
|
|
1410
|
-
*/
|
|
1411
1044
|
errorId?: string;
|
|
1412
|
-
/**
|
|
1413
|
-
* Cho phép hiển thị nút xóa giá trị hiện tại.
|
|
1414
|
-
* Enables a button for clearing the current value.
|
|
1415
|
-
* 是否显示清空当前值的按钮。
|
|
1416
|
-
*/
|
|
1417
1045
|
allowClear?: boolean;
|
|
1418
|
-
/**
|
|
1419
|
-
* Callback khi người dùng bấm xóa giá trị.
|
|
1420
|
-
* Callback fired when the current value is cleared.
|
|
1421
|
-
* 用户清空当前值时触发的回调。
|
|
1422
|
-
*/
|
|
1423
1046
|
onClear?: () => void;
|
|
1424
|
-
/**
|
|
1425
|
-
* Render dropdown bằng portal ra ngoài layout hiện tại.
|
|
1426
|
-
* Renders the dropdown in a portal outside the current layout.
|
|
1427
|
-
* 通过 portal 在当前布局外渲染下拉层。
|
|
1428
|
-
*/
|
|
1429
1047
|
portal?: boolean;
|
|
1430
|
-
/**
|
|
1431
|
-
* Class bổ sung cho dropdown menu.
|
|
1432
|
-
* Extra class names for the dropdown menu.
|
|
1433
|
-
* 下拉菜单的额外 class。
|
|
1434
|
-
*/
|
|
1435
|
-
dropdownClassName?: string;
|
|
1436
|
-
/**
|
|
1437
|
-
* Ghi đè chiều cao tối đa của dropdown.
|
|
1438
|
-
* Overrides the maximum height of the dropdown.
|
|
1439
|
-
* 覆盖下拉层的最大高度。
|
|
1440
|
-
*/
|
|
1441
|
-
dropdownMaxHeight?: number;
|
|
1442
|
-
/**
|
|
1443
|
-
* Giữ style lỗi nhưng không render dòng error bên dưới field.
|
|
1444
|
-
* Keeps error styling without rendering the error text below the field.
|
|
1445
|
-
* 保留错误样式,但不在字段下方渲染错误文本。
|
|
1446
|
-
*/
|
|
1447
|
-
hideErrorMessage?: boolean;
|
|
1448
1048
|
}
|
|
1449
|
-
declare const
|
|
1049
|
+
declare const AsyncCombobox: react.ForwardRefExoticComponent<AsyncComboboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
1050
|
+
|
|
1051
|
+
type MultiSelectOption = {
|
|
1052
|
+
label: string;
|
|
1053
|
+
value: string | number;
|
|
1054
|
+
disabled?: boolean;
|
|
1055
|
+
searchValue?: string;
|
|
1056
|
+
};
|
|
1057
|
+
interface MultiSelectProps extends SharedComponentProps {
|
|
1058
|
+
options: MultiSelectOption[];
|
|
1059
|
+
value?: Array<MultiSelectOption['value']>;
|
|
1060
|
+
placeholder?: string;
|
|
1061
|
+
onChange?: (value: Array<MultiSelectOption['value']>) => void;
|
|
1062
|
+
onSearch?: (value: string) => void;
|
|
1063
|
+
loading?: boolean;
|
|
1064
|
+
disabled?: boolean;
|
|
1065
|
+
searchable?: boolean;
|
|
1066
|
+
searchPlaceholder?: string;
|
|
1067
|
+
}
|
|
1068
|
+
declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Vertical form wrapper that keeps consistent spacing between fields.
|
|
1072
|
+
* @remarks
|
|
1073
|
+
* Extend `className` or pass native form props while maintaining consistent letter spacing for each child row.
|
|
1074
|
+
*/
|
|
1075
|
+
declare function Form({ className, ...props }: FormHTMLAttributes<HTMLFormElement>): react_jsx_runtime.JSX.Element;
|
|
1076
|
+
interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
1077
|
+
children: ReactNode;
|
|
1078
|
+
label?: ReactNode;
|
|
1079
|
+
helperText?: ReactNode;
|
|
1080
|
+
errorMessage?: ReactNode;
|
|
1081
|
+
required?: boolean;
|
|
1082
|
+
htmlFor?: string;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Grid-aligned form field wrapper for label/control/description clusters.
|
|
1086
|
+
*/
|
|
1087
|
+
declare const FormField: react.ForwardRefExoticComponent<FormFieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Container for a single form item to stack label, control, and messages vertically.
|
|
1090
|
+
*/
|
|
1091
|
+
declare const FormItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Styled label with strong typography and surface-aware coloring.
|
|
1094
|
+
*/
|
|
1095
|
+
declare const FormLabel: react.ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & react.RefAttributes<HTMLLabelElement>>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Flex container that aligns inputs and accessory controls horizontally.
|
|
1098
|
+
*/
|
|
1099
|
+
declare const FormControl: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Neutral description text for a form field.
|
|
1102
|
+
*/
|
|
1103
|
+
declare const FormDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Inline error message text for destructive validation states.
|
|
1106
|
+
*/
|
|
1107
|
+
declare const FormMessage: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
1108
|
+
|
|
1109
|
+
type SelectOption = {
|
|
1110
|
+
label: ReactNode;
|
|
1111
|
+
value: string | number;
|
|
1112
|
+
disabled?: boolean;
|
|
1113
|
+
};
|
|
1114
|
+
type Option = SelectOption;
|
|
1115
|
+
declare const triggerVariants$1: (props?: ({
|
|
1116
|
+
variant?: "outline" | "default" | "ghost" | null | undefined;
|
|
1117
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1118
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1119
|
+
type SelectVariant$1 = VariantProps<typeof triggerVariants$1>['variant'];
|
|
1120
|
+
interface SelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
1121
|
+
options: SelectOption[];
|
|
1122
|
+
value?: string | number;
|
|
1123
|
+
defaultValue?: string | number;
|
|
1124
|
+
placeholder?: string;
|
|
1125
|
+
onChange?: (value: SelectOption['value']) => void;
|
|
1126
|
+
variant?: SelectVariant$1;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Select field powered by Radix primitives with customizable trigger variants and accessible helpers.
|
|
1130
|
+
* @remarks
|
|
1131
|
+
* Provide `options`, manage `value`/`defaultValue`, and style via `variant` (default/outline/ghost) plus `size` (sm/md/lg); show helper/error text and `loading`.
|
|
1132
|
+
*/
|
|
1133
|
+
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1134
|
+
|
|
1135
|
+
type SearchableSelectOption = {
|
|
1136
|
+
label: ReactNode;
|
|
1137
|
+
value: string | number;
|
|
1138
|
+
disabled?: boolean;
|
|
1139
|
+
searchValue?: string;
|
|
1140
|
+
};
|
|
1141
|
+
declare const triggerVariants: (props?: ({
|
|
1142
|
+
variant?: "outline" | "default" | "ghost" | null | undefined;
|
|
1143
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1144
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1145
|
+
type SelectVariant = VariantProps<typeof triggerVariants>['variant'];
|
|
1146
|
+
interface SearchableSelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
1147
|
+
options: SearchableSelectOption[];
|
|
1148
|
+
value?: string | number;
|
|
1149
|
+
defaultValue?: string | number;
|
|
1150
|
+
placeholder?: string;
|
|
1151
|
+
onChange?: (value: SearchableSelectOption['value']) => void;
|
|
1152
|
+
variant?: SelectVariant;
|
|
1153
|
+
onSearch?: (query: string) => void;
|
|
1154
|
+
loading?: boolean;
|
|
1155
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1156
|
+
searchPlaceholder?: string;
|
|
1157
|
+
}
|
|
1158
|
+
declare const SearchableSelect: react.ForwardRefExoticComponent<SearchableSelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1159
|
+
|
|
1160
|
+
type Trend = 'up' | 'down' | 'flat';
|
|
1161
|
+
interface StatProps extends SharedComponentProps {
|
|
1162
|
+
value: ReactNode;
|
|
1163
|
+
helper?: ReactNode;
|
|
1164
|
+
delta?: ReactNode;
|
|
1165
|
+
trend?: Trend;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Metric card that exposes a primary `value`, optional `delta`, and severity-aware `trend` indicator.
|
|
1169
|
+
* @remarks
|
|
1170
|
+
* Accepts `size` (sm/md/lg), shows `helper` or helper text, and can render `loading`/`disabled` states while aligning helper/error messaging.
|
|
1171
|
+
*/
|
|
1172
|
+
declare function Stat({ label, value, helper, delta, trend, helperText, errorMessage, loading, disabled, size, className, style, }: StatProps): react_jsx_runtime.JSX.Element;
|
|
1450
1173
|
|
|
1451
1174
|
type DataTableSortDirection = 'asc' | 'desc';
|
|
1452
1175
|
type DataTableAlign = 'left' | 'center' | 'right';
|
|
1453
1176
|
type DataTableSortState = {
|
|
1454
|
-
/**
|
|
1455
|
-
* `key` của column đang được sort.
|
|
1456
|
-
* `key` of the column currently being sorted.
|
|
1457
|
-
* 当前参与排序的列 `key`。
|
|
1458
|
-
*/
|
|
1459
1177
|
key: string;
|
|
1460
|
-
/**
|
|
1461
|
-
* Hướng sắp xếp hiện tại.
|
|
1462
|
-
* Current sort direction.
|
|
1463
|
-
* 当前排序方向。
|
|
1464
|
-
*/
|
|
1465
1178
|
direction: DataTableSortDirection;
|
|
1466
1179
|
};
|
|
1467
1180
|
type DataTableColumn<T> = {
|
|
1468
|
-
/**
|
|
1469
|
-
* Khóa định danh duy nhất của column.
|
|
1470
|
-
* Unique identifier of the column.
|
|
1471
|
-
* 列的唯一标识键。
|
|
1472
|
-
*/
|
|
1473
1181
|
key: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* Nội dung header hiển thị của column.
|
|
1476
|
-
* Visible header content of the column.
|
|
1477
|
-
* 列头显示内容。
|
|
1478
|
-
*/
|
|
1479
1182
|
title: ReactNode;
|
|
1480
|
-
/**
|
|
1481
|
-
* Tên field trong record dùng để lấy dữ liệu mặc định.
|
|
1482
|
-
* Record field used as the default data source.
|
|
1483
|
-
* 默认取值时对应 record 的字段名。
|
|
1484
|
-
*/
|
|
1485
1183
|
dataIndex?: keyof T;
|
|
1486
|
-
/**
|
|
1487
|
-
* Chiều rộng cố định hoặc tương đối của column.
|
|
1488
|
-
* Fixed or relative width of the column.
|
|
1489
|
-
* 列的固定或相对宽度。
|
|
1490
|
-
*/
|
|
1491
1184
|
width?: number | string;
|
|
1492
|
-
/**
|
|
1493
|
-
* Hàm custom render cell.
|
|
1494
|
-
* Custom renderer for the cell content.
|
|
1495
|
-
* 单元格内容的自定义渲染函数。
|
|
1496
|
-
*/
|
|
1497
1185
|
render?: (value: T[keyof T] | undefined, record: T, index: number) => ReactNode;
|
|
1498
|
-
/**
|
|
1499
|
-
* Bật hoặc tắt khả năng sort cho column.
|
|
1500
|
-
* Enables or disables sorting for the column.
|
|
1501
|
-
* 是否启用该列排序。
|
|
1502
|
-
*/
|
|
1503
1186
|
sortable?: boolean;
|
|
1187
|
+
sorter?: (a: T, b: T) => number;
|
|
1188
|
+
sortValue?: (record: T) => string | number | Date | null | undefined;
|
|
1189
|
+
headerAlign?: DataTableAlign;
|
|
1190
|
+
cellAlign?: DataTableAlign;
|
|
1191
|
+
};
|
|
1192
|
+
type DataTablePagination = {
|
|
1193
|
+
page: number;
|
|
1194
|
+
pageSize: number;
|
|
1195
|
+
total: number;
|
|
1196
|
+
onChange: (page: number) => void;
|
|
1197
|
+
pageSizeOptions?: number[];
|
|
1198
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
1199
|
+
};
|
|
1200
|
+
type RowKey = string | number;
|
|
1201
|
+
type DataTableRowSelection = {
|
|
1202
|
+
selectedRowKeys: Array<RowKey>;
|
|
1203
|
+
onChange: (selectedRowKeys: Array<RowKey>) => void;
|
|
1204
|
+
};
|
|
1205
|
+
type DataTableProps<T> = {
|
|
1206
|
+
columns: Array<DataTableColumn<T>>;
|
|
1207
|
+
data: T[];
|
|
1208
|
+
rowKey: keyof T | ((record: T) => RowKey);
|
|
1209
|
+
loading?: boolean;
|
|
1210
|
+
emptyText?: ReactNode;
|
|
1211
|
+
pagination?: DataTablePagination;
|
|
1212
|
+
sort?: DataTableSortState | null;
|
|
1213
|
+
onSortChange?: (sort: DataTableSortState | null) => void;
|
|
1214
|
+
sortMode?: 'client' | 'server';
|
|
1215
|
+
onRowClick?: (record: T) => void;
|
|
1216
|
+
rowSelection?: DataTableRowSelection;
|
|
1217
|
+
renderActions?: (record: T) => ReactNode;
|
|
1218
|
+
className?: string;
|
|
1219
|
+
headerAlign?: DataTableAlign;
|
|
1220
|
+
cellAlign?: DataTableAlign;
|
|
1221
|
+
stickyOffset?: number;
|
|
1222
|
+
/** When false, table container does not scroll (overflow-visible). Default true. */
|
|
1223
|
+
scrollable?: boolean;
|
|
1224
|
+
};
|
|
1225
|
+
declare function DataTable<T>({ columns, data, rowKey, loading, emptyText, pagination, sort, onSortChange, sortMode, onRowClick, rowSelection, renderActions, className, headerAlign, stickyOffset, scrollable, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1226
|
+
declare const Table: react.ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1227
|
+
declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1228
|
+
declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1229
|
+
declare const TableRow: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1230
|
+
declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & ThHTMLAttributes<HTMLTableCellElement> & {
|
|
1231
|
+
as?: "td" | "th";
|
|
1232
|
+
} & react.RefAttributes<HTMLTableCellElement>>;
|
|
1233
|
+
|
|
1234
|
+
type PaginationInfo = {
|
|
1235
|
+
page: number;
|
|
1236
|
+
pageSize: number;
|
|
1237
|
+
total: number;
|
|
1238
|
+
totalPages: number;
|
|
1239
|
+
showingStart: number;
|
|
1240
|
+
showingEnd: number;
|
|
1241
|
+
};
|
|
1242
|
+
type PaginationProps = {
|
|
1243
|
+
page: number;
|
|
1244
|
+
pageSize: number;
|
|
1245
|
+
total: number;
|
|
1246
|
+
onChange: (page: number) => void;
|
|
1247
|
+
pageSizeOptions?: number[];
|
|
1248
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
1249
|
+
className?: string;
|
|
1250
|
+
showFirstLast?: boolean;
|
|
1251
|
+
label?: (info: PaginationInfo) => ReactNode;
|
|
1252
|
+
};
|
|
1253
|
+
declare const Pagination: ({ page, pageSize, total, onChange, pageSizeOptions, onPageSizeChange, className, showFirstLast, label, }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
type PageTitleProps = {
|
|
1504
1256
|
/**
|
|
1505
|
-
*
|
|
1506
|
-
* Custom comparator used for client-side sorting.
|
|
1507
|
-
* 客户端排序时使用的自定义比较函数。
|
|
1257
|
+
* Main title of the page.
|
|
1508
1258
|
*/
|
|
1509
|
-
|
|
1259
|
+
title: string;
|
|
1510
1260
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
* Function that returns a dedicated value for sorting.
|
|
1513
|
-
* 专门用于排序的取值函数。
|
|
1261
|
+
* Short description shown below the title.
|
|
1514
1262
|
*/
|
|
1515
|
-
|
|
1263
|
+
subtitle?: string;
|
|
1516
1264
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
* Per-column header alignment override.
|
|
1519
|
-
* 该列表头的单独对齐方式。
|
|
1265
|
+
* Visual density of the page header.
|
|
1520
1266
|
*/
|
|
1521
|
-
|
|
1267
|
+
size?: 'default' | 'compact';
|
|
1522
1268
|
/**
|
|
1523
|
-
*
|
|
1524
|
-
* Per-column cell alignment override.
|
|
1525
|
-
* 该列单元格的单独对齐方式。
|
|
1269
|
+
* Slot rendered on the right side of the header.
|
|
1526
1270
|
*/
|
|
1527
|
-
|
|
1271
|
+
rightSlot?: ReactNode;
|
|
1528
1272
|
};
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
* Current page.
|
|
1533
|
-
* 当前页码。
|
|
1534
|
-
*/
|
|
1535
|
-
page: number;
|
|
1536
|
-
/**
|
|
1537
|
-
* Số dòng trên mỗi trang.
|
|
1538
|
-
* Number of rows per page.
|
|
1539
|
-
* 每页行数。
|
|
1540
|
-
*/
|
|
1541
|
-
pageSize: number;
|
|
1542
|
-
/**
|
|
1543
|
-
* Tổng số bản ghi.
|
|
1544
|
-
* Total number of records.
|
|
1545
|
-
* 总记录数。
|
|
1546
|
-
*/
|
|
1547
|
-
total: number;
|
|
1273
|
+
declare function PageTitle({ title, subtitle, size, rightSlot, }: PageTitleProps): react_jsx_runtime.JSX.Element;
|
|
1274
|
+
|
|
1275
|
+
type SectionTitleProps = {
|
|
1548
1276
|
/**
|
|
1549
|
-
*
|
|
1550
|
-
* Callback fired when the page changes.
|
|
1551
|
-
* 页码变化时触发的回调。
|
|
1277
|
+
* Main title of the section.
|
|
1552
1278
|
*/
|
|
1553
|
-
|
|
1279
|
+
title: string;
|
|
1554
1280
|
/**
|
|
1555
|
-
*
|
|
1556
|
-
* Page-size options shown in the dropdown.
|
|
1557
|
-
* 下拉中展示的分页大小选项。
|
|
1281
|
+
* Short description that explains the section.
|
|
1558
1282
|
*/
|
|
1559
|
-
|
|
1283
|
+
subtitle?: string;
|
|
1560
1284
|
/**
|
|
1561
|
-
*
|
|
1562
|
-
* Callback fired when page size changes.
|
|
1563
|
-
* 每页行数变化时触发的回调。
|
|
1285
|
+
* Icon displayed to the left of the title.
|
|
1564
1286
|
*/
|
|
1565
|
-
|
|
1566
|
-
};
|
|
1567
|
-
type RowKey = string | number;
|
|
1568
|
-
type DataTableRowSelection = {
|
|
1287
|
+
icon?: ReactNode;
|
|
1569
1288
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
* Row keys that are currently selected.
|
|
1572
|
-
* 当前已选中的行 key 列表。
|
|
1289
|
+
* Custom class for the icon wrapper.
|
|
1573
1290
|
*/
|
|
1574
|
-
|
|
1291
|
+
iconClassName?: string;
|
|
1575
1292
|
/**
|
|
1576
|
-
*
|
|
1577
|
-
* Callback fired when the selected rows change.
|
|
1578
|
-
* 已选行集合变化时触发的回调。
|
|
1293
|
+
* Slot rendered on the right side of the section title.
|
|
1579
1294
|
*/
|
|
1580
|
-
|
|
1295
|
+
rightSlot?: ReactNode;
|
|
1581
1296
|
};
|
|
1582
|
-
|
|
1297
|
+
declare function SectionTitle({ title, subtitle, icon, iconClassName, rightSlot, }: SectionTitleProps): react_jsx_runtime.JSX.Element;
|
|
1298
|
+
|
|
1299
|
+
interface TabItem {
|
|
1300
|
+
value: string;
|
|
1301
|
+
label: ReactNode;
|
|
1302
|
+
content: ReactNode;
|
|
1303
|
+
badge?: ReactNode;
|
|
1304
|
+
}
|
|
1305
|
+
interface TabsProps {
|
|
1306
|
+
items: TabItem[];
|
|
1307
|
+
defaultValue?: string;
|
|
1308
|
+
onChange?: (value: string) => void;
|
|
1309
|
+
className?: string;
|
|
1310
|
+
listClassName?: string;
|
|
1311
|
+
contentClassName?: string;
|
|
1312
|
+
}
|
|
1313
|
+
declare function Tabs({ items, defaultValue, onChange, className, listClassName, contentClassName, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1314
|
+
|
|
1315
|
+
interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
1316
|
+
label?: ReactNode;
|
|
1317
|
+
size?: LoadingSpinnerProps['size'];
|
|
1318
|
+
}
|
|
1319
|
+
declare function Loading({ label, size, className, ...props }: LoadingProps): react_jsx_runtime.JSX.Element;
|
|
1320
|
+
|
|
1321
|
+
type TooltipSide$2 = 'top' | 'right' | 'bottom' | 'left';
|
|
1322
|
+
type TooltipAlign$2 = 'start' | 'center' | 'end';
|
|
1323
|
+
type TooltipProps = {
|
|
1583
1324
|
/**
|
|
1584
|
-
*
|
|
1585
|
-
* Column configuration of the table.
|
|
1586
|
-
* 表格列配置。
|
|
1325
|
+
* Tooltip content shown on hover or focus.
|
|
1587
1326
|
*/
|
|
1588
|
-
|
|
1327
|
+
content: ReactNode;
|
|
1589
1328
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
* Source data rendered by the table.
|
|
1592
|
-
* 表格渲染的数据源。
|
|
1329
|
+
* Trigger element for the tooltip.
|
|
1593
1330
|
*/
|
|
1594
|
-
|
|
1331
|
+
children: ReactNode;
|
|
1595
1332
|
/**
|
|
1596
|
-
*
|
|
1597
|
-
* How to resolve a unique key for each row.
|
|
1598
|
-
* 为每一行生成唯一 key 的方式。
|
|
1333
|
+
* Tooltip side relative to the trigger.
|
|
1599
1334
|
*/
|
|
1600
|
-
|
|
1335
|
+
side?: TooltipSide$2;
|
|
1601
1336
|
/**
|
|
1602
|
-
*
|
|
1603
|
-
* Loading state of the table.
|
|
1604
|
-
* 表格的加载状态。
|
|
1337
|
+
* Tooltip alignment on the secondary axis.
|
|
1605
1338
|
*/
|
|
1606
|
-
|
|
1339
|
+
align?: TooltipAlign$2;
|
|
1607
1340
|
/**
|
|
1608
|
-
*
|
|
1609
|
-
* Content shown when the table has no data.
|
|
1610
|
-
* 表格无数据时显示的内容。
|
|
1341
|
+
* Extra class names for the trigger wrapper.
|
|
1611
1342
|
*/
|
|
1612
|
-
|
|
1343
|
+
className?: string;
|
|
1613
1344
|
/**
|
|
1614
|
-
*
|
|
1615
|
-
* Pagination configuration.
|
|
1616
|
-
* 分页配置。
|
|
1345
|
+
* Extra class names for the tooltip panel.
|
|
1617
1346
|
*/
|
|
1618
|
-
|
|
1347
|
+
contentClassName?: string;
|
|
1619
1348
|
/**
|
|
1620
|
-
*
|
|
1621
|
-
* Current sort state when controlled from the parent.
|
|
1622
|
-
* 由外部控制时的当前排序状态。
|
|
1349
|
+
* Allows tooltip content to wrap onto multiple lines.
|
|
1623
1350
|
*/
|
|
1624
|
-
|
|
1351
|
+
wrap?: boolean;
|
|
1625
1352
|
/**
|
|
1626
|
-
*
|
|
1627
|
-
* Callback fired when sort state changes.
|
|
1628
|
-
* 排序状态变化时触发的回调。
|
|
1353
|
+
* Renders the tooltip through a portal into `document.body`.
|
|
1629
1354
|
*/
|
|
1630
|
-
|
|
1355
|
+
portal?: boolean;
|
|
1356
|
+
};
|
|
1357
|
+
declare function Tooltip({ content, children, side, align, className, contentClassName, wrap, portal, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
1358
|
+
|
|
1359
|
+
type TooltipSide$1 = 'top' | 'right' | 'bottom' | 'left';
|
|
1360
|
+
type TooltipAlign$1 = 'start' | 'center' | 'end';
|
|
1361
|
+
type OverflowTooltipProps = {
|
|
1362
|
+
content: ReactNode;
|
|
1363
|
+
children: ReactNode;
|
|
1364
|
+
targetRef?: RefObject<HTMLElement | null>;
|
|
1365
|
+
side?: TooltipSide$1;
|
|
1366
|
+
align?: TooltipAlign$1;
|
|
1367
|
+
className?: string;
|
|
1368
|
+
contentClassName?: string;
|
|
1369
|
+
wrap?: boolean;
|
|
1370
|
+
portal?: boolean;
|
|
1371
|
+
disabled?: boolean;
|
|
1372
|
+
watch?: ReadonlyArray<unknown>;
|
|
1373
|
+
};
|
|
1374
|
+
declare function OverflowTooltip({ content, children, targetRef, side, align, className, contentClassName, wrap, portal, disabled, watch, }: OverflowTooltipProps): react_jsx_runtime.JSX.Element;
|
|
1375
|
+
|
|
1376
|
+
type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
|
|
1377
|
+
type TooltipAlign = 'start' | 'center' | 'end';
|
|
1378
|
+
type LineClampTooltipProps = {
|
|
1379
|
+
text: string;
|
|
1380
|
+
lineClamp?: number;
|
|
1381
|
+
className?: string;
|
|
1382
|
+
side?: TooltipSide;
|
|
1383
|
+
align?: TooltipAlign;
|
|
1384
|
+
wrap?: boolean;
|
|
1385
|
+
portal?: boolean;
|
|
1386
|
+
};
|
|
1387
|
+
declare function LineClampTooltip({ text, lineClamp, className, side, align, wrap, portal, }: LineClampTooltipProps): react_jsx_runtime.JSX.Element;
|
|
1388
|
+
|
|
1389
|
+
type TruncatedTextProps = {
|
|
1390
|
+
email: string;
|
|
1391
|
+
};
|
|
1392
|
+
declare function TruncatedText({ email, }: TruncatedTextProps): react_jsx_runtime.JSX.Element;
|
|
1393
|
+
|
|
1394
|
+
declare function Sidebar({ items, userPermissions, permissionChecker, activeItemId, onItemClick, listClassName, nestedListClassName, itemClassName, indentSize, ariaLabel, className, collapsible, collapsed, defaultCollapsed, onCollapseChange, collapsedWidth, expandedWidth, collapseButtonLabel, style, ...rest }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
1395
|
+
|
|
1396
|
+
type SidebarItemProps = {
|
|
1397
|
+
item: SidebarItem$1;
|
|
1398
|
+
depth: number;
|
|
1399
|
+
activeItemId?: string;
|
|
1400
|
+
onItemClick?: (item: SidebarItem$1) => void;
|
|
1401
|
+
indentSize?: number;
|
|
1402
|
+
nestedListClassName?: string;
|
|
1403
|
+
itemClassName?: string;
|
|
1404
|
+
collapsed?: boolean;
|
|
1405
|
+
};
|
|
1406
|
+
declare function SidebarItem({ item, depth, activeItemId, onItemClick, indentSize, nestedListClassName, itemClassName, collapsed, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
1407
|
+
|
|
1408
|
+
declare const defaultPermissionChecker: PermissionChecker;
|
|
1409
|
+
declare function filterSidebarItems(items: SidebarItem$1[], userPermissions: string[] | undefined, permissionChecker?: PermissionChecker): SidebarItem$1[];
|
|
1410
|
+
declare function hasActiveDescendant(item: SidebarItem$1, activeItemId?: string): boolean;
|
|
1411
|
+
|
|
1412
|
+
interface MainFeNamespace {
|
|
1631
1413
|
/**
|
|
1632
|
-
*
|
|
1633
|
-
* Sorting mode handled on the client or server.
|
|
1634
|
-
* 排序在客户端还是服务端处理。
|
|
1414
|
+
* Legacy page header component.
|
|
1635
1415
|
*/
|
|
1636
|
-
|
|
1416
|
+
PageTitle: typeof PageTitle$1;
|
|
1637
1417
|
/**
|
|
1638
|
-
*
|
|
1639
|
-
* Callback fired when a row is clicked.
|
|
1640
|
-
* 用户点击某一行时触发的回调。
|
|
1418
|
+
* Section header for legacy `main-fe`.
|
|
1641
1419
|
*/
|
|
1642
|
-
|
|
1420
|
+
SectionTitle: typeof SectionTitle$1;
|
|
1643
1421
|
/**
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1646
|
-
* 行选择配置。
|
|
1422
|
+
* Button theo visual style legacy `main-fe`.
|
|
1423
|
+
* Legacy `main-fe` styled button.
|
|
1647
1424
|
*/
|
|
1648
|
-
|
|
1425
|
+
Button: typeof Button$1;
|
|
1649
1426
|
/**
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
* 每一行操作列的渲染函数。
|
|
1427
|
+
* Input theo visual style legacy `main-fe`.
|
|
1428
|
+
* Legacy `main-fe` styled input.
|
|
1653
1429
|
*/
|
|
1654
|
-
|
|
1430
|
+
Input: typeof Input$1;
|
|
1655
1431
|
/**
|
|
1656
|
-
*
|
|
1657
|
-
* Width of the action column.
|
|
1658
|
-
* 操作列宽度。
|
|
1432
|
+
* Legacy `main-fe` combobox with search/load-more.
|
|
1659
1433
|
*/
|
|
1660
|
-
|
|
1434
|
+
Combobox: typeof Combobox$1;
|
|
1661
1435
|
/**
|
|
1662
|
-
*
|
|
1663
|
-
*
|
|
1664
|
-
* 表格容器的额外 class。
|
|
1436
|
+
* Switch theo visual style legacy `main-fe`.
|
|
1437
|
+
* Legacy `main-fe` styled switch.
|
|
1665
1438
|
*/
|
|
1666
|
-
|
|
1439
|
+
Switch: typeof Switch;
|
|
1667
1440
|
/**
|
|
1668
|
-
*
|
|
1669
|
-
* Default alignment for all headers.
|
|
1670
|
-
* 全部表头的默认对齐方式。
|
|
1441
|
+
* Segmented tab group.
|
|
1671
1442
|
*/
|
|
1672
|
-
|
|
1443
|
+
MultiTabs: typeof MultiTabs;
|
|
1673
1444
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
* Default alignment for all cells.
|
|
1676
|
-
* 全部单元格的默认对齐方式。
|
|
1445
|
+
* Metric card for legacy dashboards/lists.
|
|
1677
1446
|
*/
|
|
1678
|
-
|
|
1447
|
+
StatCard: typeof StatCard;
|
|
1679
1448
|
/**
|
|
1680
|
-
*
|
|
1681
|
-
* Sticky offset for header or fixed columns when the layout has a top bar.
|
|
1682
|
-
* 当布局存在顶部栏时,表头/固定列的 sticky 偏移。
|
|
1449
|
+
* Legacy `main-fe` data table.
|
|
1683
1450
|
*/
|
|
1684
|
-
|
|
1685
|
-
};
|
|
1686
|
-
declare function DataTable<T>({ columns, data, rowKey, loading, emptyText, pagination, sort, onSortChange, sortMode, onRowClick, rowSelection, renderActions, actionColumnWidth, className, headerAlign, stickyOffset, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1687
|
-
declare const Table: react.ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1688
|
-
declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1689
|
-
declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1690
|
-
declare const TableRow: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1691
|
-
declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & ThHTMLAttributes<HTMLTableCellElement> & {
|
|
1692
|
-
as?: "td" | "th";
|
|
1693
|
-
} & react.RefAttributes<HTMLTableCellElement>>;
|
|
1694
|
-
|
|
1695
|
-
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'className' | 'onChange'> {
|
|
1451
|
+
DataTable: typeof DataTable$1;
|
|
1696
1452
|
/**
|
|
1697
|
-
*
|
|
1698
|
-
* Extra class names for the outer switch wrapper.
|
|
1699
|
-
* 开关最外层容器的额外 class。
|
|
1453
|
+
* Full-area loading state for remote or legacy screens.
|
|
1700
1454
|
*/
|
|
1701
|
-
|
|
1455
|
+
RemoteLoading: typeof RemoteLoading;
|
|
1702
1456
|
/**
|
|
1703
|
-
*
|
|
1704
|
-
* Custom class for the switch track.
|
|
1705
|
-
* 开关轨道的自定义 class。
|
|
1457
|
+
* Date-range picker.
|
|
1706
1458
|
*/
|
|
1707
|
-
|
|
1459
|
+
DateRangePicker: typeof DateRangePicker;
|
|
1708
1460
|
/**
|
|
1709
|
-
*
|
|
1710
|
-
* Custom class for the switch thumb.
|
|
1711
|
-
* 开关圆点的自定义 class。
|
|
1461
|
+
* Date-time picker.
|
|
1712
1462
|
*/
|
|
1713
|
-
|
|
1463
|
+
DateTimePicker: typeof DateTimePicker;
|
|
1714
1464
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
* Callback that returns the next checked state.
|
|
1717
|
-
* 返回最新选中状态的回调。
|
|
1465
|
+
* Argon-style sidebar for legacy `main-fe`.
|
|
1718
1466
|
*/
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
href?: string;
|
|
1735
|
-
onClick?: () => void;
|
|
1736
|
-
};
|
|
1737
|
-
type StatusOption = {
|
|
1738
|
-
value: string | number;
|
|
1739
|
-
label: ReactNode;
|
|
1740
|
-
color?: string;
|
|
1741
|
-
action?: StatusAction;
|
|
1742
|
-
};
|
|
1743
|
-
type StatusPresentation = {
|
|
1744
|
-
label: ReactNode;
|
|
1745
|
-
color?: string;
|
|
1746
|
-
action?: StatusAction;
|
|
1747
|
-
};
|
|
1748
|
-
declare function getStatusPresentation(status: string | number | null | undefined, options: StatusOption[]): StatusPresentation | null;
|
|
1749
|
-
|
|
1750
|
-
declare const index_ArgonSidebar: typeof ArgonSidebar;
|
|
1751
|
-
type index_ArgonSidebarHeaderRender = ArgonSidebarHeaderRender;
|
|
1752
|
-
type index_ArgonSidebarProps = ArgonSidebarProps;
|
|
1753
|
-
declare const index_Badge: typeof Badge;
|
|
1754
|
-
type index_BadgeProps = BadgeProps;
|
|
1755
|
-
declare const index_Button: typeof Button;
|
|
1756
|
-
type index_ButtonProps = ButtonProps;
|
|
1757
|
-
declare const index_Card: typeof Card;
|
|
1758
|
-
declare const index_CardAction: typeof CardAction;
|
|
1759
|
-
declare const index_CardContent: typeof CardContent;
|
|
1760
|
-
declare const index_CardDescription: typeof CardDescription;
|
|
1761
|
-
declare const index_CardFooter: typeof CardFooter;
|
|
1762
|
-
declare const index_CardHeader: typeof CardHeader;
|
|
1763
|
-
declare const index_CardTitle: typeof CardTitle;
|
|
1764
|
-
declare const index_Combobox: typeof Combobox;
|
|
1765
|
-
type index_ComboboxAsyncConfig = ComboboxAsyncConfig;
|
|
1766
|
-
type index_ComboboxOption = ComboboxOption;
|
|
1767
|
-
type index_ComboboxProps = ComboboxProps;
|
|
1768
|
-
declare const index_DataTable: typeof DataTable;
|
|
1769
|
-
type index_DataTableAlign = DataTableAlign;
|
|
1770
|
-
type index_DataTableColumn<T> = DataTableColumn<T>;
|
|
1771
|
-
type index_DataTablePagination = DataTablePagination;
|
|
1772
|
-
type index_DataTableProps<T> = DataTableProps<T>;
|
|
1773
|
-
type index_DataTableRowSelection = DataTableRowSelection;
|
|
1774
|
-
type index_DataTableSortDirection = DataTableSortDirection;
|
|
1775
|
-
type index_DataTableSortState = DataTableSortState;
|
|
1776
|
-
declare const index_DateRangePicker: typeof DateRangePicker;
|
|
1777
|
-
type index_DateRangePickerProps = DateRangePickerProps;
|
|
1778
|
-
type index_DateRangePickerValue = DateRangePickerValue;
|
|
1779
|
-
declare const index_DateTimePicker: typeof DateTimePicker;
|
|
1780
|
-
type index_DateTimePickerProps = DateTimePickerProps;
|
|
1781
|
-
declare const index_Input: typeof Input;
|
|
1782
|
-
type index_InputProps = InputProps;
|
|
1783
|
-
type index_MainFePageTitleProps = MainFePageTitleProps;
|
|
1784
|
-
type index_MainFeSectionTitleProps = MainFeSectionTitleProps;
|
|
1785
|
-
type index_MultiTabItem = MultiTabItem;
|
|
1786
|
-
declare const index_MultiTabs: typeof MultiTabs;
|
|
1787
|
-
type index_MultiTabsProps = MultiTabsProps;
|
|
1788
|
-
declare const index_PageTitle: typeof PageTitle;
|
|
1789
|
-
type index_QuickOption = QuickOption;
|
|
1790
|
-
declare const index_RemoteLoading: typeof RemoteLoading;
|
|
1791
|
-
type index_RemoteLoadingProps = RemoteLoadingProps;
|
|
1792
|
-
declare const index_SectionTitle: typeof SectionTitle;
|
|
1793
|
-
declare const index_StatCard: typeof StatCard;
|
|
1794
|
-
type index_StatCardProps = StatCardProps;
|
|
1795
|
-
type index_StatTone = StatTone;
|
|
1796
|
-
type index_StatusAction = StatusAction;
|
|
1797
|
-
type index_StatusOption = StatusOption;
|
|
1798
|
-
type index_StatusPresentation = StatusPresentation;
|
|
1799
|
-
declare const index_Switch: typeof Switch;
|
|
1800
|
-
type index_SwitchProps = SwitchProps;
|
|
1801
|
-
declare const index_Table: typeof Table;
|
|
1802
|
-
declare const index_TableBody: typeof TableBody;
|
|
1803
|
-
declare const index_TableCell: typeof TableCell;
|
|
1804
|
-
declare const index_TableHeader: typeof TableHeader;
|
|
1805
|
-
declare const index_TableRow: typeof TableRow;
|
|
1806
|
-
declare const index_getStatusPresentation: typeof getStatusPresentation;
|
|
1807
|
-
declare namespace index {
|
|
1808
|
-
export { index_ArgonSidebar as ArgonSidebar, type index_ArgonSidebarHeaderRender as ArgonSidebarHeaderRender, type index_ArgonSidebarProps as ArgonSidebarProps, index_Badge as Badge, type index_BadgeProps as BadgeProps, index_Button as Button, type index_ButtonProps as ButtonProps, index_Card as Card, index_CardAction as CardAction, index_CardContent as CardContent, index_CardDescription as CardDescription, index_CardFooter as CardFooter, index_CardHeader as CardHeader, index_CardTitle as CardTitle, index_Combobox as Combobox, type index_ComboboxAsyncConfig as ComboboxAsyncConfig, type index_ComboboxOption as ComboboxOption, type index_ComboboxProps as ComboboxProps, index_DataTable as DataTable, type index_DataTableAlign as DataTableAlign, type index_DataTableColumn as DataTableColumn, type index_DataTablePagination as DataTablePagination, type index_DataTableProps as DataTableProps, type index_DataTableRowSelection as DataTableRowSelection, type index_DataTableSortDirection as DataTableSortDirection, type index_DataTableSortState as DataTableSortState, index_DateRangePicker as DateRangePicker, type index_DateRangePickerProps as DateRangePickerProps, type index_DateRangePickerValue as DateRangePickerValue, index_DateTimePicker as DateTimePicker, type index_DateTimePickerProps as DateTimePickerProps, index_Input as Input, type index_InputProps as InputProps, type index_MainFePageTitleProps as MainFePageTitleProps, type index_MainFeSectionTitleProps as MainFeSectionTitleProps, type index_MultiTabItem as MultiTabItem, index_MultiTabs as MultiTabs, type index_MultiTabsProps as MultiTabsProps, index_PageTitle as PageTitle, type index_QuickOption as QuickOption, index_RemoteLoading as RemoteLoading, type index_RemoteLoadingProps as RemoteLoadingProps, index_SectionTitle as SectionTitle, index_StatCard as StatCard, type index_StatCardProps as StatCardProps, type index_StatTone as StatTone, type index_StatusAction as StatusAction, type index_StatusOption as StatusOption, type index_StatusPresentation as StatusPresentation, index_Switch as Switch, type index_SwitchProps as SwitchProps, index_Table as Table, index_TableBody as TableBody, index_TableCell as TableCell, index_TableHeader as TableHeader, index_TableRow as TableRow, index_getStatusPresentation as getStatusPresentation };
|
|
1467
|
+
ArgonSidebar: typeof ArgonSidebar;
|
|
1468
|
+
Badge: typeof Badge;
|
|
1469
|
+
Card: typeof Card$1;
|
|
1470
|
+
CardHeader: typeof CardHeader$1;
|
|
1471
|
+
CardFooter: typeof CardFooter$1;
|
|
1472
|
+
CardTitle: typeof CardTitle$1;
|
|
1473
|
+
CardAction: typeof CardAction$1;
|
|
1474
|
+
CardDescription: typeof CardDescription$1;
|
|
1475
|
+
CardContent: typeof CardContent$1;
|
|
1476
|
+
Table: typeof Table$1;
|
|
1477
|
+
TableHeader: typeof TableHeader$1;
|
|
1478
|
+
TableBody: typeof TableBody$1;
|
|
1479
|
+
TableRow: typeof TableRow$1;
|
|
1480
|
+
TableCell: typeof TableCell$1;
|
|
1481
|
+
getStatusPresentation: typeof getStatusPresentation;
|
|
1809
1482
|
}
|
|
1483
|
+
declare const MainFe: MainFeNamespace;
|
|
1810
1484
|
|
|
1811
|
-
export { Alert, type AlertProps, ArgonSidebar, type ArgonSidebarHeaderRender, type ArgonSidebarProps, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button
|
|
1485
|
+
export { Alert, type AlertProps, ArgonSidebar, type ArgonSidebarHeaderRender, type ArgonSidebarProps, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Combobox, type ComboboxOption$1 as ComboboxOption, type ComboboxProps, FormControl as Control, DataTable, type DataTableAlign, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableRowSelection, type DataTableSortDirection, type DataTableSortState, type DateRangePickerProps, type DateRangePickerValue, type DateTimePickerProps, FormDescription as Description, FormField as Field, Form, FormControl, FormDescription, FormField, type FormFieldProps, FormItem, FormLabel, FormMessage, Input, type InputProps, FormItem as Item, FormLabel as Label, LineClampTooltip, type LineClampTooltipProps, Loading, type LoadingProps, MainFe, type ButtonProps$1 as MainFeButtonProps, type ComboboxAsyncConfig as MainFeComboboxAsyncConfig, type ComboboxOption$2 as MainFeComboboxOption, type ComboboxProps$1 as MainFeComboboxProps, type DataTableAlign$1 as MainFeDataTableAlign, type DataTableColumn$1 as MainFeDataTableColumn, type DataTablePagination$1 as MainFeDataTablePagination, type DataTableProps$1 as MainFeDataTableProps, type DataTableRowSelection$1 as MainFeDataTableRowSelection, type DataTableSortDirection$1 as MainFeDataTableSortDirection, type DataTableSortState$1 as MainFeDataTableSortState, type InputProps$1 as MainFeInputProps, type MainFeNamespace, type MainFePageTitleProps, type QuickOption as MainFeQuickOption, type MainFeSectionTitleProps, type SwitchProps as MainFeSwitchProps, FormMessage as Message, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiTabItem, type MultiTabsProps, NumericInput, type NumericInputProps, type Option, OverflowTooltip, type OverflowTooltipProps, PageTitle, type PageTitleProps, Pagination, type PaginationInfo, type PaginationProps, type PermissionChecker, type RemoteLoadingProps, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, SectionTitle, type SectionTitleProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarItem, type SidebarProps, Stat, type StatCardProps, type StatProps, type StatTone, type TabItem, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, type TabsProps, Textarea, type TextareaProps, Tooltip, type TooltipProps, type Trend, TruncatedText, type TruncatedTextProps, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant };
|