@raptortrade/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 +798 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +298 -0
- package/dist/index.d.ts +298 -0
- package/dist/index.mjs +716 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +62 -0
- package/src/styles/base.css +115 -0
- package/src/styles/index.css +3 -0
- package/src/styles/theme.css +30 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes } from 'react';
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
|
|
11
|
+
type AccordionProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
|
|
12
|
+
type AccordionItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
13
|
+
type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>;
|
|
14
|
+
type AccordionContentProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
|
|
15
|
+
|
|
16
|
+
type BadgeVariant = "active" | "inactive" | "coming-soon" | "default" | "signal" | "success" | "danger" | "warning" | "error" | "outline";
|
|
17
|
+
interface BadgeProps {
|
|
18
|
+
variant?: BadgeVariant;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare function Badge({ variant, children, className, onClick }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "destructive" | "link";
|
|
26
|
+
type ButtonSize = "sm" | "md" | "lg" | "icon";
|
|
27
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
28
|
+
variant?: ButtonVariant;
|
|
29
|
+
size?: ButtonSize;
|
|
30
|
+
}
|
|
31
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
|
|
33
|
+
interface CardProps {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function Card({ children, className }: CardProps): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function CardHeader({ children, className }: CardProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function CardTitle({ children, className }: {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
className?: string;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function CardDescription({ children, className }: {
|
|
44
|
+
children: ReactNode;
|
|
45
|
+
className?: string;
|
|
46
|
+
}): react_jsx_runtime.JSX.Element;
|
|
47
|
+
declare function CardContent({ children, className }: {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
}): react_jsx_runtime.JSX.Element;
|
|
51
|
+
declare function CardFooter({ children, className }: {
|
|
52
|
+
children: ReactNode;
|
|
53
|
+
className?: string;
|
|
54
|
+
}): react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
interface ChipProps {
|
|
57
|
+
active: boolean;
|
|
58
|
+
onClick: () => void;
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function Chip({ active, onClick, children, className }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface ChipGroupOption {
|
|
65
|
+
value: string;
|
|
66
|
+
label: string;
|
|
67
|
+
}
|
|
68
|
+
interface ChipGroupBaseProps {
|
|
69
|
+
options: ChipGroupOption[];
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ChipGroupSingleProps extends ChipGroupBaseProps {
|
|
73
|
+
multiple?: false;
|
|
74
|
+
value: string;
|
|
75
|
+
onChange: (value: string) => void;
|
|
76
|
+
}
|
|
77
|
+
interface ChipGroupMultipleProps extends ChipGroupBaseProps {
|
|
78
|
+
multiple: true;
|
|
79
|
+
value: string[];
|
|
80
|
+
onChange: (value: string[]) => void;
|
|
81
|
+
}
|
|
82
|
+
type ChipGroupProps = ChipGroupSingleProps | ChipGroupMultipleProps;
|
|
83
|
+
declare function ChipGroup(props: ChipGroupProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
|
|
85
|
+
interface CodeBlockProps {
|
|
86
|
+
code: string;
|
|
87
|
+
language?: string;
|
|
88
|
+
showCopy?: boolean;
|
|
89
|
+
className?: string;
|
|
90
|
+
}
|
|
91
|
+
declare function CodeBlock({ code, language, showCopy, className }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
92
|
+
|
|
93
|
+
interface CopyButtonProps {
|
|
94
|
+
text: string;
|
|
95
|
+
className?: string;
|
|
96
|
+
label?: string;
|
|
97
|
+
onCopy?: () => void;
|
|
98
|
+
}
|
|
99
|
+
declare function CopyButton({ text, className, label, onCopy }: CopyButtonProps): react_jsx_runtime.JSX.Element;
|
|
100
|
+
|
|
101
|
+
interface DialogProps {
|
|
102
|
+
open: boolean;
|
|
103
|
+
onOpenChange: (open: boolean) => void;
|
|
104
|
+
children: ReactNode;
|
|
105
|
+
}
|
|
106
|
+
declare function Dialog({ open, onOpenChange, children }: DialogProps): react_jsx_runtime.JSX.Element | null;
|
|
107
|
+
interface DialogContentProps {
|
|
108
|
+
className?: string;
|
|
109
|
+
children: ReactNode;
|
|
110
|
+
}
|
|
111
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
112
|
+
declare function DialogHeader({ children, className }: {
|
|
113
|
+
children: ReactNode;
|
|
114
|
+
className?: string;
|
|
115
|
+
}): react_jsx_runtime.JSX.Element;
|
|
116
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<{
|
|
117
|
+
children: ReactNode;
|
|
118
|
+
className?: string;
|
|
119
|
+
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
120
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<{
|
|
121
|
+
children: ReactNode;
|
|
122
|
+
className?: string;
|
|
123
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
124
|
+
declare const DialogClose: React.ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
125
|
+
declare function DialogFooter({ children, className }: {
|
|
126
|
+
children: ReactNode;
|
|
127
|
+
className?: string;
|
|
128
|
+
}): react_jsx_runtime.JSX.Element;
|
|
129
|
+
|
|
130
|
+
interface EmptyStateProps {
|
|
131
|
+
icon?: ReactNode;
|
|
132
|
+
title: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
action?: ReactNode;
|
|
135
|
+
}
|
|
136
|
+
declare function EmptyState({ icon, title, description, action }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
137
|
+
|
|
138
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
139
|
+
label?: string;
|
|
140
|
+
error?: string;
|
|
141
|
+
}
|
|
142
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
143
|
+
|
|
144
|
+
interface KbdProps {
|
|
145
|
+
children: ReactNode;
|
|
146
|
+
className?: string;
|
|
147
|
+
}
|
|
148
|
+
declare function Kbd({ children, className }: KbdProps): react_jsx_runtime.JSX.Element;
|
|
149
|
+
|
|
150
|
+
interface LoadingProps {
|
|
151
|
+
text?: string;
|
|
152
|
+
className?: string;
|
|
153
|
+
}
|
|
154
|
+
declare function Loading({ text, className }: LoadingProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
156
|
+
interface ModalProps {
|
|
157
|
+
open: boolean;
|
|
158
|
+
onClose: () => void;
|
|
159
|
+
title: string;
|
|
160
|
+
children: ReactNode;
|
|
161
|
+
className?: string;
|
|
162
|
+
}
|
|
163
|
+
declare function Modal({ open, onClose, title, children, className }: ModalProps): react_jsx_runtime.JSX.Element | null;
|
|
164
|
+
|
|
165
|
+
interface NavTabItem {
|
|
166
|
+
label: string;
|
|
167
|
+
href: string;
|
|
168
|
+
isActive?: boolean;
|
|
169
|
+
}
|
|
170
|
+
interface NavTabsProps {
|
|
171
|
+
items: NavTabItem[];
|
|
172
|
+
variant?: "underline" | "pill";
|
|
173
|
+
className?: string;
|
|
174
|
+
renderLink?: (props: {
|
|
175
|
+
href: string;
|
|
176
|
+
className: string;
|
|
177
|
+
children: ReactNode;
|
|
178
|
+
}) => ReactNode;
|
|
179
|
+
}
|
|
180
|
+
declare function NavTabs({ items, variant, className, renderLink }: NavTabsProps): react_jsx_runtime.JSX.Element;
|
|
181
|
+
|
|
182
|
+
interface SectionHeaderProps {
|
|
183
|
+
title: string;
|
|
184
|
+
badge?: ReactNode;
|
|
185
|
+
className?: string;
|
|
186
|
+
}
|
|
187
|
+
declare function SectionHeader({ title, badge, className }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
188
|
+
|
|
189
|
+
interface SelectOption {
|
|
190
|
+
value: string;
|
|
191
|
+
label: string;
|
|
192
|
+
}
|
|
193
|
+
interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
194
|
+
label?: string;
|
|
195
|
+
options: SelectOption[];
|
|
196
|
+
}
|
|
197
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
198
|
+
|
|
199
|
+
interface SidePanelProps {
|
|
200
|
+
open: boolean;
|
|
201
|
+
onClose: () => void;
|
|
202
|
+
title: string;
|
|
203
|
+
subtitle?: string;
|
|
204
|
+
children: ReactNode;
|
|
205
|
+
className?: string;
|
|
206
|
+
}
|
|
207
|
+
declare function SidePanel({ open, onClose, title, subtitle, children, className }: SidePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
208
|
+
|
|
209
|
+
interface SeparatorProps {
|
|
210
|
+
className?: string;
|
|
211
|
+
}
|
|
212
|
+
declare function Separator({ className }: SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
interface SkeletonProps {
|
|
215
|
+
className?: string;
|
|
216
|
+
}
|
|
217
|
+
declare function Skeleton({ className }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
218
|
+
|
|
219
|
+
interface SkeletonTableProps {
|
|
220
|
+
className?: string;
|
|
221
|
+
rows?: number;
|
|
222
|
+
cols?: number;
|
|
223
|
+
}
|
|
224
|
+
declare function SkeletonTable({ className, rows, cols }: SkeletonTableProps): react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
interface SparklineProps {
|
|
227
|
+
trend: number[];
|
|
228
|
+
className?: string;
|
|
229
|
+
}
|
|
230
|
+
declare function Sparkline({ trend, className }: SparklineProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
|
|
232
|
+
interface SpinnerProps {
|
|
233
|
+
size?: "sm" | "md" | "lg";
|
|
234
|
+
className?: string;
|
|
235
|
+
}
|
|
236
|
+
declare function Spinner({ size, className }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
237
|
+
|
|
238
|
+
type StatusDot = "success" | "warning" | "danger" | "idle";
|
|
239
|
+
interface StatusBarItem {
|
|
240
|
+
dot?: StatusDot;
|
|
241
|
+
label: string;
|
|
242
|
+
}
|
|
243
|
+
interface StatusBarProps {
|
|
244
|
+
items: StatusBarItem[];
|
|
245
|
+
trailing?: ReactNode;
|
|
246
|
+
className?: string;
|
|
247
|
+
}
|
|
248
|
+
declare function StatusBar({ items, trailing, className }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
249
|
+
|
|
250
|
+
interface TableProps {
|
|
251
|
+
children: ReactNode;
|
|
252
|
+
className?: string;
|
|
253
|
+
}
|
|
254
|
+
declare function Table({ children, className }: TableProps): react_jsx_runtime.JSX.Element;
|
|
255
|
+
declare function TableHead({ children }: {
|
|
256
|
+
children: ReactNode;
|
|
257
|
+
}): react_jsx_runtime.JSX.Element;
|
|
258
|
+
interface TableHeaderProps {
|
|
259
|
+
children?: ReactNode;
|
|
260
|
+
className?: string;
|
|
261
|
+
onClick?: () => void;
|
|
262
|
+
}
|
|
263
|
+
declare function TableHeader({ children, className, onClick }: TableHeaderProps): react_jsx_runtime.JSX.Element;
|
|
264
|
+
declare function TableBody({ children }: {
|
|
265
|
+
children: ReactNode;
|
|
266
|
+
}): react_jsx_runtime.JSX.Element;
|
|
267
|
+
interface TableRowProps {
|
|
268
|
+
children: ReactNode;
|
|
269
|
+
className?: string;
|
|
270
|
+
onClick?: () => void;
|
|
271
|
+
}
|
|
272
|
+
declare function TableRow({ children, className, onClick }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
273
|
+
declare function TableCell({ children, className }: {
|
|
274
|
+
children: ReactNode;
|
|
275
|
+
className?: string;
|
|
276
|
+
}): react_jsx_runtime.JSX.Element;
|
|
277
|
+
|
|
278
|
+
interface Tab {
|
|
279
|
+
value: string;
|
|
280
|
+
label: string;
|
|
281
|
+
}
|
|
282
|
+
interface TabsProps {
|
|
283
|
+
tabs: Tab[];
|
|
284
|
+
value: string;
|
|
285
|
+
onChange: (value: string) => void;
|
|
286
|
+
className?: string;
|
|
287
|
+
}
|
|
288
|
+
declare function Tabs({ tabs, value, onChange, className }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
290
|
+
interface ToggleProps {
|
|
291
|
+
options: [string, string];
|
|
292
|
+
value: string;
|
|
293
|
+
onChange: (value: string) => void;
|
|
294
|
+
className?: string;
|
|
295
|
+
}
|
|
296
|
+
declare function Toggle({ options, value, onChange, className }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
297
|
+
|
|
298
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Chip, ChipGroup, type ChipGroupOption, type ChipGroupProps, type ChipProps, CodeBlock, type CodeBlockProps, CopyButton, type CopyButtonProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, EmptyState, type EmptyStateProps, Input, type InputProps, Kbd, type KbdProps, Loading, type LoadingProps, Modal, type ModalProps, type NavTabItem, NavTabs, type NavTabsProps, SectionHeader, type SectionHeaderProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, SidePanel, type SidePanelProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Sparkline, type SparklineProps, Spinner, type SpinnerProps, StatusBar, type StatusBarItem, type StatusBarProps, type Tab, Table, TableBody, TableCell, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Toggle, type ToggleProps };
|