@agentatom/design-system 1.4.78
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 +24 -0
- package/dist/high-contrast.css +92 -0
- package/dist/index.cjs.js +22 -0
- package/dist/index.d.ts +1057 -0
- package/dist/index.es.js +3535 -0
- package/dist/light.css +2 -0
- package/dist/tokens.css +49 -0
- package/package.json +36 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1057 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ReactNode,
|
|
3
|
+
ReactElement,
|
|
4
|
+
MouseEvent,
|
|
5
|
+
CSSProperties,
|
|
6
|
+
HTMLAttributes,
|
|
7
|
+
ButtonHTMLAttributes,
|
|
8
|
+
InputHTMLAttributes,
|
|
9
|
+
TextareaHTMLAttributes,
|
|
10
|
+
AnchorHTMLAttributes,
|
|
11
|
+
ElementType,
|
|
12
|
+
ComponentPropsWithRef,
|
|
13
|
+
} from 'react';
|
|
14
|
+
|
|
15
|
+
// ─── Shared ───────────────────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
type Size = 'xs' | 's' | 'sm' | 'm' | 'l';
|
|
18
|
+
|
|
19
|
+
// ─── iconSizes ────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
export declare const iconSizes: { 1: 16; 2: 20; 3: 24; 4: 28; 5: 48 };
|
|
22
|
+
|
|
23
|
+
// ─── Button ───────────────────────────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
export interface ButtonProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
28
|
+
size?: Size;
|
|
29
|
+
fullWidth?: boolean;
|
|
30
|
+
icon?: ReactNode;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
state?: 'idle' | 'loading' | 'success' | 'error';
|
|
33
|
+
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
34
|
+
type?: 'button' | 'submit' | 'reset';
|
|
35
|
+
href?: string;
|
|
36
|
+
target?: string;
|
|
37
|
+
rel?: string;
|
|
38
|
+
'aria-label'?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare function Button(props: ButtonProps): JSX.Element;
|
|
42
|
+
|
|
43
|
+
// ─── SegmentedControl ─────────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
export interface SegmentedControlOption {
|
|
46
|
+
value: string;
|
|
47
|
+
label?: ReactNode;
|
|
48
|
+
icon?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SegmentedControlProps {
|
|
52
|
+
options: SegmentedControlOption[];
|
|
53
|
+
value: string;
|
|
54
|
+
onChange: (value: string) => void;
|
|
55
|
+
size?: 's' | 'sm' | 'm' | 'l';
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export declare function SegmentedControl(props: SegmentedControlProps): JSX.Element;
|
|
60
|
+
|
|
61
|
+
// ─── Tabs ─────────────────────────────────────────────────────────────────
|
|
62
|
+
|
|
63
|
+
export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
64
|
+
children?: ReactNode;
|
|
65
|
+
size?: Size;
|
|
66
|
+
variant?: 'ghost' | 'underline';
|
|
67
|
+
value?: string;
|
|
68
|
+
onChange?: (value: string) => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare function Tabs(props: TabsProps): JSX.Element;
|
|
72
|
+
|
|
73
|
+
export interface TabProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
74
|
+
children?: ReactNode;
|
|
75
|
+
selected?: boolean;
|
|
76
|
+
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
77
|
+
size?: Size;
|
|
78
|
+
variant?: 'ghost' | 'underline';
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
icon?: ReactNode;
|
|
81
|
+
href?: string;
|
|
82
|
+
value?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export declare function Tab(props: TabProps): JSX.Element;
|
|
86
|
+
|
|
87
|
+
// ─── Input ────────────────────────────────────────────────────────────────
|
|
88
|
+
|
|
89
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
90
|
+
label?: string;
|
|
91
|
+
error?: string;
|
|
92
|
+
hint?: string;
|
|
93
|
+
fullWidth?: boolean;
|
|
94
|
+
icon?: ReactNode;
|
|
95
|
+
iconRight?: ReactNode;
|
|
96
|
+
onIconRightClick?: () => void;
|
|
97
|
+
size?: Size;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export declare function Input(props: InputProps): JSX.Element;
|
|
101
|
+
|
|
102
|
+
// ─── Textarea ─────────────────────────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
105
|
+
label?: string;
|
|
106
|
+
error?: string;
|
|
107
|
+
hint?: string;
|
|
108
|
+
fullWidth?: boolean;
|
|
109
|
+
size?: 'xs' | 's' | 'm';
|
|
110
|
+
resize?: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare function Textarea(props: TextareaProps): JSX.Element;
|
|
114
|
+
|
|
115
|
+
// ─── Select ───────────────────────────────────────────────────────────────
|
|
116
|
+
|
|
117
|
+
export interface SelectOption {
|
|
118
|
+
value: string;
|
|
119
|
+
label: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface SelectProps {
|
|
123
|
+
label?: string;
|
|
124
|
+
value?: string;
|
|
125
|
+
onChange?: (value: string) => void;
|
|
126
|
+
options?: SelectOption[];
|
|
127
|
+
placeholder?: string;
|
|
128
|
+
error?: string;
|
|
129
|
+
fullWidth?: boolean;
|
|
130
|
+
size?: Size;
|
|
131
|
+
disabled?: boolean;
|
|
132
|
+
id?: string;
|
|
133
|
+
className?: string;
|
|
134
|
+
style?: CSSProperties;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export declare function Select(props: SelectProps): JSX.Element;
|
|
138
|
+
|
|
139
|
+
// ─── Stepper ──────────────────────────────────────────────────────────────
|
|
140
|
+
|
|
141
|
+
export interface StepperProps {
|
|
142
|
+
label?: string;
|
|
143
|
+
value?: number;
|
|
144
|
+
onChange?: (value: number) => void;
|
|
145
|
+
min?: number;
|
|
146
|
+
max?: number;
|
|
147
|
+
step?: number;
|
|
148
|
+
size?: 'xs' | 's' | 'm';
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
hint?: string;
|
|
151
|
+
error?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export declare function Stepper(props: StepperProps): JSX.Element;
|
|
155
|
+
|
|
156
|
+
// ─── Toggle ───────────────────────────────────────────────────────────────
|
|
157
|
+
|
|
158
|
+
export interface ToggleProps {
|
|
159
|
+
checked?: boolean;
|
|
160
|
+
onChange?: (checked: boolean) => void;
|
|
161
|
+
size?: Size;
|
|
162
|
+
disabled?: boolean;
|
|
163
|
+
label?: string;
|
|
164
|
+
id?: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export declare function Toggle(props: ToggleProps): JSX.Element;
|
|
168
|
+
|
|
169
|
+
// ─── Checkbox ─────────────────────────────────────────────────────────────
|
|
170
|
+
|
|
171
|
+
export interface CheckboxProps {
|
|
172
|
+
checked?: boolean;
|
|
173
|
+
onChange?: (checked: boolean) => void;
|
|
174
|
+
size?: Size;
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
label?: string;
|
|
177
|
+
id?: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
181
|
+
|
|
182
|
+
// ─── Radio ────────────────────────────────────────────────────────────────
|
|
183
|
+
|
|
184
|
+
export interface RadioProps {
|
|
185
|
+
checked?: boolean;
|
|
186
|
+
onChange?: (checked: boolean) => void;
|
|
187
|
+
size?: Size;
|
|
188
|
+
disabled?: boolean;
|
|
189
|
+
label?: string;
|
|
190
|
+
name?: string;
|
|
191
|
+
value?: string;
|
|
192
|
+
id?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare function Radio(props: RadioProps): JSX.Element;
|
|
196
|
+
|
|
197
|
+
// ─── Badge ────────────────────────────────────────────────────────────────
|
|
198
|
+
|
|
199
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
200
|
+
children?: ReactNode;
|
|
201
|
+
variant?: 'default' | 'info' | 'success' | 'warning' | 'error' | 'accent'
|
|
202
|
+
| 'data-1' | 'data-2' | 'data-3' | 'data-4' | 'data-5' | 'data-6' | 'data-7';
|
|
203
|
+
size?: 'xs' | 's' | 'm';
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export declare function Badge(props: BadgeProps): JSX.Element;
|
|
207
|
+
|
|
208
|
+
// ─── Alert ────────────────────────────────────────────────────────────────
|
|
209
|
+
|
|
210
|
+
export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
211
|
+
children?: ReactNode;
|
|
212
|
+
variant?: 'info' | 'success' | 'warning' | 'error';
|
|
213
|
+
title?: string;
|
|
214
|
+
onClose?: () => void;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export declare function Alert(props: AlertProps): JSX.Element;
|
|
218
|
+
|
|
219
|
+
// ─── Modal ────────────────────────────────────────────────────────────────
|
|
220
|
+
|
|
221
|
+
export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
222
|
+
children?: ReactNode;
|
|
223
|
+
title?: string;
|
|
224
|
+
onClose?: () => void;
|
|
225
|
+
size?: 's' | 'm' | 'l';
|
|
226
|
+
scrollable?: boolean;
|
|
227
|
+
subHeader?: ReactNode;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare function Modal(props: ModalProps): JSX.Element;
|
|
231
|
+
|
|
232
|
+
export interface ModalFooterProps {
|
|
233
|
+
children?: ReactNode;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export declare function ModalFooter(props: ModalFooterProps): JSX.Element;
|
|
237
|
+
|
|
238
|
+
// ─── BottomSheet ──────────────────────────────────────────────────────────────
|
|
239
|
+
|
|
240
|
+
export interface BottomSheetProps extends HTMLAttributes<HTMLDivElement> {
|
|
241
|
+
children?: ReactNode;
|
|
242
|
+
title?: string;
|
|
243
|
+
onClose?: () => void;
|
|
244
|
+
subHeader?: ReactNode;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare function BottomSheet(props: BottomSheetProps): JSX.Element;
|
|
248
|
+
|
|
249
|
+
// ─── Card ─────────────────────────────────────────────────────────────────
|
|
250
|
+
|
|
251
|
+
export interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
252
|
+
children?: ReactNode;
|
|
253
|
+
padding?: 's' | 'm' | 'l';
|
|
254
|
+
variant?: 'info' | 'interactive';
|
|
255
|
+
/** @deprecated use variant="interactive" */
|
|
256
|
+
hover?: boolean;
|
|
257
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
258
|
+
href?: string;
|
|
259
|
+
disabled?: boolean;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare function Card(props: CardProps): JSX.Element;
|
|
263
|
+
|
|
264
|
+
// ─── Typography ───────────────────────────────────────────────────────────
|
|
265
|
+
|
|
266
|
+
export interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
267
|
+
children?: ReactNode;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
271
|
+
children?: ReactNode;
|
|
272
|
+
secondary?: boolean;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export declare function H1(props: HeadingProps): JSX.Element;
|
|
276
|
+
export declare function H2(props: HeadingProps): JSX.Element;
|
|
277
|
+
export declare function H3(props: HeadingProps): JSX.Element;
|
|
278
|
+
export declare function H4(props: HeadingProps): JSX.Element;
|
|
279
|
+
export declare function P1(props: ParagraphProps): JSX.Element;
|
|
280
|
+
export declare function P2(props: ParagraphProps): JSX.Element;
|
|
281
|
+
export declare function P3(props: ParagraphProps): JSX.Element;
|
|
282
|
+
|
|
283
|
+
// ─── Accordion ────────────────────────────────────────────────────────────
|
|
284
|
+
|
|
285
|
+
export interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
286
|
+
children?: ReactNode;
|
|
287
|
+
title: ReactNode;
|
|
288
|
+
defaultExpanded?: boolean;
|
|
289
|
+
expanded?: boolean;
|
|
290
|
+
onToggle?: (expanded: boolean) => void;
|
|
291
|
+
onChange?: (expanded: boolean) => void;
|
|
292
|
+
padding?: 's' | 'm' | 'l';
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export declare function Accordion(props: AccordionProps): JSX.Element;
|
|
296
|
+
|
|
297
|
+
// ─── CodeAccordion ────────────────────────────────────────────────────────
|
|
298
|
+
|
|
299
|
+
export interface CodeAccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
300
|
+
children?: ReactNode;
|
|
301
|
+
title?: string;
|
|
302
|
+
defaultExpanded?: boolean;
|
|
303
|
+
expanded?: boolean;
|
|
304
|
+
onToggle?: (expanded: boolean) => void;
|
|
305
|
+
padding?: 's' | 'm' | 'l';
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export declare function CodeAccordion(props: CodeAccordionProps): JSX.Element;
|
|
309
|
+
|
|
310
|
+
// ─── Code ─────────────────────────────────────────────────────────────────
|
|
311
|
+
|
|
312
|
+
export interface CodeProps extends HTMLAttributes<HTMLElement> {
|
|
313
|
+
children?: ReactNode;
|
|
314
|
+
block?: boolean;
|
|
315
|
+
collapsible?: boolean;
|
|
316
|
+
title?: string;
|
|
317
|
+
defaultExpanded?: boolean;
|
|
318
|
+
language?: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export declare function Code(props: CodeProps): JSX.Element;
|
|
322
|
+
|
|
323
|
+
// ─── Link ─────────────────────────────────────────────────────────────────
|
|
324
|
+
|
|
325
|
+
export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
326
|
+
children?: ReactNode;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export declare function Link(props: LinkProps): JSX.Element;
|
|
330
|
+
|
|
331
|
+
// ─── Tooltip ──────────────────────────────────────────────────────────────
|
|
332
|
+
|
|
333
|
+
export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
334
|
+
children?: ReactNode;
|
|
335
|
+
content?: ReactNode;
|
|
336
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export declare function Tooltip(props: TooltipProps): JSX.Element;
|
|
340
|
+
|
|
341
|
+
// ─── Spinner ──────────────────────────────────────────────────────────────
|
|
342
|
+
|
|
343
|
+
export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
344
|
+
size?: 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
345
|
+
color?: 'default' | 'secondary' | 'on-accent';
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export declare function Spinner(props: SpinnerProps): JSX.Element;
|
|
349
|
+
|
|
350
|
+
// ─── Skeleton ─────────────────────────────────────────────────────────────
|
|
351
|
+
|
|
352
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
353
|
+
width?: number | string;
|
|
354
|
+
height?: number | string;
|
|
355
|
+
shape?: 'rect' | 'circle' | 'pill' | 'text';
|
|
356
|
+
aspectRatio?: string;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface SkeletonTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
360
|
+
lines?: number;
|
|
361
|
+
lastLineWidth?: string | number;
|
|
362
|
+
gap?: string | number;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export declare const Skeleton: ((props: SkeletonProps) => JSX.Element) & {
|
|
366
|
+
Text: (props: SkeletonTextProps) => JSX.Element;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// ─── Avatar ───────────────────────────────────────────────────────────────
|
|
370
|
+
|
|
371
|
+
export interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
372
|
+
seed?: string;
|
|
373
|
+
icon?: ReactNode;
|
|
374
|
+
src?: string;
|
|
375
|
+
size?: number;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export declare function Avatar(props: AvatarProps): JSX.Element;
|
|
379
|
+
|
|
380
|
+
// ─── Table ────────────────────────────────────────────────────────────────
|
|
381
|
+
|
|
382
|
+
export interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
383
|
+
children?: ReactNode;
|
|
384
|
+
size?: 'compact' | 'comfortable';
|
|
385
|
+
stickyTop?: number | string;
|
|
386
|
+
maxHeight?: string;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export declare function Table(props: TableProps): JSX.Element;
|
|
390
|
+
|
|
391
|
+
export interface TableHeadProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
392
|
+
children?: ReactNode;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export declare function TableHead(props: TableHeadProps): JSX.Element;
|
|
396
|
+
|
|
397
|
+
export interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
398
|
+
children?: ReactNode;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export declare function TableBody(props: TableBodyProps): JSX.Element;
|
|
402
|
+
|
|
403
|
+
export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
404
|
+
children?: ReactNode;
|
|
405
|
+
interactive?: boolean;
|
|
406
|
+
selected?: boolean;
|
|
407
|
+
subheader?: boolean;
|
|
408
|
+
exiting?: boolean;
|
|
409
|
+
updated?: boolean;
|
|
410
|
+
onClick?: () => void;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export declare function TableRow(props: TableRowProps): JSX.Element;
|
|
414
|
+
|
|
415
|
+
export interface TableSubheaderRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
416
|
+
children?: ReactNode;
|
|
417
|
+
colSpan?: number;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export declare function TableSubheaderRow(props: TableSubheaderRowProps): JSX.Element;
|
|
421
|
+
|
|
422
|
+
export interface ThProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
423
|
+
children?: ReactNode;
|
|
424
|
+
align?: 'left' | 'center' | 'right';
|
|
425
|
+
sortDir?: 'asc' | 'desc' | null;
|
|
426
|
+
onSort?: () => void;
|
|
427
|
+
width?: number | string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export declare function Th(props: ThProps): JSX.Element;
|
|
431
|
+
|
|
432
|
+
export interface TdProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
433
|
+
children?: ReactNode;
|
|
434
|
+
align?: 'left' | 'center' | 'right';
|
|
435
|
+
secondary?: boolean;
|
|
436
|
+
muted?: boolean;
|
|
437
|
+
truncate?: boolean;
|
|
438
|
+
nowrap?: boolean;
|
|
439
|
+
colSpan?: number;
|
|
440
|
+
rowSpan?: number;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export declare function Td(props: TdProps): JSX.Element;
|
|
444
|
+
|
|
445
|
+
// ─── Banner ───────────────────────────────────────────────────────────────
|
|
446
|
+
|
|
447
|
+
export interface BannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
448
|
+
children?: ReactNode;
|
|
449
|
+
variant?: 'info' | 'success' | 'warning' | 'error';
|
|
450
|
+
action?: ReactNode;
|
|
451
|
+
onAction?: () => void;
|
|
452
|
+
onDismiss?: () => void;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export declare function Banner(props: BannerProps): JSX.Element;
|
|
456
|
+
|
|
457
|
+
// ─── SidePage ─────────────────────────────────────────────────────────────
|
|
458
|
+
|
|
459
|
+
export interface SidePageProps extends HTMLAttributes<HTMLDivElement> {
|
|
460
|
+
children?: ReactNode;
|
|
461
|
+
title?: string;
|
|
462
|
+
onClose?: () => void;
|
|
463
|
+
subHeader?: ReactNode;
|
|
464
|
+
side?: 'left' | 'right';
|
|
465
|
+
size?: 'narrow' | 'medium' | 'wide';
|
|
466
|
+
offsetLeft?: number;
|
|
467
|
+
offsetRight?: number;
|
|
468
|
+
keepOpenRef?: React.RefObject<HTMLElement>;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export declare function SidePage(props: SidePageProps): JSX.Element;
|
|
472
|
+
|
|
473
|
+
export interface SidePageFooterProps {
|
|
474
|
+
children?: ReactNode;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export declare function SidePageFooter(props: SidePageFooterProps): JSX.Element;
|
|
478
|
+
|
|
479
|
+
// ─── Pagination ───────────────────────────────────────────────────────────
|
|
480
|
+
|
|
481
|
+
export interface PaginationProps extends HTMLAttributes<HTMLElement> {
|
|
482
|
+
page: number;
|
|
483
|
+
total: number;
|
|
484
|
+
onChange?: (page: number) => void;
|
|
485
|
+
siblings?: number;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export declare function Pagination(props: PaginationProps): JSX.Element;
|
|
489
|
+
|
|
490
|
+
// ─── Breadcrumb ───────────────────────────────────────────────────────────
|
|
491
|
+
|
|
492
|
+
export interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
493
|
+
children?: ReactNode;
|
|
494
|
+
separator?: ReactNode;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
|
|
498
|
+
|
|
499
|
+
// ─── Stat ─────────────────────────────────────────────────────────────────
|
|
500
|
+
|
|
501
|
+
export interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
502
|
+
label?: string;
|
|
503
|
+
value?: ReactNode;
|
|
504
|
+
delta?: string;
|
|
505
|
+
size?: 'xs' | 's' | 'm' | 'l';
|
|
506
|
+
inline?: boolean;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export declare function Stat(props: StatProps): JSX.Element;
|
|
510
|
+
|
|
511
|
+
// ─── FormField ────────────────────────────────────────────────────────────
|
|
512
|
+
|
|
513
|
+
export interface FormFieldProps {
|
|
514
|
+
label?: string;
|
|
515
|
+
hint?: string;
|
|
516
|
+
error?: string;
|
|
517
|
+
required?: boolean;
|
|
518
|
+
disabled?: boolean;
|
|
519
|
+
htmlFor?: string;
|
|
520
|
+
children?: ReactNode;
|
|
521
|
+
className?: string;
|
|
522
|
+
style?: CSSProperties;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export declare function FormField(props: FormFieldProps): JSX.Element;
|
|
526
|
+
|
|
527
|
+
// ─── EmptyState ───────────────────────────────────────────────────────────
|
|
528
|
+
|
|
529
|
+
export interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
530
|
+
icon?: ReactNode;
|
|
531
|
+
title: string;
|
|
532
|
+
description?: string;
|
|
533
|
+
action?: ReactNode;
|
|
534
|
+
size?: 's' | 'm' | 'l';
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export declare function EmptyState(props: EmptyStateProps): JSX.Element;
|
|
538
|
+
|
|
539
|
+
// ─── Dropdown ─────────────────────────────────────────────────────────────
|
|
540
|
+
|
|
541
|
+
export interface DropdownItem {
|
|
542
|
+
label?: string;
|
|
543
|
+
onClick?: () => void;
|
|
544
|
+
icon?: ReactNode;
|
|
545
|
+
shortcut?: string;
|
|
546
|
+
disabled?: boolean;
|
|
547
|
+
danger?: boolean;
|
|
548
|
+
href?: string;
|
|
549
|
+
separator?: boolean;
|
|
550
|
+
type?: 'section';
|
|
551
|
+
content?: ReactNode;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
555
|
+
trigger: ReactNode;
|
|
556
|
+
items?: DropdownItem[];
|
|
557
|
+
open?: boolean;
|
|
558
|
+
onOpenChange?: (open: boolean) => void;
|
|
559
|
+
align?: 'left' | 'right';
|
|
560
|
+
fullWidth?: boolean;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export declare function Dropdown(props: DropdownProps): JSX.Element;
|
|
564
|
+
|
|
565
|
+
// ─── Toast ────────────────────────────────────────────────────────────────
|
|
566
|
+
|
|
567
|
+
export interface ToastOptions {
|
|
568
|
+
type?: 'default' | 'success' | 'warning' | 'error';
|
|
569
|
+
duration?: number;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface ToastFn {
|
|
573
|
+
(message: string, opts?: ToastOptions): void;
|
|
574
|
+
success(message: string, opts?: Omit<ToastOptions, 'type'>): void;
|
|
575
|
+
warning(message: string, opts?: Omit<ToastOptions, 'type'>): void;
|
|
576
|
+
error(message: string, opts?: Omit<ToastOptions, 'type'>): void;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export declare function useToast(): { toast: ToastFn };
|
|
580
|
+
|
|
581
|
+
export interface ToastContainerProps {
|
|
582
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export declare function ToastContainer(props: ToastContainerProps): JSX.Element | null;
|
|
586
|
+
|
|
587
|
+
// ─── ProgressBar ──────────────────────────────────────────────────────────────
|
|
588
|
+
|
|
589
|
+
export interface ProgressBarProps {
|
|
590
|
+
value?: number;
|
|
591
|
+
size?: 'xs' | 's' | 'm' | 'l';
|
|
592
|
+
variant?: 'default' | 'success' | 'warning' | 'danger' | 'auto';
|
|
593
|
+
showValue?: boolean;
|
|
594
|
+
min?: number;
|
|
595
|
+
animate?: boolean;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
|
|
599
|
+
|
|
600
|
+
// ─── AnimatedNumber ───────────────────────────────────────────────────────────
|
|
601
|
+
|
|
602
|
+
export interface UseAnimatedNumberOptions {
|
|
603
|
+
duration?: number;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export declare function useAnimatedNumber(value: number, options?: UseAnimatedNumberOptions): number;
|
|
607
|
+
|
|
608
|
+
export interface AnimatedNumberProps extends UseAnimatedNumberOptions {
|
|
609
|
+
value: number;
|
|
610
|
+
decimals?: number;
|
|
611
|
+
prefix?: string;
|
|
612
|
+
suffix?: string;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export declare function AnimatedNumber(props: AnimatedNumberProps): string;
|
|
616
|
+
|
|
617
|
+
// ─── InView ───────────────────────────────────────────────────────────────────
|
|
618
|
+
|
|
619
|
+
export interface UseInViewOptions {
|
|
620
|
+
threshold?: number;
|
|
621
|
+
rootMargin?: string;
|
|
622
|
+
once?: boolean;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export declare function useInView(options?: UseInViewOptions): { ref: React.RefObject<HTMLElement>; inView: boolean };
|
|
626
|
+
|
|
627
|
+
export interface InViewProps extends UseInViewOptions {
|
|
628
|
+
children: React.ReactNode | ((inView: boolean) => React.ReactNode);
|
|
629
|
+
as?: keyof JSX.IntrinsicElements;
|
|
630
|
+
onEnter?: () => void;
|
|
631
|
+
onLeave?: () => void;
|
|
632
|
+
[key: string]: any;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export declare function InView(props: InViewProps): JSX.Element;
|
|
636
|
+
|
|
637
|
+
// ─── ToolCallCard ─────────────────────────────────────────────────────────────
|
|
638
|
+
|
|
639
|
+
export interface ToolCallCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
640
|
+
label: string;
|
|
641
|
+
status?: 'idle' | 'running' | 'success' | 'error';
|
|
642
|
+
icon?: ReactNode;
|
|
643
|
+
badge?: ReactNode;
|
|
644
|
+
defaultExpanded?: boolean;
|
|
645
|
+
expanded?: boolean;
|
|
646
|
+
onToggle?: (value: boolean) => void;
|
|
647
|
+
children?: ReactNode;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export declare function ToolCallCard(props: ToolCallCardProps): JSX.Element;
|
|
651
|
+
|
|
652
|
+
// ─── CopyButton ───────────────────────────────────────────────────────────────
|
|
653
|
+
|
|
654
|
+
export interface CopyButtonProps {
|
|
655
|
+
text: string;
|
|
656
|
+
size?: Size;
|
|
657
|
+
timeout?: number;
|
|
658
|
+
'aria-label'?: string;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export declare function CopyButton(props: CopyButtonProps): JSX.Element;
|
|
662
|
+
|
|
663
|
+
// ─── ReasoningBlock ───────────────────────────────────────────────────────────
|
|
664
|
+
|
|
665
|
+
export interface ReasoningBlockProps {
|
|
666
|
+
content: string;
|
|
667
|
+
streaming?: boolean;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export declare function ReasoningBlock(props: ReasoningBlockProps): JSX.Element;
|
|
671
|
+
|
|
672
|
+
// ─── StepIndicator ────────────────────────────────────────────────────────────
|
|
673
|
+
|
|
674
|
+
export interface StepIndicatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
675
|
+
count: number;
|
|
676
|
+
current?: number;
|
|
677
|
+
done?: number[];
|
|
678
|
+
onChange?: (index: number) => void;
|
|
679
|
+
showCounter?: boolean;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export declare function StepIndicator(props: StepIndicatorProps): JSX.Element;
|
|
683
|
+
|
|
684
|
+
// ─── StreamingText ────────────────────────────────────────────────────────────
|
|
685
|
+
|
|
686
|
+
export interface StreamingTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
687
|
+
content: string;
|
|
688
|
+
isStreaming?: boolean;
|
|
689
|
+
cursor?: 'line' | 'block' | 'none';
|
|
690
|
+
onChunk?: (content: string) => void;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export declare function StreamingText(props: StreamingTextProps): JSX.Element;
|
|
694
|
+
|
|
695
|
+
// ─── ChatMessage ──────────────────────────────────────────────────────────────
|
|
696
|
+
|
|
697
|
+
export interface ChatMessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
698
|
+
role?: 'user' | 'assistant' | 'system' | 'tool';
|
|
699
|
+
header?: ReactNode;
|
|
700
|
+
footer?: ReactNode;
|
|
701
|
+
attachments?: ReactNode;
|
|
702
|
+
isStreaming?: boolean;
|
|
703
|
+
children?: ReactNode;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export declare function ChatMessage(props: ChatMessageProps): JSX.Element;
|
|
707
|
+
|
|
708
|
+
// ─── useStreamScroll ──────────────────────────────────────────────────────────
|
|
709
|
+
|
|
710
|
+
export interface UseStreamScrollOptions {
|
|
711
|
+
containerRef: React.RefObject<HTMLElement>;
|
|
712
|
+
smartPause?: boolean;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export declare function useStreamScroll(deps: any[], options?: UseStreamScrollOptions): void;
|
|
716
|
+
|
|
717
|
+
// ─── PromptInput ──────────────────────────────────────────────────────────────
|
|
718
|
+
|
|
719
|
+
export interface PromptAttachment {
|
|
720
|
+
filename: string;
|
|
721
|
+
uploading?: boolean;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export interface PromptImage {
|
|
725
|
+
preview: string;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export interface PromptInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onKeyDown'> {
|
|
729
|
+
value?: string;
|
|
730
|
+
onChange?: (value: string) => void;
|
|
731
|
+
onSubmit?: () => void;
|
|
732
|
+
onStop?: () => void;
|
|
733
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
734
|
+
loading?: boolean;
|
|
735
|
+
disabled?: boolean;
|
|
736
|
+
placeholder?: string;
|
|
737
|
+
animatedPlaceholders?: string[];
|
|
738
|
+
attachments?: PromptAttachment[];
|
|
739
|
+
images?: PromptImage[];
|
|
740
|
+
onAttachFiles?: (files: File[]) => void;
|
|
741
|
+
onAttachImages?: (files: File[]) => void;
|
|
742
|
+
onRemoveAttachment?: (index: number) => void;
|
|
743
|
+
onRemoveImage?: (index: number) => void;
|
|
744
|
+
acceptImage?: (file: File) => boolean;
|
|
745
|
+
acceptFile?: (file: File) => boolean;
|
|
746
|
+
maxImages?: number;
|
|
747
|
+
maxImageSize?: number;
|
|
748
|
+
leftSlot?: ReactNode;
|
|
749
|
+
rightSlot?: ReactNode;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export declare function PromptInput(props: PromptInputProps): JSX.Element;
|
|
753
|
+
|
|
754
|
+
// ─── ModelPicker ──────────────────────────────────────────────────────────────
|
|
755
|
+
|
|
756
|
+
export interface PickerModel {
|
|
757
|
+
name: string;
|
|
758
|
+
displayName?: string;
|
|
759
|
+
tier?: 'fast' | 'standard' | 'premium' | string;
|
|
760
|
+
icon?: ReactNode;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export interface ModelPickerProps extends HTMLAttributes<HTMLDivElement> {
|
|
764
|
+
models: PickerModel[];
|
|
765
|
+
value: string;
|
|
766
|
+
onChange?: (name: string) => void;
|
|
767
|
+
size?: 'xs' | 's' | 'm';
|
|
768
|
+
minTier?: 'fast' | 'standard' | 'premium';
|
|
769
|
+
showAutoOption?: boolean;
|
|
770
|
+
groupByTier?: boolean;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export declare function ModelPicker(props: ModelPickerProps): JSX.Element;
|
|
774
|
+
|
|
775
|
+
// ─── useAnimatedPlaceholder ───────────────────────────────────────────────────
|
|
776
|
+
|
|
777
|
+
export interface UseAnimatedPlaceholderOptions {
|
|
778
|
+
prompts: string[];
|
|
779
|
+
enabled: boolean;
|
|
780
|
+
typingSpeed?: number;
|
|
781
|
+
erasingSpeed?: number;
|
|
782
|
+
holdTime?: number;
|
|
783
|
+
betweenTime?: number;
|
|
784
|
+
manualPauseMs?: number;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export interface UseAnimatedPlaceholderResult {
|
|
788
|
+
displayed: string;
|
|
789
|
+
currentPrompt: string;
|
|
790
|
+
index: number;
|
|
791
|
+
next: () => void;
|
|
792
|
+
prev: () => void;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare function useAnimatedPlaceholder(options: UseAnimatedPlaceholderOptions): UseAnimatedPlaceholderResult;
|
|
796
|
+
|
|
797
|
+
// ─── SourcesPanel ─────────────────────────────────────────────────────────────
|
|
798
|
+
|
|
799
|
+
export interface Source {
|
|
800
|
+
filename: string;
|
|
801
|
+
page?: number | string;
|
|
802
|
+
snippet?: string;
|
|
803
|
+
url?: string;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
export interface SourcesPanelProps {
|
|
807
|
+
sources?: Source[];
|
|
808
|
+
layout?: 'list' | 'compact';
|
|
809
|
+
title?: string;
|
|
810
|
+
maxVisible?: number;
|
|
811
|
+
onSourceClick?: (source: Source) => void;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export declare function SourcesPanel(props: SourcesPanelProps): JSX.Element;
|
|
815
|
+
|
|
816
|
+
// ─── TokenCounter ─────────────────────────────────────────────────────────────
|
|
817
|
+
|
|
818
|
+
export interface TokenCounterProps {
|
|
819
|
+
used: number;
|
|
820
|
+
limit: number;
|
|
821
|
+
size?: 's' | 'm';
|
|
822
|
+
showCount?: boolean;
|
|
823
|
+
showPercent?: boolean;
|
|
824
|
+
warningThreshold?: number;
|
|
825
|
+
errorThreshold?: number;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export declare function TokenCounter(props: TokenCounterProps): JSX.Element;
|
|
829
|
+
|
|
830
|
+
// ─── ConfidenceBar ────────────────────────────────────────────────────────────
|
|
831
|
+
|
|
832
|
+
export interface ConfidenceBarProps {
|
|
833
|
+
value: number;
|
|
834
|
+
size?: 'xs' | 's';
|
|
835
|
+
showLabel?: 'text' | 'none';
|
|
836
|
+
layout?: 'inline' | 'block';
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export declare function ConfidenceBar(props: ConfidenceBarProps): JSX.Element;
|
|
840
|
+
|
|
841
|
+
// ─── DiffView ─────────────────────────────────────────────────────────────────
|
|
842
|
+
|
|
843
|
+
export interface DiffLine {
|
|
844
|
+
type: 'add' | 'remove' | 'context';
|
|
845
|
+
text: string;
|
|
846
|
+
lineNo?: number;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export interface DiffViewProps {
|
|
850
|
+
lines?: DiffLine[];
|
|
851
|
+
layout?: 'inline' | 'split';
|
|
852
|
+
wordWrap?: boolean;
|
|
853
|
+
lineNumbers?: boolean;
|
|
854
|
+
maxHeight?: number;
|
|
855
|
+
title?: string;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
export declare function DiffView(props: DiffViewProps): JSX.Element;
|
|
859
|
+
|
|
860
|
+
// ─── ToolCallBubble ───────────────────────────────────────────────────────────
|
|
861
|
+
|
|
862
|
+
export declare function ToolCallBubble(props: ToolCallCardProps): JSX.Element;
|
|
863
|
+
|
|
864
|
+
// ─── MessageFeedback ──────────────────────────────────────────────────────────
|
|
865
|
+
|
|
866
|
+
export interface MessageFeedbackProps {
|
|
867
|
+
value?: 'idle' | 'liked' | 'disliked';
|
|
868
|
+
onLike?: () => void;
|
|
869
|
+
onDislike?: () => void;
|
|
870
|
+
className?: string;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export declare function MessageFeedback(props: MessageFeedbackProps): JSX.Element;
|
|
874
|
+
|
|
875
|
+
// ─── MessageFooter ────────────────────────────────────────────────────────────
|
|
876
|
+
|
|
877
|
+
export interface MessageFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
878
|
+
role?: 'user' | 'assistant';
|
|
879
|
+
text?: string;
|
|
880
|
+
timestamp?: Date | string | number;
|
|
881
|
+
feedbackValue?: 'idle' | 'liked' | 'disliked';
|
|
882
|
+
onLike?: () => void;
|
|
883
|
+
onDislike?: () => void;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export declare function MessageFooter(props: MessageFooterProps): JSX.Element | null;
|
|
887
|
+
|
|
888
|
+
// ─── ThinkingDot ──────────────────────────────────────────────────────────────
|
|
889
|
+
|
|
890
|
+
export interface ThinkingDotProps extends HTMLAttributes<HTMLSpanElement> {
|
|
891
|
+
label?: string;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
export declare function ThinkingDot(props: ThinkingDotProps): JSX.Element;
|
|
895
|
+
|
|
896
|
+
// ─── Scrollable ───────────────────────────────────────────────────────────────
|
|
897
|
+
|
|
898
|
+
export interface ScrollableProps extends HTMLAttributes<HTMLDivElement> {
|
|
899
|
+
axis?: 'x' | 'y' | 'both';
|
|
900
|
+
children?: ReactNode;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export declare function Scrollable(props: ScrollableProps): JSX.Element;
|
|
904
|
+
|
|
905
|
+
// ─── EngineerGrid ─────────────────────────────────────────────────────────────
|
|
906
|
+
|
|
907
|
+
export interface EngineerGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
908
|
+
variant?: 'light' | 'dark';
|
|
909
|
+
glow?: boolean;
|
|
910
|
+
mask?: boolean;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
export declare function EngineerGrid(props: EngineerGridProps): JSX.Element;
|
|
914
|
+
|
|
915
|
+
// ─── NavRail ──────────────────────────────────────────────────────────────────
|
|
916
|
+
|
|
917
|
+
export interface NavRailProps extends HTMLAttributes<HTMLElement> {
|
|
918
|
+
children?: ReactNode;
|
|
919
|
+
collapsed?: boolean;
|
|
920
|
+
side?: 'left' | 'right';
|
|
921
|
+
onExpand?: () => void;
|
|
922
|
+
onCollapse?: () => void;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
export declare function NavRail(props: NavRailProps): JSX.Element;
|
|
926
|
+
|
|
927
|
+
export interface NavRailItemProps {
|
|
928
|
+
icon: ReactNode;
|
|
929
|
+
label: string;
|
|
930
|
+
selected?: boolean;
|
|
931
|
+
disabled?: boolean;
|
|
932
|
+
href?: string;
|
|
933
|
+
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
934
|
+
count?: number;
|
|
935
|
+
updated?: boolean;
|
|
936
|
+
open?: boolean;
|
|
937
|
+
onboarding?: boolean;
|
|
938
|
+
className?: string;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export declare function NavRailItem(props: NavRailItemProps): JSX.Element;
|
|
942
|
+
|
|
943
|
+
export interface NavRailBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
944
|
+
children?: ReactNode;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export declare function NavRailBody(props: NavRailBodyProps): JSX.Element;
|
|
948
|
+
|
|
949
|
+
export interface NavRailHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
950
|
+
children?: ReactNode;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export declare function NavRailHeader(props: NavRailHeaderProps): JSX.Element;
|
|
954
|
+
|
|
955
|
+
export interface NavRailFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
956
|
+
children?: ReactNode;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export declare function NavRailFooter(props: NavRailFooterProps): JSX.Element;
|
|
960
|
+
|
|
961
|
+
export interface NavRailDividerProps extends HTMLAttributes<HTMLHRElement> {}
|
|
962
|
+
|
|
963
|
+
export declare function NavRailDivider(props: NavRailDividerProps): JSX.Element;
|
|
964
|
+
|
|
965
|
+
export interface NavRailRecentsProps extends HTMLAttributes<HTMLDivElement> {
|
|
966
|
+
children?: ReactNode;
|
|
967
|
+
label?: string;
|
|
968
|
+
defaultOpen?: boolean;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export declare function NavRailRecents(props: NavRailRecentsProps): JSX.Element;
|
|
972
|
+
|
|
973
|
+
export interface NavRailAgentProps {
|
|
974
|
+
avatar: ReactNode;
|
|
975
|
+
label: string;
|
|
976
|
+
selected?: boolean;
|
|
977
|
+
disabled?: boolean;
|
|
978
|
+
href?: string;
|
|
979
|
+
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
980
|
+
className?: string;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export declare function NavRailAgent(props: NavRailAgentProps): JSX.Element;
|
|
984
|
+
|
|
985
|
+
export interface NavRailFlyoutProps {
|
|
986
|
+
trigger: ReactNode;
|
|
987
|
+
title?: string;
|
|
988
|
+
children?: ReactNode;
|
|
989
|
+
open?: boolean;
|
|
990
|
+
onOpenChange?: (open: boolean) => void;
|
|
991
|
+
defaultOpen?: boolean;
|
|
992
|
+
}
|
|
993
|
+
export declare function NavRailFlyout(props: NavRailFlyoutProps): JSX.Element;
|
|
994
|
+
|
|
995
|
+
export type NavRailCustomItemProps<T extends ElementType = 'button'> = {
|
|
996
|
+
as?: T;
|
|
997
|
+
avatar: ReactNode;
|
|
998
|
+
label: string;
|
|
999
|
+
className?: string;
|
|
1000
|
+
} & Omit<ComponentPropsWithRef<T>, 'as' | 'avatar' | 'label' | 'className'>;
|
|
1001
|
+
|
|
1002
|
+
export declare const NavRailCustomItem: <T extends ElementType = 'button'>(
|
|
1003
|
+
props: NavRailCustomItemProps<T>
|
|
1004
|
+
) => JSX.Element;
|
|
1005
|
+
|
|
1006
|
+
// ─── Coachmark ────────────────────────────────────────────────────────────────
|
|
1007
|
+
|
|
1008
|
+
export interface CoachmarkStep {
|
|
1009
|
+
target: string | (() => Element | null);
|
|
1010
|
+
title?: string;
|
|
1011
|
+
content: ReactNode;
|
|
1012
|
+
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface CoachmarkProps {
|
|
1016
|
+
steps: CoachmarkStep[];
|
|
1017
|
+
currentStep: number;
|
|
1018
|
+
onNext: () => void;
|
|
1019
|
+
onBack: () => void;
|
|
1020
|
+
onSkip: () => void;
|
|
1021
|
+
onFinish: () => void;
|
|
1022
|
+
overlay?: boolean;
|
|
1023
|
+
ring?: boolean;
|
|
1024
|
+
labelNext?: string;
|
|
1025
|
+
labelBack?: string;
|
|
1026
|
+
labelSkip?: string;
|
|
1027
|
+
labelFinish?: string;
|
|
1028
|
+
statePrimary?: 'idle' | 'loading' | 'success' | 'error';
|
|
1029
|
+
stateBack?: 'idle' | 'loading' | 'success' | 'error';
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
export declare function Coachmark(props: CoachmarkProps): JSX.Element | null;
|
|
1033
|
+
|
|
1034
|
+
export interface UseCoachmarkOptions {
|
|
1035
|
+
storageKey?: string;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export interface UseCoachmarkReturn {
|
|
1039
|
+
currentStep: number;
|
|
1040
|
+
isActive: boolean;
|
|
1041
|
+
start: () => void;
|
|
1042
|
+
next: () => void;
|
|
1043
|
+
back: () => void;
|
|
1044
|
+
skip: () => void;
|
|
1045
|
+
finish: () => void;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export declare function useCoachmark(steps: CoachmarkStep[], options?: UseCoachmarkOptions): UseCoachmarkReturn;
|
|
1049
|
+
|
|
1050
|
+
// ─── useShake ─────────────────────────────────────────────────────────────────
|
|
1051
|
+
|
|
1052
|
+
export interface UseShakeReturn {
|
|
1053
|
+
ref: React.RefObject<any>;
|
|
1054
|
+
shake: () => void;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export declare function useShake(): UseShakeReturn;
|