namps-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/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/index.cjs +976 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +453 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.js +893 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +416 -0
- package/package.json +65 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type Theme = "light" | "dark";
|
|
4
|
+
interface ThemeContextValue {
|
|
5
|
+
theme: Theme;
|
|
6
|
+
setTheme: (t: Theme) => void;
|
|
7
|
+
toggle: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface ThemeProviderProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** Initial theme when nothing is stored. Default "light". */
|
|
12
|
+
defaultTheme?: Theme;
|
|
13
|
+
/** localStorage key for persistence. Default "pui-theme". Pass null to disable. */
|
|
14
|
+
storageKey?: string | null;
|
|
15
|
+
/** Element to stamp `data-theme` on. Default document.documentElement. */
|
|
16
|
+
attributeTarget?: "html" | "self";
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wrap your app once. Sets `data-theme` on <html> (or a wrapper div) and
|
|
20
|
+
* persists the choice. Read/control via the `useTheme()` hook.
|
|
21
|
+
*/
|
|
22
|
+
declare function ThemeProvider({ children, defaultTheme, storageKey, attributeTarget, }: ThemeProviderProps): React.JSX.Element;
|
|
23
|
+
declare function useTheme(): ThemeContextValue;
|
|
24
|
+
/** Drop-in icon button that flips the theme. */
|
|
25
|
+
declare function ThemeToggle({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element;
|
|
26
|
+
|
|
27
|
+
/** Tiny classNames helper — joins truthy class fragments. */
|
|
28
|
+
declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
29
|
+
/** Derive up-to-two-letter initials from a full name. */
|
|
30
|
+
declare function initials(name: string): string;
|
|
31
|
+
|
|
32
|
+
type IconProps = React.SVGProps<SVGSVGElement>;
|
|
33
|
+
declare const ChevronDown: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
34
|
+
declare const ChevronRight: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
35
|
+
declare const ChevronLeft: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
36
|
+
declare const Check: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
37
|
+
declare const X: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
38
|
+
declare const Search: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
39
|
+
declare const Plus: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
40
|
+
declare const Sun: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
41
|
+
declare const Moon: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
42
|
+
declare const Info: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
43
|
+
declare const AlertTriangle: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
44
|
+
declare const CheckCircle: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
45
|
+
declare const XCircle: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
46
|
+
declare const ArrowRight: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
47
|
+
declare const Sort: ({ className, ...props }: IconProps) => React.JSX.Element;
|
|
48
|
+
declare function DotsVertical({ className, ...props }: IconProps): React.JSX.Element;
|
|
49
|
+
|
|
50
|
+
declare const icons_AlertTriangle: typeof AlertTriangle;
|
|
51
|
+
declare const icons_ArrowRight: typeof ArrowRight;
|
|
52
|
+
declare const icons_Check: typeof Check;
|
|
53
|
+
declare const icons_CheckCircle: typeof CheckCircle;
|
|
54
|
+
declare const icons_ChevronDown: typeof ChevronDown;
|
|
55
|
+
declare const icons_ChevronLeft: typeof ChevronLeft;
|
|
56
|
+
declare const icons_ChevronRight: typeof ChevronRight;
|
|
57
|
+
declare const icons_DotsVertical: typeof DotsVertical;
|
|
58
|
+
declare const icons_Info: typeof Info;
|
|
59
|
+
declare const icons_Moon: typeof Moon;
|
|
60
|
+
declare const icons_Plus: typeof Plus;
|
|
61
|
+
declare const icons_Search: typeof Search;
|
|
62
|
+
declare const icons_Sort: typeof Sort;
|
|
63
|
+
declare const icons_Sun: typeof Sun;
|
|
64
|
+
declare const icons_X: typeof X;
|
|
65
|
+
declare const icons_XCircle: typeof XCircle;
|
|
66
|
+
declare namespace icons {
|
|
67
|
+
export { icons_AlertTriangle as AlertTriangle, icons_ArrowRight as ArrowRight, icons_Check as Check, icons_CheckCircle as CheckCircle, icons_ChevronDown as ChevronDown, icons_ChevronLeft as ChevronLeft, icons_ChevronRight as ChevronRight, icons_DotsVertical as DotsVertical, icons_Info as Info, icons_Moon as Moon, icons_Plus as Plus, icons_Search as Search, icons_Sort as Sort, icons_Sun as Sun, icons_X as X, icons_XCircle as XCircle };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "danger";
|
|
71
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
72
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
73
|
+
variant?: ButtonVariant;
|
|
74
|
+
size?: ButtonSize;
|
|
75
|
+
/** Renders a spinner and disables the button. */
|
|
76
|
+
loading?: boolean;
|
|
77
|
+
/** Icon-only square button. Pass an icon as the single child. */
|
|
78
|
+
iconOnly?: boolean;
|
|
79
|
+
/** Stretch to full container width. */
|
|
80
|
+
block?: boolean;
|
|
81
|
+
leftIcon?: React.ReactNode;
|
|
82
|
+
rightIcon?: React.ReactNode;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The primary action element. Five variants, three sizes, loading + icon support.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* <Button variant="primary" leftIcon={<Plus/>}>Create key</Button>
|
|
89
|
+
*/
|
|
90
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
91
|
+
|
|
92
|
+
interface FieldProps {
|
|
93
|
+
label?: React.ReactNode;
|
|
94
|
+
hint?: React.ReactNode;
|
|
95
|
+
error?: React.ReactNode;
|
|
96
|
+
htmlFor?: string;
|
|
97
|
+
children: React.ReactNode;
|
|
98
|
+
className?: string;
|
|
99
|
+
style?: React.CSSProperties;
|
|
100
|
+
}
|
|
101
|
+
/** Labelled wrapper: renders label, control, and hint/error text. */
|
|
102
|
+
declare function Field({ label, hint, error, htmlFor, children, className, style }: FieldProps): React.JSX.Element;
|
|
103
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
104
|
+
invalid?: boolean;
|
|
105
|
+
}
|
|
106
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
107
|
+
/** Input with a leading search glyph. */
|
|
108
|
+
declare const SearchInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
109
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
110
|
+
invalid?: boolean;
|
|
111
|
+
}
|
|
112
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
113
|
+
interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
114
|
+
options?: Array<{
|
|
115
|
+
label: string;
|
|
116
|
+
value: string;
|
|
117
|
+
}>;
|
|
118
|
+
}
|
|
119
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
120
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
121
|
+
label?: React.ReactNode;
|
|
122
|
+
}
|
|
123
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
124
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
125
|
+
}
|
|
126
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
127
|
+
interface RadioOption {
|
|
128
|
+
value: string;
|
|
129
|
+
title: React.ReactNode;
|
|
130
|
+
description?: React.ReactNode;
|
|
131
|
+
}
|
|
132
|
+
interface RadioGroupProps {
|
|
133
|
+
name: string;
|
|
134
|
+
value: string;
|
|
135
|
+
onValueChange: (value: string) => void;
|
|
136
|
+
options: RadioOption[];
|
|
137
|
+
className?: string;
|
|
138
|
+
}
|
|
139
|
+
/** Card-style radio group. Controlled via `value` / `onValueChange`. */
|
|
140
|
+
declare function RadioGroup({ name, value, onValueChange, options, className }: RadioGroupProps): React.JSX.Element;
|
|
141
|
+
interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange"> {
|
|
142
|
+
value: number;
|
|
143
|
+
min?: number;
|
|
144
|
+
max?: number;
|
|
145
|
+
onValueChange: (value: number) => void;
|
|
146
|
+
}
|
|
147
|
+
declare function Slider({ value, min, max, onValueChange, className, ...props }: SliderProps): React.JSX.Element;
|
|
148
|
+
|
|
149
|
+
type Tone = "neutral" | "green" | "amber" | "red" | "blue" | "accent";
|
|
150
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
151
|
+
tone?: Tone;
|
|
152
|
+
solid?: boolean;
|
|
153
|
+
dot?: boolean;
|
|
154
|
+
}
|
|
155
|
+
declare function Badge({ tone, solid, dot, className, children, ...props }: BadgeProps): React.JSX.Element;
|
|
156
|
+
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
157
|
+
onRemove?: () => void;
|
|
158
|
+
}
|
|
159
|
+
declare function Tag({ onRemove, className, children, ...props }: TagProps): React.JSX.Element;
|
|
160
|
+
type AvatarSize = "sm" | "md" | "lg";
|
|
161
|
+
interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
162
|
+
name: string;
|
|
163
|
+
src?: string;
|
|
164
|
+
size?: AvatarSize;
|
|
165
|
+
tone?: "accent" | "blue" | "green" | "amber";
|
|
166
|
+
status?: "online" | "busy" | "away";
|
|
167
|
+
}
|
|
168
|
+
declare function Avatar({ name, src, size, tone, status, className, ...props }: AvatarProps): React.JSX.Element;
|
|
169
|
+
interface AvatarGroupProps {
|
|
170
|
+
/** Avatar elements. */
|
|
171
|
+
children: React.ReactNode;
|
|
172
|
+
/** Show at most this many, collapsing the rest into a "+N". */
|
|
173
|
+
max?: number;
|
|
174
|
+
size?: AvatarSize;
|
|
175
|
+
className?: string;
|
|
176
|
+
}
|
|
177
|
+
declare function AvatarGroup({ children, max, size, className }: AvatarGroupProps): React.JSX.Element;
|
|
178
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
179
|
+
padded?: boolean;
|
|
180
|
+
}
|
|
181
|
+
declare function Card({ padded, className, children, ...props }: CardProps): React.JSX.Element;
|
|
182
|
+
interface StatCardProps {
|
|
183
|
+
label: React.ReactNode;
|
|
184
|
+
value: React.ReactNode;
|
|
185
|
+
delta?: {
|
|
186
|
+
value: React.ReactNode;
|
|
187
|
+
direction: "up" | "down";
|
|
188
|
+
};
|
|
189
|
+
className?: string;
|
|
190
|
+
}
|
|
191
|
+
declare function StatCard({ label, value, delta, className }: StatCardProps): React.JSX.Element;
|
|
192
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
193
|
+
/** 0–100. Omit for an indeterminate bar. */
|
|
194
|
+
value?: number;
|
|
195
|
+
}
|
|
196
|
+
declare function Progress({ value, className, ...props }: ProgressProps): React.JSX.Element;
|
|
197
|
+
declare function Spinner({ size, className, style, ...props }: {
|
|
198
|
+
size?: number;
|
|
199
|
+
} & React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
200
|
+
declare function Skeleton({ width, height, className, style, ...props }: {
|
|
201
|
+
width?: number | string;
|
|
202
|
+
height?: number | string;
|
|
203
|
+
} & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
204
|
+
interface EmptyStateProps {
|
|
205
|
+
icon?: React.ReactNode;
|
|
206
|
+
title: React.ReactNode;
|
|
207
|
+
description?: React.ReactNode;
|
|
208
|
+
action?: React.ReactNode;
|
|
209
|
+
className?: string;
|
|
210
|
+
}
|
|
211
|
+
declare function EmptyState({ icon, title, description, action, className }: EmptyStateProps): React.JSX.Element;
|
|
212
|
+
|
|
213
|
+
interface AccordionProps {
|
|
214
|
+
children: React.ReactNode;
|
|
215
|
+
/** "single" (default) collapses others; "multiple" allows many open. */
|
|
216
|
+
type?: "single" | "multiple";
|
|
217
|
+
defaultValue?: string | string[];
|
|
218
|
+
className?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Collapsible disclosure list.
|
|
222
|
+
* @example
|
|
223
|
+
* <Accordion defaultValue="a">
|
|
224
|
+
* <AccordionItem value="a" title="How is usage metered?">…</AccordionItem>
|
|
225
|
+
* <AccordionItem value="b" title="Can I rotate keys?">…</AccordionItem>
|
|
226
|
+
* </Accordion>
|
|
227
|
+
*/
|
|
228
|
+
declare function Accordion({ children, type, defaultValue, className }: AccordionProps): React.JSX.Element;
|
|
229
|
+
interface AccordionItemProps {
|
|
230
|
+
value: string;
|
|
231
|
+
title: React.ReactNode;
|
|
232
|
+
children: React.ReactNode;
|
|
233
|
+
}
|
|
234
|
+
declare function AccordionItem({ value, title, children }: AccordionItemProps): React.JSX.Element;
|
|
235
|
+
|
|
236
|
+
interface TabsProps {
|
|
237
|
+
children: React.ReactNode;
|
|
238
|
+
defaultValue: string;
|
|
239
|
+
value?: string;
|
|
240
|
+
onValueChange?: (v: string) => void;
|
|
241
|
+
className?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Underline tab set.
|
|
245
|
+
* @example
|
|
246
|
+
* <Tabs defaultValue="overview">
|
|
247
|
+
* <TabList>
|
|
248
|
+
* <Tab value="overview">Overview</Tab>
|
|
249
|
+
* <Tab value="activity">Activity</Tab>
|
|
250
|
+
* </TabList>
|
|
251
|
+
* <TabPanel value="overview">…</TabPanel>
|
|
252
|
+
* <TabPanel value="activity">…</TabPanel>
|
|
253
|
+
* </Tabs>
|
|
254
|
+
*/
|
|
255
|
+
declare function Tabs({ children, defaultValue, value, onValueChange, className }: TabsProps): React.JSX.Element;
|
|
256
|
+
declare function TabList({ children, className }: {
|
|
257
|
+
children: React.ReactNode;
|
|
258
|
+
className?: string;
|
|
259
|
+
}): React.JSX.Element;
|
|
260
|
+
declare function Tab({ value, children }: {
|
|
261
|
+
value: string;
|
|
262
|
+
children: React.ReactNode;
|
|
263
|
+
}): React.JSX.Element;
|
|
264
|
+
declare function TabPanel({ value, children, className }: {
|
|
265
|
+
value: string;
|
|
266
|
+
children: React.ReactNode;
|
|
267
|
+
className?: string;
|
|
268
|
+
}): React.JSX.Element | null;
|
|
269
|
+
|
|
270
|
+
interface Crumb {
|
|
271
|
+
label: React.ReactNode;
|
|
272
|
+
href?: string;
|
|
273
|
+
}
|
|
274
|
+
declare function Breadcrumbs({ items, className }: {
|
|
275
|
+
items: Crumb[];
|
|
276
|
+
className?: string;
|
|
277
|
+
}): React.JSX.Element;
|
|
278
|
+
interface PaginationProps {
|
|
279
|
+
page: number;
|
|
280
|
+
count: number;
|
|
281
|
+
onChange: (page: number) => void;
|
|
282
|
+
/** How many sibling pages to show around the current one. Default 1. */
|
|
283
|
+
siblings?: number;
|
|
284
|
+
className?: string;
|
|
285
|
+
}
|
|
286
|
+
declare function Pagination({ page, count, onChange, siblings, className }: PaginationProps): React.JSX.Element;
|
|
287
|
+
interface SegmentedProps {
|
|
288
|
+
options: Array<{
|
|
289
|
+
label: React.ReactNode;
|
|
290
|
+
value: string;
|
|
291
|
+
}>;
|
|
292
|
+
value: string;
|
|
293
|
+
onValueChange: (value: string) => void;
|
|
294
|
+
className?: string;
|
|
295
|
+
}
|
|
296
|
+
declare function Segmented({ options, value, onValueChange, className }: SegmentedProps): React.JSX.Element;
|
|
297
|
+
|
|
298
|
+
interface Column<T> {
|
|
299
|
+
key: string;
|
|
300
|
+
header: React.ReactNode;
|
|
301
|
+
/** Cell renderer. Receives the row. */
|
|
302
|
+
cell: (row: T) => React.ReactNode;
|
|
303
|
+
sortable?: boolean;
|
|
304
|
+
/** Comparator used when this column is sorted. */
|
|
305
|
+
sortValue?: (row: T) => string | number;
|
|
306
|
+
width?: string;
|
|
307
|
+
align?: "left" | "right" | "center";
|
|
308
|
+
}
|
|
309
|
+
interface TableProps<T> {
|
|
310
|
+
columns: Column<T>[];
|
|
311
|
+
data: T[];
|
|
312
|
+
rowKey: (row: T, index: number) => React.Key;
|
|
313
|
+
className?: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Data-driven table with optional client-side sorting.
|
|
317
|
+
* @example
|
|
318
|
+
* <Table rowKey={(r) => r.id} data={members} columns={[
|
|
319
|
+
* { key: "name", header: "Member", cell: (r) => r.name, sortable: true, sortValue: (r) => r.name },
|
|
320
|
+
* { key: "role", header: "Role", cell: (r) => r.role },
|
|
321
|
+
* ]} />
|
|
322
|
+
*/
|
|
323
|
+
declare function Table<T>({ columns, data, rowKey, className }: TableProps<T>): React.JSX.Element;
|
|
324
|
+
|
|
325
|
+
type AlertTone = "info" | "success" | "warning" | "danger";
|
|
326
|
+
interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
327
|
+
tone?: AlertTone;
|
|
328
|
+
title?: React.ReactNode;
|
|
329
|
+
onDismiss?: () => void;
|
|
330
|
+
}
|
|
331
|
+
/** Inline banner for four intents. */
|
|
332
|
+
declare function Alert({ tone, title, onDismiss, className, children, ...props }: AlertProps): React.JSX.Element;
|
|
333
|
+
|
|
334
|
+
type ToastTone = "info" | "success" | "danger";
|
|
335
|
+
interface ToastOptions {
|
|
336
|
+
title: React.ReactNode;
|
|
337
|
+
description?: React.ReactNode;
|
|
338
|
+
tone?: ToastTone;
|
|
339
|
+
/** Auto-dismiss after this many ms. Default 4500. 0 = sticky. */
|
|
340
|
+
duration?: number;
|
|
341
|
+
}
|
|
342
|
+
interface ToastContextValue {
|
|
343
|
+
toast: (opts: ToastOptions) => number;
|
|
344
|
+
dismiss: (id: number) => void;
|
|
345
|
+
}
|
|
346
|
+
/** Wrap your app once; call notifications with the `useToast()` hook. */
|
|
347
|
+
declare function ToastProvider({ children }: {
|
|
348
|
+
children: React.ReactNode;
|
|
349
|
+
}): React.JSX.Element;
|
|
350
|
+
declare function useToast(): ToastContextValue;
|
|
351
|
+
|
|
352
|
+
interface TooltipProps {
|
|
353
|
+
label: React.ReactNode;
|
|
354
|
+
children: React.ReactNode;
|
|
355
|
+
className?: string;
|
|
356
|
+
}
|
|
357
|
+
/** Hover/focus tooltip. Wraps a single focusable child. */
|
|
358
|
+
declare function Tooltip({ label, children, className }: TooltipProps): React.JSX.Element;
|
|
359
|
+
interface MenuItem {
|
|
360
|
+
label: React.ReactNode;
|
|
361
|
+
icon?: React.ReactNode;
|
|
362
|
+
onSelect?: () => void;
|
|
363
|
+
tone?: "default" | "danger";
|
|
364
|
+
}
|
|
365
|
+
interface DropdownMenuProps {
|
|
366
|
+
trigger: React.ReactNode;
|
|
367
|
+
children?: React.ReactNode;
|
|
368
|
+
items?: MenuItem[];
|
|
369
|
+
align?: "start" | "end";
|
|
370
|
+
className?: string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Click-to-open menu. Provide `items` for a simple list, or `children`
|
|
374
|
+
* for custom content. Closes on outside click and Escape.
|
|
375
|
+
*/
|
|
376
|
+
declare function DropdownMenu({ trigger, children, items, align, className }: DropdownMenuProps): React.JSX.Element;
|
|
377
|
+
declare function MenuSeparator(): React.JSX.Element;
|
|
378
|
+
interface ModalProps {
|
|
379
|
+
open: boolean;
|
|
380
|
+
onClose: () => void;
|
|
381
|
+
title?: React.ReactNode;
|
|
382
|
+
children?: React.ReactNode;
|
|
383
|
+
footer?: React.ReactNode;
|
|
384
|
+
/** Decorative icon shown beside the title. */
|
|
385
|
+
icon?: React.ReactNode;
|
|
386
|
+
}
|
|
387
|
+
/** Overlay dialog. Closes on backdrop click and Escape. */
|
|
388
|
+
declare function Modal({ open, onClose, title, children, footer, icon }: ModalProps): React.JSX.Element | null;
|
|
389
|
+
|
|
390
|
+
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
391
|
+
orientation?: "horizontal" | "vertical";
|
|
392
|
+
}
|
|
393
|
+
declare function Separator({ orientation, className, ...props }: SeparatorProps): React.JSX.Element;
|
|
394
|
+
declare function Kbd({ children, className }: {
|
|
395
|
+
children: React.ReactNode;
|
|
396
|
+
className?: string;
|
|
397
|
+
}): React.JSX.Element;
|
|
398
|
+
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
399
|
+
external?: boolean;
|
|
400
|
+
}
|
|
401
|
+
declare function Link({ external, className, children, ...props }: LinkProps): React.JSX.Element;
|
|
402
|
+
interface PopoverProps {
|
|
403
|
+
trigger: React.ReactNode;
|
|
404
|
+
children: React.ReactNode;
|
|
405
|
+
align?: "start" | "end";
|
|
406
|
+
className?: string;
|
|
407
|
+
}
|
|
408
|
+
declare function Popover({ trigger, children, align, className }: PopoverProps): React.JSX.Element;
|
|
409
|
+
interface DrawerProps {
|
|
410
|
+
open: boolean;
|
|
411
|
+
onClose: () => void;
|
|
412
|
+
side?: "left" | "right";
|
|
413
|
+
title?: React.ReactNode;
|
|
414
|
+
children?: React.ReactNode;
|
|
415
|
+
footer?: React.ReactNode;
|
|
416
|
+
}
|
|
417
|
+
declare function Drawer({ open, onClose, side, title, children, footer }: DrawerProps): React.JSX.Element | null;
|
|
418
|
+
interface ToggleOption {
|
|
419
|
+
value: string;
|
|
420
|
+
label: React.ReactNode;
|
|
421
|
+
icon?: React.ReactNode;
|
|
422
|
+
}
|
|
423
|
+
interface ToggleGroupProps {
|
|
424
|
+
options: ToggleOption[];
|
|
425
|
+
value: string;
|
|
426
|
+
onValueChange: (value: string) => void;
|
|
427
|
+
className?: string;
|
|
428
|
+
}
|
|
429
|
+
declare function ToggleGroup({ options, value, onValueChange, className }: ToggleGroupProps): React.JSX.Element;
|
|
430
|
+
interface Step {
|
|
431
|
+
label: React.ReactNode;
|
|
432
|
+
description?: React.ReactNode;
|
|
433
|
+
}
|
|
434
|
+
interface StepperProps {
|
|
435
|
+
steps: Step[];
|
|
436
|
+
/** Zero-based index of the active step. Earlier steps render as complete. */
|
|
437
|
+
current: number;
|
|
438
|
+
className?: string;
|
|
439
|
+
}
|
|
440
|
+
declare function Stepper({ steps, current, className }: StepperProps): React.JSX.Element;
|
|
441
|
+
interface CodeBlockProps {
|
|
442
|
+
code: string;
|
|
443
|
+
filename?: React.ReactNode;
|
|
444
|
+
className?: string;
|
|
445
|
+
}
|
|
446
|
+
declare function CodeBlock({ code, filename, className }: CodeBlockProps): React.JSX.Element;
|
|
447
|
+
declare function List({ children, className }: {
|
|
448
|
+
children: React.ReactNode;
|
|
449
|
+
className?: string;
|
|
450
|
+
}): React.JSX.Element;
|
|
451
|
+
declare function ListItem({ children, className, ...props }: React.LiHTMLAttributes<HTMLLIElement>): React.JSX.Element;
|
|
452
|
+
|
|
453
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertTone, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Breadcrumbs, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Crumb, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuProps, EmptyState, type EmptyStateProps, Field, type FieldProps, icons as Icons, Input, type InputProps, Kbd, Link, type LinkProps, List, ListItem, type MenuItem, MenuSeparator, Modal, type ModalProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, SearchInput, Segmented, type SegmentedProps, Select, type SelectProps, Separator, type SeparatorProps, Skeleton, Slider, type SliderProps, Spinner, StatCard, type StatCardProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, Tab, TabList, TabPanel, Table, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ToastOptions, ToastProvider, type ToastTone, ToggleGroup, type ToggleGroupProps, type ToggleOption, type Tone, Tooltip, type TooltipProps, cx, initials, useTheme, useToast };
|