@agentxjs/ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -0
  3. package/dist/api/index.d.ts +9 -0
  4. package/dist/components/container/AgentPane.d.ts +56 -0
  5. package/dist/components/container/ContainerView.d.ts +119 -0
  6. package/dist/components/container/DefinitionPane.d.ts +27 -0
  7. package/dist/components/container/InputPane.d.ts +44 -0
  8. package/dist/components/container/InputToolBar.d.ts +22 -0
  9. package/dist/components/container/MessagePane.d.ts +32 -0
  10. package/dist/components/container/SessionPane.d.ts +35 -0
  11. package/dist/components/container/index.d.ts +22 -0
  12. package/dist/components/container/types.d.ts +67 -0
  13. package/dist/components/element/ActionBar.d.ts +43 -0
  14. package/dist/components/element/AgentLogo.d.ts +21 -0
  15. package/dist/components/element/AppHeader.d.ts +84 -0
  16. package/dist/components/element/Badge.d.ts +9 -0
  17. package/dist/components/element/Button.d.ts +11 -0
  18. package/dist/components/element/EmptyState.d.ts +56 -0
  19. package/dist/components/element/ImageAttachment.d.ts +50 -0
  20. package/dist/components/element/Input.d.ts +5 -0
  21. package/dist/components/element/ListItem.d.ts +106 -0
  22. package/dist/components/element/LoadingState.d.ts +51 -0
  23. package/dist/components/element/MessageAvatar.d.ts +61 -0
  24. package/dist/components/element/PageHeader.d.ts +90 -0
  25. package/dist/components/element/Popover.d.ts +20 -0
  26. package/dist/components/element/ScrollArea.d.ts +6 -0
  27. package/dist/components/element/SearchInput.d.ts +75 -0
  28. package/dist/components/element/TabNavigation.d.ts +91 -0
  29. package/dist/components/element/TimeAgo.d.ts +46 -0
  30. package/dist/components/element/TokenUsagePie.d.ts +33 -0
  31. package/dist/components/element/index.d.ts +18 -0
  32. package/dist/components/input/InputBox.d.ts +43 -0
  33. package/dist/components/input/index.d.ts +1 -0
  34. package/dist/components/layout/ActivityBar.d.ts +62 -0
  35. package/dist/components/layout/Header.d.ts +36 -0
  36. package/dist/components/layout/MainContent.d.ts +21 -0
  37. package/dist/components/layout/Panel.d.ts +44 -0
  38. package/dist/components/layout/RightSidebar.d.ts +43 -0
  39. package/dist/components/layout/Sidebar.d.ts +34 -0
  40. package/dist/components/layout/StatusBar.d.ts +66 -0
  41. package/dist/components/layout/index.d.ts +7 -0
  42. package/dist/components/message/MessageList.d.ts +16 -0
  43. package/dist/components/message/StatusIndicator.d.ts +28 -0
  44. package/dist/components/message/index.d.ts +4 -0
  45. package/dist/components/message/items/AssistantMessage.d.ts +33 -0
  46. package/dist/components/message/items/ErrorAlert.d.ts +33 -0
  47. package/dist/components/message/items/SystemMessage.d.ts +25 -0
  48. package/dist/components/message/items/ToolCallMessage.d.ts +31 -0
  49. package/dist/components/message/items/ToolResultMessage.d.ts +33 -0
  50. package/dist/components/message/items/ToolUseMessage.d.ts +30 -0
  51. package/dist/components/message/items/UserMessage.d.ts +27 -0
  52. package/dist/components/message/items/index.d.ts +7 -0
  53. package/dist/components/message/parts/FileContent.d.ts +24 -0
  54. package/dist/components/message/parts/ImageContent.d.ts +32 -0
  55. package/dist/components/message/parts/TextContent.d.ts +20 -0
  56. package/dist/components/message/parts/ThinkingContent.d.ts +28 -0
  57. package/dist/components/message/parts/ToolCallContent.d.ts +31 -0
  58. package/dist/components/message/parts/ToolResultContent.d.ts +32 -0
  59. package/dist/components/message/parts/index.d.ts +6 -0
  60. package/dist/components/studio/Studio.d.ts +47 -0
  61. package/dist/components/studio/index.d.ts +9 -0
  62. package/dist/components/typography/DiffViewer.d.ts +41 -0
  63. package/dist/components/typography/JSONRenderer.d.ts +23 -0
  64. package/dist/components/typography/MarkdownText.d.ts +25 -0
  65. package/dist/components/typography/index.d.ts +3 -0
  66. package/dist/globals.css +201 -0
  67. package/dist/hooks/index.d.ts +28 -0
  68. package/dist/hooks/useAgent.d.ts +71 -0
  69. package/dist/hooks/useAgentX.d.ts +10 -0
  70. package/dist/hooks/useSession.d.ts +79 -0
  71. package/dist/index-CB5mSMCj.js +3041 -0
  72. package/dist/index-CB5mSMCj.js.map +1 -0
  73. package/dist/index-CyXGvO5F.js +27676 -0
  74. package/dist/index-CyXGvO5F.js.map +1 -0
  75. package/dist/index.d.ts +2 -0
  76. package/dist/index.js +64 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/types/index.d.ts +1 -0
  79. package/dist/utils/eventBus.d.ts +93 -0
  80. package/dist/utils/index.d.ts +3 -0
  81. package/dist/utils/timeUtils.d.ts +14 -0
  82. package/dist/utils/utils.d.ts +13 -0
  83. package/package.json +87 -0
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "outline" | "primary" | "secondary" | "success" | "warning" | "info" | "destructive" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,56 @@
1
+ import * as React from "react";
2
+ export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Icon element to display
5
+ */
6
+ icon?: React.ReactNode;
7
+ /**
8
+ * Title text
9
+ */
10
+ title: string;
11
+ /**
12
+ * Description text
13
+ */
14
+ description?: string;
15
+ /**
16
+ * Action button or element
17
+ */
18
+ action?: React.ReactNode;
19
+ /**
20
+ * Vertical spacing size
21
+ */
22
+ spacing?: "sm" | "md" | "lg";
23
+ }
24
+ /**
25
+ * EmptyState - Display empty state with icon, title, description, and optional action
26
+ *
27
+ * A flexible component for showing empty states in lists, tables, search results, etc.
28
+ * Supports custom icons, descriptions, and action buttons.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // Basic empty state
33
+ * <EmptyState
34
+ * icon={<MessageSquare className="w-6 h-6" />}
35
+ * title="No sessions found"
36
+ * description="Create a new session to get started"
37
+ * />
38
+ *
39
+ * // With action button
40
+ * <EmptyState
41
+ * icon={<Inbox className="w-6 h-6" />}
42
+ * title="No messages"
43
+ * description="Your inbox is empty"
44
+ * action={<Button>Compose Message</Button>}
45
+ * />
46
+ *
47
+ * // Search results empty state
48
+ * <EmptyState
49
+ * icon={<Search className="w-6 h-6" />}
50
+ * title="No matching results"
51
+ * description="Try adjusting your search term"
52
+ * spacing="sm"
53
+ * />
54
+ * ```
55
+ */
56
+ export declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,50 @@
1
+ export interface ImageAttachmentProps {
2
+ /**
3
+ * The image file to display
4
+ */
5
+ file: File;
6
+ /**
7
+ * Callback when remove button is clicked
8
+ */
9
+ onRemove: () => void;
10
+ /**
11
+ * Upload progress (0-100). Shows progress overlay when < 100
12
+ */
13
+ uploadProgress?: number;
14
+ /**
15
+ * Error message. Shows error overlay when provided
16
+ */
17
+ error?: string;
18
+ /**
19
+ * Additional CSS classes
20
+ */
21
+ className?: string;
22
+ }
23
+ /**
24
+ * ImageAttachment - Display image preview with upload progress and remove button
25
+ *
26
+ * Single Responsibility: Display a single image attachment with its upload state
27
+ *
28
+ * Used in input area for previewing images before sending
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <ImageAttachment
33
+ * file={imageFile}
34
+ * onRemove={() => handleRemove(index)}
35
+ * />
36
+ *
37
+ * <ImageAttachment
38
+ * file={imageFile}
39
+ * uploadProgress={75}
40
+ * onRemove={() => handleRemove(index)}
41
+ * />
42
+ *
43
+ * <ImageAttachment
44
+ * file={imageFile}
45
+ * error="Upload failed"
46
+ * onRemove={() => handleRemove(index)}
47
+ * />
48
+ * ```
49
+ */
50
+ export declare function ImageAttachment({ file, onRemove, uploadProgress, error, className, }: ImageAttachmentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
@@ -0,0 +1,106 @@
1
+ import * as React from "react";
2
+ export interface ListItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
3
+ /**
4
+ * Whether the item is selected
5
+ */
6
+ selected?: boolean;
7
+ /**
8
+ * Whether the item is active (within last 10 minutes, etc.)
9
+ */
10
+ active?: boolean;
11
+ /**
12
+ * Whether to show active indicator dot
13
+ */
14
+ showActiveIndicator?: boolean;
15
+ /**
16
+ * Left side content (icon, avatar, logo, etc.)
17
+ */
18
+ leading?: React.ReactNode;
19
+ /**
20
+ * Main title content
21
+ */
22
+ title: React.ReactNode;
23
+ /**
24
+ * Subtitle content (timestamp, description, etc.)
25
+ */
26
+ subtitle?: React.ReactNode;
27
+ /**
28
+ * Trailing content (badge, actions, etc.)
29
+ */
30
+ trailing?: React.ReactNode;
31
+ /**
32
+ * Action buttons (show on hover for desktop)
33
+ */
34
+ actions?: React.ReactNode;
35
+ /**
36
+ * Layout variant
37
+ */
38
+ variant?: "default" | "compact";
39
+ /**
40
+ * Whether in mobile mode
41
+ */
42
+ isMobile?: boolean;
43
+ /**
44
+ * Click handler
45
+ */
46
+ onClick?: () => void;
47
+ }
48
+ /**
49
+ * ListItem - Generic list item component with flexible slots
50
+ *
51
+ * A highly flexible list item component for building various list UIs.
52
+ * Supports leading icons, titles, subtitles, trailing content, and hover actions.
53
+ * Can be used for sessions, messages, users, files, etc.
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * // Session item
58
+ * <ListItem
59
+ * leading={<AgentLogo />}
60
+ * title="Project Planning Session"
61
+ * subtitle={
62
+ * <div className="flex items-center gap-1">
63
+ * <Clock className="w-3 h-3" />
64
+ * <TimeAgo date={session.lastActivity} />
65
+ * </div>
66
+ * }
67
+ * trailing={<Badge>5</Badge>}
68
+ * actions={
69
+ * <button><Trash2 className="w-3 h-3" /></button>
70
+ * }
71
+ * selected={isSelected}
72
+ * onClick={handleSelect}
73
+ * />
74
+ *
75
+ * // User item
76
+ * <ListItem
77
+ * leading={<Avatar src={user.avatar} />}
78
+ * title={user.name}
79
+ * subtitle={user.email}
80
+ * trailing={<Badge variant="success">Online</Badge>}
81
+ * />
82
+ *
83
+ * // File item
84
+ * <ListItem
85
+ * leading={<File className="w-5 h-5" />}
86
+ * title="document.pdf"
87
+ * subtitle="2.4 MB"
88
+ * actions={
89
+ * <>
90
+ * <button><Download /></button>
91
+ * <button><Trash2 /></button>
92
+ * </>
93
+ * }
94
+ * />
95
+ *
96
+ * // With active indicator
97
+ * <ListItem
98
+ * active
99
+ * showActiveIndicator
100
+ * leading={<MessageSquare />}
101
+ * title="Live Session"
102
+ * subtitle="Active now"
103
+ * />
104
+ * ```
105
+ */
106
+ export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,51 @@
1
+ import * as React from "react";
2
+ export interface LoadingStateProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Icon or spinner element to display
5
+ */
6
+ icon?: React.ReactNode;
7
+ /**
8
+ * Title text
9
+ */
10
+ title?: string;
11
+ /**
12
+ * Description text
13
+ */
14
+ description?: string;
15
+ /**
16
+ * Vertical spacing size
17
+ */
18
+ spacing?: "sm" | "md" | "lg";
19
+ /**
20
+ * Show default spinner if no icon provided
21
+ */
22
+ showSpinner?: boolean;
23
+ }
24
+ /**
25
+ * LoadingState - Display loading state with spinner, title, and description
26
+ *
27
+ * A flexible component for showing loading states in lists, tables, pages, etc.
28
+ * Automatically shows a spinner unless a custom icon is provided.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // Basic loading state
33
+ * <LoadingState
34
+ * title="Loading sessions..."
35
+ * description="Fetching your Agent sessions"
36
+ * />
37
+ *
38
+ * // Minimal loading state
39
+ * <LoadingState title="Loading..." spacing="sm" />
40
+ *
41
+ * // Custom icon
42
+ * <LoadingState
43
+ * icon={<RefreshCw className="w-6 h-6 animate-spin" />}
44
+ * title="Refreshing data..."
45
+ * />
46
+ *
47
+ * // Spinner only (no text)
48
+ * <LoadingState showSpinner />
49
+ * ```
50
+ */
51
+ export declare const LoadingState: React.ForwardRefExoticComponent<LoadingStateProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,61 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const avatarVariants: (props?: ({
4
+ variant?: "error" | "primary" | "secondary" | "success" | "warning" | "info" | "neutral" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface MessageAvatarProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof avatarVariants> {
8
+ /**
9
+ * Label text to display next to avatar
10
+ */
11
+ label: string;
12
+ /**
13
+ * Icon to display in avatar (lucide-react icon component)
14
+ */
15
+ icon?: React.ReactNode;
16
+ /**
17
+ * Image URL for avatar (overrides icon)
18
+ */
19
+ src?: string;
20
+ /**
21
+ * Alt text for image
22
+ */
23
+ alt?: string;
24
+ }
25
+ /**
26
+ * MessageAvatar - Display avatar with icon/image and label
27
+ *
28
+ * A flexible avatar component for message headers. Supports icons, images,
29
+ * and multiple color variants for different message types or agents.
30
+ *
31
+ * Design System Colors:
32
+ * - Primary (Blue): AI Assistant, computational tasks
33
+ * - Secondary (Amber): User messages, generative tasks
34
+ * - Info (Light Blue): System messages, tools
35
+ * - Error (Red): Error messages
36
+ * - Success (Green): Success messages
37
+ * - Neutral (Gray): Default/unknown
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * // With icon
42
+ * <MessageAvatar
43
+ * label="AI Assistant"
44
+ * variant="primary"
45
+ * icon={<Bot className="w-5 h-5 text-white" />}
46
+ * />
47
+ *
48
+ * // With image
49
+ * <MessageAvatar
50
+ * label="Agent Smith"
51
+ * variant="info"
52
+ * src="/avatars/agent-smith.png"
53
+ * alt="Agent Smith"
54
+ * />
55
+ *
56
+ * // Simple text avatar
57
+ * <MessageAvatar label="System" variant="neutral" />
58
+ * ```
59
+ */
60
+ export declare const MessageAvatar: React.ForwardRefExoticComponent<MessageAvatarProps & React.RefAttributes<HTMLDivElement>>;
61
+ export { avatarVariants };
@@ -0,0 +1,90 @@
1
+ import * as React from "react";
2
+ export interface PageHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Main title text
5
+ */
6
+ title: string;
7
+ /**
8
+ * Optional subtitle/description
9
+ */
10
+ subtitle?: string;
11
+ /**
12
+ * Optional leading element (e.g., menu button, back button)
13
+ */
14
+ leading?: React.ReactNode;
15
+ /**
16
+ * Optional trailing element (e.g., actions, tabs)
17
+ */
18
+ trailing?: React.ReactNode;
19
+ /**
20
+ * Whether to show border at bottom
21
+ * @default true
22
+ */
23
+ showBorder?: boolean;
24
+ /**
25
+ * Whether in mobile mode (compact spacing)
26
+ * @default false
27
+ */
28
+ isMobile?: boolean;
29
+ }
30
+ /**
31
+ * PageHeader - Flexible page header with title and actions
32
+ *
33
+ * A generic header component for page layouts. Supports leading elements
34
+ * (menu buttons, back buttons), title/subtitle, and trailing elements
35
+ * (actions, tabs, buttons). Automatically handles mobile responsive layout.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * // Basic header with title
40
+ * <PageHeader title="New Session" />
41
+ *
42
+ * // With subtitle
43
+ * <PageHeader
44
+ * title="Dashboard"
45
+ * subtitle="Welcome back!"
46
+ * />
47
+ *
48
+ * // With mobile menu button
49
+ * <PageHeader
50
+ * title="Settings"
51
+ * leading={
52
+ * <Button variant="ghost" size="icon">
53
+ * <Menu className="w-5 h-5" />
54
+ * </Button>
55
+ * }
56
+ * isMobile
57
+ * />
58
+ *
59
+ * // With tab navigation
60
+ * <PageHeader
61
+ * title="Project Explorer"
62
+ * trailing={
63
+ * <TabNavigation
64
+ * tabs={tabs}
65
+ * activeTab={activeTab}
66
+ * onTabChange={setActiveTab}
67
+ * />
68
+ * }
69
+ * />
70
+ *
71
+ * // Complete example with all props
72
+ * <PageHeader
73
+ * title="Agent Conversation"
74
+ * subtitle="deepractice-ai/project"
75
+ * leading={<MenuButton onClick={toggleSidebar} />}
76
+ * trailing={
77
+ * <TabNavigation
78
+ * tabs={[
79
+ * { id: 'chat', label: 'Chat', icon: <MessageSquare /> },
80
+ * { id: 'shell', label: 'Shell', icon: <Terminal /> },
81
+ * ]}
82
+ * activeTab="chat"
83
+ * onTabChange={setTab}
84
+ * />
85
+ * }
86
+ * isMobile
87
+ * />
88
+ * ```
89
+ */
90
+ export declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ interface PopoverProps {
3
+ children: React.ReactNode;
4
+ open?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ }
7
+ export declare function Popover({ children, open: controlledOpen, onOpenChange }: PopoverProps): import("react/jsx-runtime").JSX.Element;
8
+ interface PopoverTriggerProps {
9
+ children: React.ReactNode;
10
+ asChild?: boolean;
11
+ }
12
+ export declare function PopoverTrigger({ children, asChild }: PopoverTriggerProps): import("react/jsx-runtime").JSX.Element;
13
+ interface PopoverContentProps {
14
+ children: React.ReactNode;
15
+ align?: "start" | "center" | "end";
16
+ side?: "top" | "right" | "bottom" | "left";
17
+ className?: string;
18
+ }
19
+ export declare function PopoverContent({ children, align, side, className, }: PopoverContentProps): import("react/jsx-runtime").JSX.Element | null;
20
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children?: React.ReactNode;
4
+ }
5
+ declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { ScrollArea };
@@ -0,0 +1,75 @@
1
+ import * as React from "react";
2
+ export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
3
+ /**
4
+ * Current search value (controlled)
5
+ */
6
+ value: string;
7
+ /**
8
+ * Callback when value changes
9
+ */
10
+ onChange: (value: string) => void;
11
+ /**
12
+ * Callback when clear button is clicked
13
+ */
14
+ onClear?: () => void;
15
+ /**
16
+ * Show search icon on the left
17
+ * @default true
18
+ */
19
+ showSearchIcon?: boolean;
20
+ /**
21
+ * Show clear button when input has value
22
+ * @default true
23
+ */
24
+ showClearButton?: boolean;
25
+ /**
26
+ * Custom search icon element
27
+ */
28
+ searchIcon?: React.ReactNode;
29
+ /**
30
+ * Custom clear icon element
31
+ */
32
+ clearIcon?: React.ReactNode;
33
+ }
34
+ /**
35
+ * SearchInput - Input field with search icon and clear button
36
+ *
37
+ * A specialized input component for search functionality with built-in
38
+ * search icon and clear button. Fully controlled with onChange callback.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * // Basic usage
43
+ * const [search, setSearch] = useState("");
44
+ * <SearchInput
45
+ * value={search}
46
+ * onChange={setSearch}
47
+ * placeholder="Search sessions..."
48
+ * />
49
+ *
50
+ * // With custom clear handler
51
+ * <SearchInput
52
+ * value={searchFilter}
53
+ * onChange={setSearchFilter}
54
+ * onClear={() => {
55
+ * setSearchFilter("");
56
+ * resetResults();
57
+ * }}
58
+ * />
59
+ *
60
+ * // Without search icon
61
+ * <SearchInput
62
+ * value={query}
63
+ * onChange={setQuery}
64
+ * showSearchIcon={false}
65
+ * />
66
+ *
67
+ * // Custom styling
68
+ * <SearchInput
69
+ * value={search}
70
+ * onChange={setSearch}
71
+ * className="bg-muted/50 focus:bg-background"
72
+ * />
73
+ * ```
74
+ */
75
+ export declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,91 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const tabNavigationVariants: (props?: ({
4
+ variant?: "underline" | "pills" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface Tab {
7
+ /**
8
+ * Unique identifier for the tab
9
+ */
10
+ id: string;
11
+ /**
12
+ * Tab label text
13
+ */
14
+ label: string;
15
+ /**
16
+ * Optional icon element
17
+ */
18
+ icon?: React.ReactNode;
19
+ /**
20
+ * Whether the tab is disabled
21
+ */
22
+ disabled?: boolean;
23
+ }
24
+ export interface TabNavigationProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">, VariantProps<typeof tabNavigationVariants> {
25
+ /**
26
+ * Array of tab items
27
+ */
28
+ tabs: Tab[];
29
+ /**
30
+ * Currently active tab ID
31
+ */
32
+ activeTab: string;
33
+ /**
34
+ * Callback when tab is changed
35
+ */
36
+ onTabChange: (tabId: string) => void;
37
+ /**
38
+ * Whether to show icons only on mobile
39
+ * @default false
40
+ */
41
+ iconOnlyMobile?: boolean;
42
+ }
43
+ /**
44
+ * TabNavigation - Flexible tab navigation component
45
+ *
46
+ * A versatile tab navigation that supports both pills and underline styles.
47
+ * Can display tabs with icons, labels, or both. Automatically handles active
48
+ * states and keyboard navigation.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * // Pills variant (default)
53
+ * <TabNavigation
54
+ * tabs={[
55
+ * { id: 'chat', label: 'Chat', icon: <MessageSquare /> },
56
+ * { id: 'shell', label: 'Shell', icon: <Terminal /> },
57
+ * { id: 'files', label: 'Files', icon: <Folder /> },
58
+ * ]}
59
+ * activeTab={activeTab}
60
+ * onTabChange={setActiveTab}
61
+ * />
62
+ *
63
+ * // Underline variant
64
+ * <TabNavigation
65
+ * variant="underline"
66
+ * tabs={tabs}
67
+ * activeTab={current}
68
+ * onTabChange={setCurrent}
69
+ * />
70
+ *
71
+ * // Icon only on mobile
72
+ * <TabNavigation
73
+ * tabs={tabs}
74
+ * activeTab={active}
75
+ * onTabChange={onChange}
76
+ * iconOnlyMobile
77
+ * />
78
+ *
79
+ * // With disabled tabs
80
+ * <TabNavigation
81
+ * tabs={[
82
+ * { id: 'tab1', label: 'Enabled' },
83
+ * { id: 'tab2', label: 'Disabled', disabled: true },
84
+ * ]}
85
+ * activeTab={activeTab}
86
+ * onTabChange={setActiveTab}
87
+ * />
88
+ * ```
89
+ */
90
+ export declare const TabNavigation: React.ForwardRefExoticComponent<TabNavigationProps & React.RefAttributes<HTMLDivElement>>;
91
+ export {};
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ export interface TimeAgoProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ /**
4
+ * Date to display (ISO string or Date object)
5
+ */
6
+ date: string | Date;
7
+ /**
8
+ * Auto-update interval in milliseconds (0 to disable)
9
+ * @default 60000 (1 minute)
10
+ */
11
+ updateInterval?: number;
12
+ /**
13
+ * Show tooltip with full date on hover
14
+ * @default true
15
+ */
16
+ showTooltip?: boolean;
17
+ }
18
+ /**
19
+ * TimeAgo - Display relative time with auto-update
20
+ *
21
+ * A component that displays relative time ("Just now", "5 mins ago") and
22
+ * automatically updates at a specified interval. Useful for showing timestamps
23
+ * in lists, messages, and activity feeds.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * // Basic usage with auto-update every minute
28
+ * <TimeAgo date="2025-01-14T10:30:00Z" />
29
+ *
30
+ * // With custom styling
31
+ * <TimeAgo
32
+ * date={session.lastActivity}
33
+ * className="text-xs text-muted-foreground"
34
+ * />
35
+ *
36
+ * // Disable auto-update
37
+ * <TimeAgo date={message.timestamp} updateInterval={0} />
38
+ *
39
+ * // Fast update interval (every 10 seconds)
40
+ * <TimeAgo date={recentEvent} updateInterval={10000} />
41
+ *
42
+ * // No tooltip
43
+ * <TimeAgo date={date} showTooltip={false} />
44
+ * ```
45
+ */
46
+ export declare const TimeAgo: React.ForwardRefExoticComponent<TimeAgoProps & React.RefAttributes<HTMLSpanElement>>;