mywhy-ui 0.1.0 → 0.2.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/README.md +136 -28
- package/dist/index.cjs +1453 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +288 -1
- package/dist/index.d.ts +288 -1
- package/dist/index.js +1415 -4
- package/dist/index.js.map +1 -1
- package/package.json +19 -4
package/dist/index.d.cts
CHANGED
|
@@ -45,6 +45,13 @@ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>
|
|
|
45
45
|
}
|
|
46
46
|
declare function Select({ size, label, error, options, id, className, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
49
|
+
label?: React.ReactNode;
|
|
50
|
+
description?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
}
|
|
53
|
+
declare function Switch({ label, description, error, id, className, checked, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
48
55
|
type BadgeTheme = 'brand' | 'success' | 'danger' | 'warning' | 'gray' | 'admin' | 'operator' | 'viewer' | 'online' | 'offline' | 'error';
|
|
49
56
|
interface BadgeProps {
|
|
50
57
|
theme?: BadgeTheme;
|
|
@@ -98,6 +105,99 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
98
105
|
}
|
|
99
106
|
declare function Textarea({ size, label, error, resize, id, className, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
100
107
|
|
|
108
|
+
type AlertTheme = 'info' | 'success' | 'warning' | 'danger';
|
|
109
|
+
interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
110
|
+
theme?: AlertTheme;
|
|
111
|
+
title?: React.ReactNode;
|
|
112
|
+
icon?: React.ReactNode;
|
|
113
|
+
onClose?: () => void;
|
|
114
|
+
isDismissible?: boolean;
|
|
115
|
+
}
|
|
116
|
+
declare function Alert({ theme, title, icon, onClose, isDismissible, children, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
117
|
+
|
|
118
|
+
interface MultiSelectOption {
|
|
119
|
+
label: string;
|
|
120
|
+
value: string;
|
|
121
|
+
icon?: React.ReactNode;
|
|
122
|
+
disabled?: boolean;
|
|
123
|
+
}
|
|
124
|
+
interface MultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
125
|
+
options: MultiSelectOption[];
|
|
126
|
+
value?: string[];
|
|
127
|
+
onChange?: (values: string[]) => void;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
label?: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
error?: string;
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
searchable?: boolean;
|
|
134
|
+
clearable?: boolean;
|
|
135
|
+
size?: 'sm' | 'md' | 'lg';
|
|
136
|
+
}
|
|
137
|
+
declare function MultiSelect({ options, value, onChange, placeholder, label, description, error, disabled, searchable, clearable, size, className, ...props }: MultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface FormControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
140
|
+
label?: React.ReactNode;
|
|
141
|
+
description?: string;
|
|
142
|
+
error?: string;
|
|
143
|
+
required?: boolean;
|
|
144
|
+
helperText?: string;
|
|
145
|
+
children: React.ReactNode;
|
|
146
|
+
}
|
|
147
|
+
declare function FormControl({ label, description, error, required, helperText, children, className, ...props }: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
|
|
149
|
+
interface TabItem {
|
|
150
|
+
label: React.ReactNode;
|
|
151
|
+
value: string;
|
|
152
|
+
content: React.ReactNode;
|
|
153
|
+
icon?: React.ReactNode;
|
|
154
|
+
disabled?: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface TabsProps {
|
|
157
|
+
tabs: TabItem[];
|
|
158
|
+
activeTab?: string;
|
|
159
|
+
onTabChange?: (value: string) => void;
|
|
160
|
+
variant?: 'underline' | 'soft';
|
|
161
|
+
className?: string;
|
|
162
|
+
tabsClassName?: string;
|
|
163
|
+
contentClassName?: string;
|
|
164
|
+
}
|
|
165
|
+
declare function Tabs({ tabs, activeTab, onTabChange, variant, className, tabsClassName, contentClassName, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
167
|
+
interface BreadcrumbItem {
|
|
168
|
+
label: React.ReactNode;
|
|
169
|
+
href?: string;
|
|
170
|
+
onClick?: () => void;
|
|
171
|
+
icon?: React.ReactNode;
|
|
172
|
+
isActive?: boolean;
|
|
173
|
+
}
|
|
174
|
+
interface BreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
175
|
+
items: BreadcrumbItem[];
|
|
176
|
+
separator?: React.ReactNode;
|
|
177
|
+
className?: string;
|
|
178
|
+
}
|
|
179
|
+
declare function Breadcrumbs({ items, separator, className, ...props }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
181
|
+
interface DropdownItem {
|
|
182
|
+
label: React.ReactNode;
|
|
183
|
+
value?: string;
|
|
184
|
+
icon?: React.ReactNode;
|
|
185
|
+
onClick?: () => void;
|
|
186
|
+
isDanger?: boolean;
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
}
|
|
189
|
+
interface DropdownProps {
|
|
190
|
+
items: DropdownItem[];
|
|
191
|
+
trigger: React.ReactNode;
|
|
192
|
+
placement?: 'bottom' | 'top' | 'left' | 'right';
|
|
193
|
+
isOpen?: boolean;
|
|
194
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
195
|
+
className?: string;
|
|
196
|
+
triggerClassName?: string;
|
|
197
|
+
menuClassName?: string;
|
|
198
|
+
}
|
|
199
|
+
declare function Dropdown({ items, trigger, placement, isOpen: controlledIsOpen, onOpenChange, className, triggerClassName, menuClassName, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
200
|
+
|
|
101
201
|
interface DialogProps {
|
|
102
202
|
open: boolean;
|
|
103
203
|
onClose: () => void;
|
|
@@ -143,6 +243,193 @@ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
143
243
|
}
|
|
144
244
|
declare function Link({ variant, external, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
145
245
|
|
|
246
|
+
interface FileUploaderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
247
|
+
label?: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
error?: string;
|
|
250
|
+
hint?: string;
|
|
251
|
+
onFilesChange?: (files: File[]) => void;
|
|
252
|
+
maxSize?: number;
|
|
253
|
+
accept?: string;
|
|
254
|
+
isDragActive?: boolean;
|
|
255
|
+
multiple?: boolean;
|
|
256
|
+
}
|
|
257
|
+
declare function FileUploader({ label, description, error, hint, onFilesChange, maxSize, accept, multiple, disabled, className, ...props }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
258
|
+
|
|
259
|
+
interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
260
|
+
value?: string;
|
|
261
|
+
onChange?: (value: string) => void;
|
|
262
|
+
label?: string;
|
|
263
|
+
description?: string;
|
|
264
|
+
error?: string;
|
|
265
|
+
min?: string;
|
|
266
|
+
max?: string;
|
|
267
|
+
placeholder?: string;
|
|
268
|
+
}
|
|
269
|
+
declare function DatePicker({ value, onChange, label, description, error, min, max, placeholder, disabled, className, ...props }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
271
|
+
interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
272
|
+
value?: string;
|
|
273
|
+
onChange?: (value: string) => void;
|
|
274
|
+
label?: string;
|
|
275
|
+
description?: string;
|
|
276
|
+
error?: string;
|
|
277
|
+
placeholder?: string;
|
|
278
|
+
format?: '12h' | '24h';
|
|
279
|
+
}
|
|
280
|
+
declare function TimePicker({ value, onChange, label, description, error, placeholder, format, disabled, className, ...props }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
283
|
+
value: number;
|
|
284
|
+
label?: string;
|
|
285
|
+
size?: 'sm' | 'md' | 'lg';
|
|
286
|
+
theme?: 'brand' | 'success' | 'warning' | 'danger';
|
|
287
|
+
showLabel?: boolean;
|
|
288
|
+
striped?: boolean;
|
|
289
|
+
animated?: boolean;
|
|
290
|
+
}
|
|
291
|
+
declare function Progress({ value, label, size, theme, showLabel, striped, animated, className, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
292
|
+
|
|
293
|
+
interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
294
|
+
value?: number;
|
|
295
|
+
onChange?: (value: number) => void;
|
|
296
|
+
count?: number;
|
|
297
|
+
size?: 'sm' | 'md' | 'lg';
|
|
298
|
+
readonly?: boolean;
|
|
299
|
+
label?: string;
|
|
300
|
+
color?: 'yellow' | 'brand' | 'danger';
|
|
301
|
+
}
|
|
302
|
+
declare function Rating({ value, onChange, count, size, readonly, label, color, className, ...props }: RatingProps): react_jsx_runtime.JSX.Element;
|
|
303
|
+
|
|
304
|
+
interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
305
|
+
value?: number;
|
|
306
|
+
onChange?: (value: number) => void;
|
|
307
|
+
min?: number;
|
|
308
|
+
max?: number;
|
|
309
|
+
step?: number;
|
|
310
|
+
label?: string;
|
|
311
|
+
showValue?: boolean;
|
|
312
|
+
theme?: 'brand' | 'success' | 'danger';
|
|
313
|
+
}
|
|
314
|
+
declare function Slider({ value, onChange, min, max, step, label, showValue, theme, className, disabled, ...props }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
315
|
+
|
|
316
|
+
interface SidebarItem {
|
|
317
|
+
label: React.ReactNode;
|
|
318
|
+
value: string;
|
|
319
|
+
icon?: React.ReactNode;
|
|
320
|
+
onClick?: () => void;
|
|
321
|
+
isActive?: boolean;
|
|
322
|
+
disabled?: boolean;
|
|
323
|
+
badge?: React.ReactNode;
|
|
324
|
+
}
|
|
325
|
+
interface SidebarSection {
|
|
326
|
+
title?: string;
|
|
327
|
+
items: SidebarItem[];
|
|
328
|
+
}
|
|
329
|
+
interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
330
|
+
sections: SidebarSection[];
|
|
331
|
+
activeItem?: string;
|
|
332
|
+
onItemClick?: (value: string) => void;
|
|
333
|
+
collapsible?: boolean;
|
|
334
|
+
isCollapsed?: boolean;
|
|
335
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
336
|
+
width?: string;
|
|
337
|
+
className?: string;
|
|
338
|
+
}
|
|
339
|
+
declare function Sidebar({ sections, activeItem, onItemClick, collapsible, isCollapsed, onCollapsedChange, width, className, ...props }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
340
|
+
|
|
341
|
+
interface TableColumn {
|
|
342
|
+
key: string;
|
|
343
|
+
label: string;
|
|
344
|
+
width?: string;
|
|
345
|
+
render?: (value: any, row: any) => React.ReactNode;
|
|
346
|
+
align?: 'left' | 'center' | 'right';
|
|
347
|
+
}
|
|
348
|
+
interface TableProps {
|
|
349
|
+
columns: TableColumn[];
|
|
350
|
+
data: any[];
|
|
351
|
+
striped?: boolean;
|
|
352
|
+
hoverable?: boolean;
|
|
353
|
+
compact?: boolean;
|
|
354
|
+
className?: string;
|
|
355
|
+
emptyMessage?: string;
|
|
356
|
+
}
|
|
357
|
+
declare function Table({ columns, data, striped, hoverable, compact, className, emptyMessage, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
358
|
+
|
|
359
|
+
interface PaginationProps {
|
|
360
|
+
current: number;
|
|
361
|
+
total: number;
|
|
362
|
+
onChange: (page: number) => void;
|
|
363
|
+
size?: 'sm' | 'md';
|
|
364
|
+
showInfo?: boolean;
|
|
365
|
+
maxVisible?: number;
|
|
366
|
+
className?: string;
|
|
367
|
+
}
|
|
368
|
+
declare function Pagination({ current, total, onChange, size, showInfo, maxVisible, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
369
|
+
|
|
370
|
+
interface EmptyStateProps {
|
|
371
|
+
icon?: React.ReactNode;
|
|
372
|
+
title: string;
|
|
373
|
+
description?: string;
|
|
374
|
+
action?: {
|
|
375
|
+
label: string;
|
|
376
|
+
onClick: () => void;
|
|
377
|
+
};
|
|
378
|
+
className?: string;
|
|
379
|
+
}
|
|
380
|
+
declare function EmptyState({ icon, title, description, action, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
381
|
+
|
|
382
|
+
type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
383
|
+
interface NumberInputProps {
|
|
384
|
+
value: number;
|
|
385
|
+
onChange: (value: number) => void;
|
|
386
|
+
step?: number;
|
|
387
|
+
min?: number;
|
|
388
|
+
max?: number;
|
|
389
|
+
size?: NumberInputSize;
|
|
390
|
+
disabled?: boolean;
|
|
391
|
+
placeholder?: string;
|
|
392
|
+
className?: string;
|
|
393
|
+
}
|
|
394
|
+
declare function NumberInput({ value, onChange, step, min, max, size, disabled, placeholder, className, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
395
|
+
|
|
396
|
+
type CodeBlockLanguage = 'json' | 'javascript' | 'typescript' | 'python' | 'bash' | 'text';
|
|
397
|
+
interface CodeBlockProps {
|
|
398
|
+
code: string;
|
|
399
|
+
language?: CodeBlockLanguage;
|
|
400
|
+
copyable?: boolean;
|
|
401
|
+
numbered?: boolean;
|
|
402
|
+
maxHeight?: string;
|
|
403
|
+
className?: string;
|
|
404
|
+
}
|
|
405
|
+
declare function CodeBlock({ code, language, copyable, numbered, maxHeight, className, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
|
|
407
|
+
type TimelineStatus = 'completed' | 'pending' | 'error' | 'in-progress';
|
|
408
|
+
interface TimelineItem {
|
|
409
|
+
id: string | number;
|
|
410
|
+
label: string;
|
|
411
|
+
description?: string;
|
|
412
|
+
status: TimelineStatus;
|
|
413
|
+
timestamp?: string | Date;
|
|
414
|
+
icon?: React.ReactNode;
|
|
415
|
+
}
|
|
416
|
+
interface TimelineProps {
|
|
417
|
+
items: TimelineItem[];
|
|
418
|
+
orientation?: 'vertical' | 'horizontal';
|
|
419
|
+
className?: string;
|
|
420
|
+
}
|
|
421
|
+
declare function Timeline({ items, orientation, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
type KbdSize = 'xs' | 'sm' | 'md';
|
|
424
|
+
type KbdTheme = 'gray' | 'dark' | 'brand';
|
|
425
|
+
interface KbdProps {
|
|
426
|
+
keys: string | string[];
|
|
427
|
+
size?: KbdSize;
|
|
428
|
+
theme?: KbdTheme;
|
|
429
|
+
className?: string;
|
|
430
|
+
}
|
|
431
|
+
declare function Kbd({ keys, size, theme, className, }: KbdProps): react_jsx_runtime.JSX.Element;
|
|
432
|
+
|
|
146
433
|
type RobotStatus = 'online' | 'offline' | 'error' | 'warning' | 'connecting' | 'unknown';
|
|
147
434
|
interface StatusBadgeProps {
|
|
148
435
|
status: RobotStatus;
|
|
@@ -186,4 +473,4 @@ declare function useToast(): {
|
|
|
186
473
|
removeToast: (id: string) => void;
|
|
187
474
|
};
|
|
188
475
|
|
|
189
|
-
export { Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, Dialog, type DialogProps, Input, type InputProps, type InputSize, Link, type LinkProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Textarea, type TextareaProps, type TextareaSize, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
|
476
|
+
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,13 @@ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>
|
|
|
45
45
|
}
|
|
46
46
|
declare function Select({ size, label, error, options, id, className, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
49
|
+
label?: React.ReactNode;
|
|
50
|
+
description?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
}
|
|
53
|
+
declare function Switch({ label, description, error, id, className, checked, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
48
55
|
type BadgeTheme = 'brand' | 'success' | 'danger' | 'warning' | 'gray' | 'admin' | 'operator' | 'viewer' | 'online' | 'offline' | 'error';
|
|
49
56
|
interface BadgeProps {
|
|
50
57
|
theme?: BadgeTheme;
|
|
@@ -98,6 +105,99 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
98
105
|
}
|
|
99
106
|
declare function Textarea({ size, label, error, resize, id, className, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
100
107
|
|
|
108
|
+
type AlertTheme = 'info' | 'success' | 'warning' | 'danger';
|
|
109
|
+
interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
110
|
+
theme?: AlertTheme;
|
|
111
|
+
title?: React.ReactNode;
|
|
112
|
+
icon?: React.ReactNode;
|
|
113
|
+
onClose?: () => void;
|
|
114
|
+
isDismissible?: boolean;
|
|
115
|
+
}
|
|
116
|
+
declare function Alert({ theme, title, icon, onClose, isDismissible, children, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
117
|
+
|
|
118
|
+
interface MultiSelectOption {
|
|
119
|
+
label: string;
|
|
120
|
+
value: string;
|
|
121
|
+
icon?: React.ReactNode;
|
|
122
|
+
disabled?: boolean;
|
|
123
|
+
}
|
|
124
|
+
interface MultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
125
|
+
options: MultiSelectOption[];
|
|
126
|
+
value?: string[];
|
|
127
|
+
onChange?: (values: string[]) => void;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
label?: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
error?: string;
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
searchable?: boolean;
|
|
134
|
+
clearable?: boolean;
|
|
135
|
+
size?: 'sm' | 'md' | 'lg';
|
|
136
|
+
}
|
|
137
|
+
declare function MultiSelect({ options, value, onChange, placeholder, label, description, error, disabled, searchable, clearable, size, className, ...props }: MultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface FormControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
140
|
+
label?: React.ReactNode;
|
|
141
|
+
description?: string;
|
|
142
|
+
error?: string;
|
|
143
|
+
required?: boolean;
|
|
144
|
+
helperText?: string;
|
|
145
|
+
children: React.ReactNode;
|
|
146
|
+
}
|
|
147
|
+
declare function FormControl({ label, description, error, required, helperText, children, className, ...props }: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
|
|
149
|
+
interface TabItem {
|
|
150
|
+
label: React.ReactNode;
|
|
151
|
+
value: string;
|
|
152
|
+
content: React.ReactNode;
|
|
153
|
+
icon?: React.ReactNode;
|
|
154
|
+
disabled?: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface TabsProps {
|
|
157
|
+
tabs: TabItem[];
|
|
158
|
+
activeTab?: string;
|
|
159
|
+
onTabChange?: (value: string) => void;
|
|
160
|
+
variant?: 'underline' | 'soft';
|
|
161
|
+
className?: string;
|
|
162
|
+
tabsClassName?: string;
|
|
163
|
+
contentClassName?: string;
|
|
164
|
+
}
|
|
165
|
+
declare function Tabs({ tabs, activeTab, onTabChange, variant, className, tabsClassName, contentClassName, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
167
|
+
interface BreadcrumbItem {
|
|
168
|
+
label: React.ReactNode;
|
|
169
|
+
href?: string;
|
|
170
|
+
onClick?: () => void;
|
|
171
|
+
icon?: React.ReactNode;
|
|
172
|
+
isActive?: boolean;
|
|
173
|
+
}
|
|
174
|
+
interface BreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
175
|
+
items: BreadcrumbItem[];
|
|
176
|
+
separator?: React.ReactNode;
|
|
177
|
+
className?: string;
|
|
178
|
+
}
|
|
179
|
+
declare function Breadcrumbs({ items, separator, className, ...props }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
181
|
+
interface DropdownItem {
|
|
182
|
+
label: React.ReactNode;
|
|
183
|
+
value?: string;
|
|
184
|
+
icon?: React.ReactNode;
|
|
185
|
+
onClick?: () => void;
|
|
186
|
+
isDanger?: boolean;
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
}
|
|
189
|
+
interface DropdownProps {
|
|
190
|
+
items: DropdownItem[];
|
|
191
|
+
trigger: React.ReactNode;
|
|
192
|
+
placement?: 'bottom' | 'top' | 'left' | 'right';
|
|
193
|
+
isOpen?: boolean;
|
|
194
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
195
|
+
className?: string;
|
|
196
|
+
triggerClassName?: string;
|
|
197
|
+
menuClassName?: string;
|
|
198
|
+
}
|
|
199
|
+
declare function Dropdown({ items, trigger, placement, isOpen: controlledIsOpen, onOpenChange, className, triggerClassName, menuClassName, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
200
|
+
|
|
101
201
|
interface DialogProps {
|
|
102
202
|
open: boolean;
|
|
103
203
|
onClose: () => void;
|
|
@@ -143,6 +243,193 @@ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
143
243
|
}
|
|
144
244
|
declare function Link({ variant, external, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
145
245
|
|
|
246
|
+
interface FileUploaderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
247
|
+
label?: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
error?: string;
|
|
250
|
+
hint?: string;
|
|
251
|
+
onFilesChange?: (files: File[]) => void;
|
|
252
|
+
maxSize?: number;
|
|
253
|
+
accept?: string;
|
|
254
|
+
isDragActive?: boolean;
|
|
255
|
+
multiple?: boolean;
|
|
256
|
+
}
|
|
257
|
+
declare function FileUploader({ label, description, error, hint, onFilesChange, maxSize, accept, multiple, disabled, className, ...props }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
258
|
+
|
|
259
|
+
interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
260
|
+
value?: string;
|
|
261
|
+
onChange?: (value: string) => void;
|
|
262
|
+
label?: string;
|
|
263
|
+
description?: string;
|
|
264
|
+
error?: string;
|
|
265
|
+
min?: string;
|
|
266
|
+
max?: string;
|
|
267
|
+
placeholder?: string;
|
|
268
|
+
}
|
|
269
|
+
declare function DatePicker({ value, onChange, label, description, error, min, max, placeholder, disabled, className, ...props }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
271
|
+
interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
272
|
+
value?: string;
|
|
273
|
+
onChange?: (value: string) => void;
|
|
274
|
+
label?: string;
|
|
275
|
+
description?: string;
|
|
276
|
+
error?: string;
|
|
277
|
+
placeholder?: string;
|
|
278
|
+
format?: '12h' | '24h';
|
|
279
|
+
}
|
|
280
|
+
declare function TimePicker({ value, onChange, label, description, error, placeholder, format, disabled, className, ...props }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
283
|
+
value: number;
|
|
284
|
+
label?: string;
|
|
285
|
+
size?: 'sm' | 'md' | 'lg';
|
|
286
|
+
theme?: 'brand' | 'success' | 'warning' | 'danger';
|
|
287
|
+
showLabel?: boolean;
|
|
288
|
+
striped?: boolean;
|
|
289
|
+
animated?: boolean;
|
|
290
|
+
}
|
|
291
|
+
declare function Progress({ value, label, size, theme, showLabel, striped, animated, className, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
292
|
+
|
|
293
|
+
interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
294
|
+
value?: number;
|
|
295
|
+
onChange?: (value: number) => void;
|
|
296
|
+
count?: number;
|
|
297
|
+
size?: 'sm' | 'md' | 'lg';
|
|
298
|
+
readonly?: boolean;
|
|
299
|
+
label?: string;
|
|
300
|
+
color?: 'yellow' | 'brand' | 'danger';
|
|
301
|
+
}
|
|
302
|
+
declare function Rating({ value, onChange, count, size, readonly, label, color, className, ...props }: RatingProps): react_jsx_runtime.JSX.Element;
|
|
303
|
+
|
|
304
|
+
interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
305
|
+
value?: number;
|
|
306
|
+
onChange?: (value: number) => void;
|
|
307
|
+
min?: number;
|
|
308
|
+
max?: number;
|
|
309
|
+
step?: number;
|
|
310
|
+
label?: string;
|
|
311
|
+
showValue?: boolean;
|
|
312
|
+
theme?: 'brand' | 'success' | 'danger';
|
|
313
|
+
}
|
|
314
|
+
declare function Slider({ value, onChange, min, max, step, label, showValue, theme, className, disabled, ...props }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
315
|
+
|
|
316
|
+
interface SidebarItem {
|
|
317
|
+
label: React.ReactNode;
|
|
318
|
+
value: string;
|
|
319
|
+
icon?: React.ReactNode;
|
|
320
|
+
onClick?: () => void;
|
|
321
|
+
isActive?: boolean;
|
|
322
|
+
disabled?: boolean;
|
|
323
|
+
badge?: React.ReactNode;
|
|
324
|
+
}
|
|
325
|
+
interface SidebarSection {
|
|
326
|
+
title?: string;
|
|
327
|
+
items: SidebarItem[];
|
|
328
|
+
}
|
|
329
|
+
interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
330
|
+
sections: SidebarSection[];
|
|
331
|
+
activeItem?: string;
|
|
332
|
+
onItemClick?: (value: string) => void;
|
|
333
|
+
collapsible?: boolean;
|
|
334
|
+
isCollapsed?: boolean;
|
|
335
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
336
|
+
width?: string;
|
|
337
|
+
className?: string;
|
|
338
|
+
}
|
|
339
|
+
declare function Sidebar({ sections, activeItem, onItemClick, collapsible, isCollapsed, onCollapsedChange, width, className, ...props }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
340
|
+
|
|
341
|
+
interface TableColumn {
|
|
342
|
+
key: string;
|
|
343
|
+
label: string;
|
|
344
|
+
width?: string;
|
|
345
|
+
render?: (value: any, row: any) => React.ReactNode;
|
|
346
|
+
align?: 'left' | 'center' | 'right';
|
|
347
|
+
}
|
|
348
|
+
interface TableProps {
|
|
349
|
+
columns: TableColumn[];
|
|
350
|
+
data: any[];
|
|
351
|
+
striped?: boolean;
|
|
352
|
+
hoverable?: boolean;
|
|
353
|
+
compact?: boolean;
|
|
354
|
+
className?: string;
|
|
355
|
+
emptyMessage?: string;
|
|
356
|
+
}
|
|
357
|
+
declare function Table({ columns, data, striped, hoverable, compact, className, emptyMessage, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
358
|
+
|
|
359
|
+
interface PaginationProps {
|
|
360
|
+
current: number;
|
|
361
|
+
total: number;
|
|
362
|
+
onChange: (page: number) => void;
|
|
363
|
+
size?: 'sm' | 'md';
|
|
364
|
+
showInfo?: boolean;
|
|
365
|
+
maxVisible?: number;
|
|
366
|
+
className?: string;
|
|
367
|
+
}
|
|
368
|
+
declare function Pagination({ current, total, onChange, size, showInfo, maxVisible, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
369
|
+
|
|
370
|
+
interface EmptyStateProps {
|
|
371
|
+
icon?: React.ReactNode;
|
|
372
|
+
title: string;
|
|
373
|
+
description?: string;
|
|
374
|
+
action?: {
|
|
375
|
+
label: string;
|
|
376
|
+
onClick: () => void;
|
|
377
|
+
};
|
|
378
|
+
className?: string;
|
|
379
|
+
}
|
|
380
|
+
declare function EmptyState({ icon, title, description, action, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
381
|
+
|
|
382
|
+
type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
383
|
+
interface NumberInputProps {
|
|
384
|
+
value: number;
|
|
385
|
+
onChange: (value: number) => void;
|
|
386
|
+
step?: number;
|
|
387
|
+
min?: number;
|
|
388
|
+
max?: number;
|
|
389
|
+
size?: NumberInputSize;
|
|
390
|
+
disabled?: boolean;
|
|
391
|
+
placeholder?: string;
|
|
392
|
+
className?: string;
|
|
393
|
+
}
|
|
394
|
+
declare function NumberInput({ value, onChange, step, min, max, size, disabled, placeholder, className, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
395
|
+
|
|
396
|
+
type CodeBlockLanguage = 'json' | 'javascript' | 'typescript' | 'python' | 'bash' | 'text';
|
|
397
|
+
interface CodeBlockProps {
|
|
398
|
+
code: string;
|
|
399
|
+
language?: CodeBlockLanguage;
|
|
400
|
+
copyable?: boolean;
|
|
401
|
+
numbered?: boolean;
|
|
402
|
+
maxHeight?: string;
|
|
403
|
+
className?: string;
|
|
404
|
+
}
|
|
405
|
+
declare function CodeBlock({ code, language, copyable, numbered, maxHeight, className, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
|
|
407
|
+
type TimelineStatus = 'completed' | 'pending' | 'error' | 'in-progress';
|
|
408
|
+
interface TimelineItem {
|
|
409
|
+
id: string | number;
|
|
410
|
+
label: string;
|
|
411
|
+
description?: string;
|
|
412
|
+
status: TimelineStatus;
|
|
413
|
+
timestamp?: string | Date;
|
|
414
|
+
icon?: React.ReactNode;
|
|
415
|
+
}
|
|
416
|
+
interface TimelineProps {
|
|
417
|
+
items: TimelineItem[];
|
|
418
|
+
orientation?: 'vertical' | 'horizontal';
|
|
419
|
+
className?: string;
|
|
420
|
+
}
|
|
421
|
+
declare function Timeline({ items, orientation, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
type KbdSize = 'xs' | 'sm' | 'md';
|
|
424
|
+
type KbdTheme = 'gray' | 'dark' | 'brand';
|
|
425
|
+
interface KbdProps {
|
|
426
|
+
keys: string | string[];
|
|
427
|
+
size?: KbdSize;
|
|
428
|
+
theme?: KbdTheme;
|
|
429
|
+
className?: string;
|
|
430
|
+
}
|
|
431
|
+
declare function Kbd({ keys, size, theme, className, }: KbdProps): react_jsx_runtime.JSX.Element;
|
|
432
|
+
|
|
146
433
|
type RobotStatus = 'online' | 'offline' | 'error' | 'warning' | 'connecting' | 'unknown';
|
|
147
434
|
interface StatusBadgeProps {
|
|
148
435
|
status: RobotStatus;
|
|
@@ -186,4 +473,4 @@ declare function useToast(): {
|
|
|
186
473
|
removeToast: (id: string) => void;
|
|
187
474
|
};
|
|
188
475
|
|
|
189
|
-
export { Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, Dialog, type DialogProps, Input, type InputProps, type InputSize, Link, type LinkProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Textarea, type TextareaProps, type TextareaSize, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
|
476
|
+
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|