@raxrai/stylelab-ui 0.3.2 → 0.4.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.
- package/README.md +18 -3
- package/dist/index.cjs +534 -516
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +163 -55
- package/dist/index.d.ts +163 -55
- package/dist/index.mjs +423 -403
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, HTMLAttributes, ElementType, AnchorHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, RefObject } from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, ElementType, AnchorHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, Ref, RefCallback, RefObject } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
@@ -28,9 +28,15 @@ type AccordionProps = {
|
|
|
28
28
|
style?: React.CSSProperties;
|
|
29
29
|
theme?: StyleLabTheme;
|
|
30
30
|
};
|
|
31
|
-
declare
|
|
31
|
+
declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
|
|
33
33
|
type AlertIntent = "default" | "info" | "success" | "warning" | "danger";
|
|
34
|
+
type AlertProps = HTMLAttributes<HTMLDivElement> & {
|
|
35
|
+
intent?: AlertIntent;
|
|
36
|
+
title?: ReactNode;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
theme?: StyleLabTheme;
|
|
39
|
+
};
|
|
34
40
|
declare const Alert: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
35
41
|
intent?: AlertIntent;
|
|
36
42
|
title?: ReactNode;
|
|
@@ -38,6 +44,13 @@ declare const Alert: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivEleme
|
|
|
38
44
|
theme?: StyleLabTheme;
|
|
39
45
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
40
46
|
|
|
47
|
+
type AvatarProps = HTMLAttributes<HTMLDivElement> & {
|
|
48
|
+
src?: string | null;
|
|
49
|
+
alt?: string;
|
|
50
|
+
/** Fallback when no image: initials (e.g. "JD") or any string */
|
|
51
|
+
fallback?: string;
|
|
52
|
+
theme?: StyleLabTheme;
|
|
53
|
+
};
|
|
41
54
|
declare const Avatar: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
42
55
|
src?: string | null;
|
|
43
56
|
alt?: string;
|
|
@@ -52,6 +65,17 @@ type AvatarGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
52
65
|
};
|
|
53
66
|
declare function AvatarGroup({ children, max, className, theme: themeProp, ...props }: AvatarGroupProps): react.JSX.Element;
|
|
54
67
|
|
|
68
|
+
declare const badgeVariants: (props?: ({
|
|
69
|
+
variant?: "default" | "success" | "warning" | "error" | null | undefined;
|
|
70
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
71
|
+
type BadgeProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants> & {
|
|
72
|
+
dot?: boolean;
|
|
73
|
+
theme?: StyleLabTheme;
|
|
74
|
+
/** Override background (e.g. hex) when you need a specific color. */
|
|
75
|
+
bgOverride?: string;
|
|
76
|
+
/** Override text color (e.g. hex). */
|
|
77
|
+
textOverride?: string;
|
|
78
|
+
};
|
|
55
79
|
declare const Badge: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
56
80
|
variant?: "default" | "success" | "warning" | "error" | null | undefined;
|
|
57
81
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
@@ -63,11 +87,11 @@ declare const Badge: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElem
|
|
|
63
87
|
textOverride?: string;
|
|
64
88
|
} & react.RefAttributes<HTMLSpanElement>>;
|
|
65
89
|
|
|
66
|
-
declare
|
|
90
|
+
declare const BentoGrid: react.ForwardRefExoticComponent<{
|
|
67
91
|
children: React.ReactNode;
|
|
68
92
|
className?: string;
|
|
69
93
|
style?: React.CSSProperties;
|
|
70
|
-
}
|
|
94
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
71
95
|
|
|
72
96
|
type BreadcrumbItem = {
|
|
73
97
|
label: ReactNode;
|
|
@@ -77,9 +101,10 @@ type BreadcrumbsProps = {
|
|
|
77
101
|
items: BreadcrumbItem[];
|
|
78
102
|
separator?: ReactNode;
|
|
79
103
|
className?: string;
|
|
104
|
+
style?: React.CSSProperties;
|
|
80
105
|
theme?: StyleLabTheme;
|
|
81
106
|
};
|
|
82
|
-
declare
|
|
107
|
+
declare const Breadcrumbs: react.ForwardRefExoticComponent<BreadcrumbsProps & react.RefAttributes<HTMLElement>>;
|
|
83
108
|
|
|
84
109
|
declare const buttonVariants: (props?: ({
|
|
85
110
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -108,9 +133,10 @@ type CalendarProps = {
|
|
|
108
133
|
min?: Date;
|
|
109
134
|
max?: Date;
|
|
110
135
|
className?: string;
|
|
136
|
+
style?: React.CSSProperties;
|
|
111
137
|
theme?: StyleLabTheme;
|
|
112
138
|
};
|
|
113
|
-
declare
|
|
139
|
+
declare const Calendar: react.ForwardRefExoticComponent<CalendarProps & react.RefAttributes<HTMLDivElement>>;
|
|
114
140
|
|
|
115
141
|
declare const cardVariants: (props?: ({
|
|
116
142
|
padding?: "none" | "sm" | "md" | null | undefined;
|
|
@@ -138,6 +164,23 @@ declare const Card: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElemen
|
|
|
138
164
|
classNames?: CardClassNames;
|
|
139
165
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
140
166
|
|
|
167
|
+
type CommandItem = {
|
|
168
|
+
id: string;
|
|
169
|
+
label: string;
|
|
170
|
+
shortcut?: string;
|
|
171
|
+
onSelect: () => void;
|
|
172
|
+
};
|
|
173
|
+
type CommandPaletteProps = {
|
|
174
|
+
open: boolean;
|
|
175
|
+
onClose: () => void;
|
|
176
|
+
commands: CommandItem[];
|
|
177
|
+
placeholder?: string;
|
|
178
|
+
className?: string;
|
|
179
|
+
style?: React.CSSProperties;
|
|
180
|
+
theme?: StyleLabTheme;
|
|
181
|
+
};
|
|
182
|
+
declare const CommandPalette: react.ForwardRefExoticComponent<CommandPaletteProps & react.RefAttributes<HTMLDivElement>>;
|
|
183
|
+
|
|
141
184
|
type DashboardNavItem = {
|
|
142
185
|
href: string;
|
|
143
186
|
label: string;
|
|
@@ -152,23 +195,26 @@ type DashboardShellProps = {
|
|
|
152
195
|
onLogout?: () => void;
|
|
153
196
|
logo?: ReactNode;
|
|
154
197
|
className?: string;
|
|
198
|
+
style?: React.CSSProperties;
|
|
155
199
|
};
|
|
156
|
-
declare
|
|
200
|
+
declare const DashboardShell: react.ForwardRefExoticComponent<DashboardShellProps & react.RefAttributes<HTMLDivElement>>;
|
|
157
201
|
|
|
158
|
-
type
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
onSelect: () => void;
|
|
202
|
+
type Column<T> = {
|
|
203
|
+
key: keyof T | string;
|
|
204
|
+
header: string;
|
|
205
|
+
render?: (row: T) => React.ReactNode;
|
|
163
206
|
};
|
|
164
|
-
type
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
207
|
+
type DataTableProps<T extends Record<string, unknown>> = {
|
|
208
|
+
columns: Column<T>[];
|
|
209
|
+
data: T[];
|
|
210
|
+
/** Return a unique key for each row (e.g. row.id). Defaults to row index. */
|
|
211
|
+
getRowKey?: (row: T, index: number) => string | number;
|
|
212
|
+
className?: string;
|
|
213
|
+
style?: React.CSSProperties;
|
|
170
214
|
};
|
|
171
|
-
declare
|
|
215
|
+
declare const DataTable: <T extends Record<string, unknown>>(props: DataTableProps<T> & {
|
|
216
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
217
|
+
}) => React.ReactElement;
|
|
172
218
|
|
|
173
219
|
type DocumentAccordionProps = {
|
|
174
220
|
title: ReactNode;
|
|
@@ -184,20 +230,6 @@ type DocumentAccordionProps = {
|
|
|
184
230
|
};
|
|
185
231
|
declare function DocumentAccordion({ title, content, pdfUrl, defaultOpen, className, theme: themeProp, }: DocumentAccordionProps): react.JSX.Element;
|
|
186
232
|
|
|
187
|
-
type Column<T> = {
|
|
188
|
-
key: keyof T | string;
|
|
189
|
-
header: string;
|
|
190
|
-
render?: (row: T) => React.ReactNode;
|
|
191
|
-
};
|
|
192
|
-
declare function DataTable<T extends Record<string, unknown>>({ columns, data, getRowKey, className, style, }: {
|
|
193
|
-
columns: Column<T>[];
|
|
194
|
-
data: T[];
|
|
195
|
-
/** Return a unique key for each row (e.g. row.id). Defaults to row index. */
|
|
196
|
-
getRowKey?: (row: T, index: number) => string | number;
|
|
197
|
-
className?: string;
|
|
198
|
-
style?: React.CSSProperties;
|
|
199
|
-
}): react.JSX.Element;
|
|
200
|
-
|
|
201
233
|
type DropdownItem = {
|
|
202
234
|
value: string;
|
|
203
235
|
label: ReactNode;
|
|
@@ -225,19 +257,35 @@ type DropdownProps = {
|
|
|
225
257
|
/** Slot classNames for trigger, popover, and item. */
|
|
226
258
|
classNames?: DropdownClassNames;
|
|
227
259
|
};
|
|
228
|
-
declare
|
|
260
|
+
declare const Dropdown: react.ForwardRefExoticComponent<DropdownProps & react.RefAttributes<HTMLDivElement>>;
|
|
229
261
|
|
|
230
262
|
type FlashcardProps = {
|
|
231
263
|
question: string;
|
|
232
264
|
answer: string;
|
|
233
265
|
} & HTMLAttributes<HTMLDivElement>;
|
|
234
|
-
declare
|
|
266
|
+
declare const Flashcard: react.ForwardRefExoticComponent<{
|
|
267
|
+
question: string;
|
|
268
|
+
answer: string;
|
|
269
|
+
} & HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
235
270
|
|
|
236
271
|
type GraphicCardProps = {
|
|
237
272
|
children: ReactNode;
|
|
238
273
|
} & HTMLAttributes<HTMLDivElement>;
|
|
239
|
-
declare
|
|
274
|
+
declare const GraphicCard: react.ForwardRefExoticComponent<{
|
|
275
|
+
children: ReactNode;
|
|
276
|
+
} & HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
240
277
|
|
|
278
|
+
declare const inputVariants: (props?: ({
|
|
279
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
280
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
281
|
+
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps<typeof inputVariants> & {
|
|
282
|
+
label?: string;
|
|
283
|
+
error?: string;
|
|
284
|
+
helperText?: string;
|
|
285
|
+
prefix?: ReactNode;
|
|
286
|
+
suffix?: ReactNode;
|
|
287
|
+
theme?: StyleLabTheme;
|
|
288
|
+
};
|
|
241
289
|
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps<(props?: ({
|
|
242
290
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
243
291
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
@@ -262,7 +310,18 @@ type ModalProps = VariantProps<typeof modalVariants> & {
|
|
|
262
310
|
children?: ReactNode;
|
|
263
311
|
theme?: StyleLabTheme;
|
|
264
312
|
};
|
|
265
|
-
declare
|
|
313
|
+
declare const Modal: react.ForwardRefExoticComponent<VariantProps<(props?: ({
|
|
314
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
315
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
316
|
+
open: boolean;
|
|
317
|
+
onClose: () => void;
|
|
318
|
+
title?: string;
|
|
319
|
+
size?: "sm" | "md" | "lg";
|
|
320
|
+
className?: string;
|
|
321
|
+
style?: React.CSSProperties;
|
|
322
|
+
children?: ReactNode;
|
|
323
|
+
theme?: StyleLabTheme;
|
|
324
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
266
325
|
|
|
267
326
|
type NavbarItem = {
|
|
268
327
|
href: string;
|
|
@@ -277,10 +336,12 @@ type NavbarProps = {
|
|
|
277
336
|
items?: NavbarItem[];
|
|
278
337
|
/** Optional slot for right side (e.g. theme switcher, user menu). Shown after nav items on desktop, in header row on mobile. */
|
|
279
338
|
right?: ReactNode;
|
|
339
|
+
/** Optional content shown only in the mobile hamburger menu (e.g. Log out button). Rendered at the bottom of the overlay; clicking it closes the menu. */
|
|
340
|
+
mobileMenuExtra?: ReactNode;
|
|
280
341
|
className?: string;
|
|
281
342
|
style?: React.CSSProperties;
|
|
282
343
|
};
|
|
283
|
-
declare
|
|
344
|
+
declare const Navbar: react.ForwardRefExoticComponent<NavbarProps & react.RefAttributes<HTMLElement>>;
|
|
284
345
|
|
|
285
346
|
type Tier = {
|
|
286
347
|
name: string;
|
|
@@ -290,12 +351,12 @@ type Tier = {
|
|
|
290
351
|
cta: string;
|
|
291
352
|
highlighted?: boolean;
|
|
292
353
|
};
|
|
293
|
-
declare
|
|
354
|
+
declare const PricingCard: react.ForwardRefExoticComponent<{
|
|
294
355
|
tier: Tier;
|
|
295
356
|
onSelect?: () => void;
|
|
296
357
|
className?: string;
|
|
297
358
|
style?: React.CSSProperties;
|
|
298
|
-
}
|
|
359
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
299
360
|
|
|
300
361
|
type ProgressBarProps = {
|
|
301
362
|
value: number;
|
|
@@ -303,32 +364,52 @@ type ProgressBarProps = {
|
|
|
303
364
|
segmented?: boolean;
|
|
304
365
|
className?: string;
|
|
305
366
|
style?: React.CSSProperties;
|
|
367
|
+
/** Accessible label for the progress bar (e.g. "Loading" or "Upload progress"). */
|
|
368
|
+
"aria-label"?: string;
|
|
306
369
|
/** Override track background (e.g. hex). */
|
|
307
370
|
trackColor?: string;
|
|
308
371
|
/** Override fill/active bar color (e.g. hex). */
|
|
309
372
|
activeColor?: string;
|
|
310
373
|
};
|
|
311
|
-
declare
|
|
374
|
+
declare const ProgressBar: react.ForwardRefExoticComponent<ProgressBarProps & react.RefAttributes<HTMLDivElement>>;
|
|
312
375
|
|
|
313
|
-
declare
|
|
376
|
+
declare const SectionHeader: react.ForwardRefExoticComponent<{
|
|
314
377
|
title: string;
|
|
315
378
|
subtitle?: string;
|
|
316
379
|
className?: string;
|
|
317
380
|
style?: React.CSSProperties;
|
|
318
|
-
}
|
|
381
|
+
} & react.RefAttributes<HTMLElement>>;
|
|
319
382
|
|
|
320
|
-
declare
|
|
383
|
+
declare const Sidebar: react.ForwardRefExoticComponent<{
|
|
321
384
|
children: React.ReactNode;
|
|
322
385
|
className?: string;
|
|
323
386
|
style?: React.CSSProperties;
|
|
324
|
-
}
|
|
387
|
+
} & react.RefAttributes<HTMLElement>>;
|
|
325
388
|
|
|
389
|
+
declare const skeletonVariants: (props?: ({
|
|
390
|
+
variant?: "circle" | "text" | "rectangle" | null | undefined;
|
|
391
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
392
|
+
type SkeletonProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof skeletonVariants> & {
|
|
393
|
+
theme?: StyleLabTheme;
|
|
394
|
+
};
|
|
326
395
|
declare const Skeleton: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
327
396
|
variant?: "circle" | "text" | "rectangle" | null | undefined;
|
|
328
397
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
329
398
|
theme?: StyleLabTheme;
|
|
330
399
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
331
400
|
|
|
401
|
+
declare const sliderVariants: (props?: ({
|
|
402
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
403
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
404
|
+
type SliderProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size"> & VariantProps<typeof sliderVariants> & {
|
|
405
|
+
min?: number;
|
|
406
|
+
max?: number;
|
|
407
|
+
step?: number;
|
|
408
|
+
value?: number;
|
|
409
|
+
defaultValue?: number;
|
|
410
|
+
onValueChange?: (value: number) => void;
|
|
411
|
+
theme?: StyleLabTheme;
|
|
412
|
+
};
|
|
332
413
|
declare const Slider: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "onChange" | "size" | "defaultValue"> & VariantProps<(props?: ({
|
|
333
414
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
334
415
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
@@ -341,7 +422,7 @@ declare const Slider: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<H
|
|
|
341
422
|
theme?: StyleLabTheme;
|
|
342
423
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
343
424
|
|
|
344
|
-
declare
|
|
425
|
+
declare const StatsCard: react.ForwardRefExoticComponent<{
|
|
345
426
|
label: string;
|
|
346
427
|
value: string | number;
|
|
347
428
|
trend?: {
|
|
@@ -350,7 +431,7 @@ declare function StatsCard({ label, value, trend, className, style, }: {
|
|
|
350
431
|
};
|
|
351
432
|
className?: string;
|
|
352
433
|
style?: React.CSSProperties;
|
|
353
|
-
}
|
|
434
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
354
435
|
|
|
355
436
|
declare const tabsListVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
356
437
|
type TabItem = {
|
|
@@ -367,14 +448,22 @@ type TabsProps = VariantProps<typeof tabsListVariants> & {
|
|
|
367
448
|
style?: React.CSSProperties;
|
|
368
449
|
theme?: StyleLabTheme;
|
|
369
450
|
};
|
|
370
|
-
declare
|
|
451
|
+
declare const Tabs: react.ForwardRefExoticComponent<VariantProps<(props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
452
|
+
items: TabItem[];
|
|
453
|
+
defaultValue?: string;
|
|
454
|
+
value?: string;
|
|
455
|
+
onValueChange?: (value: string) => void;
|
|
456
|
+
className?: string;
|
|
457
|
+
style?: React.CSSProperties;
|
|
458
|
+
theme?: StyleLabTheme;
|
|
459
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
371
460
|
|
|
372
|
-
declare
|
|
461
|
+
declare const Terminal: react.ForwardRefExoticComponent<{
|
|
373
462
|
title?: string;
|
|
374
463
|
children: React.ReactNode;
|
|
375
464
|
className?: string;
|
|
376
465
|
style?: React.CSSProperties;
|
|
377
|
-
}
|
|
466
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
378
467
|
|
|
379
468
|
type TimelineItem = {
|
|
380
469
|
title: ReactNode;
|
|
@@ -384,17 +473,25 @@ type TimelineItem = {
|
|
|
384
473
|
type TimelineProps = {
|
|
385
474
|
items: TimelineItem[];
|
|
386
475
|
className?: string;
|
|
476
|
+
style?: React.CSSProperties;
|
|
387
477
|
theme?: StyleLabTheme;
|
|
388
478
|
};
|
|
389
|
-
declare
|
|
479
|
+
declare const Timeline: react.ForwardRefExoticComponent<TimelineProps & react.RefAttributes<HTMLDivElement>>;
|
|
390
480
|
|
|
391
|
-
declare
|
|
481
|
+
declare const Toast: react.ForwardRefExoticComponent<{
|
|
392
482
|
message: string;
|
|
393
483
|
onDismiss: () => void;
|
|
394
484
|
className?: string;
|
|
395
485
|
style?: React.CSSProperties;
|
|
396
|
-
}
|
|
486
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
397
487
|
|
|
488
|
+
declare const toggleVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
489
|
+
type ToggleProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "onChange"> & VariantProps<typeof toggleVariants> & {
|
|
490
|
+
checked?: boolean;
|
|
491
|
+
defaultChecked?: boolean;
|
|
492
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
493
|
+
theme?: StyleLabTheme;
|
|
494
|
+
};
|
|
398
495
|
declare const Toggle: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "onChange" | "size"> & VariantProps<(props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
399
496
|
checked?: boolean;
|
|
400
497
|
defaultChecked?: boolean;
|
|
@@ -411,7 +508,14 @@ type TooltipProps = VariantProps<typeof tooltipVariants> & {
|
|
|
411
508
|
style?: React.CSSProperties;
|
|
412
509
|
theme?: StyleLabTheme;
|
|
413
510
|
};
|
|
414
|
-
declare
|
|
511
|
+
declare const Tooltip: react.ForwardRefExoticComponent<VariantProps<(props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
512
|
+
content: ReactNode;
|
|
513
|
+
children: ReactNode;
|
|
514
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
515
|
+
className?: string;
|
|
516
|
+
style?: React.CSSProperties;
|
|
517
|
+
theme?: StyleLabTheme;
|
|
518
|
+
} & react.RefAttributes<HTMLSpanElement>>;
|
|
415
519
|
|
|
416
520
|
type ThemeContextValue = {
|
|
417
521
|
theme: StyleLabTheme;
|
|
@@ -457,6 +561,10 @@ declare const THEME_RECOMMENDATIONS: Record<StyleLabTheme, ThemeRecommendation>;
|
|
|
457
561
|
* Use for all component className composition.
|
|
458
562
|
*/
|
|
459
563
|
declare function cn(...inputs: ClassValue[]): string;
|
|
564
|
+
/**
|
|
565
|
+
* Merges multiple refs (e.g. forwardRef + internal ref) into a single callback ref.
|
|
566
|
+
*/
|
|
567
|
+
declare function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
|
|
460
568
|
|
|
461
569
|
/**
|
|
462
570
|
* Traps focus within the container element while active.
|
|
@@ -493,4 +601,4 @@ declare function useKeyboardNavigation(options: {
|
|
|
493
601
|
*/
|
|
494
602
|
declare function getNextListIndex(current: number, direction: "up" | "down", length: number): number;
|
|
495
603
|
|
|
496
|
-
export { Accordion, Alert, Avatar, AvatarGroup, Badge, BentoGrid, Breadcrumbs, Button, Calendar, Card, type CardClassNames, type CardProps, CommandPalette, type ComponentName, DashboardShell, DataTable, DocumentAccordion, Dropdown, type DropdownClassNames, type DropdownItem, type DropdownProps, Flashcard, GraphicCard, Input, Modal, Navbar, type NavbarItem, type NavbarProps, PricingCard, ProgressBar, SectionHeader, Sidebar, Skeleton, Slider, StatsCard, type StyleLabTheme, THEMES, THEME_BACKGROUNDS, THEME_NAVBAR, THEME_RECOMMENDATIONS, Tabs, Terminal, ThemeProvider, type ThemeRecommendation, Timeline, Toast, Toggle, Tooltip, cn, getNextListIndex, getThemeClass, useClickOutside, useFocusTrap, useKeyboardNavigation, useTheme };
|
|
604
|
+
export { Accordion, type AccordionItem, type AccordionProps, Alert, type AlertIntent, type AlertProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BentoGrid, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, type CardClassNames, type CardProps, CommandPalette, type CommandPaletteProps, type ComponentName, type DashboardNavItem, DashboardShell, type DashboardShellProps, DataTable, type DataTableProps, DocumentAccordion, type DocumentAccordionProps, Dropdown, type DropdownClassNames, type DropdownItem, type DropdownProps, Flashcard, type FlashcardProps, GraphicCard, type GraphicCardProps, Input, type InputProps, Modal, type ModalProps, Navbar, type NavbarItem, type NavbarProps, PricingCard, ProgressBar, type ProgressBarProps, SectionHeader, Sidebar, Skeleton, type SkeletonProps, Slider, type SliderProps, StatsCard, type StyleLabTheme, THEMES, THEME_BACKGROUNDS, THEME_NAVBAR, THEME_RECOMMENDATIONS, type TabItem, Tabs, type TabsProps, Terminal, ThemeProvider, type ThemeRecommendation, Timeline, type TimelineItem, type TimelineProps, Toast, Toggle, type ToggleProps, Tooltip, type TooltipProps, cn, getNextListIndex, getThemeClass, mergeRefs, useClickOutside, useFocusTrap, useKeyboardNavigation, useTheme };
|