@mortenbrudvik/waveui 0.4.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 +262 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2438 -0
- package/dist/index.mjs +5695 -0
- package/package.json +100 -0
- package/src/styles/animations.css +39 -0
- package/src/styles/globals.css +22 -0
- package/src/styles/tokens.css +221 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2438 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
export declare const Accordion: {
|
|
6
|
+
({ type, openItems: controlledOpenItems, defaultOpenItems, onOpenItemsChange, className, children, ref, ...rest }: AccordionProps & {
|
|
7
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
} & {
|
|
11
|
+
Item: {
|
|
12
|
+
({ value, className, children, ref, ...rest }: AccordionItemProps & {
|
|
13
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
Trigger: {
|
|
18
|
+
({ children, ref, ...rest }: React_2.HTMLAttributes<HTMLSpanElement> & {
|
|
19
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
Panel: {
|
|
24
|
+
({ children, ref, ...rest }: React_2.HTMLAttributes<HTMLDivElement> & {
|
|
25
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
26
|
+
}): JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** Properties for the AccordionItem sub-component. */
|
|
32
|
+
export declare interface AccordionItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** Unique value identifying this accordion item. */
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Properties for the Accordion component. */
|
|
38
|
+
export declare interface AccordionProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
/** Whether only one or multiple items can be open at a time.
|
|
40
|
+
* @default 'single'
|
|
41
|
+
*/
|
|
42
|
+
type?: 'single' | 'multiple';
|
|
43
|
+
/** Controlled array of currently open item values. */
|
|
44
|
+
openItems?: string[];
|
|
45
|
+
/** Default open items for uncontrolled usage.
|
|
46
|
+
* @default []
|
|
47
|
+
*/
|
|
48
|
+
defaultOpenItems?: string[];
|
|
49
|
+
/** Callback invoked when the set of open items changes. */
|
|
50
|
+
onOpenItemsChange?: (openItems: string[]) => void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Visual style variant controlling fill, border, and background treatment. */
|
|
54
|
+
export declare type Appearance = 'primary' | 'outline' | 'subtle' | 'transparent';
|
|
55
|
+
|
|
56
|
+
export declare const Avatar: {
|
|
57
|
+
({ src, name, size, icon, image, badge, className, ref, ...props }: AvatarProps & {
|
|
58
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
59
|
+
}): JSX.Element;
|
|
60
|
+
displayName: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export declare const AvatarGroup: {
|
|
64
|
+
({ max, size, className, children, ref, ...props }: AvatarGroupProps & {
|
|
65
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
66
|
+
}): JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** Properties for the AvatarGroup component. */
|
|
71
|
+
export declare interface AvatarGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
72
|
+
/** Maximum number of avatars to display before showing an overflow indicator. */
|
|
73
|
+
max?: number;
|
|
74
|
+
/** Size of the overflow indicator badge.
|
|
75
|
+
* @default 'medium'
|
|
76
|
+
*/
|
|
77
|
+
size?: Size;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Properties for the Avatar component. */
|
|
81
|
+
export declare interface AvatarProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
82
|
+
/** URL of the avatar image. */
|
|
83
|
+
src?: string;
|
|
84
|
+
/** Full name used to generate initials when no image is provided. */
|
|
85
|
+
name?: string;
|
|
86
|
+
/** Size of the avatar.
|
|
87
|
+
* @default 'medium'
|
|
88
|
+
*/
|
|
89
|
+
size?: Size;
|
|
90
|
+
/** Custom icon to display when no image or name is provided. */
|
|
91
|
+
icon?: React_2.ReactNode;
|
|
92
|
+
/** Slot for a custom image element. */
|
|
93
|
+
image?: Slot<'img'>;
|
|
94
|
+
/** Slot for a badge element positioned at the bottom-right corner. */
|
|
95
|
+
badge?: Slot<'span'>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare const Badge: {
|
|
99
|
+
({ appearance, color, size, className, children, ref, ...props }: BadgeProps & {
|
|
100
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
101
|
+
}): JSX.Element;
|
|
102
|
+
displayName: string;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** Visual style variant for Badge components. */
|
|
106
|
+
export declare type BadgeAppearance = 'filled' | 'tint' | 'outline';
|
|
107
|
+
|
|
108
|
+
/** Semantic color for Badge components. */
|
|
109
|
+
export declare type BadgeColor = 'brand' | 'success' | 'warning' | 'danger' | 'important' | 'informative';
|
|
110
|
+
|
|
111
|
+
/** Properties for the Badge component. */
|
|
112
|
+
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
113
|
+
/** Visual style of the badge.
|
|
114
|
+
* @default 'filled'
|
|
115
|
+
*/
|
|
116
|
+
appearance?: BadgeAppearance;
|
|
117
|
+
/** Semantic color of the badge.
|
|
118
|
+
* @default 'brand'
|
|
119
|
+
*/
|
|
120
|
+
color?: BadgeColor;
|
|
121
|
+
/** Size of the badge.
|
|
122
|
+
* @default 'medium'
|
|
123
|
+
*/
|
|
124
|
+
size?: Size;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare const Breadcrumb: {
|
|
128
|
+
({ children, className, ref, ...rest }: BreadcrumbProps & {
|
|
129
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
130
|
+
}): JSX.Element;
|
|
131
|
+
displayName: string;
|
|
132
|
+
} & {
|
|
133
|
+
Item: {
|
|
134
|
+
({ href, current, icon, children, className, ref, ...rest }: BreadcrumbItemProps & {
|
|
135
|
+
ref?: React_2.Ref<HTMLSpanElement | HTMLAnchorElement>;
|
|
136
|
+
}): JSX.Element;
|
|
137
|
+
displayName: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/** Properties for the BreadcrumbItem sub-component. */
|
|
142
|
+
export declare interface BreadcrumbItemProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
143
|
+
/** URL the breadcrumb item links to. */
|
|
144
|
+
href?: string;
|
|
145
|
+
/** Whether this item represents the current page. */
|
|
146
|
+
current?: boolean;
|
|
147
|
+
/** Slot for an icon displayed before the item text. */
|
|
148
|
+
icon?: Slot<'span'>;
|
|
149
|
+
/** Label content of the breadcrumb item. */
|
|
150
|
+
children: React_2.ReactNode;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Properties for the Breadcrumb component. */
|
|
154
|
+
export declare interface BreadcrumbProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
155
|
+
/** Breadcrumb items to render. */
|
|
156
|
+
children: React_2.ReactNode;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export declare const Button: {
|
|
160
|
+
({ as, appearance, size, icon, disabled, className, children, ref, ...props }: ButtonProps & {
|
|
161
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
162
|
+
}): JSX.Element;
|
|
163
|
+
displayName: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** Properties for the Button component. */
|
|
167
|
+
export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
168
|
+
/** Custom element type to render as.
|
|
169
|
+
* @default 'button'
|
|
170
|
+
*/
|
|
171
|
+
as?: React_2.ElementType;
|
|
172
|
+
/** Visual style variant.
|
|
173
|
+
* @default 'outline'
|
|
174
|
+
*/
|
|
175
|
+
appearance?: Appearance;
|
|
176
|
+
/** Size affecting padding and font size.
|
|
177
|
+
* @default 'medium'
|
|
178
|
+
*/
|
|
179
|
+
size?: Size;
|
|
180
|
+
/** Icon slot rendered before the button label. */
|
|
181
|
+
icon?: Slot<'span'>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export declare const Card: {
|
|
185
|
+
({ as: Component, selected, onSelect, className, children, ref, ...props }: CardProps & {
|
|
186
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
187
|
+
}): JSX.Element;
|
|
188
|
+
displayName: string;
|
|
189
|
+
} & {
|
|
190
|
+
Header: {
|
|
191
|
+
({ as: Component, title, subtitle, className, children, ref, ...props }: CardHeaderProps & {
|
|
192
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
193
|
+
}): JSX.Element;
|
|
194
|
+
displayName: string;
|
|
195
|
+
};
|
|
196
|
+
Body: {
|
|
197
|
+
({ as: Component, className, ref, ...props }: CardBodyProps & {
|
|
198
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
199
|
+
}): JSX.Element;
|
|
200
|
+
displayName: string;
|
|
201
|
+
};
|
|
202
|
+
Footer: {
|
|
203
|
+
({ as: Component, className, ref, ...props }: CardFooterProps & {
|
|
204
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
205
|
+
}): JSX.Element;
|
|
206
|
+
displayName: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/** Properties for the CardBody sub-component. */
|
|
211
|
+
export declare interface CardBodyProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
212
|
+
/** Element type to render as.
|
|
213
|
+
* @default 'div'
|
|
214
|
+
*/
|
|
215
|
+
as?: React_2.ElementType;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Properties for the CardFooter sub-component. */
|
|
219
|
+
export declare interface CardFooterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
220
|
+
/** Element type to render as.
|
|
221
|
+
* @default 'div'
|
|
222
|
+
*/
|
|
223
|
+
as?: React_2.ElementType;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** Properties for the CardHeader sub-component. */
|
|
227
|
+
export declare interface CardHeaderProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
228
|
+
/** Element type to render as.
|
|
229
|
+
* @default 'div'
|
|
230
|
+
*/
|
|
231
|
+
as?: React_2.ElementType;
|
|
232
|
+
/** Title content displayed in the card header. */
|
|
233
|
+
title?: React_2.ReactNode;
|
|
234
|
+
/** Subtitle content displayed below the title. */
|
|
235
|
+
subtitle?: React_2.ReactNode;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** Properties for the Card component. */
|
|
239
|
+
export declare interface CardProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
240
|
+
/** Element type to render as.
|
|
241
|
+
* @default 'div'
|
|
242
|
+
*/
|
|
243
|
+
as?: React_2.ElementType;
|
|
244
|
+
/** Whether the card is in a selected state. */
|
|
245
|
+
selected?: boolean;
|
|
246
|
+
/** Callback invoked when the card is clicked for selection. */
|
|
247
|
+
onSelect?: () => void;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export declare const Carousel: {
|
|
251
|
+
({ value: controlledValue, defaultValue, onValueChange, autoPlay, autoPlayInterval, loop, className, children, ref, ...rest }: CarouselProps & {
|
|
252
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
253
|
+
}): JSX.Element;
|
|
254
|
+
displayName: string;
|
|
255
|
+
} & {
|
|
256
|
+
Item: {
|
|
257
|
+
({ className, children, ref, ...rest }: CarouselItemProps & {
|
|
258
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
259
|
+
}): JSX.Element;
|
|
260
|
+
displayName: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/** Properties for the CarouselItem sub-component. */
|
|
265
|
+
export declare type CarouselItemProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
266
|
+
|
|
267
|
+
/** Properties for the Carousel component. */
|
|
268
|
+
export declare interface CarouselProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
269
|
+
/** Controlled index of the currently active slide. */
|
|
270
|
+
value?: number;
|
|
271
|
+
/** Default active slide index for uncontrolled usage.
|
|
272
|
+
* @default 0
|
|
273
|
+
*/
|
|
274
|
+
defaultValue?: number;
|
|
275
|
+
/** Callback invoked when the active slide changes. */
|
|
276
|
+
onValueChange?: (index: number) => void;
|
|
277
|
+
/** Whether the carousel auto-advances slides.
|
|
278
|
+
* @default false
|
|
279
|
+
*/
|
|
280
|
+
autoPlay?: boolean;
|
|
281
|
+
/** Interval in milliseconds between auto-play transitions.
|
|
282
|
+
* @default 5000
|
|
283
|
+
*/
|
|
284
|
+
autoPlayInterval?: number;
|
|
285
|
+
/** Whether the carousel loops back to the first slide after the last.
|
|
286
|
+
* @default false
|
|
287
|
+
*/
|
|
288
|
+
loop?: boolean;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export declare const Checkbox: {
|
|
292
|
+
({ checked: controlledChecked, defaultChecked, indeterminate, onChange, disabled, label, className, ref, ...rest }: CheckboxProps & {
|
|
293
|
+
ref?: React_2.Ref<HTMLLabelElement>;
|
|
294
|
+
}): JSX.Element;
|
|
295
|
+
displayName: string;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/** Properties for the Checkbox component. */
|
|
299
|
+
export declare interface CheckboxProps extends Omit<React_2.HTMLAttributes<HTMLLabelElement>, 'onChange' | 'defaultChecked'> {
|
|
300
|
+
/** Controlled checked state. */
|
|
301
|
+
checked?: boolean;
|
|
302
|
+
/** Initial checked state for uncontrolled usage.
|
|
303
|
+
* @default false
|
|
304
|
+
*/
|
|
305
|
+
defaultChecked?: boolean;
|
|
306
|
+
/** Whether the checkbox shows an indeterminate (mixed) state. */
|
|
307
|
+
indeterminate?: boolean;
|
|
308
|
+
/** Callback fired when the checked state changes. */
|
|
309
|
+
onChange?: (checked: boolean) => void;
|
|
310
|
+
/** Whether the checkbox is disabled and non-interactive. */
|
|
311
|
+
disabled?: boolean;
|
|
312
|
+
/** Text label displayed next to the checkbox. */
|
|
313
|
+
label?: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
317
|
+
|
|
318
|
+
export declare const ColorPicker: {
|
|
319
|
+
({ value: controlledValue, defaultValue, onChange, presets, showOpacity, className, ref, ...rest }: ColorPickerProps & {
|
|
320
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
321
|
+
}): JSX.Element;
|
|
322
|
+
displayName: string;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
/** Properties for the ColorPicker component. */
|
|
326
|
+
export declare interface ColorPickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
327
|
+
/** Controlled hex color value (e.g., '#0f6cbd'). */
|
|
328
|
+
value?: string;
|
|
329
|
+
/** Initial hex color for uncontrolled usage.
|
|
330
|
+
* @default '#0f6cbd'
|
|
331
|
+
*/
|
|
332
|
+
defaultValue?: string;
|
|
333
|
+
/** Callback fired when the selected color changes. */
|
|
334
|
+
onChange?: (color: string) => void;
|
|
335
|
+
/** Array of preset hex colors displayed as quick-select swatches.
|
|
336
|
+
* @default ['#0f6cbd','#d13438','#107c10','#ffb900','#5c2d91','#008272','#e3008c','#242424']
|
|
337
|
+
*/
|
|
338
|
+
presets?: string[];
|
|
339
|
+
/** Whether to show the opacity slider.
|
|
340
|
+
* @default false
|
|
341
|
+
*/
|
|
342
|
+
showOpacity?: boolean;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export declare const Combobox: {
|
|
346
|
+
({ value: controlledValue, defaultValue, onOptionSelect, placeholder, disabled, freeform, className, children, ref, ...rest }: ComboboxProps & {
|
|
347
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
348
|
+
}): JSX.Element;
|
|
349
|
+
displayName: string;
|
|
350
|
+
} & {
|
|
351
|
+
Option: {
|
|
352
|
+
({ value, disabled, className, children, ref, ...rest }: OptionProps & {
|
|
353
|
+
ref?: React_2.Ref<HTMLLIElement>;
|
|
354
|
+
}): JSX.Element;
|
|
355
|
+
displayName: string;
|
|
356
|
+
};
|
|
357
|
+
OptionGroup: {
|
|
358
|
+
({ label, className, children, ref, ...rest }: OptionGroupProps & {
|
|
359
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
360
|
+
}): JSX.Element;
|
|
361
|
+
displayName: string;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
/** Properties for the Combobox component. */
|
|
366
|
+
export declare interface ComboboxProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
367
|
+
/** Controlled selected value. */
|
|
368
|
+
value?: string;
|
|
369
|
+
/** Initial selected value for uncontrolled usage.
|
|
370
|
+
* @default ''
|
|
371
|
+
*/
|
|
372
|
+
defaultValue?: string;
|
|
373
|
+
/** Callback fired when an option is selected. */
|
|
374
|
+
onOptionSelect?: (value: string) => void;
|
|
375
|
+
/** Placeholder text shown when no value is selected. */
|
|
376
|
+
placeholder?: string;
|
|
377
|
+
/** Whether the combobox is disabled and non-interactive.
|
|
378
|
+
* @default false
|
|
379
|
+
*/
|
|
380
|
+
disabled?: boolean;
|
|
381
|
+
/** Whether to allow free-form text input that filters options.
|
|
382
|
+
* @default false
|
|
383
|
+
*/
|
|
384
|
+
freeform?: boolean;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export declare const CompoundButton: {
|
|
388
|
+
({ as, secondaryText, appearance, size, disabled, className, children, ref, ...props }: CompoundButtonProps & {
|
|
389
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
390
|
+
}): JSX.Element;
|
|
391
|
+
displayName: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
/** Properties for the CompoundButton component. */
|
|
395
|
+
export declare interface CompoundButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
396
|
+
/** Custom element type to render as.
|
|
397
|
+
* @default 'button'
|
|
398
|
+
*/
|
|
399
|
+
as?: React_2.ElementType;
|
|
400
|
+
/** Secondary descriptive text displayed below the main label. */
|
|
401
|
+
secondaryText?: React_2.ReactNode;
|
|
402
|
+
/** Visual style variant.
|
|
403
|
+
* @default 'outline'
|
|
404
|
+
*/
|
|
405
|
+
appearance?: Appearance;
|
|
406
|
+
/** Size affecting padding and font size.
|
|
407
|
+
* @default 'medium'
|
|
408
|
+
*/
|
|
409
|
+
size?: Size;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export declare const CounterBadge: {
|
|
413
|
+
({ count, overflowCount, appearance, className, ref, ...props }: CounterBadgeProps & {
|
|
414
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
415
|
+
}): JSX.Element | null;
|
|
416
|
+
displayName: string;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/** Properties for the CounterBadge component. */
|
|
420
|
+
export declare interface CounterBadgeProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
421
|
+
/** Numeric count to display. Hidden when count is 0 or less. */
|
|
422
|
+
count: number;
|
|
423
|
+
/** Maximum count before displaying overflow indicator (e.g. "99+").
|
|
424
|
+
* @default 99
|
|
425
|
+
*/
|
|
426
|
+
overflowCount?: number;
|
|
427
|
+
/** Visual style of the counter badge.
|
|
428
|
+
* @default 'filled'
|
|
429
|
+
*/
|
|
430
|
+
appearance?: 'filled' | 'outline';
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export declare const DataGrid: {
|
|
434
|
+
({ sortColumn: sortColumnProp, defaultSortColumn, sortDirection: sortDirectionProp, defaultSortDirection, onSortChange, selectionMode, selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, children, className, columns: _columns, ref, ...rest }: DataGridProps & {
|
|
435
|
+
ref?: React_2.Ref<HTMLTableElement>;
|
|
436
|
+
}): JSX.Element;
|
|
437
|
+
displayName: string;
|
|
438
|
+
} & {
|
|
439
|
+
Header: {
|
|
440
|
+
({ children, className, ref, ...rest }: DataGridHeaderProps & {
|
|
441
|
+
ref?: React_2.Ref<HTMLTableSectionElement>;
|
|
442
|
+
}): JSX.Element;
|
|
443
|
+
displayName: string;
|
|
444
|
+
};
|
|
445
|
+
HeaderCell: {
|
|
446
|
+
({ columnId, sortable, children, className, ref, ...rest }: DataGridHeaderCellProps & {
|
|
447
|
+
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
448
|
+
}): JSX.Element;
|
|
449
|
+
displayName: string;
|
|
450
|
+
};
|
|
451
|
+
Body: {
|
|
452
|
+
({ children, className, ref, ...rest }: DataGridBodyProps & {
|
|
453
|
+
ref?: React_2.Ref<HTMLTableSectionElement>;
|
|
454
|
+
}): JSX.Element;
|
|
455
|
+
displayName: string;
|
|
456
|
+
};
|
|
457
|
+
Row: {
|
|
458
|
+
({ rowId, children, className, ref, ...rest }: DataGridRowProps & {
|
|
459
|
+
ref?: React_2.Ref<HTMLTableRowElement>;
|
|
460
|
+
}): JSX.Element;
|
|
461
|
+
displayName: string;
|
|
462
|
+
};
|
|
463
|
+
Cell: {
|
|
464
|
+
({ children, className, ref, ...rest }: DataGridCellProps & {
|
|
465
|
+
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
466
|
+
}): JSX.Element;
|
|
467
|
+
displayName: string;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/** Properties for the DataGridBody sub-component. */
|
|
472
|
+
export declare interface DataGridBodyProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
473
|
+
/** DataGrid row elements. */
|
|
474
|
+
children: React_2.ReactNode;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/** Properties for the DataGridCell sub-component. */
|
|
478
|
+
export declare interface DataGridCellProps extends React_2.TdHTMLAttributes<HTMLTableCellElement> {
|
|
479
|
+
/** Cell content. */
|
|
480
|
+
children: React_2.ReactNode;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** Defines a column in the DataGrid. */
|
|
484
|
+
export declare interface DataGridColumn {
|
|
485
|
+
/** Unique identifier for the column. */
|
|
486
|
+
id: string;
|
|
487
|
+
/** Display label for the column header. */
|
|
488
|
+
label: string;
|
|
489
|
+
/** Whether the column supports sorting. */
|
|
490
|
+
sortable?: boolean;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/** Properties for the DataGridHeaderCell sub-component. */
|
|
494
|
+
export declare interface DataGridHeaderCellProps extends React_2.ThHTMLAttributes<HTMLTableCellElement> {
|
|
495
|
+
/** Column ID used for sort tracking. */
|
|
496
|
+
columnId?: string;
|
|
497
|
+
/** Whether this column header supports click-to-sort.
|
|
498
|
+
* @default false
|
|
499
|
+
*/
|
|
500
|
+
sortable?: boolean;
|
|
501
|
+
/** Header cell content. */
|
|
502
|
+
children: React_2.ReactNode;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/** Properties for the DataGridHeader sub-component. */
|
|
506
|
+
export declare interface DataGridHeaderProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
507
|
+
/** Header row elements. */
|
|
508
|
+
children: React_2.ReactNode;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/** Properties for the DataGrid component. */
|
|
512
|
+
export declare interface DataGridProps extends React_2.HTMLAttributes<HTMLTableElement> {
|
|
513
|
+
/** Column definitions for automatic header rendering. */
|
|
514
|
+
columns?: DataGridColumn[];
|
|
515
|
+
/** Controlled column ID currently being sorted. */
|
|
516
|
+
sortColumn?: string;
|
|
517
|
+
/** Default sort column for uncontrolled usage.
|
|
518
|
+
* @default ''
|
|
519
|
+
*/
|
|
520
|
+
defaultSortColumn?: string;
|
|
521
|
+
/** Controlled sort direction. */
|
|
522
|
+
sortDirection?: SortDirection;
|
|
523
|
+
/** Default sort direction for uncontrolled usage.
|
|
524
|
+
* @default 'ascending'
|
|
525
|
+
*/
|
|
526
|
+
defaultSortDirection?: SortDirection;
|
|
527
|
+
/** Callback invoked when the sort column or direction changes. */
|
|
528
|
+
onSortChange?: (columnId: string, direction: SortDirection) => void;
|
|
529
|
+
/** Row selection mode.
|
|
530
|
+
* @default 'none'
|
|
531
|
+
*/
|
|
532
|
+
selectionMode?: 'none' | 'single' | 'multiple';
|
|
533
|
+
/** Controlled set of selected row keys. */
|
|
534
|
+
selectedKeys?: Set<string>;
|
|
535
|
+
/** Default selected keys for uncontrolled usage. */
|
|
536
|
+
defaultSelectedKeys?: Set<string>;
|
|
537
|
+
/** Callback invoked when the selected rows change. */
|
|
538
|
+
onSelectionChange?: (keys: Set<string>) => void;
|
|
539
|
+
/** DataGrid header, body, and row elements. */
|
|
540
|
+
children: React_2.ReactNode;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/** Properties for the DataGridRow sub-component. */
|
|
544
|
+
export declare interface DataGridRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
|
|
545
|
+
/** Unique identifier for this row, used for selection tracking. */
|
|
546
|
+
rowId?: string;
|
|
547
|
+
/** DataGrid cell elements. */
|
|
548
|
+
children: React_2.ReactNode;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export declare const DatePicker: {
|
|
552
|
+
({ value: controlledValue, defaultValue, onChange, formatDate, parseDate, minDate, maxDate, disabledDates, placeholder, disabled, clearable, firstDayOfWeek, open: controlledOpen, onOpenChange, className, ref, ...rest }: DatePickerProps & {
|
|
553
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
554
|
+
}): JSX.Element;
|
|
555
|
+
displayName: string;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
/** Properties for the DatePicker component. */
|
|
559
|
+
export declare interface DatePickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
560
|
+
/** Controlled selected date. */
|
|
561
|
+
value?: Date | null;
|
|
562
|
+
/** Initial date for uncontrolled usage.
|
|
563
|
+
* @default null
|
|
564
|
+
*/
|
|
565
|
+
defaultValue?: Date | null;
|
|
566
|
+
/** Callback fired when the selected date changes. */
|
|
567
|
+
onChange?: (date: Date | null) => void;
|
|
568
|
+
/** Custom function to format a Date into display text. */
|
|
569
|
+
formatDate?: (date: Date) => string;
|
|
570
|
+
/** Custom function to parse user input text into a Date. */
|
|
571
|
+
parseDate?: (str: string) => Date | null;
|
|
572
|
+
/** Earliest selectable date. */
|
|
573
|
+
minDate?: Date;
|
|
574
|
+
/** Latest selectable date. */
|
|
575
|
+
maxDate?: Date;
|
|
576
|
+
/** Function returning true for dates that should be disabled. */
|
|
577
|
+
disabledDates?: (date: Date) => boolean;
|
|
578
|
+
/** Placeholder text shown when no date is selected.
|
|
579
|
+
* @default 'Select a date'
|
|
580
|
+
*/
|
|
581
|
+
placeholder?: string;
|
|
582
|
+
/** Whether the date picker is disabled and non-interactive.
|
|
583
|
+
* @default false
|
|
584
|
+
*/
|
|
585
|
+
disabled?: boolean;
|
|
586
|
+
/** Whether to show a clear button when a date is selected.
|
|
587
|
+
* @default false
|
|
588
|
+
*/
|
|
589
|
+
clearable?: boolean;
|
|
590
|
+
/** First day of the week (0 = Sunday, 1 = Monday, etc.).
|
|
591
|
+
* @default 0
|
|
592
|
+
*/
|
|
593
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
594
|
+
/** Controlled open state of the calendar popup. */
|
|
595
|
+
open?: boolean;
|
|
596
|
+
/** Callback fired when the calendar popup open state changes. */
|
|
597
|
+
onOpenChange?: (open: boolean) => void;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare const Dialog: typeof DialogRoot & {
|
|
601
|
+
Trigger: {
|
|
602
|
+
({ children, ref, ...rest }: DialogTriggerProps & {
|
|
603
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
604
|
+
}): JSX.Element;
|
|
605
|
+
displayName: string;
|
|
606
|
+
};
|
|
607
|
+
Content: {
|
|
608
|
+
({ title, size, children, className, ref, ...rest }: DialogContentProps & {
|
|
609
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
610
|
+
}): React_2.ReactPortal | null;
|
|
611
|
+
displayName: string;
|
|
612
|
+
};
|
|
613
|
+
Footer: {
|
|
614
|
+
({ children, className, ref, ...rest }: DialogFooterProps & {
|
|
615
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
616
|
+
}): JSX.Element;
|
|
617
|
+
displayName: string;
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
/** Properties for the DialogContent sub-component. */
|
|
622
|
+
export declare interface DialogContentProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
623
|
+
/** Title displayed at the top of the dialog. */
|
|
624
|
+
title?: string;
|
|
625
|
+
/** Width size of the dialog.
|
|
626
|
+
* @default 'medium'
|
|
627
|
+
*/
|
|
628
|
+
size?: 'small' | 'medium';
|
|
629
|
+
/** Content to render inside the dialog body. */
|
|
630
|
+
children: React_2.ReactNode;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** Properties for the DialogFooter sub-component. */
|
|
634
|
+
export declare interface DialogFooterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
635
|
+
/** Footer content, typically action buttons. */
|
|
636
|
+
children: React_2.ReactNode;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/** Properties for the Dialog component. */
|
|
640
|
+
export declare interface DialogProps {
|
|
641
|
+
/** Controlled open state of the dialog. */
|
|
642
|
+
open?: boolean;
|
|
643
|
+
/** Default open state for uncontrolled usage.
|
|
644
|
+
* @default false
|
|
645
|
+
*/
|
|
646
|
+
defaultOpen?: boolean;
|
|
647
|
+
/** Callback invoked when the dialog open state changes. */
|
|
648
|
+
onOpenChange?: (open: boolean) => void;
|
|
649
|
+
/** Dialog trigger, content, and footer elements. */
|
|
650
|
+
children: React_2.ReactNode;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
declare function DialogRoot({ open, defaultOpen, onOpenChange, children }: DialogProps): JSX.Element;
|
|
654
|
+
|
|
655
|
+
declare namespace DialogRoot {
|
|
656
|
+
var displayName: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/** Properties for the DialogTrigger sub-component. */
|
|
660
|
+
export declare interface DialogTriggerProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
661
|
+
/** Trigger element that opens the dialog on click. */
|
|
662
|
+
children: React_2.ReactNode;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare const Divider: {
|
|
666
|
+
({ as, orientation, className, children, ref, ...props }: DividerProps & {
|
|
667
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
668
|
+
}): JSX.Element;
|
|
669
|
+
displayName: string;
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
/** Properties for the Divider component. */
|
|
673
|
+
export declare interface DividerProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
674
|
+
/** Element type to render as. */
|
|
675
|
+
as?: React_2.ElementType;
|
|
676
|
+
/** Orientation of the divider line.
|
|
677
|
+
* @default 'horizontal'
|
|
678
|
+
*/
|
|
679
|
+
orientation?: 'horizontal' | 'vertical';
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export declare const Drawer: {
|
|
683
|
+
({ open: openProp, defaultOpen, onOpenChange, position, title, children, className, ref, ...rest }: DrawerProps & {
|
|
684
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
685
|
+
}): React_2.ReactPortal | null;
|
|
686
|
+
displayName: string;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
/** Properties for the Drawer component. */
|
|
690
|
+
export declare interface DrawerProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
691
|
+
/** Controlled open state of the drawer. */
|
|
692
|
+
open?: boolean;
|
|
693
|
+
/** Default open state for uncontrolled usage.
|
|
694
|
+
* @default false
|
|
695
|
+
*/
|
|
696
|
+
defaultOpen?: boolean;
|
|
697
|
+
/** Callback invoked when the drawer open state changes. */
|
|
698
|
+
onOpenChange?: (open: boolean) => void;
|
|
699
|
+
/** Side of the screen from which the drawer slides in.
|
|
700
|
+
* @default 'right'
|
|
701
|
+
*/
|
|
702
|
+
position?: 'left' | 'right';
|
|
703
|
+
/** Title displayed in the drawer header. */
|
|
704
|
+
title?: string;
|
|
705
|
+
/** Content to render inside the drawer body. */
|
|
706
|
+
children: React_2.ReactNode;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export declare const Dropdown: {
|
|
710
|
+
({ value: controlledValue, defaultValue, onOptionSelect, placeholder, disabled, className, children, ref, ...rest }: DropdownProps & {
|
|
711
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
712
|
+
}): JSX.Element;
|
|
713
|
+
displayName: string;
|
|
714
|
+
} & {
|
|
715
|
+
Option: {
|
|
716
|
+
({ value, disabled, className, children, ref, ...rest }: OptionProps & {
|
|
717
|
+
ref?: React_2.Ref<HTMLLIElement>;
|
|
718
|
+
}): JSX.Element;
|
|
719
|
+
displayName: string;
|
|
720
|
+
};
|
|
721
|
+
OptionGroup: {
|
|
722
|
+
({ label, className, children, ref, ...rest }: OptionGroupProps & {
|
|
723
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
724
|
+
}): JSX.Element;
|
|
725
|
+
displayName: string;
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
/** Properties for the Dropdown component. */
|
|
730
|
+
export declare interface DropdownProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
731
|
+
/** Controlled selected value. */
|
|
732
|
+
value?: string;
|
|
733
|
+
/** Initial selected value for uncontrolled usage.
|
|
734
|
+
* @default ''
|
|
735
|
+
*/
|
|
736
|
+
defaultValue?: string;
|
|
737
|
+
/** Callback fired when an option is selected. */
|
|
738
|
+
onOptionSelect?: (value: string) => void;
|
|
739
|
+
/** Placeholder text shown when no value is selected.
|
|
740
|
+
* @default 'Select an option'
|
|
741
|
+
*/
|
|
742
|
+
placeholder?: string;
|
|
743
|
+
/** Whether the dropdown is disabled and non-interactive.
|
|
744
|
+
* @default false
|
|
745
|
+
*/
|
|
746
|
+
disabled?: boolean;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export declare const Field: {
|
|
750
|
+
({ label, hint, error, required, htmlFor, className, children, ref, ...rest }: FieldProps & {
|
|
751
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
752
|
+
}): JSX.Element;
|
|
753
|
+
displayName: string;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
/** Properties for the Field component. */
|
|
757
|
+
export declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
758
|
+
/** Label text displayed above the field. */
|
|
759
|
+
label?: string;
|
|
760
|
+
/** Hint text displayed below the field when no error is present. */
|
|
761
|
+
hint?: string;
|
|
762
|
+
/** Error message displayed below the field; sets `aria-invalid` on the child. */
|
|
763
|
+
error?: string;
|
|
764
|
+
/** Whether the field is required; shows a red asterisk next to the label. */
|
|
765
|
+
required?: boolean;
|
|
766
|
+
/** Explicit `for` attribute linking the label to a child input. */
|
|
767
|
+
htmlFor?: string;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
export declare const Flex: {
|
|
771
|
+
({ as: Component, direction, wrap, align, justify, gap, inline, grow, shrink, className, children, ref, ...props }: FlexProps & {
|
|
772
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
773
|
+
}): JSX.Element;
|
|
774
|
+
displayName: string;
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
/** Properties for the Flex component. */
|
|
778
|
+
export declare interface FlexProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
779
|
+
/** Element type to render as.
|
|
780
|
+
* @default 'div'
|
|
781
|
+
*/
|
|
782
|
+
as?: React_2.ElementType;
|
|
783
|
+
/** Flex direction.
|
|
784
|
+
* @default 'row'
|
|
785
|
+
*/
|
|
786
|
+
direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
787
|
+
/** Flex wrap behavior. */
|
|
788
|
+
wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
789
|
+
/** Cross-axis alignment of items. */
|
|
790
|
+
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
791
|
+
/** Main-axis justification of items. */
|
|
792
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
793
|
+
/** Gap size between flex items. */
|
|
794
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
795
|
+
/** Whether to use inline-flex instead of flex. */
|
|
796
|
+
inline?: boolean;
|
|
797
|
+
/** Whether the flex container should grow to fill available space. */
|
|
798
|
+
grow?: boolean;
|
|
799
|
+
/** Whether the flex container should shrink if necessary. */
|
|
800
|
+
shrink?: boolean;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export declare const Grid: {
|
|
804
|
+
({ as: Component, columns, rows, gap, columnGap, rowGap, align, justify, className, style, children, ref, ...props }: GridProps & {
|
|
805
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
806
|
+
}): JSX.Element;
|
|
807
|
+
displayName: string;
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
/** Properties for the Grid component. */
|
|
811
|
+
export declare interface GridProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
812
|
+
/** Element type to render as.
|
|
813
|
+
* @default 'div'
|
|
814
|
+
*/
|
|
815
|
+
as?: React_2.ElementType;
|
|
816
|
+
/** Number of grid columns. */
|
|
817
|
+
columns?: 1 | 2 | 3 | 4 | 5 | 6 | 12;
|
|
818
|
+
/** Number of grid rows. */
|
|
819
|
+
rows?: number;
|
|
820
|
+
/** Uniform gap size between grid items. */
|
|
821
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
822
|
+
/** Horizontal gap size between grid columns. */
|
|
823
|
+
columnGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
824
|
+
/** Vertical gap size between grid rows. */
|
|
825
|
+
rowGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
826
|
+
/** Vertical alignment of items within the grid. */
|
|
827
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
828
|
+
/** Horizontal alignment of items within the grid. */
|
|
829
|
+
justify?: 'start' | 'center' | 'end' | 'stretch';
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
declare const Image_2: {
|
|
833
|
+
({ fit, shape, shadow, block, bordered, className, alt, ref, ...rest }: ImageProps & {
|
|
834
|
+
ref?: React_2.Ref<HTMLImageElement>;
|
|
835
|
+
}): JSX.Element;
|
|
836
|
+
displayName: string;
|
|
837
|
+
};
|
|
838
|
+
export { Image_2 as Image }
|
|
839
|
+
|
|
840
|
+
export declare type ImageFit = 'none' | 'center' | 'contain' | 'cover' | 'default';
|
|
841
|
+
|
|
842
|
+
/** Properties for the Image component. */
|
|
843
|
+
export declare interface ImageProps extends React_2.ImgHTMLAttributes<HTMLImageElement> {
|
|
844
|
+
/** How the image fits within its container.
|
|
845
|
+
* @default 'default'
|
|
846
|
+
*/
|
|
847
|
+
fit?: ImageFit;
|
|
848
|
+
/** Shape of the image border radius.
|
|
849
|
+
* @default 'square'
|
|
850
|
+
*/
|
|
851
|
+
shape?: ImageShape;
|
|
852
|
+
/** Whether to apply a shadow to the image.
|
|
853
|
+
* @default false
|
|
854
|
+
*/
|
|
855
|
+
shadow?: boolean;
|
|
856
|
+
/** Whether the image is displayed as a block element filling its container width.
|
|
857
|
+
* @default false
|
|
858
|
+
*/
|
|
859
|
+
block?: boolean;
|
|
860
|
+
/** Whether to show a border around the image.
|
|
861
|
+
* @default false
|
|
862
|
+
*/
|
|
863
|
+
bordered?: boolean;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
export declare type ImageShape = 'circular' | 'rounded' | 'square';
|
|
867
|
+
|
|
868
|
+
export declare const InfoLabel: {
|
|
869
|
+
({ label, info, className, ref, ...props }: InfoLabelProps & {
|
|
870
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
871
|
+
}): JSX.Element;
|
|
872
|
+
displayName: string;
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
/** Properties for the InfoLabel component. */
|
|
876
|
+
export declare interface InfoLabelProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
877
|
+
/** Primary label text to display. */
|
|
878
|
+
label: string;
|
|
879
|
+
/** Informational tooltip text shown via the info icon. */
|
|
880
|
+
info: string;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export declare const Input: {
|
|
884
|
+
({ error, contentBefore, contentAfter, className, ref, ...props }: InputProps & {
|
|
885
|
+
ref?: React_2.Ref<HTMLInputElement>;
|
|
886
|
+
}): JSX.Element;
|
|
887
|
+
displayName: string;
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
/** Properties for the Input component. */
|
|
891
|
+
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
892
|
+
/** Validation error message; sets `aria-invalid` when provided. */
|
|
893
|
+
error?: string;
|
|
894
|
+
/** Slot rendered before the input text (e.g., an icon). */
|
|
895
|
+
contentBefore?: Slot<'span'>;
|
|
896
|
+
/** Slot rendered after the input text (e.g., a suffix). */
|
|
897
|
+
contentAfter?: Slot<'span'>;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export declare const Label: {
|
|
901
|
+
({ required, disabled, size, weight, className, children, ref, ...rest }: LabelProps & {
|
|
902
|
+
ref?: React_2.Ref<HTMLLabelElement>;
|
|
903
|
+
}): JSX.Element;
|
|
904
|
+
displayName: string;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
/** Properties for the Label component. */
|
|
908
|
+
export declare interface LabelProps extends React_2.LabelHTMLAttributes<HTMLLabelElement> {
|
|
909
|
+
/** Whether to show a required indicator asterisk.
|
|
910
|
+
* @default false
|
|
911
|
+
*/
|
|
912
|
+
required?: boolean;
|
|
913
|
+
/** Whether the label is visually dimmed.
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
disabled?: boolean;
|
|
917
|
+
/** Text size of the label.
|
|
918
|
+
* @default 'medium'
|
|
919
|
+
*/
|
|
920
|
+
size?: Extract<Size, 'small' | 'medium' | 'large'>;
|
|
921
|
+
/** Font weight of the label.
|
|
922
|
+
* @default 'regular'
|
|
923
|
+
*/
|
|
924
|
+
weight?: 'regular' | 'semibold';
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export declare const Link: {
|
|
928
|
+
({ as, variant, disabled, className, children, onClick, ref, ...props }: LinkProps & {
|
|
929
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
930
|
+
}): JSX.Element;
|
|
931
|
+
displayName: string;
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
/** Properties for the Link component. */
|
|
935
|
+
export declare interface LinkProps extends React_2.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
936
|
+
/** Custom element type to render as.
|
|
937
|
+
* @default 'a'
|
|
938
|
+
*/
|
|
939
|
+
as?: React_2.ElementType;
|
|
940
|
+
/** Visual style variant for the link.
|
|
941
|
+
* @default 'inline'
|
|
942
|
+
*/
|
|
943
|
+
variant?: LinkVariant;
|
|
944
|
+
/** Whether the link is disabled and non-interactive. */
|
|
945
|
+
disabled?: boolean;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export declare type LinkVariant = 'inline' | 'standalone' | 'subtle';
|
|
949
|
+
|
|
950
|
+
export declare const List: {
|
|
951
|
+
({ selectable, selectionMode, selectedItems: controlledSelected, defaultSelectedItems, onSelectionChange, className, children, ref, ...rest }: ListProps & {
|
|
952
|
+
ref?: React_2.Ref<HTMLUListElement>;
|
|
953
|
+
}): JSX.Element;
|
|
954
|
+
displayName: string;
|
|
955
|
+
} & {
|
|
956
|
+
Item: {
|
|
957
|
+
({ value, action, className, children, onClick, ref, ...rest }: ListItemProps & {
|
|
958
|
+
ref?: React_2.Ref<HTMLLIElement>;
|
|
959
|
+
}): JSX.Element;
|
|
960
|
+
displayName: string;
|
|
961
|
+
};
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
/** Properties for the ListItem component. */
|
|
965
|
+
export declare interface ListItemProps extends React_2.HTMLAttributes<HTMLLIElement> {
|
|
966
|
+
/** Unique value identifying this item for selection tracking. */
|
|
967
|
+
value?: string;
|
|
968
|
+
/** Action element rendered at the end of the list item. */
|
|
969
|
+
action?: React_2.ReactNode;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/** Properties for the List component. */
|
|
973
|
+
export declare interface ListProps extends React_2.HTMLAttributes<HTMLUListElement> {
|
|
974
|
+
/** Whether list items can be selected.
|
|
975
|
+
* @default false
|
|
976
|
+
*/
|
|
977
|
+
selectable?: boolean;
|
|
978
|
+
/** Selection behavior when selectable is true.
|
|
979
|
+
* @default 'single'
|
|
980
|
+
*/
|
|
981
|
+
selectionMode?: 'single' | 'multi';
|
|
982
|
+
/** Controlled array of selected item values. */
|
|
983
|
+
selectedItems?: string[];
|
|
984
|
+
/** Default selected items for uncontrolled usage.
|
|
985
|
+
* @default []
|
|
986
|
+
*/
|
|
987
|
+
defaultSelectedItems?: string[];
|
|
988
|
+
/** Callback invoked when the selection changes. */
|
|
989
|
+
onSelectionChange?: (selected: string[]) => void;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
export declare const Menu: {
|
|
993
|
+
({ children, className, ref, ...rest }: MenuProps & {
|
|
994
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
995
|
+
}): JSX.Element;
|
|
996
|
+
displayName: string;
|
|
997
|
+
} & {
|
|
998
|
+
Item: {
|
|
999
|
+
({ icon, shortcut, disabled, onClick, children, className, ref, ...rest }: MenuItemProps & {
|
|
1000
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1001
|
+
}): JSX.Element;
|
|
1002
|
+
displayName: string;
|
|
1003
|
+
};
|
|
1004
|
+
Divider: {
|
|
1005
|
+
({ className, ref, ...rest }: MenuDividerProps & {
|
|
1006
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1007
|
+
}): JSX.Element;
|
|
1008
|
+
displayName: string;
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
export declare const MenuButton: {
|
|
1013
|
+
({ appearance, size, icon, menuIcon, expanded, disabled, className, children, ref, ...props }: MenuButtonProps & {
|
|
1014
|
+
ref?: React_2.Ref<HTMLButtonElement>;
|
|
1015
|
+
}): JSX.Element;
|
|
1016
|
+
displayName: string;
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
/** Properties for the MenuButton component. */
|
|
1020
|
+
export declare interface MenuButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1021
|
+
/** Visual style variant.
|
|
1022
|
+
* @default 'outline'
|
|
1023
|
+
*/
|
|
1024
|
+
appearance?: Appearance;
|
|
1025
|
+
/** Size affecting padding and font size.
|
|
1026
|
+
* @default 'medium'
|
|
1027
|
+
*/
|
|
1028
|
+
size?: Size;
|
|
1029
|
+
/** Icon slot rendered before the button label. */
|
|
1030
|
+
icon?: Slot<'span'>;
|
|
1031
|
+
/** Custom icon slot for the menu chevron indicator. */
|
|
1032
|
+
menuIcon?: Slot<'span'>;
|
|
1033
|
+
/** Whether the associated menu is currently expanded. */
|
|
1034
|
+
expanded?: boolean;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/** Properties for the MenuDivider sub-component. */
|
|
1038
|
+
export declare type MenuDividerProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
1039
|
+
|
|
1040
|
+
/** Properties for the MenuItem sub-component. */
|
|
1041
|
+
export declare interface MenuItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1042
|
+
/** Slot for an icon displayed before the item text. */
|
|
1043
|
+
icon?: Slot<'span'>;
|
|
1044
|
+
/** Keyboard shortcut text displayed on the right side. */
|
|
1045
|
+
shortcut?: string;
|
|
1046
|
+
/** Whether the menu item is disabled. */
|
|
1047
|
+
disabled?: boolean;
|
|
1048
|
+
/** Label content of the menu item. */
|
|
1049
|
+
children: React_2.ReactNode;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/** Properties for the Menu component. */
|
|
1053
|
+
export declare interface MenuProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1054
|
+
/** Menu items and dividers to render. */
|
|
1055
|
+
children: React_2.ReactNode;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export declare const MessageBar: {
|
|
1059
|
+
({ status, onDismiss, icon, dismiss, children, className, ref, ...rest }: MessageBarProps & {
|
|
1060
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1061
|
+
}): JSX.Element;
|
|
1062
|
+
displayName: string;
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
/** Properties for the MessageBar component. */
|
|
1066
|
+
export declare interface MessageBarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1067
|
+
/** Status level controlling the color and icon of the message bar.
|
|
1068
|
+
* @default 'info'
|
|
1069
|
+
*/
|
|
1070
|
+
status?: Status;
|
|
1071
|
+
/** Callback invoked when the dismiss button is clicked. */
|
|
1072
|
+
onDismiss?: () => void;
|
|
1073
|
+
/** Slot for a custom status icon. */
|
|
1074
|
+
icon?: Slot<'span'>;
|
|
1075
|
+
/** Slot for a custom dismiss button. */
|
|
1076
|
+
dismiss?: Slot<'button'>;
|
|
1077
|
+
/** Message content to display. */
|
|
1078
|
+
children: React_2.ReactNode;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export declare const Nav: {
|
|
1082
|
+
({ selectedValue: controlledValue, defaultSelectedValue, onNavItemSelect, className, children, ref, ...rest }: NavProps & {
|
|
1083
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
1084
|
+
}): JSX.Element;
|
|
1085
|
+
displayName: string;
|
|
1086
|
+
} & {
|
|
1087
|
+
Category: {
|
|
1088
|
+
({ value, icon, className, children, ref, ...rest }: NavCategoryProps & {
|
|
1089
|
+
ref?: React_2.Ref<HTMLLIElement>;
|
|
1090
|
+
}): JSX.Element;
|
|
1091
|
+
displayName: string;
|
|
1092
|
+
};
|
|
1093
|
+
Item: {
|
|
1094
|
+
({ value, icon, href, className, children, onClick, ref, ...rest }: NavItemProps & {
|
|
1095
|
+
ref?: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
1096
|
+
}): JSX.Element;
|
|
1097
|
+
displayName: string;
|
|
1098
|
+
};
|
|
1099
|
+
SubItem: {
|
|
1100
|
+
({ value, href, className, children, onClick, ref, ...rest }: NavSubItemProps & {
|
|
1101
|
+
ref?: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
1102
|
+
}): JSX.Element;
|
|
1103
|
+
displayName: string;
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
/** Properties for the NavCategory sub-component. */
|
|
1108
|
+
export declare interface NavCategoryProps extends React_2.HTMLAttributes<HTMLLIElement> {
|
|
1109
|
+
/** Unique value identifying this category. */
|
|
1110
|
+
value: string;
|
|
1111
|
+
/** Icon displayed before the category label. */
|
|
1112
|
+
icon?: React_2.ReactNode;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
/** Properties for the NavItem sub-component. */
|
|
1116
|
+
export declare interface NavItemProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
1117
|
+
/** Unique value identifying this nav item. */
|
|
1118
|
+
value: string;
|
|
1119
|
+
/** Icon displayed before the item label. */
|
|
1120
|
+
icon?: React_2.ReactNode;
|
|
1121
|
+
/** URL to navigate to; renders as an anchor instead of a button when provided. */
|
|
1122
|
+
href?: string;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/** Properties for the Nav component. */
|
|
1126
|
+
export declare interface NavProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
1127
|
+
/** Controlled value of the currently selected nav item. */
|
|
1128
|
+
selectedValue?: string;
|
|
1129
|
+
/** Default selected nav item value for uncontrolled usage.
|
|
1130
|
+
* @default ''
|
|
1131
|
+
*/
|
|
1132
|
+
defaultSelectedValue?: string;
|
|
1133
|
+
/** Callback invoked when a nav item is selected. */
|
|
1134
|
+
onNavItemSelect?: (value: string) => void;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/** Properties for the NavSubItem sub-component. */
|
|
1138
|
+
export declare interface NavSubItemProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
1139
|
+
/** Unique value identifying this sub-item. */
|
|
1140
|
+
value: string;
|
|
1141
|
+
/** URL to navigate to; renders as an anchor instead of a button when provided. */
|
|
1142
|
+
href?: string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
declare const Option_2: {
|
|
1146
|
+
({ value, disabled, className, children, ref, ...rest }: OptionProps & {
|
|
1147
|
+
ref?: React_2.Ref<HTMLLIElement>;
|
|
1148
|
+
}): JSX.Element;
|
|
1149
|
+
displayName: string;
|
|
1150
|
+
};
|
|
1151
|
+
export { Option_2 as Option }
|
|
1152
|
+
|
|
1153
|
+
export declare const OptionGroup: {
|
|
1154
|
+
({ label, className, children, ref, ...rest }: OptionGroupProps & {
|
|
1155
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1156
|
+
}): JSX.Element;
|
|
1157
|
+
displayName: string;
|
|
1158
|
+
};
|
|
1159
|
+
|
|
1160
|
+
/** Properties for the OptionGroup component used to group options. */
|
|
1161
|
+
export declare interface OptionGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1162
|
+
/** Heading label for the option group. */
|
|
1163
|
+
label: string;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/** Properties for the Option component used within Combobox and Dropdown. */
|
|
1167
|
+
export declare interface OptionProps extends React_2.LiHTMLAttributes<HTMLLIElement> {
|
|
1168
|
+
/** Value associated with this option. */
|
|
1169
|
+
value: string;
|
|
1170
|
+
/** Whether the option is disabled and non-selectable. */
|
|
1171
|
+
disabled?: boolean;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
export declare const Overflow: {
|
|
1175
|
+
({ overflowButton, children, className, ref, ...rest }: OverflowProps & {
|
|
1176
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1177
|
+
}): JSX.Element;
|
|
1178
|
+
displayName: string;
|
|
1179
|
+
} & {
|
|
1180
|
+
Item: {
|
|
1181
|
+
({ itemId, children, className, style, ref, ...rest }: OverflowItemProps & {
|
|
1182
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1183
|
+
}): JSX.Element;
|
|
1184
|
+
displayName: string;
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
export declare const OverflowItem: {
|
|
1189
|
+
({ itemId, children, className, style, ref, ...rest }: OverflowItemProps & {
|
|
1190
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1191
|
+
}): JSX.Element;
|
|
1192
|
+
displayName: string;
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
/** Properties for the OverflowItem sub-component. */
|
|
1196
|
+
export declare interface OverflowItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1197
|
+
/** Unique identifier for tracking this item's overflow visibility. */
|
|
1198
|
+
itemId: string;
|
|
1199
|
+
/** Content of the overflow item. */
|
|
1200
|
+
children: React_2.ReactNode;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/** Properties for the Overflow component. */
|
|
1204
|
+
export declare interface OverflowProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1205
|
+
/** Render function for the overflow button, receiving the count of hidden items. */
|
|
1206
|
+
overflowButton?: (count: number) => React_2.ReactNode;
|
|
1207
|
+
/** Child elements to monitor for overflow. */
|
|
1208
|
+
children: React_2.ReactNode;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
export declare const Pagination: {
|
|
1212
|
+
({ currentPage: controlledPage, defaultCurrentPage, totalPages, onPageChange, siblingCount, boundaryCount, showPreviousNext, showFirstLast, disabled, size, className, ref, ...rest }: PaginationProps & {
|
|
1213
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
1214
|
+
}): JSX.Element | null;
|
|
1215
|
+
displayName: string;
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
/** Properties for the Pagination component. */
|
|
1219
|
+
export declare interface PaginationProps extends Omit<React_2.HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
1220
|
+
/** Controlled current page number. */
|
|
1221
|
+
currentPage?: number;
|
|
1222
|
+
/** Default current page for uncontrolled usage.
|
|
1223
|
+
* @default 1
|
|
1224
|
+
*/
|
|
1225
|
+
defaultCurrentPage?: number;
|
|
1226
|
+
/** Total number of pages. */
|
|
1227
|
+
totalPages: number;
|
|
1228
|
+
/** Callback invoked when the page changes. */
|
|
1229
|
+
onPageChange?: (page: number) => void;
|
|
1230
|
+
/** Number of page buttons to show on each side of the current page.
|
|
1231
|
+
* @default 1
|
|
1232
|
+
*/
|
|
1233
|
+
siblingCount?: number;
|
|
1234
|
+
/** Number of page buttons to always show at the start and end.
|
|
1235
|
+
* @default 1
|
|
1236
|
+
*/
|
|
1237
|
+
boundaryCount?: number;
|
|
1238
|
+
/** Whether to show previous/next navigation buttons.
|
|
1239
|
+
* @default true
|
|
1240
|
+
*/
|
|
1241
|
+
showPreviousNext?: boolean;
|
|
1242
|
+
/** Whether to show first/last page navigation buttons.
|
|
1243
|
+
* @default false
|
|
1244
|
+
*/
|
|
1245
|
+
showFirstLast?: boolean;
|
|
1246
|
+
/** Whether the entire pagination control is disabled.
|
|
1247
|
+
* @default false
|
|
1248
|
+
*/
|
|
1249
|
+
disabled?: boolean;
|
|
1250
|
+
/** Size of the pagination buttons.
|
|
1251
|
+
* @default 'medium'
|
|
1252
|
+
*/
|
|
1253
|
+
size?: 'small' | 'medium';
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
export declare const Persona: {
|
|
1257
|
+
({ name, secondaryText, src, size, status, avatar, badge, className, ref, ...props }: PersonaProps & {
|
|
1258
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1259
|
+
}): JSX.Element;
|
|
1260
|
+
displayName: string;
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
/** Properties for the Persona component. */
|
|
1264
|
+
export declare interface PersonaProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1265
|
+
/** Display name of the person. */
|
|
1266
|
+
name: string;
|
|
1267
|
+
/** Secondary text such as job title or email. */
|
|
1268
|
+
secondaryText?: string;
|
|
1269
|
+
/** URL of the person's avatar image. */
|
|
1270
|
+
src?: string;
|
|
1271
|
+
/** Size of the persona avatar.
|
|
1272
|
+
* @default 'medium'
|
|
1273
|
+
*/
|
|
1274
|
+
size?: Size;
|
|
1275
|
+
/** Presence status shown as a badge on the avatar. */
|
|
1276
|
+
status?: PresenceStatus;
|
|
1277
|
+
/** Slot for a custom avatar element. */
|
|
1278
|
+
avatar?: Slot<'span'>;
|
|
1279
|
+
/** Slot for a custom badge element. */
|
|
1280
|
+
badge?: Slot<'span'>;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export declare const Popover: typeof PopoverRoot & {
|
|
1284
|
+
Trigger: {
|
|
1285
|
+
({ children, ref, ...rest }: PopoverTriggerProps & {
|
|
1286
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
1287
|
+
}): JSX.Element;
|
|
1288
|
+
displayName: string;
|
|
1289
|
+
};
|
|
1290
|
+
Content: {
|
|
1291
|
+
({ children, className, ref, ...rest }: PopoverContentProps & {
|
|
1292
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1293
|
+
}): JSX.Element | null;
|
|
1294
|
+
displayName: string;
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
/** Properties for the PopoverContent sub-component. */
|
|
1299
|
+
export declare interface PopoverContentProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1300
|
+
/** Content to render inside the popover. */
|
|
1301
|
+
children: React_2.ReactNode;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/** Properties for the Popover component. */
|
|
1305
|
+
export declare interface PopoverProps {
|
|
1306
|
+
/** Controlled open state of the popover. */
|
|
1307
|
+
open?: boolean;
|
|
1308
|
+
/** Default open state for uncontrolled usage.
|
|
1309
|
+
* @default false
|
|
1310
|
+
*/
|
|
1311
|
+
defaultOpen?: boolean;
|
|
1312
|
+
/** Callback invoked when the popover open state changes. */
|
|
1313
|
+
onOpenChange?: (open: boolean) => void;
|
|
1314
|
+
/** Popover trigger and content elements. */
|
|
1315
|
+
children: React_2.ReactNode;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
declare function PopoverRoot({ open: openProp, defaultOpen, onOpenChange, children }: PopoverProps): JSX.Element;
|
|
1319
|
+
|
|
1320
|
+
declare namespace PopoverRoot {
|
|
1321
|
+
var displayName: string;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/** Properties for the PopoverTrigger sub-component. */
|
|
1325
|
+
export declare interface PopoverTriggerProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1326
|
+
/** Trigger element that toggles the popover on click. */
|
|
1327
|
+
children: React_2.ReactNode;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
export declare const PresenceBadge: {
|
|
1331
|
+
({ status, size, className, ref, ...props }: PresenceBadgeProps & {
|
|
1332
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
1333
|
+
}): JSX.Element;
|
|
1334
|
+
displayName: string;
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
/** Properties for the PresenceBadge component. */
|
|
1338
|
+
export declare interface PresenceBadgeProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1339
|
+
/** Presence status to display. */
|
|
1340
|
+
status: PresenceStatus;
|
|
1341
|
+
/** Size of the presence indicator.
|
|
1342
|
+
* @default 'medium'
|
|
1343
|
+
*/
|
|
1344
|
+
size?: Size;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
/** User presence status for Avatar and Persona components. */
|
|
1348
|
+
export declare type PresenceStatus = 'available' | 'busy' | 'away' | 'offline' | 'dnd' | 'oof';
|
|
1349
|
+
|
|
1350
|
+
export declare const ProgressBar: {
|
|
1351
|
+
({ value, max, label, className, ref, ...rest }: ProgressBarProps & {
|
|
1352
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1353
|
+
}): JSX.Element;
|
|
1354
|
+
displayName: string;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
/** Properties for the ProgressBar component. */
|
|
1358
|
+
export declare interface ProgressBarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1359
|
+
/** Current progress value. Omit for indeterminate mode. */
|
|
1360
|
+
value?: number;
|
|
1361
|
+
/** Maximum progress value.
|
|
1362
|
+
* @default 100
|
|
1363
|
+
*/
|
|
1364
|
+
max?: number;
|
|
1365
|
+
/** Accessible label for the progress bar. */
|
|
1366
|
+
label?: string;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
export declare const RadioGroup: {
|
|
1370
|
+
({ value: controlledValue, defaultValue, onChange, orientation, children, className, "aria-label": ariaLabel, ref, ...rest }: RadioGroupProps & {
|
|
1371
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1372
|
+
}): JSX.Element;
|
|
1373
|
+
displayName: string;
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1376
|
+
/** Properties for the RadioGroup component. */
|
|
1377
|
+
export declare interface RadioGroupProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1378
|
+
/** Controlled selected value. */
|
|
1379
|
+
value?: string;
|
|
1380
|
+
/** Initial selected value for uncontrolled usage.
|
|
1381
|
+
* @default ''
|
|
1382
|
+
*/
|
|
1383
|
+
defaultValue?: string;
|
|
1384
|
+
/** Callback fired when the selected value changes. */
|
|
1385
|
+
onChange?: (value: string) => void;
|
|
1386
|
+
/** Layout direction of radio items.
|
|
1387
|
+
* @default 'vertical'
|
|
1388
|
+
*/
|
|
1389
|
+
orientation?: 'vertical' | 'horizontal';
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
export declare function RadioItem({ value, label, disabled, className }: RadioItemProps): JSX.Element;
|
|
1393
|
+
|
|
1394
|
+
/** Properties for the RadioItem component. */
|
|
1395
|
+
export declare interface RadioItemProps {
|
|
1396
|
+
/** Value associated with this radio option. */
|
|
1397
|
+
value: string;
|
|
1398
|
+
/** Text label displayed next to the radio indicator. */
|
|
1399
|
+
label?: string;
|
|
1400
|
+
/** Whether the radio item is disabled and non-interactive. */
|
|
1401
|
+
disabled?: boolean;
|
|
1402
|
+
/** Additional CSS class name. */
|
|
1403
|
+
className?: string;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
export declare const Rating: {
|
|
1407
|
+
({ value: valueProp, defaultValue, onChange, max, size, disabled, className, ref, ...rest }: RatingProps & {
|
|
1408
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1409
|
+
}): JSX.Element;
|
|
1410
|
+
displayName: string;
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
export declare const RatingDisplay: {
|
|
1414
|
+
({ value, max, size, className, ref, ...rest }: RatingDisplayProps & {
|
|
1415
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1416
|
+
}): JSX.Element;
|
|
1417
|
+
displayName: string;
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
/** Properties for the RatingDisplay (read-only) component. */
|
|
1421
|
+
export declare interface RatingDisplayProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1422
|
+
/** Rating value to display. */
|
|
1423
|
+
value: number;
|
|
1424
|
+
/** Maximum number of stars.
|
|
1425
|
+
* @default 5
|
|
1426
|
+
*/
|
|
1427
|
+
max?: number;
|
|
1428
|
+
/** Size of the star icons.
|
|
1429
|
+
* @default 'medium'
|
|
1430
|
+
*/
|
|
1431
|
+
size?: Size;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/** Properties for the Rating component. */
|
|
1435
|
+
export declare interface RatingProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1436
|
+
/** Controlled rating value. */
|
|
1437
|
+
value?: number;
|
|
1438
|
+
/** Initial rating for uncontrolled usage.
|
|
1439
|
+
* @default 0
|
|
1440
|
+
*/
|
|
1441
|
+
defaultValue?: number;
|
|
1442
|
+
/** Callback fired when the rating changes. */
|
|
1443
|
+
onChange?: (value: number) => void;
|
|
1444
|
+
/** Maximum number of stars.
|
|
1445
|
+
* @default 5
|
|
1446
|
+
*/
|
|
1447
|
+
max?: number;
|
|
1448
|
+
/** Size of the star icons.
|
|
1449
|
+
* @default 'medium'
|
|
1450
|
+
*/
|
|
1451
|
+
size?: Size;
|
|
1452
|
+
/** Whether the rating is disabled and non-interactive.
|
|
1453
|
+
* @default false
|
|
1454
|
+
*/
|
|
1455
|
+
disabled?: boolean;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Renders a resolved slot as a React element. Returns `null` if the slot is not defined.
|
|
1460
|
+
*
|
|
1461
|
+
* @param slot The slot value from component props.
|
|
1462
|
+
* @param defaultAs The default element type (e.g., 'span', 'div').
|
|
1463
|
+
* @param baseClassName Optional base class to merge with the slot's className.
|
|
1464
|
+
* @returns A React element, or `null` if the slot is empty.
|
|
1465
|
+
*/
|
|
1466
|
+
export declare function renderSlot<T extends React_2.ElementType = 'span'>(slot: Slot<T> | undefined | null, defaultAs?: React_2.ElementType, baseClassName?: string): React_2.ReactElement | null;
|
|
1467
|
+
|
|
1468
|
+
/** The normalized output of {@link resolveSlot}, ready for rendering. */
|
|
1469
|
+
declare interface ResolvedSlot {
|
|
1470
|
+
/** The element type to render (e.g., 'span', 'div', or a component). */
|
|
1471
|
+
Component: React_2.ElementType;
|
|
1472
|
+
/** Merged props including className and any extra HTML attributes. */
|
|
1473
|
+
props: Record<string, unknown>;
|
|
1474
|
+
/** The content to render inside the element. */
|
|
1475
|
+
children: React_2.ReactNode;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Resolves a Slot value into a Component + props + children tuple.
|
|
1480
|
+
*
|
|
1481
|
+
* - If the slot is `null`, `undefined`, or `false`, returns `null`.
|
|
1482
|
+
* - If the slot is a ReactNode (element, string, number), wraps it in `defaultAs`.
|
|
1483
|
+
* - If the slot is an object, extracts `as`, `children`, `className`, and rest props.
|
|
1484
|
+
*
|
|
1485
|
+
* @param slot The slot value from component props.
|
|
1486
|
+
* @param defaultAs The default element type (e.g., 'span', 'div'). Defaults to 'span'.
|
|
1487
|
+
* @param baseClassName Optional base class to merge with the slot's className.
|
|
1488
|
+
*/
|
|
1489
|
+
export declare function resolveSlot<T extends React_2.ElementType = 'span'>(slot: Slot<T> | undefined | null, defaultAs?: T, baseClassName?: string): ResolvedSlot | null;
|
|
1490
|
+
|
|
1491
|
+
export declare const SearchBox: {
|
|
1492
|
+
({ value: controlledValue, defaultValue, onChange, onClear, placeholder, disabled, contentBefore, contentAfter, dismiss, className, ref, ...rest }: SearchBoxProps & {
|
|
1493
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1494
|
+
}): JSX.Element;
|
|
1495
|
+
displayName: string;
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
/** Properties for the SearchBox component. */
|
|
1499
|
+
export declare interface SearchBoxProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1500
|
+
/** Controlled search text value. */
|
|
1501
|
+
value?: string;
|
|
1502
|
+
/** Initial search text for uncontrolled usage.
|
|
1503
|
+
* @default ''
|
|
1504
|
+
*/
|
|
1505
|
+
defaultValue?: string;
|
|
1506
|
+
/** Callback fired when the search text changes. */
|
|
1507
|
+
onChange?: (value: string) => void;
|
|
1508
|
+
/** Callback fired when the search is cleared. */
|
|
1509
|
+
onClear?: () => void;
|
|
1510
|
+
/** Placeholder text shown when the input is empty.
|
|
1511
|
+
* @default 'Search'
|
|
1512
|
+
*/
|
|
1513
|
+
placeholder?: string;
|
|
1514
|
+
/** Whether the search box is disabled and non-interactive. */
|
|
1515
|
+
disabled?: boolean;
|
|
1516
|
+
/** Slot rendered before the input (replaces the default search icon). */
|
|
1517
|
+
contentBefore?: Slot<'span'>;
|
|
1518
|
+
/** Slot rendered after the input text. */
|
|
1519
|
+
contentAfter?: Slot<'span'>;
|
|
1520
|
+
/** Slot for the dismiss/clear button (replaces the default clear icon). */
|
|
1521
|
+
dismiss?: Slot<'button'>;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
export declare const Select: {
|
|
1525
|
+
({ error, className, children, ref, ...props }: SelectProps & {
|
|
1526
|
+
ref?: React_2.Ref<HTMLSelectElement>;
|
|
1527
|
+
}): JSX.Element;
|
|
1528
|
+
displayName: string;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
/** Properties for the Select component. */
|
|
1532
|
+
export declare interface SelectProps extends React_2.SelectHTMLAttributes<HTMLSelectElement> {
|
|
1533
|
+
/** Validation error message; sets `aria-invalid` when provided. */
|
|
1534
|
+
error?: string;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/** Setter that accepts either a direct value or a functional updater. */
|
|
1538
|
+
declare type SetValue<T> = (valueOrUpdater: T | ((prev: T) => T)) => void;
|
|
1539
|
+
|
|
1540
|
+
/** Component size affecting padding, font size, and spacing. */
|
|
1541
|
+
export declare type Size = 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
1542
|
+
|
|
1543
|
+
export declare const Skeleton: {
|
|
1544
|
+
({ width, height, variant, className, style, ref, ...rest }: SkeletonProps & {
|
|
1545
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1546
|
+
}): JSX.Element;
|
|
1547
|
+
displayName: string;
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
/** Properties for the Skeleton component. */
|
|
1551
|
+
export declare interface SkeletonProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1552
|
+
/** Width of the skeleton placeholder. */
|
|
1553
|
+
width?: string | number;
|
|
1554
|
+
/** Height of the skeleton placeholder. */
|
|
1555
|
+
height?: string | number;
|
|
1556
|
+
/** Shape variant of the skeleton.
|
|
1557
|
+
* @default 'text'
|
|
1558
|
+
*/
|
|
1559
|
+
variant?: 'text' | 'circular' | 'rectangular';
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export declare const Slider: {
|
|
1563
|
+
({ className, label, ref, ...props }: SliderProps & {
|
|
1564
|
+
ref?: React_2.Ref<HTMLInputElement>;
|
|
1565
|
+
}): JSX.Element;
|
|
1566
|
+
displayName: string;
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
/** Properties for the Slider component. */
|
|
1570
|
+
export declare interface SliderProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
1571
|
+
/** Controlled slider value. */
|
|
1572
|
+
value?: number;
|
|
1573
|
+
/** Initial value for uncontrolled usage. */
|
|
1574
|
+
defaultValue?: number;
|
|
1575
|
+
/** Callback fired when the slider value changes. */
|
|
1576
|
+
onChange?: React_2.ChangeEventHandler<HTMLInputElement>;
|
|
1577
|
+
/** Minimum allowed value. */
|
|
1578
|
+
min?: number;
|
|
1579
|
+
/** Maximum allowed value. */
|
|
1580
|
+
max?: number;
|
|
1581
|
+
/** Step increment between values. */
|
|
1582
|
+
step?: number;
|
|
1583
|
+
/** Accessible label for the slider (sets `aria-label`). */
|
|
1584
|
+
label?: string;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Slot definition — accepts either a ReactNode shorthand or an object with
|
|
1589
|
+
* `as`, `children`, `className`, `style`, and arbitrary HTML attributes.
|
|
1590
|
+
*
|
|
1591
|
+
* Backward compatible: plain ReactNode is treated as the slot's children.
|
|
1592
|
+
*
|
|
1593
|
+
* @typeParam T - The default element type for the slot.
|
|
1594
|
+
*/
|
|
1595
|
+
export declare type Slot<T extends React_2.ElementType = 'span'> = Exclude<React_2.ReactNode, object> | React_2.ReactElement | SlotObject<T>;
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* Object form of a Slot, allowing full control over the rendered element.
|
|
1599
|
+
*
|
|
1600
|
+
* @typeParam T - The default element type for the slot.
|
|
1601
|
+
*/
|
|
1602
|
+
export declare interface SlotObject<T extends React_2.ElementType = 'span'> {
|
|
1603
|
+
/** Override the rendered element type for this slot. */
|
|
1604
|
+
as?: T;
|
|
1605
|
+
/** Content to render inside the slot element. */
|
|
1606
|
+
children?: React_2.ReactNode;
|
|
1607
|
+
/** CSS class name(s) to apply to the slot element. */
|
|
1608
|
+
className?: string;
|
|
1609
|
+
/** Inline styles to apply to the slot element. */
|
|
1610
|
+
style?: React_2.CSSProperties;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
export declare type SortDirection = 'ascending' | 'descending';
|
|
1614
|
+
|
|
1615
|
+
export declare const SpinButton: {
|
|
1616
|
+
({ value: controlledValue, defaultValue, onChange, min, max, step, disabled, className, ref, ...rest }: SpinButtonProps & {
|
|
1617
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1618
|
+
}): JSX.Element;
|
|
1619
|
+
displayName: string;
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
/** Properties for the SpinButton component. */
|
|
1623
|
+
export declare interface SpinButtonProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1624
|
+
/** Controlled numeric value. */
|
|
1625
|
+
value?: number;
|
|
1626
|
+
/** Initial value for uncontrolled usage.
|
|
1627
|
+
* @default 0
|
|
1628
|
+
*/
|
|
1629
|
+
defaultValue?: number;
|
|
1630
|
+
/** Callback fired when the value changes. */
|
|
1631
|
+
onChange?: (value: number) => void;
|
|
1632
|
+
/** Minimum allowed value.
|
|
1633
|
+
* @default -Infinity
|
|
1634
|
+
*/
|
|
1635
|
+
min?: number;
|
|
1636
|
+
/** Maximum allowed value.
|
|
1637
|
+
* @default Infinity
|
|
1638
|
+
*/
|
|
1639
|
+
max?: number;
|
|
1640
|
+
/** Step increment for the increment/decrement buttons.
|
|
1641
|
+
* @default 1
|
|
1642
|
+
*/
|
|
1643
|
+
step?: number;
|
|
1644
|
+
/** Whether the spin button is disabled and non-interactive. */
|
|
1645
|
+
disabled?: boolean;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
export declare const Spinner: {
|
|
1649
|
+
({ size, label, labelVisible, className, ref, ...rest }: SpinnerProps & {
|
|
1650
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
1651
|
+
}): JSX.Element;
|
|
1652
|
+
displayName: string;
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
/** Properties for the Spinner component. */
|
|
1656
|
+
export declare interface SpinnerProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1657
|
+
/** Size of the spinner.
|
|
1658
|
+
* @default 'medium'
|
|
1659
|
+
*/
|
|
1660
|
+
size?: Size;
|
|
1661
|
+
/** Accessible label describing the loading state. */
|
|
1662
|
+
label?: string;
|
|
1663
|
+
/** Whether the label text is visually displayed alongside the spinner. */
|
|
1664
|
+
labelVisible?: boolean;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
export declare const SplitButton: {
|
|
1668
|
+
({ appearance, size, disabled, className, children, onClick, onMenuClick, ref, ...props }: SplitButtonProps & {
|
|
1669
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1670
|
+
}): JSX.Element;
|
|
1671
|
+
displayName: string;
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
/** Properties for the SplitButton component. */
|
|
1675
|
+
export declare interface SplitButtonProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
1676
|
+
/** Whether the split button is disabled. */
|
|
1677
|
+
disabled?: boolean;
|
|
1678
|
+
/** Visual style variant.
|
|
1679
|
+
* @default 'outline'
|
|
1680
|
+
*/
|
|
1681
|
+
appearance?: Appearance;
|
|
1682
|
+
/** Size affecting padding and font size.
|
|
1683
|
+
* @default 'medium'
|
|
1684
|
+
*/
|
|
1685
|
+
size?: Size;
|
|
1686
|
+
/** Click handler for the primary button action. */
|
|
1687
|
+
onClick?: React_2.MouseEventHandler<HTMLButtonElement>;
|
|
1688
|
+
/** Click handler for the secondary menu chevron button. */
|
|
1689
|
+
onMenuClick?: React_2.MouseEventHandler<HTMLButtonElement>;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
export declare const Stack: {
|
|
1693
|
+
({ as: Component, direction, gap, align, justify, wrap, inline, className, children, ref, ...props }: StackProps & {
|
|
1694
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
1695
|
+
}): JSX.Element;
|
|
1696
|
+
displayName: string;
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
/** Properties for the Stack component. */
|
|
1700
|
+
export declare interface StackProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1701
|
+
/** Element type to render as.
|
|
1702
|
+
* @default 'div'
|
|
1703
|
+
*/
|
|
1704
|
+
as?: React_2.ElementType;
|
|
1705
|
+
/** Layout direction of the stack.
|
|
1706
|
+
* @default 'vertical'
|
|
1707
|
+
*/
|
|
1708
|
+
direction?: 'vertical' | 'horizontal';
|
|
1709
|
+
/** Gap size between stack items.
|
|
1710
|
+
* @default 'md'
|
|
1711
|
+
*/
|
|
1712
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1713
|
+
/** Cross-axis alignment of items. */
|
|
1714
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
1715
|
+
/** Main-axis justification of items. */
|
|
1716
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
1717
|
+
/** Whether items should wrap to the next line. */
|
|
1718
|
+
wrap?: boolean;
|
|
1719
|
+
/** Whether to use inline-flex instead of flex. */
|
|
1720
|
+
inline?: boolean;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/** Semantic status used for alerts, messages, and status indicators. */
|
|
1724
|
+
export declare type Status = 'success' | 'warning' | 'error' | 'info';
|
|
1725
|
+
|
|
1726
|
+
export declare const Stepper: {
|
|
1727
|
+
({ activeStep: controlledStep, defaultActiveStep, onStepChange, orientation, linear, className, children, ref, ...rest }: StepperProps & {
|
|
1728
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1729
|
+
}): JSX.Element;
|
|
1730
|
+
displayName: string;
|
|
1731
|
+
} & {
|
|
1732
|
+
Step: {
|
|
1733
|
+
({ label, description, icon, disabled, completed, error, className, onClick, ref, ...rest }: StepProps & {
|
|
1734
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1735
|
+
}): JSX.Element;
|
|
1736
|
+
displayName: string;
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1740
|
+
/** Properties for the Stepper component. */
|
|
1741
|
+
export declare interface StepperProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1742
|
+
/** Controlled index of the currently active step. */
|
|
1743
|
+
activeStep?: number;
|
|
1744
|
+
/** Default active step index for uncontrolled usage.
|
|
1745
|
+
* @default 0
|
|
1746
|
+
*/
|
|
1747
|
+
defaultActiveStep?: number;
|
|
1748
|
+
/** Callback invoked when the active step changes. */
|
|
1749
|
+
onStepChange?: (step: number) => void;
|
|
1750
|
+
/** Layout orientation of the stepper.
|
|
1751
|
+
* @default 'horizontal'
|
|
1752
|
+
*/
|
|
1753
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1754
|
+
/** Whether navigation is restricted to sequential steps only.
|
|
1755
|
+
* @default false
|
|
1756
|
+
*/
|
|
1757
|
+
linear?: boolean;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
/** Properties for the Step sub-component. */
|
|
1761
|
+
export declare interface StepProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1762
|
+
/** Label text for the step. */
|
|
1763
|
+
label: string;
|
|
1764
|
+
/** Optional description text displayed below the label. */
|
|
1765
|
+
description?: string;
|
|
1766
|
+
/** Custom icon to display in the step indicator. */
|
|
1767
|
+
icon?: React_2.ReactNode;
|
|
1768
|
+
/** Whether the step is disabled and non-interactive. */
|
|
1769
|
+
disabled?: boolean;
|
|
1770
|
+
/** Whether the step is marked as completed. */
|
|
1771
|
+
completed?: boolean;
|
|
1772
|
+
/** Whether the step is in an error state. */
|
|
1773
|
+
error?: boolean;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
/** Represents a single color swatch option. */
|
|
1777
|
+
export declare interface SwatchItem {
|
|
1778
|
+
/** Unique identifier for the swatch. */
|
|
1779
|
+
value: string;
|
|
1780
|
+
/** CSS color value (e.g., hex, rgb) used as the swatch background. */
|
|
1781
|
+
color: string;
|
|
1782
|
+
/** Accessible label for the swatch. */
|
|
1783
|
+
label?: string;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
export declare const SwatchPicker: {
|
|
1787
|
+
({ items, value: controlledValue, defaultValue, onChange, size, shape, className, ref, ...rest }: SwatchPickerProps & {
|
|
1788
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1789
|
+
}): JSX.Element;
|
|
1790
|
+
displayName: string;
|
|
1791
|
+
};
|
|
1792
|
+
|
|
1793
|
+
/** Properties for the SwatchPicker component. */
|
|
1794
|
+
export declare interface SwatchPickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1795
|
+
/** Array of swatch items to display. */
|
|
1796
|
+
items: SwatchItem[];
|
|
1797
|
+
/** Controlled selected swatch value. */
|
|
1798
|
+
value?: string;
|
|
1799
|
+
/** Initial selected value for uncontrolled usage.
|
|
1800
|
+
* @default ''
|
|
1801
|
+
*/
|
|
1802
|
+
defaultValue?: string;
|
|
1803
|
+
/** Callback fired when a swatch is selected. */
|
|
1804
|
+
onChange?: (value: string) => void;
|
|
1805
|
+
/** Size of each swatch button.
|
|
1806
|
+
* @default 'medium'
|
|
1807
|
+
*/
|
|
1808
|
+
size?: Extract<Size, 'small' | 'medium' | 'large'>;
|
|
1809
|
+
/** Shape of each swatch button.
|
|
1810
|
+
* @default 'circular'
|
|
1811
|
+
*/
|
|
1812
|
+
shape?: 'circular' | 'square' | 'rounded';
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
export declare const Switch: {
|
|
1816
|
+
({ checked: controlledChecked, defaultChecked, onChange, disabled, label, className, ref, ...rest }: SwitchProps & {
|
|
1817
|
+
ref?: React_2.Ref<HTMLLabelElement>;
|
|
1818
|
+
}): JSX.Element;
|
|
1819
|
+
displayName: string;
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
/** Properties for the Switch component. */
|
|
1823
|
+
export declare interface SwitchProps extends Omit<React_2.HTMLAttributes<HTMLLabelElement>, 'onChange' | 'defaultChecked'> {
|
|
1824
|
+
/** Controlled checked (on/off) state. */
|
|
1825
|
+
checked?: boolean;
|
|
1826
|
+
/** Initial checked state for uncontrolled usage.
|
|
1827
|
+
* @default false
|
|
1828
|
+
*/
|
|
1829
|
+
defaultChecked?: boolean;
|
|
1830
|
+
/** Callback fired when the switch is toggled. */
|
|
1831
|
+
onChange?: (checked: boolean) => void;
|
|
1832
|
+
/** Whether the switch is disabled and non-interactive. */
|
|
1833
|
+
disabled?: boolean;
|
|
1834
|
+
/** Text label displayed next to the switch. */
|
|
1835
|
+
label?: string;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
export declare const Table: {
|
|
1839
|
+
({ striped, children, className, ref, ...props }: TableProps & {
|
|
1840
|
+
ref?: React_2.Ref<HTMLTableElement>;
|
|
1841
|
+
}): JSX.Element;
|
|
1842
|
+
displayName: string;
|
|
1843
|
+
} & {
|
|
1844
|
+
Head: {
|
|
1845
|
+
({ children, className, ref, ...rest }: TableHeadProps & {
|
|
1846
|
+
ref?: React_2.Ref<HTMLTableSectionElement>;
|
|
1847
|
+
}): JSX.Element;
|
|
1848
|
+
displayName: string;
|
|
1849
|
+
};
|
|
1850
|
+
HeadCell: {
|
|
1851
|
+
({ children, className, ref, ...props }: TableHeadCellProps & {
|
|
1852
|
+
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
1853
|
+
}): JSX.Element;
|
|
1854
|
+
displayName: string;
|
|
1855
|
+
};
|
|
1856
|
+
Body: {
|
|
1857
|
+
({ children, className, ref, ...rest }: TableBodyProps & {
|
|
1858
|
+
ref?: React_2.Ref<HTMLTableSectionElement>;
|
|
1859
|
+
}): JSX.Element;
|
|
1860
|
+
displayName: string;
|
|
1861
|
+
};
|
|
1862
|
+
Row: {
|
|
1863
|
+
({ children, className, ref, ...props }: TableRowProps & {
|
|
1864
|
+
ref?: React_2.Ref<HTMLTableRowElement>;
|
|
1865
|
+
}): JSX.Element;
|
|
1866
|
+
displayName: string;
|
|
1867
|
+
};
|
|
1868
|
+
Cell: {
|
|
1869
|
+
({ children, className, ref, ...props }: TableCellProps & {
|
|
1870
|
+
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
1871
|
+
}): JSX.Element;
|
|
1872
|
+
displayName: string;
|
|
1873
|
+
};
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
/** Properties for the TableBody sub-component. */
|
|
1877
|
+
export declare interface TableBodyProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
1878
|
+
/** Table row elements. */
|
|
1879
|
+
children: React_2.ReactNode;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
/** Properties for the TableCell sub-component. */
|
|
1883
|
+
export declare interface TableCellProps extends React_2.TdHTMLAttributes<HTMLTableCellElement> {
|
|
1884
|
+
/** Cell content. */
|
|
1885
|
+
children: React_2.ReactNode;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/** Properties for the TableHeadCell sub-component. */
|
|
1889
|
+
export declare interface TableHeadCellProps extends React_2.ThHTMLAttributes<HTMLTableCellElement> {
|
|
1890
|
+
/** Header cell content. */
|
|
1891
|
+
children: React_2.ReactNode;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/** Properties for the TableHead sub-component. */
|
|
1895
|
+
export declare interface TableHeadProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
1896
|
+
/** Table header row elements. */
|
|
1897
|
+
children: React_2.ReactNode;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
/** Properties for the Table component. */
|
|
1901
|
+
export declare interface TableProps extends React_2.HTMLAttributes<HTMLTableElement> {
|
|
1902
|
+
/** Whether to apply alternating row background colors.
|
|
1903
|
+
* @default false
|
|
1904
|
+
*/
|
|
1905
|
+
striped?: boolean;
|
|
1906
|
+
/** Table head, body, and row elements. */
|
|
1907
|
+
children: React_2.ReactNode;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
/** Properties for the TableRow sub-component. */
|
|
1911
|
+
export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
|
|
1912
|
+
/** Table cell elements. */
|
|
1913
|
+
children: React_2.ReactNode;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
export declare const TabList: {
|
|
1917
|
+
({ selectedValue: controlledValue, defaultSelectedValue, onTabSelect, vertical, className, children, ref, ...rest }: TabListProps & {
|
|
1918
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1919
|
+
}): JSX.Element;
|
|
1920
|
+
displayName: string;
|
|
1921
|
+
} & {
|
|
1922
|
+
Tab: {
|
|
1923
|
+
({ value, className, children, ref, ...rest }: TabProps & {
|
|
1924
|
+
ref?: React_2.Ref<HTMLButtonElement>;
|
|
1925
|
+
}): JSX.Element;
|
|
1926
|
+
displayName: string;
|
|
1927
|
+
};
|
|
1928
|
+
Panel: {
|
|
1929
|
+
({ value, children, className, ref, ...rest }: TabPanelProps & {
|
|
1930
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1931
|
+
}): JSX.Element | null;
|
|
1932
|
+
displayName: string;
|
|
1933
|
+
};
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
/** Properties for the TabList component. */
|
|
1937
|
+
export declare interface TabListProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1938
|
+
/** Controlled value of the currently selected tab. */
|
|
1939
|
+
selectedValue?: string;
|
|
1940
|
+
/** Default selected tab value for uncontrolled usage.
|
|
1941
|
+
* @default ''
|
|
1942
|
+
*/
|
|
1943
|
+
defaultSelectedValue?: string;
|
|
1944
|
+
/** Callback invoked when the selected tab changes. */
|
|
1945
|
+
onTabSelect?: (value: string) => void;
|
|
1946
|
+
/** Whether to arrange tabs vertically instead of horizontally. */
|
|
1947
|
+
vertical?: boolean;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/** Properties for the TabPanel sub-component. */
|
|
1951
|
+
export declare interface TabPanelProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1952
|
+
/** Value matching the corresponding Tab to display this panel's content. */
|
|
1953
|
+
value: string;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
/** Properties for the Tab sub-component. */
|
|
1957
|
+
export declare interface TabProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1958
|
+
/** Unique value identifying this tab. */
|
|
1959
|
+
value: string;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
export declare const Tag: {
|
|
1963
|
+
({ as: Component, dismissible, onDismiss, dismissIcon, className, children, ref, ...props }: TagProps & {
|
|
1964
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
1965
|
+
}): JSX.Element;
|
|
1966
|
+
displayName: string;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
export declare const TagPicker: {
|
|
1970
|
+
({ options, value: valueProp, defaultValue, onChange, placeholder, disabled, className, ref, ...rest }: TagPickerProps & {
|
|
1971
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1972
|
+
}): JSX.Element;
|
|
1973
|
+
displayName: string;
|
|
1974
|
+
};
|
|
1975
|
+
|
|
1976
|
+
/** Represents a single selectable tag option. */
|
|
1977
|
+
export declare interface TagPickerOption {
|
|
1978
|
+
/** Unique identifier for the option. */
|
|
1979
|
+
value: string;
|
|
1980
|
+
/** Display label for the option. */
|
|
1981
|
+
label: string;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/** Properties for the TagPicker component. */
|
|
1985
|
+
export declare interface TagPickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1986
|
+
/** Available options to choose from. */
|
|
1987
|
+
options: TagPickerOption[];
|
|
1988
|
+
/** Controlled array of selected option values. */
|
|
1989
|
+
value?: string[];
|
|
1990
|
+
/** Initial selected values for uncontrolled usage.
|
|
1991
|
+
* @default []
|
|
1992
|
+
*/
|
|
1993
|
+
defaultValue?: string[];
|
|
1994
|
+
/** Callback fired when the selection changes. */
|
|
1995
|
+
onChange?: (value: string[]) => void;
|
|
1996
|
+
/** Placeholder text shown when no tags are selected.
|
|
1997
|
+
* @default 'Select...'
|
|
1998
|
+
*/
|
|
1999
|
+
placeholder?: string;
|
|
2000
|
+
/** Whether the tag picker is disabled and non-interactive.
|
|
2001
|
+
* @default false
|
|
2002
|
+
*/
|
|
2003
|
+
disabled?: boolean;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
/** Properties for the Tag component. */
|
|
2007
|
+
export declare interface TagProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
2008
|
+
/** Element type to render as.
|
|
2009
|
+
* @default 'span'
|
|
2010
|
+
*/
|
|
2011
|
+
as?: React_2.ElementType;
|
|
2012
|
+
/** Whether the tag can be dismissed by the user. */
|
|
2013
|
+
dismissible?: boolean;
|
|
2014
|
+
/** Callback invoked when the dismiss button is clicked. */
|
|
2015
|
+
onDismiss?: () => void;
|
|
2016
|
+
/** Slot for a custom dismiss icon element. */
|
|
2017
|
+
dismissIcon?: Slot<'span'>;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
export declare const TeachingPopover: {
|
|
2021
|
+
({ steps, currentStep: currentStepProp, defaultCurrentStep, onStepChange, onDismiss, open, className, ref, ...rest }: TeachingPopoverProps & {
|
|
2022
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2023
|
+
}): JSX.Element | null;
|
|
2024
|
+
displayName: string;
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
/** Properties for the TeachingPopover component. */
|
|
2028
|
+
export declare interface TeachingPopoverProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2029
|
+
/** Array of steps to display in the teaching popover. */
|
|
2030
|
+
steps: TeachingPopoverStep[];
|
|
2031
|
+
/** Controlled index of the currently displayed step. */
|
|
2032
|
+
currentStep?: number;
|
|
2033
|
+
/** Default step index for uncontrolled usage.
|
|
2034
|
+
* @default 0
|
|
2035
|
+
*/
|
|
2036
|
+
defaultCurrentStep?: number;
|
|
2037
|
+
/** Callback invoked when the current step changes. */
|
|
2038
|
+
onStepChange?: (step: number) => void;
|
|
2039
|
+
/** Callback invoked when the popover is dismissed. */
|
|
2040
|
+
onDismiss?: () => void;
|
|
2041
|
+
/** Whether the teaching popover is visible.
|
|
2042
|
+
* @default true
|
|
2043
|
+
*/
|
|
2044
|
+
open?: boolean;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
/** Defines a single step in a teaching popover sequence. */
|
|
2048
|
+
export declare interface TeachingPopoverStep {
|
|
2049
|
+
/** Title text for the step. */
|
|
2050
|
+
title: string;
|
|
2051
|
+
/** Body content for the step. */
|
|
2052
|
+
body: React_2.ReactNode;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
declare const Text_2: {
|
|
2056
|
+
({ variant, weight, as: Component, className, ref, ...props }: TextProps & {
|
|
2057
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
2058
|
+
}): JSX.Element;
|
|
2059
|
+
displayName: string;
|
|
2060
|
+
};
|
|
2061
|
+
export { Text_2 as Text }
|
|
2062
|
+
|
|
2063
|
+
export declare const Textarea: {
|
|
2064
|
+
({ error, className, ref, ...props }: TextareaProps & {
|
|
2065
|
+
ref?: React_2.Ref<HTMLTextAreaElement>;
|
|
2066
|
+
}): JSX.Element;
|
|
2067
|
+
displayName: string;
|
|
2068
|
+
};
|
|
2069
|
+
|
|
2070
|
+
/** Properties for the Textarea component. */
|
|
2071
|
+
export declare interface TextareaProps extends React_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
2072
|
+
/** Validation error message; sets `aria-invalid` when provided. */
|
|
2073
|
+
error?: string;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
/** Properties for the Text component. */
|
|
2077
|
+
export declare interface TextProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
2078
|
+
/** Typography variant controlling font size and line height.
|
|
2079
|
+
* @default 'body-1'
|
|
2080
|
+
*/
|
|
2081
|
+
variant?: TypographyVariant;
|
|
2082
|
+
/** Font weight override. */
|
|
2083
|
+
weight?: 400 | 600 | 700;
|
|
2084
|
+
/** Element type to render as.
|
|
2085
|
+
* @default 'span'
|
|
2086
|
+
*/
|
|
2087
|
+
as?: React_2.ElementType;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
export declare const TimePicker: {
|
|
2091
|
+
({ value: controlledValue, defaultValue, onChange, format, step, minTime, maxTime, placeholder, disabled, clearable, className, ref, ...rest }: TimePickerProps & {
|
|
2092
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2093
|
+
}): JSX.Element;
|
|
2094
|
+
displayName: string;
|
|
2095
|
+
};
|
|
2096
|
+
|
|
2097
|
+
/** Properties for the TimePicker component. */
|
|
2098
|
+
export declare interface TimePickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2099
|
+
/** Controlled selected time in 'HH:mm' format. */
|
|
2100
|
+
value?: string;
|
|
2101
|
+
/** Initial time for uncontrolled usage.
|
|
2102
|
+
* @default ''
|
|
2103
|
+
*/
|
|
2104
|
+
defaultValue?: string;
|
|
2105
|
+
/** Callback fired when the selected time changes. */
|
|
2106
|
+
onChange?: (time: string) => void;
|
|
2107
|
+
/** Time display format.
|
|
2108
|
+
* @default '12h'
|
|
2109
|
+
*/
|
|
2110
|
+
format?: '12h' | '24h';
|
|
2111
|
+
/** Interval in minutes between available time options.
|
|
2112
|
+
* @default 30
|
|
2113
|
+
*/
|
|
2114
|
+
step?: number;
|
|
2115
|
+
/** Earliest selectable time in 'HH:mm' format.
|
|
2116
|
+
* @default '00:00'
|
|
2117
|
+
*/
|
|
2118
|
+
minTime?: string;
|
|
2119
|
+
/** Latest selectable time in 'HH:mm' format.
|
|
2120
|
+
* @default '23:59'
|
|
2121
|
+
*/
|
|
2122
|
+
maxTime?: string;
|
|
2123
|
+
/** Placeholder text shown when no time is selected.
|
|
2124
|
+
* @default 'Select a time'
|
|
2125
|
+
*/
|
|
2126
|
+
placeholder?: string;
|
|
2127
|
+
/** Whether the time picker is disabled and non-interactive.
|
|
2128
|
+
* @default false
|
|
2129
|
+
*/
|
|
2130
|
+
disabled?: boolean;
|
|
2131
|
+
/** Whether to show a clear button when a time is selected.
|
|
2132
|
+
* @default false
|
|
2133
|
+
*/
|
|
2134
|
+
clearable?: boolean;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
export declare const Toast: {
|
|
2138
|
+
({ status, title, onDismiss, className, children, ref, ...rest }: ToastProps & {
|
|
2139
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2140
|
+
}): JSX.Element;
|
|
2141
|
+
displayName: string;
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
export declare const Toaster: {
|
|
2145
|
+
({ position, className, children, ref, ...rest }: ToasterProps & {
|
|
2146
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2147
|
+
}): JSX.Element;
|
|
2148
|
+
displayName: string;
|
|
2149
|
+
};
|
|
2150
|
+
|
|
2151
|
+
declare interface ToasterContextValue {
|
|
2152
|
+
dispatchToast: (options: ToastOptions) => void;
|
|
2153
|
+
dismissToast: (id: string) => void;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/** Properties for the Toaster container component. */
|
|
2157
|
+
export declare interface ToasterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2158
|
+
/** Screen corner position for the toast container.
|
|
2159
|
+
* @default 'bottom-right'
|
|
2160
|
+
*/
|
|
2161
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
/** Options for dispatching a toast notification. */
|
|
2165
|
+
export declare interface ToastOptions {
|
|
2166
|
+
/** Status level controlling the toast color and icon.
|
|
2167
|
+
* @default 'info'
|
|
2168
|
+
*/
|
|
2169
|
+
status?: Status;
|
|
2170
|
+
/** Title text of the toast. */
|
|
2171
|
+
title: string;
|
|
2172
|
+
/** Optional body text displayed below the title. */
|
|
2173
|
+
body?: string;
|
|
2174
|
+
/** Auto-dismiss timeout in milliseconds. Set to 0 to disable auto-dismiss.
|
|
2175
|
+
* @default 5000
|
|
2176
|
+
*/
|
|
2177
|
+
timeout?: number;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
/** Properties for the Toast component. */
|
|
2181
|
+
export declare interface ToastProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2182
|
+
/** Status level controlling the toast appearance.
|
|
2183
|
+
* @default 'info'
|
|
2184
|
+
*/
|
|
2185
|
+
status?: Status;
|
|
2186
|
+
/** Title text displayed in the toast. */
|
|
2187
|
+
title?: string;
|
|
2188
|
+
/** Callback invoked when the dismiss button is clicked. */
|
|
2189
|
+
onDismiss?: () => void;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
export declare const ToggleButton: {
|
|
2193
|
+
({ pressed, defaultPressed, onPressedChange, appearance, size, icon, disabled, className, children, onClick, ref, ...props }: ToggleButtonProps & {
|
|
2194
|
+
ref?: React_2.Ref<HTMLButtonElement>;
|
|
2195
|
+
}): JSX.Element;
|
|
2196
|
+
displayName: string;
|
|
2197
|
+
};
|
|
2198
|
+
|
|
2199
|
+
/** Properties for the ToggleButton component. */
|
|
2200
|
+
export declare interface ToggleButtonProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
2201
|
+
/** Controlled pressed state. */
|
|
2202
|
+
pressed?: boolean;
|
|
2203
|
+
/** Initial pressed state for uncontrolled usage.
|
|
2204
|
+
* @default false
|
|
2205
|
+
*/
|
|
2206
|
+
defaultPressed?: boolean;
|
|
2207
|
+
/** Callback fired when the pressed state changes. */
|
|
2208
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
2209
|
+
/** Visual style variant.
|
|
2210
|
+
* @default 'outline'
|
|
2211
|
+
*/
|
|
2212
|
+
appearance?: Appearance;
|
|
2213
|
+
/** Size affecting padding and font size.
|
|
2214
|
+
* @default 'medium'
|
|
2215
|
+
*/
|
|
2216
|
+
size?: Size;
|
|
2217
|
+
/** Icon slot rendered before the button label. */
|
|
2218
|
+
icon?: Slot<'span'>;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
export declare const Toolbar: {
|
|
2222
|
+
({ as, className, children, ref, ...props }: ToolbarProps & {
|
|
2223
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
2224
|
+
}): JSX.Element;
|
|
2225
|
+
displayName: string;
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
/** Properties for the Toolbar component. An `aria-label` is required for accessibility
|
|
2229
|
+
* to describe the toolbar's purpose (e.g., "Formatting options").
|
|
2230
|
+
*/
|
|
2231
|
+
export declare interface ToolbarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2232
|
+
/** Custom element type to render as.
|
|
2233
|
+
* @default 'div'
|
|
2234
|
+
*/
|
|
2235
|
+
as?: React_2.ElementType;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
export declare const Tooltip: {
|
|
2239
|
+
({ content, variant, delay, children, className, ref, ...rest }: TooltipProps & {
|
|
2240
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
2241
|
+
}): JSX.Element | null;
|
|
2242
|
+
displayName: string;
|
|
2243
|
+
};
|
|
2244
|
+
|
|
2245
|
+
/** Properties for the Tooltip component. */
|
|
2246
|
+
export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, 'content'> {
|
|
2247
|
+
/** Content to display inside the tooltip. */
|
|
2248
|
+
content: React_2.ReactNode;
|
|
2249
|
+
/** Visual variant of the tooltip.
|
|
2250
|
+
* @default 'dark'
|
|
2251
|
+
*/
|
|
2252
|
+
variant?: 'dark' | 'light';
|
|
2253
|
+
/** Delay in milliseconds before the tooltip appears.
|
|
2254
|
+
* @default 200
|
|
2255
|
+
*/
|
|
2256
|
+
delay?: number;
|
|
2257
|
+
/** Target element that triggers the tooltip on hover/focus. */
|
|
2258
|
+
children: React_2.ReactElement;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
export declare const Tree: {
|
|
2262
|
+
({ defaultExpandedItems, className, children, ref, ...rest }: TreeProps & {
|
|
2263
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2264
|
+
}): JSX.Element;
|
|
2265
|
+
displayName: string;
|
|
2266
|
+
} & {
|
|
2267
|
+
Item: {
|
|
2268
|
+
({ value, icon, leaf, className, children, ref, ...rest }: TreeItemProps & {
|
|
2269
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2270
|
+
}): JSX.Element;
|
|
2271
|
+
displayName: string;
|
|
2272
|
+
};
|
|
2273
|
+
};
|
|
2274
|
+
|
|
2275
|
+
/** Properties for the TreeItem sub-component. */
|
|
2276
|
+
export declare interface TreeItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2277
|
+
/** Unique value identifying this tree item. */
|
|
2278
|
+
value: string;
|
|
2279
|
+
/** Icon displayed before the item label. */
|
|
2280
|
+
icon?: React_2.ReactNode;
|
|
2281
|
+
/** Whether this item is a leaf node with no expandable children.
|
|
2282
|
+
* @default false
|
|
2283
|
+
*/
|
|
2284
|
+
leaf?: boolean;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
/** Properties for the Tree component. */
|
|
2288
|
+
export declare interface TreeProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2289
|
+
/** Array of item values that are expanded by default.
|
|
2290
|
+
* @default []
|
|
2291
|
+
*/
|
|
2292
|
+
defaultExpandedItems?: string[];
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
/** Typography scale variant mapping to Fluent UI type ramp tokens. */
|
|
2296
|
+
export declare type TypographyVariant = 'caption-2' | 'caption-1' | 'body-1' | 'body-2' | 'subtitle-2' | 'subtitle-1' | 'title-3' | 'title-2' | 'title-1' | 'large-title' | 'display';
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Hook for components that can be either controlled or uncontrolled.
|
|
2300
|
+
* If `controlledValue` is provided, the component is controlled; otherwise it uses internal state.
|
|
2301
|
+
* Warns in development if a component switches between controlled and uncontrolled modes.
|
|
2302
|
+
*
|
|
2303
|
+
* @typeParam T - The type of the state value.
|
|
2304
|
+
* @param controlledValue - The externally controlled value, or `undefined` for uncontrolled mode.
|
|
2305
|
+
* @param defaultValue - The initial value used when the component is uncontrolled.
|
|
2306
|
+
* @param onChange - Optional callback invoked when the value changes (in both modes).
|
|
2307
|
+
* @returns A `[value, setValue]` tuple matching the React useState signature.
|
|
2308
|
+
*/
|
|
2309
|
+
export declare function useControllable<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, SetValue<T>];
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* Returns a stable callback reference that always invokes the latest version
|
|
2313
|
+
* of the provided function. Useful for event handlers passed to child
|
|
2314
|
+
* components to avoid unnecessary re-renders.
|
|
2315
|
+
*
|
|
2316
|
+
* The returned function has a stable identity across renders.
|
|
2317
|
+
*
|
|
2318
|
+
* @typeParam T - The callback function signature.
|
|
2319
|
+
* @param fn - The callback to wrap. May be `undefined`, in which case calls are no-ops.
|
|
2320
|
+
* @returns A memoized function with a stable identity that delegates to the latest `fn`.
|
|
2321
|
+
*/
|
|
2322
|
+
export declare function useEventCallback<T extends (...args: any[]) => any>(fn: T | undefined): T;
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* Generate a stable unique ID, optionally with a prefix.
|
|
2326
|
+
* Wraps React's useId for consistent usage across components.
|
|
2327
|
+
*
|
|
2328
|
+
* @param prefix - Optional string prepended to the generated ID (e.g., `'button'` produces `'button-:r0:'`).
|
|
2329
|
+
* @returns A unique, SSR-safe identifier string.
|
|
2330
|
+
*/
|
|
2331
|
+
export declare function useId(prefix?: string): string;
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* Hook that returns whether the overflow container is currently overflowing.
|
|
2335
|
+
*/
|
|
2336
|
+
export declare function useIsOverflowing(ref: React_2.RefObject<HTMLElement | null>): boolean;
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* Implements the WAI-ARIA roving tabindex pattern for composite widgets.
|
|
2340
|
+
*
|
|
2341
|
+
* Items must render `data-roving-value` attributes matching their value strings
|
|
2342
|
+
* so the hook can locate and focus them in the DOM.
|
|
2343
|
+
*
|
|
2344
|
+
* @param containerRef - Ref to the container element holding the focusable items.
|
|
2345
|
+
* @param options - Configuration for orientation, looping, and active value.
|
|
2346
|
+
* @returns An object with `handleKeyDown` (attach to the container) and `getTabIndex` (call per item).
|
|
2347
|
+
*/
|
|
2348
|
+
export declare function useRovingTabIndex(containerRef: React_2.RefObject<HTMLElement | null>, options: UseRovingTabIndexOptions): {
|
|
2349
|
+
handleKeyDown: (e: React_2.KeyboardEvent) => void;
|
|
2350
|
+
getTabIndex: (value: string) => 0 | -1;
|
|
2351
|
+
};
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Hook that implements the WAI-ARIA roving tabindex pattern for composite
|
|
2355
|
+
* widgets like RadioGroup, TabList, and Toolbar.
|
|
2356
|
+
*
|
|
2357
|
+
* Only one item in the group has `tabIndex={0}` (the active item); all
|
|
2358
|
+
* others have `tabIndex={-1}`. Arrow keys move focus between items.
|
|
2359
|
+
* Tab enters/leaves the group as a single stop.
|
|
2360
|
+
*
|
|
2361
|
+
* @param containerRef Ref to the container element holding the items
|
|
2362
|
+
* @param options Configuration for the roving behavior
|
|
2363
|
+
* @returns getTabIndex – call with an item's value to get its tabIndex
|
|
2364
|
+
*/
|
|
2365
|
+
/** Configuration options for the {@link useRovingTabIndex} hook. */
|
|
2366
|
+
export declare interface UseRovingTabIndexOptions {
|
|
2367
|
+
/** Currently active (selected) value. */
|
|
2368
|
+
activeValue: string;
|
|
2369
|
+
/** All item values in DOM order. */
|
|
2370
|
+
items: string[];
|
|
2371
|
+
/**
|
|
2372
|
+
* Arrow key axis: `'horizontal'` uses Left/Right, `'vertical'` uses Up/Down, `'both'` uses all four.
|
|
2373
|
+
* @default 'horizontal'
|
|
2374
|
+
*/
|
|
2375
|
+
orientation?: 'horizontal' | 'vertical' | 'both';
|
|
2376
|
+
/**
|
|
2377
|
+
* Whether arrow keys should wrap around at the ends.
|
|
2378
|
+
* @default true
|
|
2379
|
+
*/
|
|
2380
|
+
loop?: boolean;
|
|
2381
|
+
/** Callback fired when focus moves to a new value. */
|
|
2382
|
+
onFocusMove?: (value: string) => void;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
export declare function useToastController(): ToasterContextValue;
|
|
2386
|
+
|
|
2387
|
+
/**
|
|
2388
|
+
* Hook to read the current Wave theme and direction from context.
|
|
2389
|
+
*
|
|
2390
|
+
* @returns The current {@link WaveTheme} and {@link WaveDir} from the nearest {@link WaveProvider}.
|
|
2391
|
+
*/
|
|
2392
|
+
export declare function useWaveTheme(): WaveContextValue;
|
|
2393
|
+
|
|
2394
|
+
/** Internal context value shape for theme and direction. */
|
|
2395
|
+
declare interface WaveContextValue {
|
|
2396
|
+
/** The active theme. */
|
|
2397
|
+
theme: WaveTheme;
|
|
2398
|
+
/** The active text direction. */
|
|
2399
|
+
dir: WaveDir;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
/** Text direction for bidirectional layout support. */
|
|
2403
|
+
export declare type WaveDir = 'ltr' | 'rtl';
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* WaveProvider wraps an application (or subtree) to apply Wave UI theming.
|
|
2407
|
+
*
|
|
2408
|
+
* - Sets the appropriate CSS class (`dark`, `high-contrast`, or none for light)
|
|
2409
|
+
* on a wrapper `<div>` so that CSS custom properties from `tokens.css` take effect.
|
|
2410
|
+
* - Provides theme and dir values via React context for components that need them.
|
|
2411
|
+
*/
|
|
2412
|
+
export declare const WaveProvider: {
|
|
2413
|
+
({ theme, dir, children, className, ref, ...rest }: WaveProviderProps & {
|
|
2414
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
2415
|
+
}): JSX.Element;
|
|
2416
|
+
displayName: string;
|
|
2417
|
+
};
|
|
2418
|
+
|
|
2419
|
+
/** Props accepted by {@link WaveProvider}. */
|
|
2420
|
+
export declare interface WaveProviderProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2421
|
+
/**
|
|
2422
|
+
* Visual theme applied to the subtree.
|
|
2423
|
+
* @default 'light'
|
|
2424
|
+
*/
|
|
2425
|
+
theme?: WaveTheme;
|
|
2426
|
+
/**
|
|
2427
|
+
* Text direction for the subtree.
|
|
2428
|
+
* @default 'ltr'
|
|
2429
|
+
*/
|
|
2430
|
+
dir?: WaveDir;
|
|
2431
|
+
/** Content rendered inside the themed container. */
|
|
2432
|
+
children: React_2.ReactNode;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
/** Supported visual themes for the Wave design system. */
|
|
2436
|
+
export declare type WaveTheme = 'light' | 'dark' | 'high-contrast';
|
|
2437
|
+
|
|
2438
|
+
export { }
|