@ryanhe919/lumen-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3847 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +638 -0
- package/dist/index.js +3847 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +1826 -0
- package/package.json +68 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
export declare type BadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Common component props
|
|
8
|
+
*/
|
|
9
|
+
export declare interface BaseComponentProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Component variant types
|
|
16
|
+
*/
|
|
17
|
+
export declare type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'danger';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Common event handlers
|
|
21
|
+
*/
|
|
22
|
+
export declare type ChangeHandler<T = string> = (value: T) => void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Clamp size to allowed values
|
|
26
|
+
*/
|
|
27
|
+
export declare const clampComponentSize: (size: ComponentSize | undefined, allowedSizes: ComponentSize[], fallback?: ComponentSize) => ComponentSize;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Utility for merging class names
|
|
31
|
+
* Simple implementation without external dependencies
|
|
32
|
+
*/
|
|
33
|
+
declare type ClassValue = string | undefined | null | false | ClassValue[];
|
|
34
|
+
|
|
35
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
36
|
+
|
|
37
|
+
/** Size order for iteration */
|
|
38
|
+
export declare const COMPONENT_SIZE_ORDER: ComponentSize[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @file Component size utilities
|
|
42
|
+
* @description Shared size tokens for LumenUI components
|
|
43
|
+
*/
|
|
44
|
+
export declare type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Form field status
|
|
48
|
+
*/
|
|
49
|
+
export declare type FieldStatus = 'default' | 'success' | 'warning' | 'error';
|
|
50
|
+
|
|
51
|
+
export declare type InputVariant = 'default' | 'filled' | 'outline';
|
|
52
|
+
|
|
53
|
+
export declare const LMBadge: default_2.FC<LMBadgeProps>;
|
|
54
|
+
|
|
55
|
+
export declare interface LMBadgeProps {
|
|
56
|
+
/** Badge content */
|
|
57
|
+
children: default_2.ReactNode;
|
|
58
|
+
/** Color variant */
|
|
59
|
+
variant?: LMBadgeVariant;
|
|
60
|
+
/** Size */
|
|
61
|
+
size?: LMBadgeSize;
|
|
62
|
+
/** Custom class name */
|
|
63
|
+
className?: string;
|
|
64
|
+
/** Show dot */
|
|
65
|
+
dot?: boolean;
|
|
66
|
+
/** Icon */
|
|
67
|
+
icon?: default_2.ReactNode;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare type LMBadgeSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
71
|
+
|
|
72
|
+
export declare type LMBadgeVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
73
|
+
|
|
74
|
+
export declare const LMButton: default_2.NamedExoticComponent<LMButtonProps>;
|
|
75
|
+
|
|
76
|
+
export declare interface LMButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
77
|
+
/** Button variant */
|
|
78
|
+
variant?: LMButtonVariant;
|
|
79
|
+
/** Size */
|
|
80
|
+
size?: ComponentSize;
|
|
81
|
+
/** Loading state */
|
|
82
|
+
loading?: boolean;
|
|
83
|
+
/** Loading text */
|
|
84
|
+
loadingText?: string;
|
|
85
|
+
/** Left icon */
|
|
86
|
+
leftIcon?: default_2.ReactNode;
|
|
87
|
+
/** Right icon */
|
|
88
|
+
rightIcon?: default_2.ReactNode;
|
|
89
|
+
/** Full width */
|
|
90
|
+
fullWidth?: boolean;
|
|
91
|
+
/** Full rounded */
|
|
92
|
+
rounded?: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare type LMButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'warning';
|
|
96
|
+
|
|
97
|
+
export declare const LMCheckbox: default_2.FC<LMCheckboxProps>;
|
|
98
|
+
|
|
99
|
+
export declare interface LMCheckboxProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
100
|
+
/** Label text */
|
|
101
|
+
label: string;
|
|
102
|
+
/** Description text */
|
|
103
|
+
description?: string;
|
|
104
|
+
/** Error state */
|
|
105
|
+
error?: boolean;
|
|
106
|
+
/** Error message */
|
|
107
|
+
errorMessage?: string;
|
|
108
|
+
/** Size */
|
|
109
|
+
size?: ComponentSize;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare const LMConfirm: default_2.FC<LMConfirmProps>;
|
|
113
|
+
|
|
114
|
+
export declare interface LMConfirmProps {
|
|
115
|
+
/** Dialog visible */
|
|
116
|
+
visible: boolean;
|
|
117
|
+
/** Dialog title */
|
|
118
|
+
title?: string;
|
|
119
|
+
/** Dialog content */
|
|
120
|
+
content: string;
|
|
121
|
+
/** Confirm button text */
|
|
122
|
+
confirmText?: string;
|
|
123
|
+
/** Cancel button text */
|
|
124
|
+
cancelText?: string;
|
|
125
|
+
/** Confirm button style */
|
|
126
|
+
confirmButtonStyle?: 'primary' | 'danger';
|
|
127
|
+
/** Confirm callback */
|
|
128
|
+
onConfirm: () => void;
|
|
129
|
+
/** Cancel callback */
|
|
130
|
+
onCancel: () => void;
|
|
131
|
+
/** Close on overlay click */
|
|
132
|
+
closeOnOverlayClick?: boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare const LMField: default_2.FC<LMFieldProps>;
|
|
136
|
+
|
|
137
|
+
export declare interface LMFieldProps {
|
|
138
|
+
/** Field label */
|
|
139
|
+
label: string;
|
|
140
|
+
/** Required indicator */
|
|
141
|
+
required?: boolean;
|
|
142
|
+
/** Error message */
|
|
143
|
+
errorMessage?: string;
|
|
144
|
+
/** Help text */
|
|
145
|
+
help?: string;
|
|
146
|
+
/** Children */
|
|
147
|
+
children: default_2.ReactNode;
|
|
148
|
+
/** Class name */
|
|
149
|
+
className?: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare const LMInput: default_2.FC<LMInputProps>;
|
|
153
|
+
|
|
154
|
+
export declare interface LMInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
155
|
+
/** Left icon */
|
|
156
|
+
leftIcon?: default_2.ReactNode;
|
|
157
|
+
/** Right element */
|
|
158
|
+
rightElement?: default_2.ReactNode;
|
|
159
|
+
/** Error state */
|
|
160
|
+
error?: boolean;
|
|
161
|
+
/** Error message */
|
|
162
|
+
errorMessage?: string;
|
|
163
|
+
/** Size */
|
|
164
|
+
size?: ComponentSize;
|
|
165
|
+
/** Include seconds for time inputs */
|
|
166
|
+
includeSeconds?: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export declare interface LMLoadMoreConfig {
|
|
170
|
+
/** Enable load more */
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
/** Threshold */
|
|
173
|
+
threshold?: number;
|
|
174
|
+
/** Has more data */
|
|
175
|
+
hasMore: boolean;
|
|
176
|
+
/** Loading state */
|
|
177
|
+
loading: boolean;
|
|
178
|
+
/** Load more callback */
|
|
179
|
+
onLoadMore: () => void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export declare const LMMessage: default_2.FC<LMMessageProps>;
|
|
183
|
+
|
|
184
|
+
export declare const LMMessageContainer: default_2.FC<LMMessageContainerProps>;
|
|
185
|
+
|
|
186
|
+
export declare interface LMMessageContainerProps {
|
|
187
|
+
/** Messages list */
|
|
188
|
+
messages: LMMessageItem[];
|
|
189
|
+
/** Close callback */
|
|
190
|
+
onClose: (id: string) => void;
|
|
191
|
+
/** Position */
|
|
192
|
+
position?: 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare interface LMMessageItem {
|
|
196
|
+
id: string;
|
|
197
|
+
type: LMMessageType;
|
|
198
|
+
title?: string;
|
|
199
|
+
content: string;
|
|
200
|
+
duration?: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export declare interface LMMessageProps {
|
|
204
|
+
id: string;
|
|
205
|
+
type: LMMessageType;
|
|
206
|
+
title?: string;
|
|
207
|
+
content: string;
|
|
208
|
+
/** Auto close duration in ms, 0 means no auto close */
|
|
209
|
+
duration?: number;
|
|
210
|
+
onClose: (id: string) => void;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export declare type LMMessageType = 'success' | 'error' | 'warning' | 'info';
|
|
214
|
+
|
|
215
|
+
export declare const LMModal: default_2.NamedExoticComponent<LMModalProps>;
|
|
216
|
+
|
|
217
|
+
export declare interface LMModalProps {
|
|
218
|
+
/** Visibility */
|
|
219
|
+
visible: boolean;
|
|
220
|
+
/** Title */
|
|
221
|
+
title?: string;
|
|
222
|
+
/** Content */
|
|
223
|
+
children: default_2.ReactNode;
|
|
224
|
+
/** Custom footer */
|
|
225
|
+
footer?: default_2.ReactNode;
|
|
226
|
+
/** Close callback */
|
|
227
|
+
onClose?: () => void;
|
|
228
|
+
/** OK callback */
|
|
229
|
+
onOk?: () => void;
|
|
230
|
+
/** Cancel callback */
|
|
231
|
+
onCancel?: () => void;
|
|
232
|
+
/** OK button text */
|
|
233
|
+
okText?: string;
|
|
234
|
+
/** Cancel button text */
|
|
235
|
+
cancelText?: string;
|
|
236
|
+
/** Show OK button */
|
|
237
|
+
showOk?: boolean;
|
|
238
|
+
/** Show Cancel button */
|
|
239
|
+
showCancel?: boolean;
|
|
240
|
+
/** OK loading state */
|
|
241
|
+
okLoading?: boolean;
|
|
242
|
+
/** Cancel loading state */
|
|
243
|
+
cancelLoading?: boolean;
|
|
244
|
+
/** Show mask */
|
|
245
|
+
mask?: boolean;
|
|
246
|
+
/** Click mask to close */
|
|
247
|
+
maskClosable?: boolean;
|
|
248
|
+
/** Show close button */
|
|
249
|
+
closable?: boolean;
|
|
250
|
+
/** Custom close icon */
|
|
251
|
+
closeIcon?: default_2.ReactNode;
|
|
252
|
+
/** Header icon */
|
|
253
|
+
headerIcon?: default_2.ReactNode;
|
|
254
|
+
/** Width */
|
|
255
|
+
width?: string | number;
|
|
256
|
+
/** Height */
|
|
257
|
+
height?: string | number;
|
|
258
|
+
/** Size preset */
|
|
259
|
+
size?: ComponentSize;
|
|
260
|
+
/** Custom class name */
|
|
261
|
+
className?: string;
|
|
262
|
+
/** Custom style */
|
|
263
|
+
style?: default_2.CSSProperties;
|
|
264
|
+
/** Center vertically */
|
|
265
|
+
centered?: boolean;
|
|
266
|
+
/** Fullscreen mode */
|
|
267
|
+
fullscreen?: boolean;
|
|
268
|
+
/** Animation duration (ms) */
|
|
269
|
+
animationDuration?: number;
|
|
270
|
+
/** Enable animation */
|
|
271
|
+
animation?: boolean;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export declare const LMNumberInput: default_2.FC<LMNumberInputProps>;
|
|
275
|
+
|
|
276
|
+
export declare interface LMNumberInputProps {
|
|
277
|
+
/** Current value (controlled) */
|
|
278
|
+
value?: number | null;
|
|
279
|
+
/** Change callback */
|
|
280
|
+
onChange?: (value: number | null) => void;
|
|
281
|
+
/** Error state */
|
|
282
|
+
error?: boolean;
|
|
283
|
+
/** Error message */
|
|
284
|
+
errorMessage?: string;
|
|
285
|
+
/** Placeholder */
|
|
286
|
+
placeholder?: string;
|
|
287
|
+
/** Disabled state */
|
|
288
|
+
disabled?: boolean;
|
|
289
|
+
/** Class name */
|
|
290
|
+
className?: string;
|
|
291
|
+
/** Form field name */
|
|
292
|
+
name?: string;
|
|
293
|
+
/** Size */
|
|
294
|
+
size?: ComponentSize;
|
|
295
|
+
/** Minimum value */
|
|
296
|
+
min?: number;
|
|
297
|
+
/** Maximum value */
|
|
298
|
+
max?: number;
|
|
299
|
+
/** Step */
|
|
300
|
+
step?: number;
|
|
301
|
+
/** Decimal precision */
|
|
302
|
+
precision?: number;
|
|
303
|
+
/** Show increment/decrement controls */
|
|
304
|
+
showControls?: boolean;
|
|
305
|
+
/** Prefix text */
|
|
306
|
+
prefix?: string;
|
|
307
|
+
/** Suffix text */
|
|
308
|
+
suffix?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export declare interface LMPaginationConfig {
|
|
312
|
+
/** Current page */
|
|
313
|
+
current: number;
|
|
314
|
+
/** Page size */
|
|
315
|
+
pageSize: number;
|
|
316
|
+
/** Total count */
|
|
317
|
+
total: number;
|
|
318
|
+
/** Show pagination */
|
|
319
|
+
showPagination?: boolean;
|
|
320
|
+
/** Page size options */
|
|
321
|
+
pageSizeOptions?: number[];
|
|
322
|
+
/** Show total */
|
|
323
|
+
showTotal?: boolean;
|
|
324
|
+
/** Show quick jumper */
|
|
325
|
+
showQuickJumper?: boolean;
|
|
326
|
+
/** Show size changer */
|
|
327
|
+
showSizeChanger?: boolean;
|
|
328
|
+
/** Change callback */
|
|
329
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export declare const LMRadio: default_2.FC<LMRadioProps>;
|
|
333
|
+
|
|
334
|
+
export declare interface LMRadioProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
335
|
+
/** Label text */
|
|
336
|
+
label: string;
|
|
337
|
+
/** Description text */
|
|
338
|
+
description?: string;
|
|
339
|
+
/** Error state */
|
|
340
|
+
error?: boolean;
|
|
341
|
+
/** Error message */
|
|
342
|
+
errorMessage?: string;
|
|
343
|
+
/** Size */
|
|
344
|
+
size?: ComponentSize;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export declare const LMSearchInput: default_2.FC<LMSearchInputProps>;
|
|
348
|
+
|
|
349
|
+
export declare interface LMSearchInputProps {
|
|
350
|
+
/** Current search value */
|
|
351
|
+
value?: string;
|
|
352
|
+
/** Change callback */
|
|
353
|
+
onChange?: (value: string) => void;
|
|
354
|
+
/** Search submit callback */
|
|
355
|
+
onSearch?: (value: string) => void;
|
|
356
|
+
/** Error state */
|
|
357
|
+
error?: boolean;
|
|
358
|
+
/** Error message */
|
|
359
|
+
errorMessage?: string;
|
|
360
|
+
/** Placeholder */
|
|
361
|
+
placeholder?: string;
|
|
362
|
+
/** Disabled state */
|
|
363
|
+
disabled?: boolean;
|
|
364
|
+
/** Class name */
|
|
365
|
+
className?: string;
|
|
366
|
+
/** Form field name */
|
|
367
|
+
name?: string;
|
|
368
|
+
/** Size */
|
|
369
|
+
size?: ComponentSize;
|
|
370
|
+
/** Show clear button */
|
|
371
|
+
showClear?: boolean;
|
|
372
|
+
/** Show search button */
|
|
373
|
+
showSearchButton?: boolean;
|
|
374
|
+
/** Search button text */
|
|
375
|
+
searchButtonText?: string;
|
|
376
|
+
/** Debounce delay (ms) */
|
|
377
|
+
debounceDelay?: number;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export declare const LMSelect: default_2.FC<LMSelectProps>;
|
|
381
|
+
|
|
382
|
+
export declare interface LMSelectOption {
|
|
383
|
+
value: string | number;
|
|
384
|
+
label: string;
|
|
385
|
+
disabled?: boolean;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export declare interface LMSelectProps {
|
|
389
|
+
/** Options */
|
|
390
|
+
options: LMSelectOption[];
|
|
391
|
+
/** Current value */
|
|
392
|
+
value?: string | number | (string | number)[];
|
|
393
|
+
/** Change callback */
|
|
394
|
+
onChange?: (value: string | number | (string | number)[]) => void;
|
|
395
|
+
/** Dropdown visibility change callback */
|
|
396
|
+
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
397
|
+
/** Error state */
|
|
398
|
+
error?: boolean;
|
|
399
|
+
/** Error message */
|
|
400
|
+
errorMessage?: string;
|
|
401
|
+
/** Placeholder */
|
|
402
|
+
placeholder?: string;
|
|
403
|
+
/** Disabled state */
|
|
404
|
+
disabled?: boolean;
|
|
405
|
+
/** Class name */
|
|
406
|
+
className?: string;
|
|
407
|
+
/** Form field name */
|
|
408
|
+
name?: string;
|
|
409
|
+
/** Size */
|
|
410
|
+
size?: ComponentSize;
|
|
411
|
+
/** Multiple selection */
|
|
412
|
+
multiple?: boolean;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export declare const LMStatCard: default_2.FC<LMStatCardProps>;
|
|
416
|
+
|
|
417
|
+
export declare interface LMStatCardProps {
|
|
418
|
+
/** Title */
|
|
419
|
+
title: string;
|
|
420
|
+
/** Value */
|
|
421
|
+
value: string | number;
|
|
422
|
+
/** Description text */
|
|
423
|
+
description?: string;
|
|
424
|
+
/** Left icon */
|
|
425
|
+
icon?: default_2.ReactNode;
|
|
426
|
+
/** Trend value (percentage, positive/negative indicates direction; 0 means flat) */
|
|
427
|
+
trend?: number;
|
|
428
|
+
/** Trend description text */
|
|
429
|
+
trendText?: string;
|
|
430
|
+
/** Visual variant */
|
|
431
|
+
variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
432
|
+
/** Size */
|
|
433
|
+
size?: ComponentSize;
|
|
434
|
+
/** Clickable */
|
|
435
|
+
clickable?: boolean;
|
|
436
|
+
/** Click event */
|
|
437
|
+
onClick?: () => void;
|
|
438
|
+
/** Class name */
|
|
439
|
+
className?: string;
|
|
440
|
+
/** Value prefix (e.g., $) */
|
|
441
|
+
prefix?: string;
|
|
442
|
+
/** Value suffix (e.g., %, times) */
|
|
443
|
+
suffix?: string;
|
|
444
|
+
/** Show border */
|
|
445
|
+
bordered?: boolean;
|
|
446
|
+
/** Show shadow */
|
|
447
|
+
shadow?: boolean;
|
|
448
|
+
/** Compact mode: uses smaller spacing and fonts when enabled */
|
|
449
|
+
compact?: boolean;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export declare const LMSwitch: default_2.FC<LMSwitchProps>;
|
|
453
|
+
|
|
454
|
+
export declare interface LMSwitchProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
455
|
+
/** Label text */
|
|
456
|
+
label?: string;
|
|
457
|
+
/** Description text */
|
|
458
|
+
description?: string;
|
|
459
|
+
/** Error state */
|
|
460
|
+
error?: boolean;
|
|
461
|
+
/** Error message */
|
|
462
|
+
errorMessage?: string;
|
|
463
|
+
/** Size */
|
|
464
|
+
size?: ComponentSize;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export declare const LMTable: typeof LMTable_2;
|
|
468
|
+
|
|
469
|
+
declare const LMTable_2: <T = unknown>({ dataSource, columns, rowKey, pagination, loadMore, loading, emptyText, size, bordered, striped, selectable, selectedRowKeys, onSelectionChange, onRowClick, onSortChange, className, fullHeight, variant, }: LMTableProps<T>) => JSX_2.Element;
|
|
470
|
+
|
|
471
|
+
export declare interface LMTableColumn<T = Record<string, unknown>> {
|
|
472
|
+
/** Column title */
|
|
473
|
+
title: string;
|
|
474
|
+
/** Data field name */
|
|
475
|
+
dataIndex: string;
|
|
476
|
+
/** Column width */
|
|
477
|
+
width?: string | number;
|
|
478
|
+
/** Custom render function */
|
|
479
|
+
render?: (value: unknown, record: T, index: number) => default_2.ReactNode;
|
|
480
|
+
/** Sortable */
|
|
481
|
+
sorter?: boolean;
|
|
482
|
+
/** Column alignment */
|
|
483
|
+
align?: 'left' | 'center' | 'right';
|
|
484
|
+
/** Fixed column */
|
|
485
|
+
fixed?: 'left' | 'right';
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export declare interface LMTableProps<T = Record<string, unknown>> {
|
|
489
|
+
/** Data source */
|
|
490
|
+
dataSource: T[];
|
|
491
|
+
/** Columns */
|
|
492
|
+
columns: LMTableColumn<T>[];
|
|
493
|
+
/** Row key */
|
|
494
|
+
rowKey?: string | ((record: T, index: number) => string);
|
|
495
|
+
/** Pagination config */
|
|
496
|
+
pagination?: LMPaginationConfig;
|
|
497
|
+
/** Load more config */
|
|
498
|
+
loadMore?: LMLoadMoreConfig;
|
|
499
|
+
/** Loading state */
|
|
500
|
+
loading?: boolean;
|
|
501
|
+
/** Empty text */
|
|
502
|
+
emptyText?: string;
|
|
503
|
+
/** Size */
|
|
504
|
+
size?: ComponentSize;
|
|
505
|
+
/** Bordered */
|
|
506
|
+
bordered?: boolean;
|
|
507
|
+
/** Striped */
|
|
508
|
+
striped?: boolean;
|
|
509
|
+
/** Selectable */
|
|
510
|
+
selectable?: boolean;
|
|
511
|
+
/** Selected row keys */
|
|
512
|
+
selectedRowKeys?: string[];
|
|
513
|
+
/** Selection change callback */
|
|
514
|
+
onSelectionChange?: (selectedRowKeys: string[], selectedRows: T[]) => void;
|
|
515
|
+
/** Row click callback */
|
|
516
|
+
onRowClick?: (record: T, index: number) => void;
|
|
517
|
+
/** Sort change callback */
|
|
518
|
+
onSortChange?: (field: string, order: 'ascend' | 'descend') => void;
|
|
519
|
+
/** Class name */
|
|
520
|
+
className?: string;
|
|
521
|
+
/** Full height */
|
|
522
|
+
fullHeight?: boolean;
|
|
523
|
+
/** Variant */
|
|
524
|
+
variant?: 'default' | 'elevated' | 'outline' | 'minimal' | 'soft' | 'zebra';
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export declare const LMTextarea: default_2.FC<LMTextareaProps>;
|
|
528
|
+
|
|
529
|
+
export declare interface LMTextareaProps extends default_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
530
|
+
/** Error state */
|
|
531
|
+
error?: boolean;
|
|
532
|
+
/** Error message */
|
|
533
|
+
errorMessage?: string;
|
|
534
|
+
/** Size */
|
|
535
|
+
size?: ComponentSize;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export declare const LMTooltip: default_2.FC<LMTooltipProps>;
|
|
539
|
+
|
|
540
|
+
export declare interface LMTooltipProps {
|
|
541
|
+
/** Tooltip content */
|
|
542
|
+
content: default_2.ReactNode;
|
|
543
|
+
/** Trigger element */
|
|
544
|
+
children: default_2.ReactNode;
|
|
545
|
+
/** Placement */
|
|
546
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
547
|
+
/** Max width */
|
|
548
|
+
maxWidth?: number;
|
|
549
|
+
/** Size */
|
|
550
|
+
size?: ComponentSize;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/** Button size config */
|
|
554
|
+
export declare const SIZE_BUTTON_CONFIG: Record<ComponentSize, {
|
|
555
|
+
padding: string;
|
|
556
|
+
height: string;
|
|
557
|
+
}>;
|
|
558
|
+
|
|
559
|
+
/** Display size classes */
|
|
560
|
+
export declare const SIZE_DISPLAY_CLASSES: Record<ComponentSize, string>;
|
|
561
|
+
|
|
562
|
+
/** Gap classes */
|
|
563
|
+
export declare const SIZE_GAP_CLASSES: Record<ComponentSize, string>;
|
|
564
|
+
|
|
565
|
+
/** Heading size classes */
|
|
566
|
+
export declare const SIZE_HEADING_CLASSES: Record<ComponentSize, string>;
|
|
567
|
+
|
|
568
|
+
/** Icon size config */
|
|
569
|
+
export declare const SIZE_ICON_CONFIG: Record<ComponentSize, string>;
|
|
570
|
+
|
|
571
|
+
/** Input size config */
|
|
572
|
+
export declare const SIZE_INPUT_CONFIG: Record<ComponentSize, {
|
|
573
|
+
padding: string;
|
|
574
|
+
height: string;
|
|
575
|
+
fontSize: string;
|
|
576
|
+
}>;
|
|
577
|
+
|
|
578
|
+
/** Modal size config */
|
|
579
|
+
export declare const SIZE_MODAL_CONFIG: Record<ComponentSize, {
|
|
580
|
+
width: string;
|
|
581
|
+
maxWidth: string;
|
|
582
|
+
}>;
|
|
583
|
+
|
|
584
|
+
/** Padding classes */
|
|
585
|
+
export declare const SIZE_PADDING_CLASSES: Record<ComponentSize, string>;
|
|
586
|
+
|
|
587
|
+
/** Selector size config */
|
|
588
|
+
export declare const SIZE_SELECTOR_CONFIG: Record<ComponentSize, {
|
|
589
|
+
padding: string;
|
|
590
|
+
height: string;
|
|
591
|
+
fontSize: string;
|
|
592
|
+
}>;
|
|
593
|
+
|
|
594
|
+
/** Table size config */
|
|
595
|
+
export declare const SIZE_TABLE_CONFIG: Record<ComponentSize, {
|
|
596
|
+
cellPadding: string;
|
|
597
|
+
rowHeight: string;
|
|
598
|
+
}>;
|
|
599
|
+
|
|
600
|
+
/** Text size classes */
|
|
601
|
+
export declare const SIZE_TEXT_CLASSES: Record<ComponentSize, string>;
|
|
602
|
+
|
|
603
|
+
/** Tooltip size config */
|
|
604
|
+
export declare const SIZE_TOOLTIP_CONFIG: Record<ComponentSize, {
|
|
605
|
+
paddingClass: string;
|
|
606
|
+
textClass: string;
|
|
607
|
+
maxWidth: number;
|
|
608
|
+
}>;
|
|
609
|
+
|
|
610
|
+
export declare const useConfirm: () => UseConfirmReturn;
|
|
611
|
+
|
|
612
|
+
export declare interface UseConfirmReturn {
|
|
613
|
+
visible: boolean;
|
|
614
|
+
config: Omit<LMConfirmProps, 'visible' | 'onConfirm' | 'onCancel'> | null;
|
|
615
|
+
confirm: (options: {
|
|
616
|
+
title?: string;
|
|
617
|
+
content: string;
|
|
618
|
+
confirmText?: string;
|
|
619
|
+
cancelText?: string;
|
|
620
|
+
confirmButtonStyle?: 'primary' | 'danger';
|
|
621
|
+
}) => Promise<boolean>;
|
|
622
|
+
ConfirmDialog: default_2.FC;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export declare const useMessage: () => UseMessageReturn;
|
|
626
|
+
|
|
627
|
+
export declare interface UseMessageReturn {
|
|
628
|
+
messages: LMMessageItem[];
|
|
629
|
+
addMessage: (message: Omit<LMMessageItem, 'id'>) => string;
|
|
630
|
+
removeMessage: (id: string) => void;
|
|
631
|
+
success: (content: string, title?: string, duration?: number) => string;
|
|
632
|
+
error: (content: string, title?: string, duration?: number) => string;
|
|
633
|
+
warning: (content: string, title?: string, duration?: number) => string;
|
|
634
|
+
info: (content: string, title?: string, duration?: number) => string;
|
|
635
|
+
clearAll: () => void;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export { }
|