@raxrai/stylelab-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/README.md +220 -0
- package/dist/index.cjs +13901 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +418 -0
- package/dist/index.d.ts +418 -0
- package/dist/index.mjs +13875 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -0
- package/styles/stylelab.css +107 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, ElementType, AnchorHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, RefObject } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { ClassValue } from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* StyleLab Theme Resolver
|
|
9
|
+
* Maps component + variant to theme-specific class names.
|
|
10
|
+
*/
|
|
11
|
+
type StyleLabTheme = "minimal" | "night" | "glass" | "neubrutal" | "clay" | "cyberpunk" | "retro" | "motion";
|
|
12
|
+
type ComponentName = "button" | "input" | "toggle" | "badge" | "slider" | "tabs" | "card" | "bento" | "navbar" | "sidebar" | "sectionHeader" | "modal" | "toast" | "progress" | "tooltip" | "dataTable" | "pricingCard" | "terminal" | "statsCard" | "commandPalette" | "accordion" | "skeleton" | "avatar" | "breadcrumbs" | "alert" | "calendar" | "timeline";
|
|
13
|
+
type Variant = string;
|
|
14
|
+
declare function getThemeClass(theme: StyleLabTheme, component: ComponentName, variant?: Variant): string;
|
|
15
|
+
declare const THEMES: StyleLabTheme[];
|
|
16
|
+
|
|
17
|
+
type AccordionItem = {
|
|
18
|
+
id: string;
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
content: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
type AccordionProps = {
|
|
23
|
+
items: AccordionItem[];
|
|
24
|
+
allowMultiple?: boolean;
|
|
25
|
+
/** Optional ids that should be open by default. */
|
|
26
|
+
defaultOpenIds?: string[];
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
theme?: StyleLabTheme;
|
|
30
|
+
};
|
|
31
|
+
declare function Accordion({ items, allowMultiple, defaultOpenIds, className, style, theme: themeProp, }: AccordionProps): react.JSX.Element;
|
|
32
|
+
|
|
33
|
+
type AlertIntent = "default" | "info" | "success" | "warning" | "danger";
|
|
34
|
+
declare const Alert: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
35
|
+
intent?: AlertIntent;
|
|
36
|
+
title?: ReactNode;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
theme?: StyleLabTheme;
|
|
39
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
|
|
41
|
+
declare const Avatar: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
42
|
+
src?: string | null;
|
|
43
|
+
alt?: string;
|
|
44
|
+
/** Fallback when no image: initials (e.g. "JD") or any string */
|
|
45
|
+
fallback?: string;
|
|
46
|
+
theme?: StyleLabTheme;
|
|
47
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
type AvatarGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
max?: number;
|
|
51
|
+
theme?: StyleLabTheme;
|
|
52
|
+
};
|
|
53
|
+
declare function AvatarGroup({ children, max, className, theme: themeProp, ...props }: AvatarGroupProps): react.JSX.Element;
|
|
54
|
+
|
|
55
|
+
declare const Badge: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
56
|
+
variant?: "default" | "success" | "warning" | "error" | null | undefined;
|
|
57
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
58
|
+
dot?: boolean;
|
|
59
|
+
theme?: StyleLabTheme;
|
|
60
|
+
} & react.RefAttributes<HTMLSpanElement>>;
|
|
61
|
+
|
|
62
|
+
declare function BentoGrid({ children, className, style, }: {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
className?: string;
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
}): react.JSX.Element;
|
|
67
|
+
|
|
68
|
+
type BreadcrumbItem = {
|
|
69
|
+
label: ReactNode;
|
|
70
|
+
href?: string;
|
|
71
|
+
};
|
|
72
|
+
type BreadcrumbsProps = {
|
|
73
|
+
items: BreadcrumbItem[];
|
|
74
|
+
separator?: ReactNode;
|
|
75
|
+
className?: string;
|
|
76
|
+
theme?: StyleLabTheme;
|
|
77
|
+
};
|
|
78
|
+
declare function Breadcrumbs({ items, separator, className, theme: themeProp, }: BreadcrumbsProps): react.JSX.Element;
|
|
79
|
+
|
|
80
|
+
declare const buttonVariants: (props?: ({
|
|
81
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
82
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
83
|
+
type ButtonVariant = "primary" | "secondary" | "ghost";
|
|
84
|
+
type ButtonProps<T extends ElementType = "button"> = {
|
|
85
|
+
as?: T;
|
|
86
|
+
variant?: ButtonVariant;
|
|
87
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
88
|
+
/** @deprecated Use isLoading */
|
|
89
|
+
loading?: boolean;
|
|
90
|
+
isLoading?: boolean;
|
|
91
|
+
leftIcon?: ReactNode;
|
|
92
|
+
rightIcon?: ReactNode;
|
|
93
|
+
className?: string;
|
|
94
|
+
children?: ReactNode;
|
|
95
|
+
} & (T extends "a" ? AnchorHTMLAttributes<HTMLAnchorElement> : ButtonHTMLAttributes<HTMLButtonElement>);
|
|
96
|
+
declare const Button: <T extends ElementType = "button">(props: ButtonProps<T> & {
|
|
97
|
+
ref?: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>;
|
|
98
|
+
}) => React.ReactElement;
|
|
99
|
+
|
|
100
|
+
type CalendarProps = {
|
|
101
|
+
value?: Date | null;
|
|
102
|
+
defaultValue?: Date | null;
|
|
103
|
+
onSelect?: (date: Date) => void;
|
|
104
|
+
min?: Date;
|
|
105
|
+
max?: Date;
|
|
106
|
+
className?: string;
|
|
107
|
+
theme?: StyleLabTheme;
|
|
108
|
+
};
|
|
109
|
+
declare function Calendar({ value: controlledValue, defaultValue, onSelect, min, max, className, theme: themeProp, }: CalendarProps): react.JSX.Element;
|
|
110
|
+
|
|
111
|
+
declare const Card: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
112
|
+
padding?: "none" | "sm" | "md" | null | undefined;
|
|
113
|
+
isHoverable?: boolean | null | undefined;
|
|
114
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
115
|
+
header?: ReactNode;
|
|
116
|
+
footer?: ReactNode;
|
|
117
|
+
theme?: StyleLabTheme;
|
|
118
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
119
|
+
|
|
120
|
+
type DashboardNavItem = {
|
|
121
|
+
href: string;
|
|
122
|
+
label: string;
|
|
123
|
+
};
|
|
124
|
+
type DashboardShellProps = {
|
|
125
|
+
children: ReactNode;
|
|
126
|
+
navItems: DashboardNavItem[];
|
|
127
|
+
adminNavItems?: DashboardNavItem[];
|
|
128
|
+
currentPath?: string;
|
|
129
|
+
userEmail?: string;
|
|
130
|
+
userRole?: string;
|
|
131
|
+
onLogout?: () => void;
|
|
132
|
+
logo?: ReactNode;
|
|
133
|
+
className?: string;
|
|
134
|
+
};
|
|
135
|
+
declare function DashboardShell({ children, navItems, adminNavItems, currentPath, userEmail, userRole, onLogout, logo, className, }: DashboardShellProps): react.JSX.Element;
|
|
136
|
+
|
|
137
|
+
type CommandItem = {
|
|
138
|
+
id: string;
|
|
139
|
+
label: string;
|
|
140
|
+
shortcut?: string;
|
|
141
|
+
onSelect: () => void;
|
|
142
|
+
};
|
|
143
|
+
type CommandPaletteProps = {
|
|
144
|
+
open: boolean;
|
|
145
|
+
onClose: () => void;
|
|
146
|
+
commands: CommandItem[];
|
|
147
|
+
placeholder?: string;
|
|
148
|
+
theme?: StyleLabTheme;
|
|
149
|
+
};
|
|
150
|
+
declare function CommandPalette({ open, onClose, commands, placeholder, theme: themeProp, }: CommandPaletteProps): react.JSX.Element | null;
|
|
151
|
+
|
|
152
|
+
type DocumentAccordionProps = {
|
|
153
|
+
title: ReactNode;
|
|
154
|
+
content?: ReactNode;
|
|
155
|
+
pdfUrl?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Whether the panel should be open by default.
|
|
158
|
+
* Defaults to false.
|
|
159
|
+
*/
|
|
160
|
+
defaultOpen?: boolean;
|
|
161
|
+
className?: string;
|
|
162
|
+
theme?: StyleLabTheme;
|
|
163
|
+
};
|
|
164
|
+
declare function DocumentAccordion({ title, content, pdfUrl, defaultOpen, className, theme: themeProp, }: DocumentAccordionProps): react.JSX.Element;
|
|
165
|
+
|
|
166
|
+
type Column<T> = {
|
|
167
|
+
key: keyof T | string;
|
|
168
|
+
header: string;
|
|
169
|
+
render?: (row: T) => React.ReactNode;
|
|
170
|
+
};
|
|
171
|
+
declare function DataTable<T extends Record<string, unknown>>({ columns, data, getRowKey, className, style, }: {
|
|
172
|
+
columns: Column<T>[];
|
|
173
|
+
data: T[];
|
|
174
|
+
/** Return a unique key for each row (e.g. row.id). Defaults to row index. */
|
|
175
|
+
getRowKey?: (row: T, index: number) => string | number;
|
|
176
|
+
className?: string;
|
|
177
|
+
style?: React.CSSProperties;
|
|
178
|
+
}): react.JSX.Element;
|
|
179
|
+
|
|
180
|
+
type DropdownItem = {
|
|
181
|
+
value: string;
|
|
182
|
+
label: ReactNode;
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
};
|
|
185
|
+
type DropdownProps = {
|
|
186
|
+
trigger: ReactNode;
|
|
187
|
+
items: DropdownItem[];
|
|
188
|
+
value?: string;
|
|
189
|
+
defaultValue?: string;
|
|
190
|
+
onValueChange?: (value: string) => void;
|
|
191
|
+
className?: string;
|
|
192
|
+
style?: React.CSSProperties;
|
|
193
|
+
theme?: StyleLabTheme;
|
|
194
|
+
};
|
|
195
|
+
declare function Dropdown({ trigger, items, value: controlledValue, defaultValue, onValueChange, className, style, theme: themeProp, }: DropdownProps): react.JSX.Element;
|
|
196
|
+
|
|
197
|
+
type FlashcardProps = {
|
|
198
|
+
question: string;
|
|
199
|
+
answer: string;
|
|
200
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
201
|
+
declare function Flashcard({ question, answer, className, ...props }: FlashcardProps): react.JSX.Element;
|
|
202
|
+
|
|
203
|
+
type GraphicCardProps = {
|
|
204
|
+
children: ReactNode;
|
|
205
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
206
|
+
declare function GraphicCard({ children, className, ...props }: GraphicCardProps): react.JSX.Element;
|
|
207
|
+
|
|
208
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps<(props?: ({
|
|
209
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
210
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
211
|
+
label?: string;
|
|
212
|
+
error?: string;
|
|
213
|
+
helperText?: string;
|
|
214
|
+
prefix?: ReactNode;
|
|
215
|
+
suffix?: ReactNode;
|
|
216
|
+
theme?: StyleLabTheme;
|
|
217
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
218
|
+
|
|
219
|
+
declare const modalVariants: (props?: ({
|
|
220
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
221
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
222
|
+
type ModalProps = VariantProps<typeof modalVariants> & {
|
|
223
|
+
open: boolean;
|
|
224
|
+
onClose: () => void;
|
|
225
|
+
title?: string;
|
|
226
|
+
size?: "sm" | "md" | "lg";
|
|
227
|
+
className?: string;
|
|
228
|
+
style?: React.CSSProperties;
|
|
229
|
+
children?: ReactNode;
|
|
230
|
+
theme?: StyleLabTheme;
|
|
231
|
+
};
|
|
232
|
+
declare function Modal({ open, onClose, title, size, className, style, children, theme: themeProp, }: ModalProps): react.JSX.Element | null;
|
|
233
|
+
|
|
234
|
+
declare function Navbar({ children, className, style, }: {
|
|
235
|
+
children: React.ReactNode;
|
|
236
|
+
className?: string;
|
|
237
|
+
style?: React.CSSProperties;
|
|
238
|
+
}): react.JSX.Element;
|
|
239
|
+
|
|
240
|
+
type Tier = {
|
|
241
|
+
name: string;
|
|
242
|
+
price: string;
|
|
243
|
+
description?: string;
|
|
244
|
+
features: string[];
|
|
245
|
+
cta: string;
|
|
246
|
+
highlighted?: boolean;
|
|
247
|
+
};
|
|
248
|
+
declare function PricingCard({ tier, onSelect, className, style, }: {
|
|
249
|
+
tier: Tier;
|
|
250
|
+
onSelect?: () => void;
|
|
251
|
+
className?: string;
|
|
252
|
+
style?: React.CSSProperties;
|
|
253
|
+
}): react.JSX.Element;
|
|
254
|
+
|
|
255
|
+
type Props = {
|
|
256
|
+
value: number;
|
|
257
|
+
max?: number;
|
|
258
|
+
segmented?: boolean;
|
|
259
|
+
className?: string;
|
|
260
|
+
style?: React.CSSProperties;
|
|
261
|
+
};
|
|
262
|
+
declare function ProgressBar({ value, max, segmented, className, style, }: Props): react.JSX.Element;
|
|
263
|
+
|
|
264
|
+
declare function SectionHeader({ title, subtitle, className, style, }: {
|
|
265
|
+
title: string;
|
|
266
|
+
subtitle?: string;
|
|
267
|
+
className?: string;
|
|
268
|
+
style?: React.CSSProperties;
|
|
269
|
+
}): react.JSX.Element;
|
|
270
|
+
|
|
271
|
+
declare function Sidebar({ children, className, style, }: {
|
|
272
|
+
children: React.ReactNode;
|
|
273
|
+
className?: string;
|
|
274
|
+
style?: React.CSSProperties;
|
|
275
|
+
}): react.JSX.Element;
|
|
276
|
+
|
|
277
|
+
declare const Skeleton: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
278
|
+
variant?: "circle" | "text" | "rectangle" | null | undefined;
|
|
279
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
280
|
+
theme?: StyleLabTheme;
|
|
281
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
282
|
+
|
|
283
|
+
declare const Slider: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "onChange" | "size" | "defaultValue"> & VariantProps<(props?: ({
|
|
284
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
285
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
286
|
+
min?: number;
|
|
287
|
+
max?: number;
|
|
288
|
+
step?: number;
|
|
289
|
+
value?: number;
|
|
290
|
+
defaultValue?: number;
|
|
291
|
+
onValueChange?: (value: number) => void;
|
|
292
|
+
theme?: StyleLabTheme;
|
|
293
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
294
|
+
|
|
295
|
+
declare function StatsCard({ label, value, trend, className, style, }: {
|
|
296
|
+
label: string;
|
|
297
|
+
value: string | number;
|
|
298
|
+
trend?: {
|
|
299
|
+
direction: "up" | "down";
|
|
300
|
+
value: string;
|
|
301
|
+
};
|
|
302
|
+
className?: string;
|
|
303
|
+
style?: React.CSSProperties;
|
|
304
|
+
}): react.JSX.Element;
|
|
305
|
+
|
|
306
|
+
declare const tabsListVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
307
|
+
type TabItem = {
|
|
308
|
+
label: string;
|
|
309
|
+
value: string;
|
|
310
|
+
content: ReactNode;
|
|
311
|
+
};
|
|
312
|
+
type TabsProps = VariantProps<typeof tabsListVariants> & {
|
|
313
|
+
items: TabItem[];
|
|
314
|
+
defaultValue?: string;
|
|
315
|
+
value?: string;
|
|
316
|
+
onValueChange?: (value: string) => void;
|
|
317
|
+
className?: string;
|
|
318
|
+
style?: React.CSSProperties;
|
|
319
|
+
theme?: StyleLabTheme;
|
|
320
|
+
};
|
|
321
|
+
declare function Tabs({ items, defaultValue, value: controlledValue, onValueChange, className, style, theme: themeProp, }: TabsProps): react.JSX.Element;
|
|
322
|
+
|
|
323
|
+
declare function Terminal({ title, children, className, style, }: {
|
|
324
|
+
title?: string;
|
|
325
|
+
children: React.ReactNode;
|
|
326
|
+
className?: string;
|
|
327
|
+
style?: React.CSSProperties;
|
|
328
|
+
}): react.JSX.Element;
|
|
329
|
+
|
|
330
|
+
type TimelineItem = {
|
|
331
|
+
title: ReactNode;
|
|
332
|
+
description?: ReactNode;
|
|
333
|
+
time?: ReactNode;
|
|
334
|
+
};
|
|
335
|
+
type TimelineProps = {
|
|
336
|
+
items: TimelineItem[];
|
|
337
|
+
className?: string;
|
|
338
|
+
theme?: StyleLabTheme;
|
|
339
|
+
};
|
|
340
|
+
declare function Timeline({ items, className, theme: themeProp, }: TimelineProps): react.JSX.Element;
|
|
341
|
+
|
|
342
|
+
declare function Toast({ message, onDismiss, className, style, }: {
|
|
343
|
+
message: string;
|
|
344
|
+
onDismiss: () => void;
|
|
345
|
+
className?: string;
|
|
346
|
+
style?: React.CSSProperties;
|
|
347
|
+
}): react.JSX.Element;
|
|
348
|
+
|
|
349
|
+
declare const Toggle: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "onChange" | "size"> & VariantProps<(props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
350
|
+
checked?: boolean;
|
|
351
|
+
defaultChecked?: boolean;
|
|
352
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
353
|
+
theme?: StyleLabTheme;
|
|
354
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
355
|
+
|
|
356
|
+
declare const tooltipVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
357
|
+
type TooltipProps = VariantProps<typeof tooltipVariants> & {
|
|
358
|
+
content: ReactNode;
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
361
|
+
className?: string;
|
|
362
|
+
style?: React.CSSProperties;
|
|
363
|
+
theme?: StyleLabTheme;
|
|
364
|
+
};
|
|
365
|
+
declare function Tooltip({ content, children, placement, className, style, theme: themeProp, }: TooltipProps): react.JSX.Element;
|
|
366
|
+
|
|
367
|
+
type ThemeContextValue = {
|
|
368
|
+
theme: StyleLabTheme;
|
|
369
|
+
setTheme: (theme: StyleLabTheme) => void;
|
|
370
|
+
};
|
|
371
|
+
declare function ThemeProvider({ children, defaultTheme, }: {
|
|
372
|
+
children: ReactNode;
|
|
373
|
+
defaultTheme?: StyleLabTheme;
|
|
374
|
+
}): react.JSX.Element;
|
|
375
|
+
declare function useTheme(): ThemeContextValue;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Merges class names with Tailwind-aware deduplication.
|
|
379
|
+
* Use for all component className composition.
|
|
380
|
+
*/
|
|
381
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Traps focus within the container element while active.
|
|
385
|
+
* Used for Modal, Dialog, Drawer. Restores focus to previously focused element on cleanup.
|
|
386
|
+
*/
|
|
387
|
+
declare function useFocusTrap(active: boolean, options?: {
|
|
388
|
+
returnFocus?: boolean;
|
|
389
|
+
}): react.RefObject<HTMLElement | null>;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Invokes callback when a click occurs outside the given element(s).
|
|
393
|
+
* Used for Dropdown, Modal overlay, Popover.
|
|
394
|
+
*/
|
|
395
|
+
declare function useClickOutside(ref: RefObject<HTMLElement | null> | RefObject<HTMLElement | null>[], handler: (e: MouseEvent | TouchEvent) => void, options?: {
|
|
396
|
+
enabled?: boolean;
|
|
397
|
+
}): void;
|
|
398
|
+
|
|
399
|
+
type KeyHandler = (e: KeyboardEvent) => void;
|
|
400
|
+
/**
|
|
401
|
+
* Registers keyboard handlers (Escape to close, Arrow keys for lists/tabs).
|
|
402
|
+
* Returns a stable register function so handlers can be updated without re-running the effect.
|
|
403
|
+
*/
|
|
404
|
+
declare function useKeyboardNavigation(options: {
|
|
405
|
+
onEscape?: KeyHandler;
|
|
406
|
+
onArrowDown?: KeyHandler;
|
|
407
|
+
onArrowUp?: KeyHandler;
|
|
408
|
+
onArrowLeft?: KeyHandler;
|
|
409
|
+
onArrowRight?: KeyHandler;
|
|
410
|
+
enabled?: boolean;
|
|
411
|
+
}): void;
|
|
412
|
+
/**
|
|
413
|
+
* Returns the next index when moving in a list (for arrow-key navigation).
|
|
414
|
+
* Wrap: from last goes to first, from first with ArrowUp goes to last.
|
|
415
|
+
*/
|
|
416
|
+
declare function getNextListIndex(current: number, direction: "up" | "down", length: number): number;
|
|
417
|
+
|
|
418
|
+
export { Accordion, Alert, Avatar, AvatarGroup, Badge, BentoGrid, Breadcrumbs, Button, Calendar, Card, CommandPalette, type ComponentName, DashboardShell, DataTable, DocumentAccordion, Dropdown, Flashcard, GraphicCard, Input, Modal, Navbar, PricingCard, ProgressBar, SectionHeader, Sidebar, Skeleton, Slider, StatsCard, type StyleLabTheme, THEMES, Tabs, Terminal, ThemeProvider, Timeline, Toast, Toggle, Tooltip, cn, getNextListIndex, getThemeClass, useClickOutside, useFocusTrap, useKeyboardNavigation, useTheme };
|