@clarlabs/ui 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +149 -0
- package/dist/index.js +28 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4000 -3280
- package/dist/index.mjs.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -192,6 +192,50 @@ export declare interface CardProps {
|
|
|
192
192
|
onClick?: () => void;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
export declare function Chart({ type, datasets, data, labels, title, showLegend, showGrid, showValues, height, className, animate, smooth }: ChartProps): default_2.JSX.Element;
|
|
196
|
+
|
|
197
|
+
export declare interface ChartDataPoint {
|
|
198
|
+
label: string;
|
|
199
|
+
value: number;
|
|
200
|
+
lightColor?: string;
|
|
201
|
+
darkColor?: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare interface ChartDataset {
|
|
205
|
+
label: string;
|
|
206
|
+
data: number[];
|
|
207
|
+
lightColor?: string;
|
|
208
|
+
darkColor?: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export declare interface ChartProps {
|
|
212
|
+
type: ChartType;
|
|
213
|
+
/** For line, bar, and area charts - array of datasets */
|
|
214
|
+
datasets?: ChartDataset[];
|
|
215
|
+
/** For pie and doughnut charts - array of data points */
|
|
216
|
+
data?: ChartDataPoint[];
|
|
217
|
+
/** Labels for x-axis (for line, bar, area) */
|
|
218
|
+
labels?: string[];
|
|
219
|
+
/** Chart title */
|
|
220
|
+
title?: string;
|
|
221
|
+
/** Show legend */
|
|
222
|
+
showLegend?: boolean;
|
|
223
|
+
/** Show grid lines */
|
|
224
|
+
showGrid?: boolean;
|
|
225
|
+
/** Show values on data points/bars */
|
|
226
|
+
showValues?: boolean;
|
|
227
|
+
/** Height of the chart in pixels */
|
|
228
|
+
height?: number;
|
|
229
|
+
/** Custom className */
|
|
230
|
+
className?: string;
|
|
231
|
+
/** Animate chart on mount */
|
|
232
|
+
animate?: boolean;
|
|
233
|
+
/** Curve for line and area charts */
|
|
234
|
+
smooth?: boolean;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export declare type ChartType = 'line' | 'bar' | 'area' | 'pie' | 'doughnut';
|
|
238
|
+
|
|
195
239
|
export declare function Chat({ messages, onSendMessage, placeholder, disabled, showTimestamps, showAvatars, maxHeight, typingIndicator, userName, botName, className, ...props }: ChatProps): default_2.JSX.Element;
|
|
196
240
|
|
|
197
241
|
export declare interface ChatMessage {
|
|
@@ -473,6 +517,40 @@ export declare interface FileItem {
|
|
|
473
517
|
error?: string;
|
|
474
518
|
}
|
|
475
519
|
|
|
520
|
+
export declare function FileManager({ items, topMenuItems, onItemClick, onItemDoubleClick, onBreadcrumbClick, onBreadcrumbDoubleClick, getContextMenuItems, className }: FileManagerProps): default_2.JSX.Element;
|
|
521
|
+
|
|
522
|
+
export declare interface FileManagerFileItem {
|
|
523
|
+
id: string;
|
|
524
|
+
name: string;
|
|
525
|
+
type: 'folder' | 'file';
|
|
526
|
+
/** Custom icon element that replaces the default icon */
|
|
527
|
+
icon?: default_2.ReactNode;
|
|
528
|
+
/** Thumbnail image URL (for files only) */
|
|
529
|
+
thumbnail?: string;
|
|
530
|
+
size?: number;
|
|
531
|
+
modified?: Date;
|
|
532
|
+
children?: FileManagerFileItem[];
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export declare interface FileManagerProps {
|
|
536
|
+
/** Root items */
|
|
537
|
+
readonly items: FileManagerFileItem[];
|
|
538
|
+
/** Top left menu items */
|
|
539
|
+
readonly topMenuItems?: ContextMenuItem[];
|
|
540
|
+
/** Callback when a file/folder is clicked */
|
|
541
|
+
readonly onItemClick?: (item: FileManagerFileItem, path: string[]) => void;
|
|
542
|
+
/** Callback when a file/folder is double-clicked */
|
|
543
|
+
readonly onItemDoubleClick?: (item: FileManagerFileItem, path: string[]) => void;
|
|
544
|
+
/** Callback when breadcrumb item is clicked */
|
|
545
|
+
readonly onBreadcrumbClick?: (path: string[], index: number) => void;
|
|
546
|
+
/** Callback when breadcrumb item is double-clicked */
|
|
547
|
+
readonly onBreadcrumbDoubleClick?: (path: string[], index: number) => void;
|
|
548
|
+
/** Callback to get context menu items for a file/folder */
|
|
549
|
+
readonly getContextMenuItems?: (item: FileManagerFileItem, path: string[]) => ContextMenuItem[];
|
|
550
|
+
/** Custom className */
|
|
551
|
+
readonly className?: string;
|
|
552
|
+
}
|
|
553
|
+
|
|
476
554
|
export declare function FilePicker({ accept, multiple, maxSize, disabled, onChange, onUpload, className }: FilePickerProps): default_2.JSX.Element;
|
|
477
555
|
|
|
478
556
|
export declare interface FilePickerProps {
|
|
@@ -792,6 +870,36 @@ export declare type InputSize = 'sm' | 'md' | 'lg';
|
|
|
792
870
|
|
|
793
871
|
export declare type InputVariant = 'default' | 'error' | 'success';
|
|
794
872
|
|
|
873
|
+
export declare function KanBan({ columns: initialColumns, onItemMove, onItemClick, onColumnAdd, onColumnRemove, allowAddColumns, allowRemoveColumns, className }: KanBanProps): default_2.JSX.Element;
|
|
874
|
+
|
|
875
|
+
export declare interface KanBanColumn {
|
|
876
|
+
id: string;
|
|
877
|
+
title: string;
|
|
878
|
+
items: KanBanItem[];
|
|
879
|
+
color?: string;
|
|
880
|
+
maxItems?: number;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export declare interface KanBanItem {
|
|
884
|
+
id: string;
|
|
885
|
+
title: string;
|
|
886
|
+
description?: string;
|
|
887
|
+
badge?: string | number;
|
|
888
|
+
badgeVariant?: BadgeVariant;
|
|
889
|
+
[key: string]: any;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export declare interface KanBanProps {
|
|
893
|
+
columns: KanBanColumn[];
|
|
894
|
+
onItemMove?: (item: KanBanItem, fromColumnId: string, toColumnId: string) => void;
|
|
895
|
+
onItemClick?: (item: KanBanItem, columnId: string) => void;
|
|
896
|
+
onColumnAdd?: (columnId: string, columnTitle: string) => void;
|
|
897
|
+
onColumnRemove?: (columnId: string) => void;
|
|
898
|
+
allowAddColumns?: boolean;
|
|
899
|
+
allowRemoveColumns?: boolean;
|
|
900
|
+
className?: string;
|
|
901
|
+
}
|
|
902
|
+
|
|
795
903
|
export declare function Label({ size, required, disabled, className, children, ...props }: LabelProps): default_2.JSX.Element;
|
|
796
904
|
|
|
797
905
|
export declare interface LabelProps extends default_2.LabelHTMLAttributes<HTMLLabelElement> {
|
|
@@ -1440,6 +1548,47 @@ export declare interface ToggleSwitchProps {
|
|
|
1440
1548
|
|
|
1441
1549
|
export declare type ToggleSwitchSize = 'sm' | 'md' | 'lg';
|
|
1442
1550
|
|
|
1551
|
+
export declare function Toolbar({ menuItems, statusItems, children, className }: ToolbarProps): default_2.JSX.Element;
|
|
1552
|
+
|
|
1553
|
+
export declare interface ToolbarMenuItem {
|
|
1554
|
+
/** Unique identifier */
|
|
1555
|
+
id: string;
|
|
1556
|
+
/** Label to display */
|
|
1557
|
+
label: string;
|
|
1558
|
+
/** Icon element */
|
|
1559
|
+
icon?: default_2.ReactNode;
|
|
1560
|
+
/** Whether the item is disabled */
|
|
1561
|
+
disabled?: boolean;
|
|
1562
|
+
/** Submenu items for dropdown */
|
|
1563
|
+
submenu?: ToolbarMenuItem[];
|
|
1564
|
+
/** Callback when item is clicked (if no submenu) */
|
|
1565
|
+
onClick?: () => void;
|
|
1566
|
+
/** Separator after this item */
|
|
1567
|
+
separator?: boolean;
|
|
1568
|
+
/** Badge or count to display */
|
|
1569
|
+
badge?: string | number;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
export declare interface ToolbarProps {
|
|
1573
|
+
/** Menu items with optional dropdowns */
|
|
1574
|
+
menuItems?: ToolbarMenuItem[];
|
|
1575
|
+
/** Status information sections */
|
|
1576
|
+
statusItems?: ToolbarStatus[];
|
|
1577
|
+
/** Additional custom content */
|
|
1578
|
+
children?: default_2.ReactNode;
|
|
1579
|
+
/** Custom className */
|
|
1580
|
+
className?: string;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
export declare interface ToolbarStatus {
|
|
1584
|
+
/** Status text */
|
|
1585
|
+
text: string;
|
|
1586
|
+
/** Optional icon */
|
|
1587
|
+
icon?: default_2.ReactNode;
|
|
1588
|
+
/** Optional tooltip */
|
|
1589
|
+
tooltip?: string;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1443
1592
|
export declare function Tooltip({ children, content, position, delay, className }: TooltipProps): default_2.JSX.Element;
|
|
1444
1593
|
|
|
1445
1594
|
export declare type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|