@terminal-blueprint/react 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 +2178 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +509 -0
- package/dist/index.d.ts +509 -0
- package/dist/index.js +2141 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ElementType, ComponentPropsWithoutRef, ReactNode, Ref, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, RefCallback } from 'react';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
|
|
6
|
+
type PolymorphicProps<E extends ElementType, P = {}> = P & Omit<ComponentPropsWithoutRef<E>, keyof P> & {
|
|
7
|
+
as?: E;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type ButtonOwnProps = {
|
|
11
|
+
variant?: 'default' | 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
iconPosition?: 'left' | 'right';
|
|
17
|
+
};
|
|
18
|
+
type ButtonProps<E extends ElementType = 'button'> = PolymorphicProps<E, ButtonOwnProps>;
|
|
19
|
+
declare function Button({ as, variant, size, isLoading, loadingText, icon, iconPosition, className, disabled, children, ref, ...props }: ButtonOwnProps & {
|
|
20
|
+
as?: ElementType;
|
|
21
|
+
ref?: Ref<any>;
|
|
22
|
+
className?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
29
|
+
label?: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
hint?: string;
|
|
32
|
+
size?: 'sm' | 'md' | 'lg';
|
|
33
|
+
icon?: ReactNode;
|
|
34
|
+
iconPosition?: 'left' | 'right';
|
|
35
|
+
ref?: Ref<HTMLInputElement>;
|
|
36
|
+
}
|
|
37
|
+
declare function Input({ label, error, hint, size, icon, iconPosition, className, id: idProp, ref, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
40
|
+
label?: string;
|
|
41
|
+
error?: string;
|
|
42
|
+
hint?: string;
|
|
43
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
44
|
+
}
|
|
45
|
+
declare function Textarea({ label, error, hint, className, id: idProp, ref, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
47
|
+
interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
48
|
+
as?: ElementType;
|
|
49
|
+
brackets?: boolean;
|
|
50
|
+
pulse?: boolean;
|
|
51
|
+
hoverable?: boolean;
|
|
52
|
+
ref?: Ref<HTMLElement>;
|
|
53
|
+
}
|
|
54
|
+
declare function CardRoot({ as, brackets, pulse, hoverable, className, children, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
56
|
+
ref?: Ref<HTMLDivElement>;
|
|
57
|
+
}
|
|
58
|
+
declare function Header({ className, ref, ...props }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare function Title$1({ className, ref, ...props }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare function Body$1({ className, ref, ...props }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function Tags({ className, ref, ...props }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
62
|
+
declare function Footer$1({ className, ref, ...props }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
declare const Card: typeof CardRoot & {
|
|
64
|
+
Header: typeof Header;
|
|
65
|
+
Title: typeof Title$1;
|
|
66
|
+
Body: typeof Body$1;
|
|
67
|
+
Tags: typeof Tags;
|
|
68
|
+
Footer: typeof Footer$1;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
72
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
73
|
+
dot?: boolean;
|
|
74
|
+
pulse?: boolean;
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
ref?: Ref<HTMLSpanElement>;
|
|
77
|
+
}
|
|
78
|
+
declare function Badge({ variant, dot, pulse, className, children, ref, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
79
|
+
|
|
80
|
+
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
81
|
+
children: ReactNode;
|
|
82
|
+
ref?: Ref<HTMLSpanElement>;
|
|
83
|
+
}
|
|
84
|
+
declare function Tag({ className, children, ref, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
interface TitleLineProps {
|
|
87
|
+
label: string;
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
declare function TitleLine({ label, className }: TitleLineProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
|
|
92
|
+
interface CornerBracketsProps extends HTMLAttributes<HTMLDivElement> {
|
|
93
|
+
pulse?: boolean;
|
|
94
|
+
children: ReactNode;
|
|
95
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
96
|
+
}
|
|
97
|
+
declare function CornerBrackets({ pulse, children, className, ref, ...props }: CornerBracketsProps): react_jsx_runtime.JSX.Element;
|
|
98
|
+
|
|
99
|
+
interface SelectProps {
|
|
100
|
+
value?: string;
|
|
101
|
+
defaultValue?: string;
|
|
102
|
+
onValueChange?: (value: string) => void;
|
|
103
|
+
placeholder?: string;
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
error?: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
className?: string;
|
|
109
|
+
ref?: Ref<HTMLDivElement>;
|
|
110
|
+
}
|
|
111
|
+
declare function Select({ value: controlledValue, defaultValue, onValueChange, placeholder, disabled, error, label, children, className, ref, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
113
|
+
interface SelectTriggerProps {
|
|
114
|
+
className?: string;
|
|
115
|
+
ref?: Ref<HTMLButtonElement>;
|
|
116
|
+
}
|
|
117
|
+
declare function SelectTrigger({ className, ref }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
|
|
119
|
+
interface SelectContentProps {
|
|
120
|
+
children: ReactNode;
|
|
121
|
+
className?: string;
|
|
122
|
+
ref?: Ref<HTMLDivElement>;
|
|
123
|
+
}
|
|
124
|
+
declare function SelectContent({ children, className, ref }: SelectContentProps): react_jsx_runtime.JSX.Element;
|
|
125
|
+
|
|
126
|
+
interface SelectItemProps {
|
|
127
|
+
value: string;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
children: ReactNode;
|
|
130
|
+
className?: string;
|
|
131
|
+
ref?: Ref<HTMLDivElement>;
|
|
132
|
+
}
|
|
133
|
+
declare function SelectItem({ value: itemValue, disabled, children, className, ref, }: SelectItemProps): react_jsx_runtime.JSX.Element;
|
|
134
|
+
|
|
135
|
+
interface ModalProps {
|
|
136
|
+
open: boolean;
|
|
137
|
+
onOpenChange: (open: boolean) => void;
|
|
138
|
+
closeOnEscape?: boolean;
|
|
139
|
+
closeOnBackdrop?: boolean;
|
|
140
|
+
hideCloseButton?: boolean;
|
|
141
|
+
portalTarget?: Element | null;
|
|
142
|
+
children: ReactNode;
|
|
143
|
+
className?: string;
|
|
144
|
+
ref?: Ref<HTMLDivElement>;
|
|
145
|
+
}
|
|
146
|
+
declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
147
|
+
interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
148
|
+
ref?: Ref<HTMLDivElement>;
|
|
149
|
+
}
|
|
150
|
+
declare function Title({ className, ref, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
151
|
+
declare function Body({ className, ref, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare function Footer({ className, ref, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function Close({ className, children, ref, ...props }: HTMLAttributes<HTMLButtonElement> & {
|
|
154
|
+
ref?: Ref<HTMLButtonElement>;
|
|
155
|
+
}): react_jsx_runtime.JSX.Element;
|
|
156
|
+
declare const Modal: typeof ModalRoot & {
|
|
157
|
+
Title: typeof Title;
|
|
158
|
+
Body: typeof Body;
|
|
159
|
+
Footer: typeof Footer;
|
|
160
|
+
Close: typeof Close;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
interface TabsProps {
|
|
164
|
+
value?: string;
|
|
165
|
+
defaultValue?: string;
|
|
166
|
+
onValueChange?: (value: string) => void;
|
|
167
|
+
children: ReactNode;
|
|
168
|
+
className?: string;
|
|
169
|
+
ref?: Ref<HTMLDivElement>;
|
|
170
|
+
}
|
|
171
|
+
declare function Tabs({ value: controlledValue, defaultValue, onValueChange: onValueChangeProp, children, className, ref, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
172
|
+
interface TabsListProps {
|
|
173
|
+
children: ReactNode;
|
|
174
|
+
className?: string;
|
|
175
|
+
ref?: Ref<HTMLDivElement>;
|
|
176
|
+
}
|
|
177
|
+
declare function TabsList({ children, className, ref }: TabsListProps): react_jsx_runtime.JSX.Element;
|
|
178
|
+
interface TabsTriggerProps {
|
|
179
|
+
value: string;
|
|
180
|
+
icon?: ReactNode;
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
children: ReactNode;
|
|
183
|
+
className?: string;
|
|
184
|
+
ref?: Ref<HTMLButtonElement>;
|
|
185
|
+
}
|
|
186
|
+
declare function TabsTrigger({ value: triggerValue, icon, disabled, children, className, ref, }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
187
|
+
interface TabsContentProps {
|
|
188
|
+
value: string;
|
|
189
|
+
children: ReactNode;
|
|
190
|
+
className?: string;
|
|
191
|
+
ref?: Ref<HTMLDivElement>;
|
|
192
|
+
}
|
|
193
|
+
declare function TabsContent({ value: contentValue, children, className, ref }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
194
|
+
|
|
195
|
+
interface ToastOptions {
|
|
196
|
+
title: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
type?: 'success' | 'error' | 'warning' | 'info';
|
|
199
|
+
duration?: number | null;
|
|
200
|
+
action?: {
|
|
201
|
+
label: string;
|
|
202
|
+
onClick: () => void;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
interface ToastEntry extends ToastOptions {
|
|
206
|
+
id: string;
|
|
207
|
+
type: 'success' | 'error' | 'warning' | 'info';
|
|
208
|
+
}
|
|
209
|
+
declare function dismissToast(id: string): void;
|
|
210
|
+
declare function createToast(options: ToastOptions): string;
|
|
211
|
+
declare namespace createToast {
|
|
212
|
+
var success: (title: string, options?: Omit<ToastOptions, "title" | "type">) => string;
|
|
213
|
+
var error: (title: string, options?: Omit<ToastOptions, "title" | "type">) => string;
|
|
214
|
+
var warning: (title: string, options?: Omit<ToastOptions, "title" | "type">) => string;
|
|
215
|
+
var info: (title: string, options?: Omit<ToastOptions, "title" | "type">) => string;
|
|
216
|
+
var dismiss: typeof dismissToast;
|
|
217
|
+
var dismissAll: () => void;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface ToasterProps {
|
|
221
|
+
position?: 'top-right' | 'top-center' | 'bottom-right' | 'bottom-center';
|
|
222
|
+
}
|
|
223
|
+
declare function Toaster({ position }: ToasterProps): react_jsx_runtime.JSX.Element | null;
|
|
224
|
+
|
|
225
|
+
interface TooltipProps {
|
|
226
|
+
content: ReactNode;
|
|
227
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
228
|
+
align?: 'start' | 'center' | 'end';
|
|
229
|
+
children: ReactNode;
|
|
230
|
+
className?: string;
|
|
231
|
+
ref?: Ref<HTMLDivElement>;
|
|
232
|
+
}
|
|
233
|
+
declare function Tooltip({ content, side, align, children, className, ref, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface NavDropdownItem {
|
|
236
|
+
label: string;
|
|
237
|
+
href?: string;
|
|
238
|
+
icon?: ReactNode;
|
|
239
|
+
onClick?: () => void;
|
|
240
|
+
}
|
|
241
|
+
interface NavDropdownProps {
|
|
242
|
+
trigger: string | ReactNode;
|
|
243
|
+
items: NavDropdownItem[];
|
|
244
|
+
align?: 'left' | 'center' | 'right';
|
|
245
|
+
className?: string;
|
|
246
|
+
ref?: Ref<HTMLDivElement>;
|
|
247
|
+
}
|
|
248
|
+
declare function NavDropdown({ trigger, items, align, className, ref }: NavDropdownProps): react_jsx_runtime.JSX.Element;
|
|
249
|
+
|
|
250
|
+
interface CheckboxProps {
|
|
251
|
+
checked?: boolean;
|
|
252
|
+
defaultChecked?: boolean;
|
|
253
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
254
|
+
disabled?: boolean;
|
|
255
|
+
label?: string | ReactNode;
|
|
256
|
+
error?: string;
|
|
257
|
+
ref?: Ref<HTMLInputElement>;
|
|
258
|
+
className?: string;
|
|
259
|
+
}
|
|
260
|
+
declare function Checkbox({ checked: controlledChecked, defaultChecked, onCheckedChange, disabled, label, error, ref, className, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
261
|
+
|
|
262
|
+
interface ToggleProps {
|
|
263
|
+
checked?: boolean;
|
|
264
|
+
defaultChecked?: boolean;
|
|
265
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
266
|
+
disabled?: boolean;
|
|
267
|
+
label?: string;
|
|
268
|
+
ref?: Ref<HTMLInputElement>;
|
|
269
|
+
className?: string;
|
|
270
|
+
}
|
|
271
|
+
declare function Toggle({ checked: controlledChecked, defaultChecked, onCheckedChange, disabled, label, ref, className, }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
272
|
+
|
|
273
|
+
interface RadioGroupProps {
|
|
274
|
+
value?: string;
|
|
275
|
+
defaultValue?: string;
|
|
276
|
+
onValueChange?: (value: string) => void;
|
|
277
|
+
disabled?: boolean;
|
|
278
|
+
label?: string;
|
|
279
|
+
orientation?: 'horizontal' | 'vertical';
|
|
280
|
+
children: ReactNode;
|
|
281
|
+
className?: string;
|
|
282
|
+
}
|
|
283
|
+
interface RadioItemProps {
|
|
284
|
+
value: string;
|
|
285
|
+
label: string;
|
|
286
|
+
disabled?: boolean;
|
|
287
|
+
className?: string;
|
|
288
|
+
}
|
|
289
|
+
declare function RadioGroup({ value: controlledValue, defaultValue, onValueChange, disabled, label, orientation, children, className, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
290
|
+
declare function RadioItem({ value, label, disabled: itemDisabled, className, }: RadioItemProps): react_jsx_runtime.JSX.Element;
|
|
291
|
+
|
|
292
|
+
interface ProgressProps {
|
|
293
|
+
value: number;
|
|
294
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
295
|
+
animated?: boolean;
|
|
296
|
+
indeterminate?: boolean;
|
|
297
|
+
label?: string;
|
|
298
|
+
showValue?: boolean;
|
|
299
|
+
className?: string;
|
|
300
|
+
}
|
|
301
|
+
declare function Progress({ value, variant, animated, indeterminate, label, showValue, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
302
|
+
|
|
303
|
+
interface BatteryProps {
|
|
304
|
+
value: number;
|
|
305
|
+
total?: number;
|
|
306
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
307
|
+
animated?: boolean;
|
|
308
|
+
label?: string;
|
|
309
|
+
className?: string;
|
|
310
|
+
}
|
|
311
|
+
declare function Battery({ value, total, variant, animated, label, className, }: BatteryProps): react_jsx_runtime.JSX.Element;
|
|
312
|
+
|
|
313
|
+
interface BatteryInlineProps {
|
|
314
|
+
value: number;
|
|
315
|
+
total?: number;
|
|
316
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
317
|
+
animated?: boolean;
|
|
318
|
+
label?: string;
|
|
319
|
+
showValue?: boolean;
|
|
320
|
+
className?: string;
|
|
321
|
+
}
|
|
322
|
+
declare function BatteryInline({ value, total, variant, animated, label, showValue, className, }: BatteryInlineProps): react_jsx_runtime.JSX.Element;
|
|
323
|
+
|
|
324
|
+
interface Column<T> {
|
|
325
|
+
id: string;
|
|
326
|
+
header: string;
|
|
327
|
+
accessor: keyof T | ((row: T) => ReactNode);
|
|
328
|
+
cell?: (value: any, row: T) => ReactNode;
|
|
329
|
+
}
|
|
330
|
+
interface TableProps<T> {
|
|
331
|
+
columns: Column<T>[];
|
|
332
|
+
data: T[];
|
|
333
|
+
onRowClick?: (row: T) => void;
|
|
334
|
+
className?: string;
|
|
335
|
+
}
|
|
336
|
+
declare function Table<T>({ columns, data, onRowClick, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
337
|
+
|
|
338
|
+
interface SkeletonProps {
|
|
339
|
+
variant?: 'text' | 'heading' | 'avatar' | 'card';
|
|
340
|
+
width?: string | number;
|
|
341
|
+
height?: string | number;
|
|
342
|
+
lines?: number;
|
|
343
|
+
className?: string;
|
|
344
|
+
}
|
|
345
|
+
declare function Skeleton({ variant, width, height, lines, className, }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
346
|
+
|
|
347
|
+
interface SpinnerProps {
|
|
348
|
+
variant?: 'bracket' | 'multi-square';
|
|
349
|
+
size?: 'sm' | 'md' | 'lg';
|
|
350
|
+
className?: string;
|
|
351
|
+
}
|
|
352
|
+
declare function Spinner({ variant, size, className, }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
353
|
+
|
|
354
|
+
interface PaginationProps {
|
|
355
|
+
page: number;
|
|
356
|
+
totalPages: number;
|
|
357
|
+
onPageChange: (page: number) => void;
|
|
358
|
+
siblingCount?: number;
|
|
359
|
+
className?: string;
|
|
360
|
+
}
|
|
361
|
+
declare function Pagination({ page, totalPages, onPageChange, siblingCount, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
362
|
+
|
|
363
|
+
interface BreadcrumbItem {
|
|
364
|
+
label: string;
|
|
365
|
+
href?: string;
|
|
366
|
+
}
|
|
367
|
+
interface BreadcrumbsProps {
|
|
368
|
+
items: BreadcrumbItem[];
|
|
369
|
+
separator?: ReactNode;
|
|
370
|
+
linkComponent?: ElementType;
|
|
371
|
+
className?: string;
|
|
372
|
+
}
|
|
373
|
+
declare function Breadcrumbs({ items, separator, linkComponent, className, }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
374
|
+
|
|
375
|
+
interface ToolbarSelectOption {
|
|
376
|
+
label: string;
|
|
377
|
+
value: string;
|
|
378
|
+
meta?: string;
|
|
379
|
+
}
|
|
380
|
+
interface ToolbarSelectProps {
|
|
381
|
+
options: ToolbarSelectOption[];
|
|
382
|
+
value?: string;
|
|
383
|
+
defaultValue?: string;
|
|
384
|
+
onChange?: (value: string) => void;
|
|
385
|
+
/** Dropdown opens downward instead of upward */
|
|
386
|
+
dropDown?: boolean;
|
|
387
|
+
/** Minimum width of the trigger */
|
|
388
|
+
minWidth?: number;
|
|
389
|
+
className?: string;
|
|
390
|
+
}
|
|
391
|
+
interface ToolbarProps extends HTMLAttributes<HTMLDivElement> {
|
|
392
|
+
/** Fixed position on the viewport */
|
|
393
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
394
|
+
/** If true, uses position: fixed */
|
|
395
|
+
fixed?: boolean;
|
|
396
|
+
children?: ReactNode;
|
|
397
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
398
|
+
}
|
|
399
|
+
declare function ToolbarSelect({ options, value: controlledValue, defaultValue, onChange, dropDown, minWidth, className, }: ToolbarSelectProps): react_jsx_runtime.JSX.Element;
|
|
400
|
+
declare function ToolbarLabel({ children, className, ...props }: HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
401
|
+
declare function ToolbarDivider({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
402
|
+
declare function ToolbarRoot({ position, fixed, children, className, ref, ...props }: ToolbarProps): react_jsx_runtime.JSX.Element;
|
|
403
|
+
declare const Toolbar: typeof ToolbarRoot & {
|
|
404
|
+
Label: typeof ToolbarLabel;
|
|
405
|
+
Select: typeof ToolbarSelect;
|
|
406
|
+
Divider: typeof ToolbarDivider;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
interface SidenavProps extends HTMLAttributes<HTMLElement> {
|
|
410
|
+
iconPosition?: 'left' | 'right';
|
|
411
|
+
borderSide?: 'left' | 'right';
|
|
412
|
+
ref?: Ref<HTMLElement>;
|
|
413
|
+
}
|
|
414
|
+
declare function SidenavRoot({ iconPosition, borderSide, className, children, ref, ...props }: SidenavProps): react_jsx_runtime.JSX.Element;
|
|
415
|
+
type SidenavItemOwnProps = {
|
|
416
|
+
active?: boolean;
|
|
417
|
+
};
|
|
418
|
+
type SidenavItemProps<E extends ElementType = 'a'> = PolymorphicProps<E, SidenavItemOwnProps>;
|
|
419
|
+
declare function Item({ as, active, className, children, ref, ...props }: SidenavItemProps<ElementType> & {
|
|
420
|
+
ref?: Ref<any>;
|
|
421
|
+
}): react_jsx_runtime.JSX.Element;
|
|
422
|
+
interface SidenavIconProps extends HTMLAttributes<HTMLSpanElement> {
|
|
423
|
+
ref?: Ref<HTMLSpanElement>;
|
|
424
|
+
}
|
|
425
|
+
declare function Icon({ className, ref, ...props }: SidenavIconProps): react_jsx_runtime.JSX.Element;
|
|
426
|
+
interface SidenavGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
427
|
+
label: string;
|
|
428
|
+
icon?: ReactNode;
|
|
429
|
+
defaultOpen?: boolean;
|
|
430
|
+
open?: boolean;
|
|
431
|
+
onOpenChange?: (open: boolean) => void;
|
|
432
|
+
children: ReactNode;
|
|
433
|
+
ref?: Ref<HTMLDivElement>;
|
|
434
|
+
}
|
|
435
|
+
declare function Group({ label, icon, defaultOpen, open: controlledOpen, onOpenChange, className, children, ref, ...props }: SidenavGroupProps): react_jsx_runtime.JSX.Element;
|
|
436
|
+
declare const Sidenav: typeof SidenavRoot & {
|
|
437
|
+
Item: typeof Item;
|
|
438
|
+
Icon: typeof Icon;
|
|
439
|
+
Group: typeof Group;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
interface CodeBlockProps extends HTMLAttributes<HTMLDivElement> {
|
|
443
|
+
children: ReactNode;
|
|
444
|
+
copyText?: string;
|
|
445
|
+
ref?: Ref<HTMLDivElement>;
|
|
446
|
+
}
|
|
447
|
+
declare function CodeBlock({ children, copyText, className, ref, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
|
|
449
|
+
type Theme = 'dark' | 'light';
|
|
450
|
+
type Contrast = 'enhanced' | 'high';
|
|
451
|
+
interface ThemeContextValue {
|
|
452
|
+
theme: Theme;
|
|
453
|
+
setTheme: (theme: Theme) => void;
|
|
454
|
+
contrast: Contrast;
|
|
455
|
+
setContrast: (contrast: Contrast) => void;
|
|
456
|
+
toggleTheme: () => void;
|
|
457
|
+
}
|
|
458
|
+
interface ThemeProviderProps {
|
|
459
|
+
theme?: Theme;
|
|
460
|
+
contrast?: Contrast;
|
|
461
|
+
defaultTheme?: Theme;
|
|
462
|
+
defaultContrast?: Contrast;
|
|
463
|
+
onThemeChange?: (theme: Theme) => void;
|
|
464
|
+
onContrastChange?: (contrast: Contrast) => void;
|
|
465
|
+
children: ReactNode;
|
|
466
|
+
}
|
|
467
|
+
declare function useTheme(): ThemeContextValue;
|
|
468
|
+
declare function ThemeProvider({ theme: controlledTheme, contrast: controlledContrast, defaultTheme, defaultContrast, onThemeChange, onContrastChange, children, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
469
|
+
|
|
470
|
+
interface UseDisclosureOptions {
|
|
471
|
+
defaultOpen?: boolean;
|
|
472
|
+
onOpen?: () => void;
|
|
473
|
+
onClose?: () => void;
|
|
474
|
+
}
|
|
475
|
+
interface UseDisclosureReturn {
|
|
476
|
+
isOpen: boolean;
|
|
477
|
+
onOpen: () => void;
|
|
478
|
+
onClose: () => void;
|
|
479
|
+
onToggle: () => void;
|
|
480
|
+
}
|
|
481
|
+
declare function useDisclosure(options?: UseDisclosureOptions): UseDisclosureReturn;
|
|
482
|
+
|
|
483
|
+
declare function useFocusTrap(ref: React.RefObject<HTMLElement | null>, active: boolean): void;
|
|
484
|
+
|
|
485
|
+
interface UseKeyboardNavOptions {
|
|
486
|
+
orientation?: 'horizontal' | 'vertical';
|
|
487
|
+
loop?: boolean;
|
|
488
|
+
onSelect?: (index: number) => void;
|
|
489
|
+
}
|
|
490
|
+
interface UseKeyboardNavReturn {
|
|
491
|
+
activeIndex: number;
|
|
492
|
+
setActiveIndex: (index: number) => void;
|
|
493
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
494
|
+
}
|
|
495
|
+
declare function useKeyboardNav(items: React.RefObject<(HTMLElement | null)[]>, options?: UseKeyboardNavOptions): UseKeyboardNavReturn;
|
|
496
|
+
|
|
497
|
+
declare function useReducedMotion(): boolean;
|
|
498
|
+
|
|
499
|
+
declare function useMergedRef<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
|
|
500
|
+
|
|
501
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
502
|
+
|
|
503
|
+
interface SafePortalProps {
|
|
504
|
+
children: ReactNode;
|
|
505
|
+
target?: Element | null;
|
|
506
|
+
}
|
|
507
|
+
declare function SafePortal({ children, target }: SafePortalProps): react.ReactPortal | null;
|
|
508
|
+
|
|
509
|
+
export { Badge, type BadgeProps, Battery, BatteryInline, type BatteryInlineProps, type BatteryProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Contrast, CornerBrackets, type CornerBracketsProps, Input, type InputProps, Modal, type ModalProps, NavDropdown, type NavDropdownItem, type NavDropdownProps, Pagination, type PaginationProps, type PolymorphicProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, SafePortal, Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, Sidenav, type SidenavGroupProps, type SidenavIconProps, type SidenavItemProps, type SidenavProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Table, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TitleLine, type TitleLineProps, type ToastEntry, type ToastOptions, Toaster, type ToasterProps, Toggle, type ToggleProps, Toolbar, type ToolbarProps, type ToolbarSelectOption, type ToolbarSelectProps, Tooltip, type TooltipProps, cn, createToast as toast, useDisclosure, useFocusTrap, useKeyboardNav, useMergedRef, useReducedMotion, useTheme };
|