@wistia/ui 0.19.4 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts DELETED
@@ -1,4390 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as react from 'react';
3
- import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentProps } from 'react';
4
- import { UseFilePickerConfig, FilePickerReturnTypes, ExtractContentTypeFromConfig, useImperativeFilePickerConfig, ImperativeFilePickerReturnTypes } from 'use-file-picker/types';
5
- export * from 'use-file-picker/types';
6
- import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
7
- import { Color } from 'culori/fn';
8
- import * as Ariakit from '@ariakit/react';
9
- import * as styled_components from 'styled-components';
10
- import * as _radix_ui_react_dropdown_menu from '@radix-ui/react-dropdown-menu';
11
- import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
12
- import { PopoverContentProps } from '@radix-ui/react-popover';
13
- import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
14
- import { TabsProps as TabsProps$1, TabsContentProps as TabsContentProps$1, TabsListProps as TabsListProps$1, TabsTriggerProps as TabsTriggerProps$1 } from '@radix-ui/react-tabs';
15
- export { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from 'use-file-picker/validators';
16
-
17
- type UIProviderProps = {
18
- children: ReactNode;
19
- };
20
- declare const UIProvider: ({ children }: UIProviderProps) => react_jsx_runtime.JSX.Element;
21
-
22
- /**
23
- * Copies a string to user's clipboard for easy pasting in another location
24
- *
25
- * @param {string} textToCopy - the string that will be copied to users clipboard
26
- * @returns {Promise<void>} - Promise object that resolves when the text is copied
27
- */
28
- declare const copyToClipboard: (textToCopy: string) => Promise<void>;
29
-
30
- type DateOnlyStringOptions$1 = {
31
- timeZone?: string;
32
- /**
33
- * When set to true, the returned string will omit the year.
34
- * e.g. "Jun 3" instead of "Jun 3, 2021"
35
- */
36
- omitYear?: boolean;
37
- };
38
-
39
- declare const dateTime: {
40
- buildTimeDuration: (numberOfMilliseconds: number) => Duration;
41
- dateOnlyISOString: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
42
- dateOnlyString: (date: unknown, { timeZone, omitYear }?: DateOnlyStringOptions$1) => string;
43
- dateOnlyStringForSentence: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
44
- dateOnlyStringNumeric: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
45
- dateTimeRounded: DateTimeRoundedOverload;
46
- dateTimeString: (date: Date | number | string | null | undefined, { timeZone, omitYear }?: DateOnlyStringOptions) => string;
47
- dateTimeStringForSentence: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
48
- dateTimeToDate: (dateTime: Partial<WistiaDateTimeObject> | null | undefined) => Date | null;
49
- dateTimeToISO: (dateTime: Partial<WistiaDateTimeObject>) => string | null;
50
- dateToDateTime: (date: Date | null | undefined) => WistiaDateTimeObject | null;
51
- dateUTCOffset: (date: Date) => string;
52
- dayOfWeekString: (date: Date | null, { timeZone }?: DateOnlyStringOptions) => string;
53
- mediaDurationString: (numberOfMilliseconds: number) => string;
54
- millisecondsToDurationISOString: (numberOfMilliseconds: number) => string;
55
- monthDayStringNumeric: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
56
- sessionDurationString: (numberOfMilliseconds: number) => string;
57
- timeAgoString: (date: Date, { nowAnchor, includeTime }?: TimeAgoOptions) => string;
58
- timeOnlyString: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
59
- };
60
-
61
- declare const mergeRefs: <T = unknown>(refs: (LegacyRef<T> | MutableRefObject<T> | null | undefined)[]) => RefCallback<T>;
62
-
63
- declare const mq: {
64
- xsAndUp: () => string;
65
- smAndUp: () => string;
66
- mdAndUp: () => string;
67
- lgAndUp: () => string;
68
- xlAndUp: () => string;
69
- xsAndDown: () => string;
70
- smAndDown: () => string;
71
- mdAndDown: () => string;
72
- lgAndDown: () => string;
73
- xlAndDown: () => string;
74
- };
75
-
76
- type AriaLiveContextType = {
77
- announce: (message: string, politeness?: 'assertive' | 'polite') => void;
78
- };
79
- declare const useAriaLive: () => AriaLiveContextType;
80
-
81
- type UseBooleanReturn = [
82
- boolean,
83
- () => void,
84
- () => void,
85
- () => void,
86
- Dispatch<SetStateAction<boolean>>
87
- ];
88
- declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
89
-
90
- declare const useClipboard: (textToCopy: string, timeout?: number) => [() => Promise<void>, boolean, boolean];
91
-
92
- type Rect = {
93
- width: number;
94
- height: number;
95
- top: number;
96
- left: number;
97
- bottom: number;
98
- right: number;
99
- x: number;
100
- y: number;
101
- };
102
- declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
103
-
104
- /**
105
- * Hook that wraps `useFilePicker` from the use-file-picker library
106
- *
107
- * @param config Optional configuration for the file picker
108
- */
109
- declare const useFilePicker: <T extends UseFilePickerConfig = UseFilePickerConfig>(config?: T) => FilePickerReturnTypes<ExtractContentTypeFromConfig<T>>;
110
- /**
111
- * Hook that wraps `useImperativeFilePicker` from the use-file-picker library
112
- *
113
- * @param config Optional configuration for the imperative file picker
114
- */
115
- declare const useImperativeFilePicker: <T extends useImperativeFilePickerConfig = useImperativeFilePickerConfig>(config?: T) => ImperativeFilePickerReturnTypes<ExtractContentTypeFromConfig<T>>;
116
-
117
- type UseFocusTrapOptions = {
118
- disableAriaHider?: boolean;
119
- focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
120
- };
121
- declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
122
-
123
- declare const useForceUpdate: () => (() => void);
124
-
125
- type HoverProps = {
126
- onFocus: () => void;
127
- onMouseEnter: () => void;
128
- onBlur: () => void;
129
- onMouseLeave: () => void;
130
- onMouseMove?: () => void;
131
- };
132
- type UseIsHoveredReturnType = [boolean, HoverProps, (hovered: boolean) => void];
133
- declare const useIsHovered: () => UseIsHoveredReturnType;
134
-
135
- type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
136
- type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
137
- declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
138
-
139
- type EventHandler = (event: KeyboardEvent) => void;
140
- type KeyFilterPredicate = (evt: KeyboardEvent) => boolean;
141
- type KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;
142
- type UseKeyOptions = {
143
- eventName?: string;
144
- eventTarget?: Parameters<typeof useEvent>[2];
145
- eventOptions?: Parameters<typeof useEvent>[3];
146
- };
147
- declare const useKey: (key: KeyFilter, eventHandler: EventHandler, { eventName, eventTarget, eventOptions }?: UseKeyOptions) => void;
148
-
149
- type SetItemType = Storage['setItem'];
150
- declare const useLocalStorage: <T, _>(key: Parameters<SetItemType>[0], initialValue: T, storage?: Storage) => [T | undefined, (newValue: T) => void, () => void];
151
-
152
- declare const useLockBodyScroll: (locked: boolean) => void;
153
-
154
- type UseMqReturnType = {
155
- isXlAndUp: boolean;
156
- isLgAndUp: boolean;
157
- isMdAndUp: boolean;
158
- isSmAndUp: boolean;
159
- isXsAndUp: boolean;
160
- isXsAndDown: boolean;
161
- isSmAndDown: boolean;
162
- isMdAndDown: boolean;
163
- isLgAndDown: boolean;
164
- isXlAndDown: boolean;
165
- };
166
- declare const useMq: () => UseMqReturnType;
167
- type UseActiveMqReturnType = keyof UseMqReturnType;
168
- declare const useActiveMq: () => UseActiveMqReturnType[];
169
-
170
- type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
171
- declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
172
-
173
- declare const usePreviousValue: <T>(value: T) => T | undefined;
174
-
175
- declare const colorSchemeOptions: readonly ["standard", "inherit", "error", "info", "success", "warning", "blue", "green", "orange", "pink", "purple", "red", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
176
- type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
177
- type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
178
- /**
179
- * @ignore For use in creating navs - will override any colorScheme prop
180
- */
181
- __nav?: boolean;
182
- /**
183
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
184
- */
185
- colorScheme?: ColorSchemeTypes;
186
- /**
187
- * Children
188
- */
189
- children: ReactNode;
190
- };
191
- /**
192
- * A wrapper to apply a color scheme to its children.
193
- */
194
- declare const ColorSchemeWrapper: {
195
- ({ __nav, colorScheme, children, ...props }: ColorSchemeWrapperProps): JSX.Element;
196
- displayName: string;
197
- };
198
-
199
- type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
200
-
201
- type LinkTypes = 'default' | 'email' | 'external' | 'phone';
202
- type ReactRouterLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
203
- reloadDocument?: boolean;
204
- replace?: boolean;
205
- state?: any;
206
- preventScrollReset?: boolean;
207
- viewTransition?: boolean;
208
- };
209
- type BaseProps$2 = {
210
- /**
211
- * A Promise to invoke before navigating to location.
212
- * _Caution: if used with `external` type prop a new window will **not** be opened_
213
- */
214
- beforeAction?: (() => Promise<void>) | (() => void);
215
- /**
216
- * Text that appears inside of the link
217
- *
218
- * @type ReactNode
219
- */
220
- children: ReactNode;
221
- /**
222
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
223
- */
224
- colorScheme?: ColorSchemeTypes;
225
- /**
226
- * Disables the link
227
- */
228
- disabled?: boolean;
229
- /**
230
- * Icon to display on the left side of the link. Must be an instance of [Icon](?path=/docs/components-icon--docs)
231
- */
232
- leftIcon?: ReactNode | undefined;
233
- /**
234
- * Icon to display on the right side of the link. Must be an instance of [Icon](?path=/docs/components-icon--docs)
235
- */
236
- rightIcon?: ReactNode | undefined;
237
- /**
238
- * Type of link to display
239
- *
240
- * * `email` creates a mailto
241
- * * `phone` creates a telephone number
242
- * * `external` will open links in a new window
243
- */
244
- type?: LinkTypes | undefined;
245
- /**
246
- * Controls the underline behavior of the link
247
- *
248
- * * `none` - no underline (default)
249
- * * `always` - always show underline
250
- * * `hover` - show underline only on hover
251
- */
252
- underline?: 'always' | 'hover' | 'none';
253
- };
254
- type LinkAsLinkProps = BaseProps$2 & ComponentPropsWithRef<'a'> & ReactRouterLinkProps & {
255
- href: string | undefined;
256
- type?: LinkTypes;
257
- };
258
- type LinkAsButtonProps = BaseProps$2 & ComponentPropsWithRef<'button'> & {
259
- href?: never;
260
- type?: 'button' | 'reset' | 'submit';
261
- };
262
- type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
263
- /**
264
- * Links are used for navigation. If no `href` is supplied, a button that is visually styled to appear as a link
265
- * is rendered. If used in a `react-router` context, their [Link](https://reactrouter.com/en/main/components/link).
266
- * component is used, otherwise a native `a` element.
267
- *
268
- * This means in addition to its own props, `Link` can use props from `react-router`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
269
- * The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
270
- */
271
- declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
272
-
273
- type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
274
- type AtLeastOneBreakpoint<T, U = {
275
- [K in keyof T]: Pick<T, K>;
276
- }> = Partial<T> & U[keyof U];
277
- type ResponsiveObject<T> = AtLeastOneBreakpoint<Record<Breakpoints, T>> & {
278
- base: T;
279
- };
280
-
281
- type ButtonSizes = 'lg' | 'md' | 'sm' | 'xl';
282
- type BaseButtonProps = {
283
- /**
284
- * Text that appears inside of the button
285
- *
286
- * @type ReactNode
287
- */
288
- children: ReactNode;
289
- /**
290
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
291
- */
292
- colorScheme?: ColorSchemeTypes;
293
- /**
294
- * Disables the button
295
- */
296
- disabled?: boolean;
297
- /**
298
- * Show a spinner when the button is in a loading state
299
- */
300
- isLoading?: boolean;
301
- /**
302
- * Icon to display on the left side of the button. Must be an instance of [Icon](?path=/docs/components-icon--docs)
303
- */
304
- leftIcon?: ReactNode | undefined;
305
- /**
306
- * Callback function invoked when the button is clicked
307
- *
308
- * @type (event: MouseEvent) => void
309
- */
310
- onClick?: ((event: MouseEvent) => void) | undefined;
311
- /**
312
- * @ignore
313
- * Force a button into a particular css state (for debugging)
314
- */
315
- forceState?: 'active' | 'focus' | 'hover' | undefined;
316
- /**
317
- * If true, the button will fill its container
318
- *
319
- * @type boolean | ResponsiveObject<boolean>
320
- */
321
- fullWidth?: ResponsiveObject<boolean> | boolean;
322
- /**
323
- * Provides a button without any styling (useful for wrapping another element)
324
- */
325
- unstyled?: boolean | undefined;
326
- /**
327
- * Icon to display on the right side of the button. Must be an instance of [Icon](?path=/docs/components-icon--docs)
328
- */
329
- rightIcon?: ReactNode | undefined;
330
- /**
331
- * The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
332
- */
333
- size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
334
- /**
335
- * A visual style for the button
336
- */
337
- variant?: ButtonVariants;
338
- };
339
- type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & LinkProps & {
340
- href: string | undefined;
341
- children: ReactNode;
342
- /**
343
- * This just allows pathrough to beforeAction for link
344
- * @ignore
345
- */
346
- beforeAction?: (() => Promise<void>) | (() => void);
347
- /**
348
- * This just allows pathrough to beforeAction for link
349
- * @ignore
350
- */
351
- type?: LinkTypes;
352
- };
353
- type ButtonAsButtonProps = BaseButtonProps & ComponentPropsWithRef<'button'> & {
354
- /**
355
- * If supplied, the button will render as a link
356
- */
357
- href?: never;
358
- type?: 'button' | 'reset' | 'submit';
359
- children: ReactNode;
360
- };
361
- type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
362
- /**
363
- * Button component is used to trigger an action or event,
364
- * such as submitting a form, opening a Dialog, canceling an
365
- * action, or performing a delete operation. It replaces the HTML `<button>` element,
366
- * unless an `href` attribute is passed, in which it will render an `<a>` element.
367
- */
368
- declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
369
- beforeAction?: (() => Promise<void>) | (() => void);
370
- children: ReactNode;
371
- colorScheme?: ColorSchemeTypes;
372
- disabled?: boolean;
373
- leftIcon?: ReactNode | undefined;
374
- rightIcon?: ReactNode | undefined;
375
- type?: LinkTypes | undefined;
376
- underline?: "always" | "hover" | "none";
377
- } & Omit<react.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & {
378
- reloadDocument?: boolean;
379
- replace?: boolean;
380
- state?: any;
381
- preventScrollReset?: boolean;
382
- viewTransition?: boolean;
383
- } & {
384
- href: string | undefined;
385
- type?: LinkTypes;
386
- } & {
387
- href: string | undefined;
388
- children: ReactNode;
389
- /**
390
- * This just allows pathrough to beforeAction for link
391
- * @ignore
392
- */
393
- beforeAction?: (() => Promise<void>) | (() => void);
394
- /**
395
- * This just allows pathrough to beforeAction for link
396
- * @ignore
397
- */
398
- type?: LinkTypes;
399
- }, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
400
- beforeAction?: (() => Promise<void>) | (() => void);
401
- children: ReactNode;
402
- colorScheme?: ColorSchemeTypes;
403
- disabled?: boolean;
404
- leftIcon?: ReactNode | undefined;
405
- rightIcon?: ReactNode | undefined;
406
- type?: LinkTypes | undefined;
407
- underline?: "always" | "hover" | "none";
408
- } & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
409
- href?: never;
410
- type?: "button" | "reset" | "submit";
411
- } & {
412
- href: string | undefined;
413
- children: ReactNode;
414
- /**
415
- * This just allows pathrough to beforeAction for link
416
- * @ignore
417
- */
418
- beforeAction?: (() => Promise<void>) | (() => void);
419
- /**
420
- * This just allows pathrough to beforeAction for link
421
- * @ignore
422
- */
423
- type?: LinkTypes;
424
- }, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
425
-
426
- type ToastProps = ComponentPropsWithoutRef<'div'> & {
427
- /**
428
- * Action can be undefined (default dismiss button), a Button component or false to hide the dismiss button
429
- */
430
- action?: ReactElement<typeof Button> | undefined;
431
- /**
432
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
433
- */
434
- colorScheme?: ColorSchemeTypes | undefined;
435
- /**
436
- * Optional `Icon` component to use. Must be an instance of [Icon](/?path=/docs/components-icon--docs)
437
- */
438
- icon?: JSX.Element | undefined;
439
- /**
440
- * The message displayed in the toast
441
- */
442
- message: ReactNode;
443
- };
444
-
445
- type Position = 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right';
446
- type UseToastProps = ToastProps & {
447
- position?: Position;
448
- duration?: number;
449
- };
450
- type UseToastReturnType = ({ message, icon, colorScheme, action, position, duration, }: UseToastProps) => void;
451
- declare const useToast: () => UseToastReturnType;
452
-
453
- declare const useWindowSize: (interval?: number) => {
454
- width: number;
455
- height: number;
456
- };
457
-
458
- type ActionButtonProps = {
459
- /**
460
- * @override
461
- * The text to display for the ActionButton
462
- *
463
- */
464
- children: ReactNode;
465
- /**
466
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
467
- */
468
- icon: JSX.Element;
469
- /**
470
- * @override
471
- * Disables the button
472
- */
473
- disabled?: boolean;
474
- /**
475
- * @ignore
476
- * Force a button into a particular css state (for debugging)
477
- */
478
- forceState?: 'focus' | 'hover' | undefined;
479
- /**
480
- * Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
481
- */
482
- hoverColorScheme?: ColorSchemeTypes;
483
- /**
484
- * Changes the secondary icon for different use cases
485
- */
486
- variant?: 'default' | 'gated' | 'menu-down' | 'menu-up';
487
- } & (Omit<ButtonAsButtonProps, 'fullWidth' | 'isLoading' | 'leftIcon' | 'rightIcon' | 'size' | 'unstyled' | 'variant'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'isLoading' | 'leftIcon' | 'rightIcon' | 'size' | 'unstyled' | 'variant'>);
488
- /**
489
- * Action Button component is used as one of a group of main actions on the page. It composes [Button]().
490
- */
491
- declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
492
- /**
493
- * @override
494
- * The text to display for the ActionButton
495
- *
496
- */
497
- children: ReactNode;
498
- /**
499
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
500
- */
501
- icon: JSX.Element;
502
- /**
503
- * @override
504
- * Disables the button
505
- */
506
- disabled?: boolean;
507
- /**
508
- * @ignore
509
- * Force a button into a particular css state (for debugging)
510
- */
511
- forceState?: "focus" | "hover" | undefined;
512
- /**
513
- * Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
514
- */
515
- hoverColorScheme?: ColorSchemeTypes;
516
- /**
517
- * Changes the secondary icon for different use cases
518
- */
519
- variant?: "default" | "gated" | "menu-down" | "menu-up";
520
- } & Omit<ButtonAsButtonProps, "size" | "leftIcon" | "rightIcon" | "isLoading" | "fullWidth" | "unstyled" | "variant">, "ref"> | Omit<{
521
- /**
522
- * @override
523
- * The text to display for the ActionButton
524
- *
525
- */
526
- children: ReactNode;
527
- /**
528
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
529
- */
530
- icon: JSX.Element;
531
- /**
532
- * @override
533
- * Disables the button
534
- */
535
- disabled?: boolean;
536
- /**
537
- * @ignore
538
- * Force a button into a particular css state (for debugging)
539
- */
540
- forceState?: "focus" | "hover" | undefined;
541
- /**
542
- * Set the [color scheme](../?path=/docs/docs-color-schemes--docs) of the `ActionButton` when hovered. By default, it will inherit the `colorScheme` prop.
543
- */
544
- hoverColorScheme?: ColorSchemeTypes;
545
- /**
546
- * Changes the secondary icon for different use cases
547
- */
548
- variant?: "default" | "gated" | "menu-down" | "menu-up";
549
- } & Omit<ButtonAsLinkProps, "size" | "leftIcon" | "rightIcon" | "isLoading" | "fullWidth" | "unstyled" | "variant">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
550
-
551
- type AvatarInstanceType = 'image' | 'initials';
552
- type AvatarImageLoadStateType = 'error' | 'loaded' | 'loading';
553
- type AvatarSizeType = 'lg' | 'md' | 'sm';
554
- type AvatarStatus = {
555
- type: AvatarInstanceType;
556
- state: AvatarImageLoadStateType;
557
- };
558
- type AvatarProps = ComponentPropsWithoutRef<'div'> & {
559
- /**
560
- * The height and width of the avatar (overrides size prop)
561
- */
562
- heightAndWidth?: number;
563
- /**
564
- * The URL of the image to display
565
- */
566
- imageUrl?: string | null;
567
- /**
568
- * A string that will deterministically set the initials & background color of the avatar
569
- *
570
- * _note: only first initial shown regardless of characters provided_
571
- */
572
- name?: string | null;
573
- /**
574
- * A predefined size for the avatar
575
- */
576
- size?: AvatarSizeType;
577
- /**
578
- * A callback that is invoked after the image has loaded or failed to load
579
- */
580
- onImageLoad?: (avatarStatus: AvatarStatus) => void;
581
- };
582
- /**
583
- * An avatar uses a photo or initials to represent an identity.
584
- */
585
- declare const Avatar: {
586
- ({ imageUrl, heightAndWidth, name, size, onImageLoad, ...props }: AvatarProps): JSX.Element;
587
- displayName: string;
588
- };
589
-
590
- type BadgeVariants = 'default' | 'outline';
591
- type BadgeProps = ComponentPropsWithoutRef<'div'> & {
592
- /**
593
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
594
- */
595
- colorScheme?: ColorSchemeTypes;
596
- /**
597
- * Optional `Icon` component to use. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
598
- */
599
- icon?: JSX.Element;
600
- /**
601
- * The text to display in the `Badge`
602
- */
603
- label?: ReactNode;
604
- /**
605
- * The variant of the `Badge`
606
- */
607
- variant?: BadgeVariants;
608
- };
609
- /**
610
- * A `Badge` is a compact label, with optional icon, to convey status or context.
611
- */
612
- declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
613
- /**
614
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
615
- */
616
- colorScheme?: ColorSchemeTypes;
617
- /**
618
- * Optional `Icon` component to use. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
619
- */
620
- icon?: JSX.Element;
621
- /**
622
- * The text to display in the `Badge`
623
- */
624
- label?: ReactNode;
625
- /**
626
- * The variant of the `Badge`
627
- */
628
- variant?: BadgeVariants;
629
- } & react.RefAttributes<HTMLDivElement>>;
630
-
631
- type BannerProps = ComponentPropsWithoutRef<'div'> & {
632
- /**
633
- * The main text content displayed in the banner
634
- */
635
- bodyText: ReactNode;
636
- /**
637
- * Optional heading text displayed at the top of the banner content
638
- */
639
- headingText?: string;
640
- /**
641
- * Optional `Icon` component to use. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
642
- */
643
- icon?: JSX.Element;
644
- /**
645
- * Controls the visual prominence of the banner
646
- */
647
- prominence?: 'primary' | 'secondary';
648
- colorScheme?: ColorSchemeTypes;
649
- /**
650
- * Optional image element to display in the banner
651
- */
652
- image?: JSX.Element | undefined;
653
- /**
654
- * Controls the layout direction. If set to 'auto', the banner will switch between horizontal and vertical based on the container width.
655
- */
656
- orientation?: 'auto' | 'horizontal' | 'vertical';
657
- /**
658
- * Primary call-to-action element (typically a [Button]() of the `solid` variant)
659
- */
660
- primaryAction?: ReactNode;
661
- /**
662
- * Secondary call-to-action element (typically a [Button]() of the `outline` variant)
663
- */
664
- secondaryAction?: ReactNode;
665
- /**
666
- * Optional callback function when the close button is clicked. If not provided, the close button will not be displayed.
667
- */
668
- onClose?: () => void;
669
- };
670
- /**
671
- * The `Banner` component is for displaying contextual information to the user such as alerts or feature announcements.
672
- */
673
- declare const Banner: {
674
- ({ bodyText, colorScheme, headingText, icon, image, onClose, orientation, primaryAction, prominence, secondaryAction, ...props }: BannerProps): JSX.Element;
675
- displayName: string;
676
- };
677
-
678
- type BannerImageProps = ComponentPropsWithoutRef<'div'> & {
679
- /**
680
- * The URL of the image to display in the banner
681
- */
682
- src: string;
683
- /**
684
- * Alternative text description of the image for accessibility
685
- */
686
- alt?: string;
687
- /**
688
- * Position of the image within the banner layout. Only applies in horizontal orientation.
689
- */
690
- alignment?: 'left' | 'right';
691
- };
692
- declare const BannerImage: ({ alignment, alt, src, ...props }: BannerImageProps) => react_jsx_runtime.JSX.Element;
693
-
694
- type UnknownRecord = Record<string, unknown>;
695
- type PropsOf<Component extends ElementType> = ComponentPropsWithoutRef<Component>;
696
- type ExtendedProps<Props = UnknownRecord, OverrideProps = UnknownRecord> = Omit<Props, keyof OverrideProps> & OverrideProps;
697
- type ComponentProp<Component extends ElementType> = {
698
- /**
699
- * The component or HTML element to render as the root instead of the default.
700
- */
701
- renderAs?: Component;
702
- };
703
- /**
704
- * extend the polymorphic component props to always include children
705
- */
706
- type PolymorphicComponentProps<Component extends ElementType, Props = UnknownRecord> = ExtendedProps<PropsOf<Component>, ComponentProp<Component> & Props> & {
707
- children?: ReactNode;
708
- ref?: ComponentPropsWithRef<Component>['ref'];
709
- };
710
-
711
- type Spacings = 'space-00' | 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09';
712
-
713
- type JustifyContentType =
714
- | 'center'
715
- | 'flex-end'
716
- | 'flex-start'
717
- | 'space-around'
718
- | 'space-between'
719
- | 'space-evenly';
720
-
721
- type AlignContentType =
722
- | 'center'
723
- | 'flex-end'
724
- | 'flex-start'
725
- | 'space-around'
726
- | 'space-between'
727
- | 'stretch';
728
-
729
- type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
730
-
731
- type AlignSelfType = 'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
732
-
733
- type DirectionType = 'column-reverse' | 'column' | 'row-reverse' | 'row';
734
-
735
- type FillType = boolean | 'horizontal' | 'vertical';
736
- type Gap$1 = {
737
- column: Spacings;
738
- row: Spacings;
739
- };
740
- type ResponsiveGap$1 = ResponsiveObject<Gap$1 | Spacings>;
741
- type FlexModeType = 'equal' | 'fluid' | 'grow' | 'initial' | 'rigid';
742
- declare const DEFAULT_ELEMENT$1 = "div";
743
- /**
744
- * CSS property => Box prop:
745
- * flex-direction => direction
746
- * justify-content => justifyContent
747
- * align-items => alignItems
748
- * align-content => alignContent
749
- * flex-wrap => wrapItems
750
- * gap => gap
751
- * display: inline-flex => inline
752
- */
753
- type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
754
- /**
755
- * Specifies how the browser distributes space between and around
756
- * items along the cross-axis of their container; has no effect on
757
- * single line flexible boxes. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
758
- */
759
- alignContent?: AlignContentType | ResponsiveObject<AlignContentType>;
760
- /**
761
- * Specifies how the browser distributes space between and around
762
- * items along the cross-axis of their container; the difference
763
- * to the alignContent prop is that alignItems specifies the
764
- * alignment of the items within the current container's line,
765
- * whereas alignContent specifies the alignment of the lines themselves.
766
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
767
- */
768
- alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
769
- /**
770
- * Specifies how the browser aligns items of the current line, overriding the
771
- * alignItems value of parent; if any of the item's cross-axis margin is set to auto,
772
- * then alignSelf is ignored. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
773
- *
774
- * *Note: only works for nested `<Box />`*
775
- */
776
- alignSelf?: AlignSelfType | ResponsiveObject<AlignSelfType>;
777
- /**
778
- * Specifies the initial main size of an item. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
779
- *
780
- * *Note: Cannot be used with `flexMode` prop.*
781
- *
782
- * *Note: only works for nested `<Box />`*
783
- */
784
- basis?: ResponsiveObject<string> | string;
785
- /**
786
- * Pass an arbitrary child node
787
- */
788
- children?: ReactNode;
789
- /**
790
- * Specifies the main axis of the container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
791
- */
792
- direction?: DirectionType | ResponsiveObject<DirectionType>;
793
- /**
794
- * Specifies whether the width and/or height should fill the container.
795
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
796
- *
797
- * *Note: Cannot be used with height/width props when setting the corresponding dimension.*
798
- *
799
- * For example, `fill="vertical"` or `fill={true}` cannot be used with the `height` prop,
800
- * and `fill="horizontal"` or `fill={true}` cannot be used with the `width` prop.
801
- */
802
- fill?: FillType | ResponsiveObject<FillType>;
803
- /**
804
- * Specifies whether the width and/or height should fill the viewport.
805
- *
806
- * *Note: Cannot be used with height/width props when setting the corresponding dimension.*
807
- *
808
- * For example, `fillViewport="vertical"` or `fillViewport={true}` cannot be used with the `height` prop,
809
- * and `fillViewport="horizontal"` or `fillViewport={true}` cannot be used with the `width` prop.
810
- */
811
- fillViewport?: FillType;
812
- /**
813
- * Predefined `flex` behavior patterns. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
814
- *
815
- * - `grow`: fills available space (`flex: 1 0 0`)
816
- * - `initial`: default behavior (`flex: 0 1 auto`)
817
- * - `equal`: equal space distribution (`flex: 1`)
818
- * - `rigid`: fixed size (`flex: 0 0 auto`)
819
- * - `fluid`: responsive (`flex: 1 1 auto`)
820
- */
821
- flexMode?: FlexModeType | ResponsiveObject<FlexModeType>;
822
- /**
823
- * Specifies the gaps (gutters) between rows and columns.
824
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
825
- *
826
- * Can be either a single spacing value that applies to both row and column gaps,
827
- * or an object specifying different values for row and column gaps.
828
- */
829
- gap?: Gap$1 | ResponsiveGap$1 | Spacings;
830
- /**
831
- * Specifies what amount of space inside the flex container the item should take up.
832
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
833
- *
834
- * *Note: Cannot be used with `flexMode` prop.*
835
- *
836
- * *Note: only works for nested `<Box />`*
837
- */
838
- grow?: ResponsiveObject<number | string> | number | string;
839
- /**
840
- * Specifies the height of the box. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
841
- *
842
- * *Note: Cannot be used with fill="vertical" or fillViewport="vertical"*
843
- */
844
- height?: ResponsiveObject<string> | string;
845
- /**
846
- * Make Layout behave like an inline element but still lay out its content according to flexbox model.
847
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
848
- */
849
- inline?: ResponsiveObject<boolean> | boolean;
850
- /**
851
- * Specifies how the browser distributes space between and around
852
- * items along the main axis of their container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
853
- */
854
- justifyContent?: JustifyContentType | ResponsiveObject<JustifyContentType>;
855
- /**
856
- * Specifies the order used to lay out an item in its container. Items within the same
857
- * container are rendered in ascending order according to their order values.
858
- * Elements with the _same_ order value are rendered in the order in which they appear in code
859
- *
860
- * *Note: only works for nested `<Box />`*
861
- */
862
- order?: number | 'inherit' | 'initial' | 'unset';
863
- renderAs?: ElementType;
864
- /**
865
- * Specifies how items will shrink inside the container when the default size of
866
- * items is larger than their container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
867
- *
868
- * *Note: Cannot be used with `flexMode` prop.*
869
- *
870
- * *Note: only works for nested `<Box />`*
871
- */
872
- shrink?: ResponsiveObject<number> | number;
873
- /**
874
- * Specifies whether items are forced into a single line or can be wrapped onto multiple lines.
875
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
876
- */
877
- wrapItems?: ResponsiveObject<boolean> | boolean;
878
- /**
879
- * Specifies the width of the box. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
880
- *
881
- * *Note: Cannot be used with fill="horizontal" or fillViewport="horizontal"*
882
- */
883
- width?: ResponsiveObject<string> | string;
884
- };
885
- /**
886
- * Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
887
- */
888
- declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement | null) & UnknownRecord;
889
-
890
- type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
891
- /**
892
- * Should be at least one `Breadcrumb` component
893
- */
894
- children: ReactNode;
895
- };
896
- /**
897
- * Used to display a screens's location within a hierarchical structure. Each `Breadcrumb` is a composed version of
898
- * [Button](?path=/docs/components-button--docs). See it's documentation for additional functionality.
899
- */
900
- declare const Breadcrumbs: {
901
- ({ children, ...props }: BreadcrumbsProps): JSX.Element;
902
- displayName: string;
903
- };
904
-
905
- type BreadcrumbProps = ButtonAsLinkProps & {
906
- /**
907
- * An [Icon]() to show at the beginning of the breadcrumb
908
- */
909
- icon?: ButtonAsLinkProps['leftIcon'];
910
- /**
911
- * The text of the breadcrumb link
912
- */
913
- children: ReactNode;
914
- /**
915
- * The link to the page of the breadcrumb
916
- */
917
- href: string;
918
- };
919
- declare const Breadcrumb: ({ icon, href, children, ...props }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
920
-
921
- type ButtonGroupButtonSize = ButtonSizes | 'natural';
922
- type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
923
- /**
924
- * Align buttons to the left or right of their container
925
- */
926
- align?: 'center' | 'left' | 'right';
927
- /**
928
- * Buttons that will be rendered in grouping
929
- */
930
- children?: ReactNode;
931
- /**
932
- * Force ButtonGroup to fill the width of it's container
933
- */
934
- fullWidth?: boolean;
935
- /**
936
- * If true, the button group will collapse to a single column on small screens
937
- * and the buttons will be stacked on top of each other.
938
- */
939
- collapseOnSmallScreens?: boolean;
940
- /**
941
- * The size of the buttons in the group. Setting this will override the size of any UI button passed in as a child.
942
- */
943
- buttonSize?: ButtonGroupButtonSize | ResponsiveObject<ButtonGroupButtonSize>;
944
- };
945
- /**
946
- * ButtonGroup is a layout component that groups buttons together,
947
- * with a standardized gap between them.
948
- */
949
- declare const ButtonGroup: {
950
- ({ children, align, fullWidth, collapseOnSmallScreens, buttonSize, ...props }: ButtonGroupProps): JSX.Element | null;
951
- displayName: string;
952
- };
953
-
954
- type BorderRadius = 'border-radius-00' | 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
955
-
956
- type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
957
- /**
958
- * Content to be rendered inside the Card component
959
- */
960
- children: ReactNode;
961
- /**
962
- * Specifies the background and border color of the card.
963
- */
964
- prominence?: 'primary' | 'secondary' | 'tertiary';
965
- /**
966
- * Determines the color scheme for the card and its children.
967
- */
968
- colorScheme?: ColorSchemeTypes;
969
- /**
970
- * Specifies the internal padding of the card. Uses the design system's spacing scale.
971
- */
972
- paddingSize?: Spacings;
973
- /**
974
- * When true, adds a border around the card based on its colorScheme and prominence.
975
- */
976
- border?: boolean;
977
- /**
978
- * Border radius to apply to the Card
979
- */
980
- borderRadius?: BorderRadius;
981
- /**
982
- * Specifies the gaps (gutters) between rows and columns
983
- */
984
- gap?: BoxProps['gap'];
985
- /**
986
- * Specifies the height of the card.
987
- */
988
- height?: string;
989
- /**
990
- * Specifies the width of the card.
991
- */
992
- width?: string;
993
- /**
994
- * @ignore
995
- */
996
- alignContent?: BoxProps['alignContent'];
997
- /**
998
- * @ignore
999
- */
1000
- alignItems?: BoxProps['alignItems'];
1001
- /**
1002
- * @ignore
1003
- */
1004
- alignSelf?: BoxProps['alignSelf'];
1005
- /**
1006
- * @ignore
1007
- */
1008
- basis?: BoxProps['basis'];
1009
- /**
1010
- * @ignore
1011
- */
1012
- direction?: BoxProps['direction'];
1013
- /**
1014
- * @ignore
1015
- */
1016
- fill?: BoxProps['fill'];
1017
- /**
1018
- * @ignore
1019
- */
1020
- fillViewport?: BoxProps['fillViewport'];
1021
- /**
1022
- * @ignore
1023
- */
1024
- flexMode?: BoxProps['flexMode'];
1025
- /**
1026
- * @ignore
1027
- */
1028
- grow?: BoxProps['grow'];
1029
- /**
1030
- * @ignore
1031
- */
1032
- inline?: BoxProps['inline'];
1033
- /**
1034
- * @ignore
1035
- */
1036
- justifyContent?: BoxProps['justifyContent'];
1037
- /**
1038
- * @ignore
1039
- */
1040
- order?: BoxProps['order'];
1041
- /**
1042
- * @ignore
1043
- */
1044
- shrink?: BoxProps['shrink'];
1045
- /**
1046
- * @ignore
1047
- */
1048
- wrapItems?: BoxProps['wrapItems'];
1049
- };
1050
- /**
1051
- * A flexible container component that groups related content with consistent spacing and styling.
1052
- * Cards can be used to visually distinguish content sections. Extends the [Box component.](https://wistia.github.io/vhs/storybook-ui/?path=/docs/components-box--docs)
1053
- */
1054
- declare const Card: {
1055
- ({ children, border, borderRadius, colorScheme, direction, gap, height, paddingSize, prominence, width, ...props }: CardProps): JSX.Element;
1056
- displayName: string;
1057
- };
1058
-
1059
- type CenterProps = ComponentPropsWithoutRef<'div'> & {
1060
- /**
1061
- * A CSS max-width value
1062
- */
1063
- maxWidth?: string;
1064
- /**
1065
- * The space on either side of the content
1066
- */
1067
- gutterWidth?: Spacings;
1068
- /**
1069
- * Center child elements based on their content width
1070
- */
1071
- intrinsic?: boolean;
1072
- /**
1073
- * The content to be centered
1074
- */
1075
- children: ReactNode;
1076
- };
1077
- /**
1078
- * Center component provides various ways to center content horizontally within a container.
1079
- * It supports max-width constraints, text alignment, gutters, and intrinsic content centering.
1080
- */
1081
- declare const Center: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1082
- /**
1083
- * A CSS max-width value
1084
- */
1085
- maxWidth?: string;
1086
- /**
1087
- * The space on either side of the content
1088
- */
1089
- gutterWidth?: Spacings;
1090
- /**
1091
- * Center child elements based on their content width
1092
- */
1093
- intrinsic?: boolean;
1094
- /**
1095
- * The content to be centered
1096
- */
1097
- children: ReactNode;
1098
- } & react.RefAttributes<HTMLDivElement>>;
1099
-
1100
- type CheckboxSizeType = 'lg' | 'md' | 'sm';
1101
- declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "label" | "onChange" | "hideLabel"> & {
1102
- /**
1103
- * Indicates the state of the checkbox
1104
- */
1105
- checked?: boolean;
1106
- /**
1107
- * Disables checkbox
1108
- */
1109
- disabled?: boolean;
1110
- /**
1111
- * Optional ID attribute
1112
- */
1113
- id?: string | undefined;
1114
- /**
1115
- * The label for the checkbox
1116
- */
1117
- label: ReactNode;
1118
- /**
1119
- * The description for the checkbox
1120
- */
1121
- description?: ReactNode | undefined;
1122
- /**
1123
- * The name of the checkbox. Submitted with its owning form as part of a name/value pair.
1124
- */
1125
- name?: string | undefined;
1126
- /**
1127
- * Callback function invoked when the value changes
1128
- */
1129
- onChange?: (event: ChangeEvent) => unknown;
1130
- /**
1131
- * Indicates if the input is required
1132
- */
1133
- required?: boolean;
1134
- /**
1135
- * A predefined size for the checkbox
1136
- */
1137
- size?: CheckboxSizeType;
1138
- /**
1139
- * The value given as data when submitted with a `name`.
1140
- */
1141
- value?: string;
1142
- /**
1143
- * Whether to visually hide the label (it will still be available to screen readers)
1144
- */
1145
- hideLabel?: boolean;
1146
- } & react.RefAttributes<HTMLInputElement>>;
1147
-
1148
- type ClickRegionProps = {
1149
- /**
1150
- * The content that should be clickable.
1151
- */
1152
- children: JSX.Element;
1153
- /**
1154
- * The ref to the button or link that should be clicked when the ClickRegion is clicked.
1155
- */
1156
- targetRef: RefObject<HTMLAnchorElement | HTMLButtonElement | null>;
1157
- };
1158
- /**
1159
- * This allows larger elements to be interactive links or buttons while maintaining acessibility.
1160
- *
1161
- * For buttons, when the element is clicked, it will proxy a click event to the targetRef, which should be inside the ClickRegion.
1162
- *
1163
- * For links, a pseudo-element of the link is created that is the size of the ClickRegion. **Note**: this will prevent text selection
1164
- * inside the text region.
1165
- *
1166
- * In either case, a link or button must be present, but can be hidden by using `ScreenReaderOnly`.
1167
- */
1168
- declare const ClickRegion: {
1169
- ({ children, targetRef }: ClickRegionProps): JSX.Element;
1170
- displayName: string;
1171
- };
1172
-
1173
- type CollapsibleProps = {
1174
- /**
1175
- * `CollapsibleTrigger` and `CollapsibleContent` must be included somewhere inside these children.
1176
- */
1177
- children: ReactNode;
1178
- /**
1179
- * Whether the collapsible content is open or closed. If not provided, the collapsible will be uncontrolled.
1180
- */
1181
- isOpen?: boolean;
1182
- /**
1183
- * Callback for when the trigger is toggled. If not provided, the collapsible will be uncontrolled.
1184
- */
1185
- onOpenChange?: (isOpen: boolean) => void;
1186
- };
1187
- /**
1188
- * Toggle the visibility of content with a trigger.
1189
- */
1190
- declare const Collapsible: {
1191
- ({ children, isOpen, onOpenChange, }: CollapsibleProps): JSX.Element;
1192
- displayName: string;
1193
- };
1194
-
1195
- type CollapsibleTriggerProps = {
1196
- /**
1197
- * A trigger element that will toggle the collapsible content.
1198
- * Usually a [Button](?path=/docs/components-button--docs).
1199
- */
1200
- children: ReactNode;
1201
- };
1202
- declare const CollapsibleTrigger: ({ children }: CollapsibleTriggerProps) => react_jsx_runtime.JSX.Element;
1203
-
1204
- declare const iconMap: {
1205
- 'ab-test': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1206
- accessibility: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1207
- activity: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1208
- 'add-folder': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1209
- 'add-layout': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1210
- 'add-media': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1211
- 'annotation-link': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1212
- appearance: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1213
- archive: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1214
- 'arrow-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1215
- 'arrow-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1216
- 'arrow-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1217
- 'arrow-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1218
- 'arrow-up-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1219
- asterisk: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1220
- 'audio-description': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1221
- 'auto-scroll': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1222
- background: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1223
- bell: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1224
- bolt: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1225
- calendar: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1226
- 'call-to-action': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1227
- camera: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1228
- 'camera-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1229
- 'caret-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1230
- 'caret-down-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1231
- 'caret-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1232
- 'caret-left-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1233
- 'caret-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1234
- 'caret-right-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1235
- 'caret-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1236
- 'caret-up-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1237
- channel: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1238
- chapters: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1239
- checkmark: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1240
- 'checkmark-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1241
- 'checkmark-circle-outline': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1242
- 'checkmark-three-quaters-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1243
- 'circle-slashed': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1244
- clapboard: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1245
- close: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1246
- 'close-octagon': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1247
- 'closed-captions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1248
- cmd: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1249
- collapse: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1250
- 'collapse-diagonal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1251
- collection: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1252
- comments: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1253
- company: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1254
- compare: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1255
- 'connection-okay': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1256
- 'connection-poor': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1257
- 'connection-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1258
- 'content-library': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1259
- controls: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1260
- 'cursor-click': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1261
- delete: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1262
- desktop: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1263
- 'docs-dev': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1264
- 'dots-horizontal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1265
- download: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1266
- 'edit-transcript': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1267
- 'ellipses-vertical': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1268
- embed: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1269
- envelope: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1270
- 'envelope-open': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1271
- error: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1272
- expand: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1273
- 'expand-diagonal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1274
- 'expand-horizontal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1275
- 'fast-forward': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1276
- favorite: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1277
- 'favorite-outline': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1278
- featured: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1279
- 'file-tree': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1280
- fill: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1281
- 'film-strip': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1282
- filter: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1283
- fit: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1284
- fonts: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1285
- footer: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1286
- 'full-screen': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1287
- gear: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1288
- 'getting-started': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1289
- grid: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1290
- 'grip-dots-vertical': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1291
- header: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1292
- 'help-center': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1293
- hide: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1294
- home: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1295
- hourglass: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1296
- import: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1297
- info: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1298
- integrations: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1299
- keyboard: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1300
- layout: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1301
- leave: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1302
- 'light-bulb': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1303
- link: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1304
- list: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1305
- live: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1306
- localization: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1307
- lock: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1308
- logout: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1309
- maximize: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1310
- media: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1311
- megaphone: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1312
- menu: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1313
- mic: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1314
- 'mic-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1315
- minimize: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1316
- minus: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1317
- 'minus-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1318
- mobile: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1319
- 'more-options': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1320
- 'move-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1321
- 'move-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1322
- music: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1323
- 'on-air': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1324
- 'open-new': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1325
- overview: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1326
- page: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1327
- 'panel-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1328
- 'panel-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1329
- 'panel-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1330
- password: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1331
- pause: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1332
- pencil: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1333
- people: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1334
- pin: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1335
- 'pin-slash': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1336
- pip: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1337
- play: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1338
- player: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1339
- playlist: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1340
- plus: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1341
- podcast: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1342
- preview: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1343
- 'private-chat': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1344
- 'private-user-sessions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1345
- project: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1346
- 'project-open': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1347
- properties: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1348
- 'question-mark': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1349
- react: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1350
- record: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1351
- 'record-group': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1352
- redo: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1353
- refresh: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1354
- replace: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1355
- reply: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1356
- 'request-video': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1357
- 'revert-to-original': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1358
- rewind: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1359
- save: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1360
- 'save-as-copy': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1361
- scissors: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1362
- 'screenshare-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1363
- 'screenshare-on': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1364
- search: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1365
- send: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1366
- shapes: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1367
- share: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1368
- 'sharing-permissions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1369
- simulcast: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1370
- sort: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1371
- sparkle: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1372
- speed: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1373
- spinner: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1374
- stats: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1375
- 'switch-accounts': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1376
- tag: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1377
- teleprompter: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1378
- 'text-size': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1379
- thumbnail: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1380
- 'thumbs-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1381
- 'thumbs-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1382
- 'timeline-vertical': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1383
- token: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1384
- transcript: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1385
- transitions: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1386
- transparency: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1387
- trends: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1388
- 'trial-unlock-clock': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1389
- trim: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1390
- turnstile: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1391
- undo: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1392
- unlock: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1393
- upload: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1394
- 'users-permissions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1395
- 'view-stream': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1396
- volume: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1397
- 'volume-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1398
- 'volume-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1399
- 'volume-x': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1400
- wand: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1401
- waveform: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1402
- webhook: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1403
- 'zoom-in': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1404
- 'zoom-out': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
1405
- };
1406
- type IconNameType = keyof typeof iconMap;
1407
-
1408
- declare const iconSizeMap: {
1409
- sm: string;
1410
- md: string;
1411
- lg: string;
1412
- xl: string;
1413
- xxl: string;
1414
- };
1415
- type IconProps = ComponentPropsWithoutRef<'svg'> & {
1416
- /**
1417
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1418
- */
1419
- colorScheme?: ColorSchemeTypes;
1420
- /**
1421
- * Determines if the icon should use inline styles when used with [Text]() and [Heading]() components
1422
- */
1423
- useInlineStyles?: boolean;
1424
- /**
1425
- * Is Icon on a filled background?
1426
- */
1427
- invertColor?: boolean;
1428
- /**
1429
- * The size of the icon to display
1430
- *
1431
- */
1432
- size?: ResponsiveObject<keyof typeof iconSizeMap> | keyof typeof iconSizeMap;
1433
- /**
1434
- * @ignore
1435
- */
1436
- style?: Record<string, unknown>;
1437
- /**
1438
- * Determines which icon to display
1439
- */
1440
- type: IconNameType;
1441
- };
1442
- /**
1443
- * A component that renders any of our available icons.
1444
- *
1445
- * For inline usage with text, wrap the Icon within a Text component
1446
- * and set inline=true. The icon will automatically align with the text
1447
- * using the typography-specific positioning.
1448
- *
1449
- * Note that icons should not be used directly for interactivity.
1450
- * If you need an interactive element, use IconButton.
1451
- */
1452
- declare const Icon: {
1453
- ({ useInlineStyles, invertColor, colorScheme, size, style, type, ...props }: IconProps): JSX.Element;
1454
- displayName: string;
1455
- };
1456
-
1457
- type CollapsibleTriggerIconProps = Omit<IconProps, 'type'> & {
1458
- type: Extract<IconProps['type'], 'caret-left-strong' | 'caret-left' | 'caret-right-strong' | 'caret-right' | 'plus'>;
1459
- };
1460
- declare const CollapsibleTriggerIcon: {
1461
- ({ type, ...props }: CollapsibleTriggerIconProps): react_jsx_runtime.JSX.Element;
1462
- displayName: string;
1463
- };
1464
-
1465
- type CollapsibleContentProps = {
1466
- /**
1467
- * The number of lines to clamp the content to when `Collapsible` is closed.
1468
- */
1469
- clamp?: number;
1470
- /**
1471
- * The content that will be hidden when `Collapsible` is closed.
1472
- */
1473
- children: CollapsibleContentProps$1['children'];
1474
- };
1475
- declare const CollapsibleContent: ({ clamp, children }: CollapsibleContentProps) => react_jsx_runtime.JSX.Element;
1476
-
1477
- type ColorGridProps = PropsWithChildren & {
1478
- label?: string;
1479
- };
1480
- declare const ColorGrid: {
1481
- ({ children, label }: ColorGridProps): JSX.Element;
1482
- displayName: string;
1483
- };
1484
-
1485
- type ColorPickerOption = {
1486
- /**
1487
- * The human-readable name of the color, if available.
1488
- */
1489
- name?: string | undefined;
1490
- /**
1491
- * The color value in hex format (e.g., "#54bbff").
1492
- */
1493
- value: string;
1494
- };
1495
-
1496
- type ColorGridOptionProps = ColorPickerOption;
1497
- declare const ColorGridOption: {
1498
- ({ value: rawValue, name }: ColorGridOptionProps): JSX.Element;
1499
- displayName: string;
1500
- };
1501
-
1502
- type ColorListProps = PropsWithChildren;
1503
- declare const ColorList: {
1504
- ({ children }: ColorListProps): JSX.Element;
1505
- displayName: string;
1506
- };
1507
-
1508
- type ColorListGroupProps = PropsWithChildren<{
1509
- label: string;
1510
- }>;
1511
- declare const ColorListGroup: {
1512
- ({ label, children }: ColorListGroupProps): JSX.Element;
1513
- displayName: string;
1514
- };
1515
-
1516
- type ColorListOptionProps = ColorPickerOption;
1517
- declare const ColorListOption: {
1518
- ({ value: rawValue, name }: ColorListOptionProps): JSX.Element;
1519
- displayName: string;
1520
- };
1521
-
1522
- type ColorPickerProps = PropsWithChildren<{
1523
- /**
1524
- * The color to compare against when checking contrast ratio.
1525
- */
1526
- colorForComparison?: string;
1527
- /**
1528
- * The minimum contrast ratio to enforce when `shouldEnforceMinContrast` is true.
1529
- */
1530
- minimumContrastRatio?: number;
1531
- /**
1532
- * The opacity to apply to the value color when calculating contrast.
1533
- */
1534
- opacityForContrastCalculation?: number;
1535
- /**
1536
- * Callback function invoked when the color value changes.
1537
- */
1538
- onValueChange: (value: string) => void;
1539
- /**
1540
- * The current color value in hex format (e.g., "#ff0000").
1541
- */
1542
- value: string;
1543
- }>;
1544
- /**
1545
- * ColorPicker is a composable component that allows you to create a color
1546
- * picker with various controls and options. Choose the parts you need, leave
1547
- * out the ones you don't, and include any custom UI you need alongside its
1548
- * subcomponents.
1549
- */
1550
- declare const ColorPicker: {
1551
- ({ children, colorForComparison, minimumContrastRatio, opacityForContrastCalculation, onValueChange, value, }: ColorPickerProps): JSX.Element;
1552
- displayName: string;
1553
- };
1554
-
1555
- type ColorPickerPopoverContentProps = PropsWithChildren;
1556
- declare const ColorPickerPopoverContent: {
1557
- ({ children, }: ColorPickerPopoverContentProps): JSX.Element;
1558
- displayName: string;
1559
- };
1560
-
1561
- type ColorPickerSectionProps = PropsWithChildren;
1562
- declare const ColorPickerSection: {
1563
- ({ children }: ColorPickerSectionProps): JSX.Element;
1564
- displayName: string;
1565
- };
1566
-
1567
- type ColorPickerTriggerProps = PropsWithChildren;
1568
- declare const ColorPickerTrigger: react.ForwardRefExoticComponent<{
1569
- children?: react.ReactNode | undefined;
1570
- } & react.RefAttributes<HTMLButtonElement>>;
1571
-
1572
- declare const ContrastControls: {
1573
- (): JSX.Element;
1574
- displayName: string;
1575
- };
1576
-
1577
- type HexColorInputProps = {
1578
- /**
1579
- * Whether the input should recieve focus automatically on mount.
1580
- */
1581
- autoFocus?: boolean;
1582
- };
1583
- declare const HexColorInput: {
1584
- ({ autoFocus }: HexColorInputProps): JSX.Element;
1585
- displayName: string;
1586
- };
1587
-
1588
- declare const HueSlider: {
1589
- (): JSX.Element;
1590
- displayName: string;
1591
- };
1592
-
1593
- type SaturationAndValuePickerProps = {
1594
- dataTestId?: string;
1595
- };
1596
- declare const SaturationAndValuePicker: {
1597
- ({ dataTestId, }: SaturationAndValuePickerProps): JSX.Element;
1598
- displayName: string;
1599
- };
1600
-
1601
- declare const ValueNameOrHexCode: {
1602
- (): JSX.Element;
1603
- displayName: string;
1604
- };
1605
-
1606
- type ColorSwatchProps = PropsWithChildren<{
1607
- derivativeIsSelected?: boolean;
1608
- diameterPx?: number;
1609
- isSelected?: boolean;
1610
- value: string;
1611
- }>;
1612
-
1613
- type ValueSwatchProps = Pick<ColorSwatchProps, 'diameterPx'>;
1614
- declare const ValueSwatch: {
1615
- ({ diameterPx, }: ValueSwatchProps): JSX.Element;
1616
- displayName: string;
1617
- };
1618
-
1619
- declare const calculateContrast: ({ backgroundColor, foregroundColor, backgroundOpacity, }: {
1620
- backgroundColor: Color | string;
1621
- foregroundColor?: Color | string;
1622
- backgroundOpacity?: number;
1623
- }) => number;
1624
-
1625
- type ComboboxOptionProps = {
1626
- value: string;
1627
- children: ReactNode;
1628
- };
1629
- declare const ComboboxOption: ({ value, children }: ComboboxOptionProps) => react_jsx_runtime.JSX.Element;
1630
- type ComboboxProps = {
1631
- /**
1632
- * If true, the popover will flip to stay within the viewport
1633
- */
1634
- flipPopover?: Ariakit.ComboboxPopoverProps['flip'];
1635
- /**
1636
- * If true, the combox will fill the width of its parent
1637
- */
1638
- fullWidth?: boolean;
1639
- /**
1640
- * The options to display in the combobox
1641
- */
1642
- children: ReactNode;
1643
- /**
1644
- * Function to render the selected values. Receives the selected values and a function to remove a value. This is only applicable for multi-select comboboxes.
1645
- */
1646
- displayValues?: (values: string[] | string, onRemove: (value: string) => void) => ReactNode;
1647
- /**
1648
- * The placeholder text for the combobox input
1649
- */
1650
- placeholder?: string;
1651
- /**
1652
- * The function to call when the search value changes.
1653
- */
1654
- onSearchValueChange: (value: string) => void;
1655
- /**
1656
- * The search value of the combobox input
1657
- */
1658
- searchValue: string;
1659
- /**
1660
- * Callback that fires when a value is selected
1661
- */
1662
- onChange: (value: string[] | string) => void;
1663
- /**
1664
- * The selected values of the combobox
1665
- */
1666
- value: string[] | string;
1667
- };
1668
- declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchValueChange, displayValues, children, flipPopover, fullWidth, }: ComboboxProps) => react_jsx_runtime.JSX.Element;
1669
-
1670
- type ContextMenuProps = {
1671
- children: ReactNode;
1672
- onRequestClose?: () => void;
1673
- /**
1674
- * If the menu is compact
1675
- */
1676
- compact?: boolean;
1677
- } & ({
1678
- position: {
1679
- x: number;
1680
- y: number;
1681
- };
1682
- side?: 'bottom' | 'top';
1683
- triggerRef?: never;
1684
- } | {
1685
- position?: never;
1686
- side?: never;
1687
- triggerRef: RefObject<HTMLElement | null>;
1688
- });
1689
- /**
1690
- * The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
1691
- * It can be used in two ways:
1692
- * 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
1693
- * 2. By providing a `position` prop, which will render the menu at the specified coordinates.
1694
- */
1695
- declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, compact, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
1696
-
1697
- type DataCardProps = ComponentPropsWithoutRef<'div'> & Partial<Pick<ButtonAsLinkProps, 'beforeAction' | 'disabled' | 'href' | 'onClick' | 'type'>> & {
1698
- /**
1699
- * Label text displayed above the value
1700
- */
1701
- label: ReactNode;
1702
- /**
1703
- * Main value to display in the card
1704
- */
1705
- value: ReactNode;
1706
- /**
1707
- * Optional content to display in the top-right corner
1708
- */
1709
- upperRightSlot?: ReactNode;
1710
- /**
1711
- * Sets the color scheme of the card
1712
- */
1713
- colorScheme?: ColorSchemeTypes;
1714
- /**
1715
- * Controls the loading state of the card
1716
- */
1717
- isLoading?: boolean;
1718
- /**
1719
- * Forces a full page reload when navigating, bypassing client-side routing
1720
- */
1721
- reloadDocument?: boolean;
1722
- /**
1723
- * Optional trend arrow to display below the value. Use the `DataCardTrend` component to create this.
1724
- */
1725
- trend?: ReactNode;
1726
- /**
1727
- * Optional subtitle text to display below the value
1728
- */
1729
- subtitle?: ReactNode;
1730
- };
1731
- declare const DataCard: {
1732
- (props: DataCardProps): react_jsx_runtime.JSX.Element;
1733
- displayName: string;
1734
- };
1735
-
1736
- type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
1737
- /**
1738
- * Should be at least one `DataCard` component
1739
- */
1740
- children: ReactNode;
1741
- /**
1742
- * String to pass to the `max-width` property of its children. [View the syntax on MDN →](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width#syntax)
1743
- */
1744
- cardMaxWidth?: ResponsiveObject<string> | string;
1745
- /**
1746
- * Sets the color scheme of the cards, can be overriden at the card level
1747
- */
1748
- colorScheme?: ColorSchemeTypes;
1749
- /**
1750
- * Desired number of columns to display.
1751
- */
1752
- columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
1753
- };
1754
- /**
1755
- * Displays a series of cards tailor made for displaying analytics data
1756
- */
1757
- declare const DataCards: {
1758
- ({ children, cardMaxWidth, colorScheme, columns, ...props }: DataCardsProps): JSX.Element;
1759
- displayName: string;
1760
- };
1761
-
1762
- type DataCardTrendProps = {
1763
- /**
1764
- * Direction of the trend arrow
1765
- */
1766
- direction?: 'down' | 'up';
1767
- /**
1768
- * Outlook of the trend arrow
1769
- */
1770
- outlook?: 'negative' | 'positive';
1771
- /**
1772
- * Content to display next to the trend arrow
1773
- */
1774
- children: JSX.Element | string;
1775
- };
1776
- declare const DataCardTrend: ({ direction, outlook, children, ...props }: DataCardTrendProps) => JSX.Element;
1777
-
1778
- declare const DataCardHoverArrow: {
1779
- (): react_jsx_runtime.JSX.Element;
1780
- displayName: string;
1781
- };
1782
-
1783
- type DataListProps = ComponentPropsWithoutRef<'dl'> & {
1784
- /**
1785
- * Should only contain `DataListItem` components.
1786
- */
1787
- children: ReactNode;
1788
- /**
1789
- * Maximum width for the label.
1790
- */
1791
- labelMaxWith?: string;
1792
- /**
1793
- * Prominence of the label text. Default is `primary`.
1794
- */
1795
- labelProminence?: 'primary' | 'secondary';
1796
- /**
1797
- * Alignment of the value text. Default is `start`.
1798
- */
1799
- valueAlignment?: 'end' | 'start';
1800
- };
1801
- /**
1802
- * The DataList component is used to display a list of items with labels and values.
1803
- */
1804
- declare const DataList: {
1805
- ({ children, valueAlignment, labelMaxWith, labelProminence, ...props }: DataListProps): JSX.Element;
1806
- displayName: string;
1807
- };
1808
-
1809
- type DataListItemProps = Omit<ComponentPropsWithoutRef<'dl'>, 'children'> & {
1810
- /**
1811
- * Should only contain `DataListItemLabel` and `DataListItemValue` components.
1812
- */
1813
- children: ReactNode;
1814
- };
1815
- /**
1816
- * An item within a `DataList`. It should only contain `DataListItemLabel` and `DataListItemValue` components.
1817
- */
1818
- declare const DataListItem: {
1819
- ({ children }: DataListItemProps): ReactNode;
1820
- displayName: string;
1821
- };
1822
-
1823
- type AlignmentTypes$1 = 'center' | 'justify' | 'left' | 'right';
1824
- declare const variantStyleMap$1: {
1825
- body1: styled_components.RuleSet<object>;
1826
- body2: styled_components.RuleSet<object>;
1827
- body3: styled_components.RuleSet<object>;
1828
- body4: styled_components.RuleSet<object>;
1829
- body1Mono: styled_components.RuleSet<object>;
1830
- body2Mono: styled_components.RuleSet<object>;
1831
- body3Mono: styled_components.RuleSet<object>;
1832
- body4Mono: styled_components.RuleSet<object>;
1833
- label1: styled_components.RuleSet<object>;
1834
- label2: styled_components.RuleSet<object>;
1835
- label3: styled_components.RuleSet<object>;
1836
- label4: styled_components.RuleSet<object>;
1837
- };
1838
- type TextProps = ComponentPropsWithoutRef<'div'> & {
1839
- /**
1840
- * The horizontal alignment
1841
- * <br />
1842
- * _Note: this only affects block elements_
1843
- */
1844
- align?: AlignmentTypes$1;
1845
- /**
1846
- * The text content
1847
- */
1848
- children?: ReactNode | undefined;
1849
- /**
1850
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1851
- */
1852
- colorScheme?: ColorSchemeTypes;
1853
- /**
1854
- * Allows user to override default button colors
1855
- */
1856
- disabled?: boolean;
1857
- /**
1858
- * Display the text as inline content
1859
- */
1860
- inline?: boolean;
1861
- /**
1862
- * Maximum number of characters to display before truncating. Must be >= 1.
1863
- * When truncated, an ellipsis (...) will be added to the end.
1864
- */
1865
- maxChars?: number;
1866
- /**
1867
- * Prevents text from being highlighted and copied
1868
- */
1869
- preventUserSelect?: boolean;
1870
- /**
1871
- * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1872
- */
1873
- prominence?: 'button' | 'primary' | 'secondary';
1874
- /**
1875
- * This will inherit the jsdoc block from PolymorphicComponent
1876
- */
1877
- renderAs?: ElementType;
1878
- /**
1879
- * Number of lines to display before truncating with an ellipsis.
1880
- * Set to 1 to truncate after a single line, 2 for two lines, etc.
1881
- * <br />
1882
- * _Note: this only affects block elements_
1883
- */
1884
- maxLines?: number;
1885
- /**
1886
- * The text style to display
1887
- */
1888
- variant?: keyof typeof variantStyleMap$1 | undefined;
1889
- };
1890
- /**
1891
- * Used for rending paragraphs and inline text.
1892
- */
1893
- declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
1894
-
1895
- /**
1896
- * The label of the `DataListItem`. Extends the [Text]() component.
1897
- */
1898
- declare const DataListItemLabel: {
1899
- (props: TextProps): JSX.Element;
1900
- displayName: string;
1901
- };
1902
-
1903
- /**
1904
- * The value of the `DataListItem`. Extends the [Text]() component.
1905
- */
1906
- declare const DataListItemValue: {
1907
- (props: TextProps): JSX.Element;
1908
- displayName: string;
1909
- };
1910
-
1911
- type DividerProps = ComponentPropsWithoutRef<'div'> & {
1912
- /**
1913
- * Orientation of the divider.
1914
- */
1915
- orientation?: ResponsiveObject<'horizontal' | 'vertical'> | 'horizontal' | 'vertical';
1916
- };
1917
- /**
1918
- * A line used to visually separate content; note that dividers have no margin/spacing on their own.
1919
- */
1920
- declare const Divider: {
1921
- ({ orientation, ...props }: DividerProps): JSX.Element;
1922
- displayName: string;
1923
- };
1924
-
1925
- type AlignmentTypes = 'center' | 'justify' | 'left' | 'right';
1926
- declare const variantStyleMap: {
1927
- hero: styled_components.RuleSet<object>;
1928
- heading1: styled_components.RuleSet<object>;
1929
- heading2: styled_components.RuleSet<object>;
1930
- heading3: styled_components.RuleSet<object>;
1931
- heading4: styled_components.RuleSet<object>;
1932
- heading5: styled_components.RuleSet<object>;
1933
- heading6: styled_components.RuleSet<object>;
1934
- };
1935
- declare const DEFAULT_ELEMENT = "h1";
1936
- type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
1937
- /**
1938
- * The horizontal alignment
1939
- * <br />
1940
- * _Note: this only affects block elements_
1941
- */
1942
- align?: AlignmentTypes;
1943
- /**
1944
- * The content of the heading
1945
- */
1946
- children: ReactNode;
1947
- /**
1948
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1949
- */
1950
- colorScheme?: ColorSchemeTypes;
1951
- /**
1952
- * Styles to text as disabled
1953
- */
1954
- disabled?: boolean;
1955
- /**
1956
- * Display the text as inline content
1957
- */
1958
- inline?: boolean;
1959
- /**
1960
- * Maximum number of characters to display before truncating. Must be >= 1.
1961
- * When truncated, an ellipsis (...) will be added to the end.
1962
- */
1963
- maxChars?: number;
1964
- /**
1965
- * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1966
- */
1967
- prominence?: 'button' | 'primary' | 'secondary';
1968
- /**
1969
- * Prevents text from being highlighted and copied
1970
- */
1971
- preventUserSelect?: boolean;
1972
- renderAs?: ElementType;
1973
- /**
1974
- * Number of lines to display before truncating with an ellipsis.
1975
- * Set to 1 to truncate after a single line, 2 for two lines, etc.
1976
- * <br />
1977
- * _Note: this only affects block elements_
1978
- */
1979
- maxLines?: number;
1980
- /**
1981
- * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1982
- */
1983
- variant?: keyof typeof variantStyleMap;
1984
- };
1985
- /**
1986
- * Displaying heading text, both visually and semantically
1987
- */
1988
- declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement | null) & UnknownRecord;
1989
-
1990
- type EditableHeadingProps = {
1991
- /**
1992
- * The initial text content of the heading.
1993
- * This will be displayed and used as the starting value when editing begins.
1994
- */
1995
- children: string;
1996
- /**
1997
- * Callback fired when editing is completed (on blur or Enter key). Does not fire if the value is empty or the same as the previous value.
1998
- * @param value The new text content after editing
1999
- */
2000
- onValueChange?: (value: string) => void;
2001
- /**
2002
- * Callback fired when the editing state changes.
2003
- * @param isEditing True when entering edit mode, false when exiting
2004
- */
2005
- onEditingChange?: (isEditing: boolean) => void;
2006
- /**
2007
- * Custom tooltip text shown when hovering over the heading.
2008
- */
2009
- tooltipText?: string;
2010
- /**
2011
- * Sets an aria-label for the input and label for the screen reader only button.
2012
- */
2013
- ariaLabel?: string;
2014
- /**
2015
- * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
2016
- */
2017
- variant?: HeadingProps['variant'];
2018
- /**
2019
- * Force editing state for testing purposes
2020
- * @ignore
2021
- */
2022
- __forceEditing?: boolean;
2023
- /**
2024
- * When true, prevents the heading from entering edit mode
2025
- * @default false
2026
- */
2027
- editingDisabled?: boolean;
2028
- };
2029
- /**
2030
- * A special heading component that allows for inline editing. When clicked or activated via keyboard,
2031
- * it transforms into an editable text field. In its default state, it renders as a heading with
2032
- * an accessible button that enables editing mode. The component handles empty values, keyboard
2033
- * navigation (Enter to save, Escape to cancel), and provides callbacks for value and state changes.
2034
- */
2035
- declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel, variant, __forceEditing, editingDisabled, }: EditableHeadingProps) => JSX.Element;
2036
-
2037
- declare const typographicVariantStyleMap: {
2038
- hero: styled_components.RuleSet<object>;
2039
- heading1: styled_components.RuleSet<object>;
2040
- heading2: styled_components.RuleSet<object>;
2041
- heading3: styled_components.RuleSet<object>;
2042
- heading4: styled_components.RuleSet<object>;
2043
- heading5: styled_components.RuleSet<object>;
2044
- heading6: styled_components.RuleSet<object>;
2045
- body1: styled_components.RuleSet<object>;
2046
- body2: styled_components.RuleSet<object>;
2047
- body3: styled_components.RuleSet<object>;
2048
- body4: styled_components.RuleSet<object>;
2049
- body1Mono: styled_components.RuleSet<object>;
2050
- body2Mono: styled_components.RuleSet<object>;
2051
- body3Mono: styled_components.RuleSet<object>;
2052
- body4Mono: styled_components.RuleSet<object>;
2053
- label1: styled_components.RuleSet<object>;
2054
- label2: styled_components.RuleSet<object>;
2055
- label3: styled_components.RuleSet<object>;
2056
- label4: styled_components.RuleSet<object>;
2057
- };
2058
- type TypographicVariant = keyof typeof typographicVariantStyleMap;
2059
-
2060
- type EditableTextRootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
2061
- /**
2062
- * The children of the editable text root.
2063
- */
2064
- children: ReactNode;
2065
- /**
2066
- * The initial value for the editable text
2067
- */
2068
- defaultValue?: string;
2069
- /**
2070
- * The current value for the editable text
2071
- */
2072
- value?: string;
2073
- /**
2074
- * Callback fired when the value changes
2075
- */
2076
- onValueChange?: (value: string) => void;
2077
- /**
2078
- * Callback fired when editing is committed (e.g., save button clicked, Enter pressed)
2079
- */
2080
- onValueCommit?: (value: string) => void;
2081
- /**
2082
- * Callback fired when editing is cancelled (e.g., cancel button clicked, Escape pressed)
2083
- */
2084
- onValueRevert?: (originalValue: string) => void;
2085
- /**
2086
- * Callback fired when the editing state changes (editing starts or stops)
2087
- */
2088
- onEditingChange?: (isEditing: boolean) => void;
2089
- /**
2090
- * The typographic variant to use for the display component
2091
- */
2092
- typographicVariant?: TypographicVariant;
2093
- /**
2094
- * The action(s) that trigger submit or dismiss in edit mode:
2095
- * - "enter": Trigger submit when the enter key is pressed, or dismiss when the esc key is pressed
2096
- * - "blur": Trigger submit when the editable is blurred, or dismiss when the esc key is pressed
2097
- * - "none": No action will trigger submit or dismiss. You need to use the submit or dismiss buttons
2098
- * - "both": Pressing Enter and blurring the input will trigger submit, or dismiss when the esc key is pressed
2099
- */
2100
- submitMode?: 'blur' | 'both' | 'enter' | 'none';
2101
- /**
2102
- * Whether the editable text is read only. If true, the editable text will not be editable and the trigger will not be shown.
2103
- */
2104
- readOnly?: boolean;
2105
- /**
2106
- * The id of the editable text.
2107
- */
2108
- id?: string;
2109
- /**
2110
- * The label of the editable text.
2111
- */
2112
- label: string;
2113
- /**
2114
- * Placeholder text for the input field and display
2115
- */
2116
- placeholder?: string;
2117
- /**
2118
- * Minimum number of lines to display.
2119
- */
2120
- minLines?: number;
2121
- /**
2122
- * Maximum number of lines to display. If not set, there is no maximum.
2123
- */
2124
- maxLines?: number | undefined;
2125
- /**
2126
- * The element to receive focus when the editable is closed.
2127
- */
2128
- finalFocusEl?: () => HTMLElement | null;
2129
- };
2130
- type EditableTextContextValues = {
2131
- isEditing: boolean;
2132
- setIsEditing: (editing: boolean) => void;
2133
- value: string;
2134
- setValue: (value: string) => void;
2135
- originalValue: string;
2136
- onValueCommit: ((value: string) => void) | undefined;
2137
- onValueRevert: ((originalValue: string) => void) | undefined;
2138
- typographicVariant: TypographicVariant;
2139
- submitMode: 'blur' | 'both' | 'enter' | 'none';
2140
- readOnly: boolean;
2141
- id: string;
2142
- label: string;
2143
- placeholder: string;
2144
- minLines: number;
2145
- maxLines: number | undefined;
2146
- finalFocusEl: (() => HTMLElement | null) | undefined;
2147
- };
2148
- declare const EditableTextContext: react.Context<EditableTextContextValues | null>;
2149
- declare const EditableTextRoot: ({ children, defaultValue, value: controlledValue, onValueChange, onValueCommit, onValueRevert, onEditingChange, typographicVariant, submitMode, readOnly, id, label, placeholder, minLines, maxLines, finalFocusEl, ...props }: EditableTextRootProps) => JSX.Element;
2150
-
2151
- type EditableTextProps = Omit<EditableTextRootProps, 'children'> & {
2152
- /**
2153
- * Whether to visually hide the label.
2154
- */
2155
- hideLabel?: boolean;
2156
- };
2157
- /**
2158
- * Used for inline editing of text.
2159
- */
2160
- declare const EditableText: {
2161
- ({ hideLabel, ...props }: EditableTextProps): JSX.Element;
2162
- displayName: string;
2163
- };
2164
-
2165
- type EditableTextDisplayProps = ComponentPropsWithoutRef<'div'> & {
2166
- /**
2167
- * When true, the user can click on the display to edit the text
2168
- */
2169
- asTrigger?: boolean;
2170
- renderAs?: ElementType;
2171
- };
2172
- declare const EditableTextDisplay: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, EditableTextDisplayProps>) => react.ReactElement | null) & UnknownRecord;
2173
-
2174
- type LabelProps = ComponentPropsWithoutRef<'label'> & {
2175
- /**
2176
- * Pass an arbitrary child node
2177
- */
2178
- children?: ReactNode;
2179
- /**
2180
- * To indicate that the label is for a disabled form component
2181
- */
2182
- disabled?: boolean;
2183
- /**
2184
- * ID of the form component that the label should be associated with
2185
- */
2186
- htmlFor?: string | undefined;
2187
- /**
2188
- * Use if label describes a required form component
2189
- */
2190
- required?: boolean;
2191
- /**
2192
- * For label text that needs to be available to assistive technology (e.g. screen readers)
2193
- * but otherwise hidden on screen.
2194
- */
2195
- screenReaderOnly?: boolean;
2196
- };
2197
- /**
2198
- * Labels are used to give a title to a form component (eg. Input, Select, etc.)
2199
- */
2200
- declare const Label: {
2201
- ({ children, disabled, htmlFor, required, screenReaderOnly, ...props }: LabelProps): JSX.Element;
2202
- displayName: string;
2203
- };
2204
-
2205
- type EditableTextLabelProps = Omit<LabelProps, 'disabled' | 'htmlFor' | 'required'>;
2206
- declare const EditableTextLabel: ({ ...props }: EditableTextLabelProps) => react_jsx_runtime.JSX.Element;
2207
-
2208
- declare const EditableTextSubmitButton: ({ children, }: {
2209
- children: ReactElement;
2210
- }) => JSX.Element | null;
2211
-
2212
- type EditableTextCancelButtonProps = {
2213
- /**
2214
- * A cancel button, typically a [Button]() that will revert the value when clicked.
2215
- */
2216
- children: ReactElement;
2217
- };
2218
- declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => JSX.Element | null;
2219
-
2220
- type EditableTextTriggerProps = {
2221
- /**
2222
- * A trigger element, typically a [Button]() that will enter editing mode when clicked.
2223
- */
2224
- children: ReactElement;
2225
- };
2226
- declare const EditableTextTrigger: ({ children, ...props }: EditableTextTriggerProps) => JSX.Element | null;
2227
-
2228
- type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, 'type'> & {
2229
- /**
2230
- * When enabled, focusing the input will select the entire text within
2231
- */
2232
- autoSelect?: boolean;
2233
- /**
2234
- * Sets the validity status of the input
2235
- */
2236
- 'aria-invalid'?: boolean;
2237
- /**
2238
- * Set the disabled state of the input
2239
- */
2240
- disabled?: boolean;
2241
- /**
2242
- * If true, the input will fill the height of its parent container
2243
- * _note: only applicable when `type="multiline"`_
2244
- */
2245
- fullHeight?: boolean;
2246
- /**
2247
- * If true, the input will fill the width of its parent
2248
- */
2249
- fullWidth?: boolean;
2250
- /**
2251
- * If true, the input will use a monospace font
2252
- */
2253
- monospace?: boolean;
2254
- /**
2255
- * Icon to display on the left side of the input. Must be an instance of [Icon](?path=/docs/components-icon--docs)
2256
- */
2257
- leftIcon?: ReactNode | undefined;
2258
- /**
2259
- * Icon to display on the right side of the input. Must be an instance of [Icon](?path=/docs/components-icon--docs)
2260
- */
2261
- rightIcon?: ReactNode | undefined;
2262
- /**
2263
- * The type of the input
2264
- */
2265
- type?: 'email' | 'multiline' | 'number' | 'password' | 'phone' | 'search' | 'text' | 'url';
2266
- };
2267
- /**
2268
- * Capture user input with a text field. Should be used within a [Form]() and [FormField]().
2269
- */
2270
- declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLTextAreaElement | HTMLInputElement>, "type"> & {
2271
- /**
2272
- * When enabled, focusing the input will select the entire text within
2273
- */
2274
- autoSelect?: boolean;
2275
- /**
2276
- * Sets the validity status of the input
2277
- */
2278
- 'aria-invalid'?: boolean;
2279
- /**
2280
- * Set the disabled state of the input
2281
- */
2282
- disabled?: boolean;
2283
- /**
2284
- * If true, the input will fill the height of its parent container
2285
- * _note: only applicable when `type="multiline"`_
2286
- */
2287
- fullHeight?: boolean;
2288
- /**
2289
- * If true, the input will fill the width of its parent
2290
- */
2291
- fullWidth?: boolean;
2292
- /**
2293
- * If true, the input will use a monospace font
2294
- */
2295
- monospace?: boolean;
2296
- /**
2297
- * Icon to display on the left side of the input. Must be an instance of [Icon](?path=/docs/components-icon--docs)
2298
- */
2299
- leftIcon?: ReactNode | undefined;
2300
- /**
2301
- * Icon to display on the right side of the input. Must be an instance of [Icon](?path=/docs/components-icon--docs)
2302
- */
2303
- rightIcon?: ReactNode | undefined;
2304
- /**
2305
- * The type of the input
2306
- */
2307
- type?: "email" | "multiline" | "number" | "password" | "phone" | "search" | "text" | "url";
2308
- } & react.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
2309
-
2310
- type EditableTextInputProps = Pick<InputProps, 'autoSelect'>;
2311
- declare const EditableTextInput: (props: EditableTextInputProps) => JSX.Element | null;
2312
-
2313
- type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
2314
- /**
2315
- * The text that will be truncated with an ellipsis
2316
- */
2317
- children?: ReactNode;
2318
- /**
2319
- * The number that will be truncated with an ellipsis
2320
- */
2321
- lines?: number | undefined;
2322
- };
2323
- /**
2324
- * Truncate text with an ellispsis visble at the end
2325
- */
2326
- declare const Ellipsis: {
2327
- ({ children, lines, ...props }: EllipsisProps): JSX.Element;
2328
- displayName: string;
2329
- };
2330
-
2331
- type ActionCallback<T> = (data: T, nextData: T) => Promise<T> | T;
2332
- type Action = (data: FormData | null) => Promise<void>;
2333
- type FormActionState<T> = [{
2334
- data: T;
2335
- error: Error | null;
2336
- }, Action, boolean];
2337
- declare const useFormState: <T extends object>(action: ActionCallback<T>, initialData?: Partial<T>) => FormActionState<T>;
2338
-
2339
- type ValidationCallback<T> = (data: T) => FormErrors<T>;
2340
- type FormWithLabelledByProps = {
2341
- 'aria-label'?: never;
2342
- /**
2343
- * The id of the element that labels the form. Typically a heading.
2344
- */
2345
- 'aria-labelledby': string;
2346
- };
2347
- type FormWithLabelProps = {
2348
- /**
2349
- * Accessible name of the form. Use this only when a visible label is not possible. If the form has a title or heading, use `aria-labelledby` instead.
2350
- */
2351
- 'aria-label': string;
2352
- 'aria-labelledby'?: never;
2353
- };
2354
- type FormErrors<T> = Partial<{
2355
- [K in keyof T]: string[] | string;
2356
- }>;
2357
- type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-label' | 'aria-labelledby' | 'children'> & {
2358
- /**
2359
- * The action to be performed when the form is submitted. It can be asynchronous.
2360
- */
2361
- action?: Action;
2362
- /**
2363
- * Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
2364
- * is set on the `FormField` itself.
2365
- */
2366
- labelPosition?: 'block' | 'inline-compact' | 'inline';
2367
- /**
2368
- * The form elements used in the form
2369
- */
2370
- children: ReactNode;
2371
- /**
2372
- * An object that providesd errors for the form fields. This is created by `useFormState` and passed along to `FormField`s.
2373
- */
2374
- errors?: FormErrors<T>;
2375
- /**
2376
- * If true, fills the entire container
2377
- */
2378
- fullWidth?: boolean;
2379
- /**
2380
- * The function for handling validation.
2381
- */
2382
- validate?: ValidationCallback<T>;
2383
- /**
2384
- * An object that provides valuesfor the form fields. This is typically the `state.data` value from `useFormState` and passed along to `FormField`s.
2385
- */
2386
- values?: T;
2387
- } & (FormWithLabelledByProps | FormWithLabelProps);
2388
- /**
2389
- * For creating forms. It provides a context for the form fields to access the form state and validation.
2390
- * It also provides a way to handle form submission and validation. It is built around [React 19's form APIs](https://react.dev/reference/react-dom/components/form).
2391
- */
2392
- declare const Form: <T>(props: FormProps<T> & {
2393
- ref?: Ref<HTMLFormElement>;
2394
- }) => JSX.Element;
2395
-
2396
- type FormErrorSummaryProps = {
2397
- description: string;
2398
- };
2399
- declare const FormErrorSummary: ({ description }: FormErrorSummaryProps) => react_jsx_runtime.JSX.Element | null;
2400
-
2401
- type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
2402
- /**
2403
- * This should be a single child that is a valid form field (or can pretend to be one).
2404
- */
2405
- children: JSX.Element;
2406
- /**
2407
- * Additional descriptive text to display below the form field
2408
- */
2409
- description?: ReactNode;
2410
- /**
2411
- * Valid label text
2412
- */
2413
- label: ReactNode;
2414
- /**
2415
- * If an id isn't supplied, one is generated internally.
2416
- */
2417
- id?: string;
2418
- /**
2419
- * Will show an error message and put the child input into an invalid state
2420
- */
2421
- error?: ReactNode;
2422
- /**
2423
- * The name attribute of the field. It will map to the form data passed into `useFormState`.
2424
- */
2425
- name: string;
2426
- /**
2427
- * Use if label describes a required form component
2428
- */
2429
- required?: boolean;
2430
- /**
2431
- * A value that overrides the basic value. This should pair with `onChange`.
2432
- */
2433
- value?: string;
2434
- /**
2435
- * Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
2436
- */
2437
- labelPosition?: 'block' | 'inline-compact' | 'inline';
2438
- };
2439
- /**
2440
- * FormField is a compound component that combines a label, form control, and optional description and error message.
2441
- */
2442
- declare const FormField: {
2443
- ({ children, description, error, id, label, labelPosition, name, required, value, ...props }: FormFieldProps): JSX.Element;
2444
- displayName: string;
2445
- };
2446
-
2447
- type FormGroupProps = Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> & {
2448
- children: ReactNode;
2449
- /**
2450
- * The label for the form group
2451
- */
2452
- label?: ReactNode;
2453
- /**
2454
- * The description for the form group
2455
- */
2456
- description?: ReactNode;
2457
- };
2458
- /**
2459
- * For grouping like form elements together.
2460
- */
2461
- declare const FormGroup: {
2462
- ({ children, label, description, ...props }: FormGroupProps): JSX.Element;
2463
- displayName: string;
2464
- };
2465
-
2466
- type RadioGroupProps = FormGroupProps & {
2467
- onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2468
- value?: string | undefined;
2469
- name: string;
2470
- };
2471
- /**
2472
- * For grouping like form elements together. Can serve as a checkbox
2473
- */
2474
- declare const RadioGroup: {
2475
- ({ children, name, onChange, value, ...props }: RadioGroupProps): JSX.Element;
2476
- displayName: string;
2477
- };
2478
-
2479
- type CheckboxGroupProps = FormGroupProps & {
2480
- onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2481
- value?: string[] | undefined;
2482
- name: string;
2483
- };
2484
- /**
2485
- * For grouping like form elements together. Can serve as a checkbox
2486
- */
2487
- declare const CheckboxGroup: {
2488
- ({ children, name, onChange, value, ...props }: CheckboxGroupProps): JSX.Element;
2489
- displayName: string;
2490
- };
2491
-
2492
- type Gap = {
2493
- column: Spacings;
2494
- row: Spacings;
2495
- };
2496
- type ResponsiveGap = ResponsiveObject<Gap | Spacings>;
2497
- type GridProps = ComponentPropsWithoutRef<'div'> & {
2498
- /**
2499
- * The content to be displayed in the grid
2500
- */
2501
- children: ReactNode;
2502
- /**
2503
- * When minChildWidth is 'auto', this will be the number of columns, otherwise it will be the maximum number of columns.
2504
- */
2505
- columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
2506
- /**
2507
- * Sets the minimum width for each grid item.
2508
- */
2509
- minChildWidth?: ResponsiveObject<number | 'auto'> | number | 'auto';
2510
- /**
2511
- * Controls the spacing between grid items.
2512
- */
2513
- gap?: Gap | ResponsiveGap | Spacings;
2514
- /**
2515
- * Controls whether grid items expand to fill available space when there are fewer items than columns.
2516
- * When true, items grow to fill space. When false, the grid will auto fill the additional space with empty tracks.
2517
- */
2518
- expandItems?: boolean;
2519
- renderAs?: ElementType;
2520
- };
2521
- declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement | null) & UnknownRecord;
2522
-
2523
- type IconButtonProps = {
2524
- /**
2525
- * Accessible text for screen readers.
2526
- */
2527
- label: string;
2528
- /**
2529
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
2530
- */
2531
- children: JSX.Element;
2532
- } & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
2533
- /**
2534
- * IconButton behaves like a [Button](?path=/docs/components-button--docs),
2535
- * but only accepts an [Icon](?path=/docs/components-icon--docs) as a child.
2536
- */
2537
- declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
2538
- /**
2539
- * Accessible text for screen readers.
2540
- */
2541
- label: string;
2542
- /**
2543
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
2544
- */
2545
- children: JSX.Element;
2546
- } & Omit<ButtonAsButtonProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref"> | Omit<{
2547
- /**
2548
- * Accessible text for screen readers.
2549
- */
2550
- label: string;
2551
- /**
2552
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
2553
- */
2554
- children: JSX.Element;
2555
- } & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
2556
-
2557
- type ImageProps = ComponentPropsWithoutRef<'img'> & {
2558
- /**
2559
- * Accessible text to apply to the image
2560
- */
2561
- alt: string;
2562
- /**
2563
- * Border radius to apply to the image
2564
- */
2565
- borderRadius?: BorderRadius;
2566
- /**
2567
- * Specifies whether the width and/or height should fill the container
2568
- *
2569
- * *Note: this will override height/width attributes*
2570
- */
2571
- fill?: boolean | 'horizontal' | 'vertical';
2572
- /**
2573
- * Specifies how the image's intrinsic size (ie. its natural size) should
2574
- * be adjusted to fit within its container
2575
- */
2576
- fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
2577
- /**
2578
- * Indicates how the browser should load the image; `eager`loads the image immediately,
2579
- * `lazy` defers loading the image until it reaches a calculated distance from the viewport.
2580
- * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
2581
- */
2582
- loading?: 'eager' | 'lazy';
2583
- /**
2584
- * Specifies how the image will align itself in its container
2585
- */
2586
- position?: string;
2587
- /**
2588
- * URL to image file
2589
- */
2590
- src: string;
2591
- /**
2592
- * A callback that is invoked after the image has loaded
2593
- */
2594
- onLoad?: (event?: SyntheticEvent<HTMLImageElement>) => void;
2595
- /**
2596
- * A callback that is invoked after the image has failed to load
2597
- */
2598
- onError?: (event?: SyntheticEvent<HTMLImageElement>) => void;
2599
- };
2600
- declare const Image: {
2601
- ({ src, alt, borderRadius, fill: fillContainer, fit: objFit, loading, position: objPosition, onLoad, onError, ...props }: ImageProps): JSX.Element;
2602
- displayName: string;
2603
- };
2604
-
2605
- type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'rightIcon' | 'type' | 'value'> & {
2606
- /**
2607
- * When disabled, the copy action will not be triggered
2608
- */
2609
- disabled?: boolean;
2610
- /**
2611
- * Callback function that is called when the value is copied to the clipboard
2612
- */
2613
- onCopy?: (value: string) => void;
2614
- /**
2615
- * the value of what is copied
2616
- */
2617
- value: string;
2618
- };
2619
- /**
2620
- * Provides a readonly input that copies the text to the clipboard when clicked.
2621
- */
2622
- declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "disabled" | "value" | "type" | "rightIcon" | "autoSelect"> & {
2623
- /**
2624
- * When disabled, the copy action will not be triggered
2625
- */
2626
- disabled?: boolean;
2627
- /**
2628
- * Callback function that is called when the value is copied to the clipboard
2629
- */
2630
- onCopy?: (value: string) => void;
2631
- /**
2632
- * the value of what is copied
2633
- */
2634
- value: string;
2635
- } & react.RefAttributes<HTMLInputElement>>;
2636
-
2637
- type InputPasswordProps = Omit<InputProps, 'leftIcon' | 'monospace' | 'rightIcon' | 'type'> & {
2638
- /**
2639
- * Set the disabled state of the input
2640
- */
2641
- disabled?: boolean;
2642
- /**
2643
- * Callback function that is called when the visibility state changes
2644
- */
2645
- onVisibilityToggle?: (isVisible: boolean) => void;
2646
- };
2647
- /**
2648
- * A password input component with a toggle button to show or hide the password text.
2649
- */
2650
- declare const InputPassword: react.ForwardRefExoticComponent<Omit<InputProps, "monospace" | "type" | "leftIcon" | "rightIcon"> & {
2651
- /**
2652
- * Set the disabled state of the input
2653
- */
2654
- disabled?: boolean;
2655
- /**
2656
- * Callback function that is called when the visibility state changes
2657
- */
2658
- onVisibilityToggle?: (isVisible: boolean) => void;
2659
- } & react.RefAttributes<HTMLInputElement>>;
2660
-
2661
- type AlphanumericKeyboardKeys = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
2662
- type ModifierKeys = 'Alt' | 'Cmd' | 'Ctrl' | 'Meta' | 'Option' | 'Shift';
2663
- type WhitespaceKeys = 'Enter' | 'Space' | 'Tab';
2664
- type ArrowKeys = 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp';
2665
- type KeyboardKeys = AlphanumericKeyboardKeys | ArrowKeys | ModifierKeys | WhitespaceKeys | '?' | 'Backspace' | 'Esc';
2666
-
2667
- type KeyboardShortcutProps = ComponentPropsWithoutRef<'div'> & {
2668
- /**
2669
- * @description If set to true, the keyboard shortcut will stretch the full width of its container.
2670
- */
2671
- fullWidth?: boolean;
2672
- /**
2673
- * @description The keys displayed.
2674
- */
2675
- keyboardKeys: KeyboardKeys | KeyboardKeys[];
2676
- /**
2677
- * @description A visual label for the keyboard shortcut.
2678
- */
2679
- label?: string;
2680
- };
2681
- declare const KeyboardShortcut: {
2682
- ({ label, keyboardKeys, fullWidth, ...otherProps }: KeyboardShortcutProps): JSX.Element;
2683
- displayName: string;
2684
- };
2685
-
2686
- type VariantType = 'breadcrumbs' | 'bullets' | 'commas' | 'ordered' | 'slashes' | 'spaces' | 'unbulleted';
2687
- type ItemType = ItemType[] | string[] | string;
2688
- type ListProps = ComponentPropsWithoutRef<'ul'> & {
2689
- /**
2690
- * Children should be wrapped in `<ListItem>`
2691
- */
2692
- children?: ReactNode;
2693
- /**
2694
- * As an alternative to passing children you can supply an array of strings that
2695
- * will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.
2696
- */
2697
- items?: ItemType[];
2698
- /**
2699
- * The kind of list to render
2700
- */
2701
- variant?: VariantType;
2702
- };
2703
- declare const List: {
2704
- ({ children, items, variant, ...otherProps }: ListProps): JSX.Element | null;
2705
- displayName: string;
2706
- };
2707
-
2708
- type ListItemProps = {
2709
- /**
2710
- * Pass an arbitrary child node
2711
- */
2712
- children?: ReactNode;
2713
- };
2714
- declare const ListItem: {
2715
- ({ children }: ListItemProps): JSX.Element | null;
2716
- displayName: string;
2717
- };
2718
-
2719
- type MarkProps = ComponentPropsWithoutRef<'div'> & {
2720
- /** The content of the Mark component. */
2721
- children: ReactNode;
2722
- colorScheme?: ColorSchemeTypes;
2723
- };
2724
- /**
2725
- * Defines text that should be marked or highlighted.
2726
- */
2727
- declare const Mark: {
2728
- ({ children, colorScheme, ...props }: MarkProps): JSX.Element;
2729
- displayName: string;
2730
- };
2731
-
2732
- type ControlledMenuProps = {
2733
- /**
2734
- * Is the menu open.
2735
- * Must be used with `onOpenChange`.
2736
- */
2737
- isOpen: boolean;
2738
- /** When an attempt to toggle the menu is triggered.
2739
- * Must be used with `isOpen`.
2740
- */
2741
- onOpenChange: (isOpen: boolean) => void;
2742
- };
2743
- type UncontrolledMenuProps = {
2744
- isOpen?: never;
2745
- onOpenChange?: never;
2746
- };
2747
- type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
2748
- type MenuProps = MenuControlProps & {
2749
- /**
2750
- * The position of the Menu
2751
- */
2752
- align?: 'center' | 'end' | 'start';
2753
- /**
2754
- * The content of the menu.
2755
- * Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
2756
- */
2757
- children: ReactNode;
2758
- /**
2759
- * If the menu is compact
2760
- */
2761
- compact?: boolean;
2762
- /**
2763
- * If disabled, the trigger will appear disabled and the menu will not open
2764
- */
2765
- disabled?: boolean;
2766
- /**
2767
- * The label for the trigger element, this is ignored if `trigger` is defined
2768
- */
2769
- label?: string;
2770
- /**
2771
- * Callback for when the user clicks or focuses outside of the menu
2772
- */
2773
- onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
2774
- /**
2775
- * The side the menu appears on, relative to the trigger
2776
- */
2777
- side?: 'bottom' | 'top';
2778
- /**
2779
- * Replace the default trigger with a custom button or other element
2780
- */
2781
- trigger?: ReactNode;
2782
- /**
2783
- * Props to pass to the trigger component, the default trigger is Button
2784
- */
2785
- triggerProps?: Partial<ButtonProps>;
2786
- };
2787
- /**
2788
- * Displays a menu to the users with a set of actions.
2789
- */
2790
- declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<HTMLButtonElement>>;
2791
-
2792
- type MenuLabelProps = {
2793
- /**
2794
- * The text of the label
2795
- */
2796
- children: ReactNode | string;
2797
- };
2798
- declare const MenuLabel: {
2799
- ({ children, ...props }: MenuLabelProps): react_jsx_runtime.JSX.Element;
2800
- displayName: string;
2801
- };
2802
-
2803
- type SubMenuProps = {
2804
- /**
2805
- * The label of the submenu
2806
- */
2807
- label: ReactNode;
2808
- /**
2809
- * The description of the submenu
2810
- */
2811
- description?: ReactNode;
2812
- /**
2813
- * The menu items that will appear in this submenu
2814
- */
2815
- children: ReactNode[];
2816
- /**
2817
- * Callback when the submenu is opened or closed
2818
- */
2819
- onOpenChange?: (open: boolean) => void;
2820
- /**
2821
- * Icon to display on the left side of the SubMenu. Must be an instance of [Icon](?path=/docs/components-icon--docs)
2822
- */
2823
- icon?: JSX.Element | undefined;
2824
- };
2825
- declare const SubMenu: {
2826
- ({ label, description, children, onOpenChange, ...props }: SubMenuProps): react_jsx_runtime.JSX.Element;
2827
- displayName: string;
2828
- };
2829
-
2830
- type MenuItemButtonProps = ButtonProps & {
2831
- /**
2832
- * Pre-defined visual treatments for the menu item
2833
- */
2834
- appearance?: 'dangerous' | 'default' | 'gated';
2835
- /**
2836
- * Optional `Badge` to display on the MenuItem. Must be an instance of [Badge](../?path=/docs/components-badge--docs)
2837
- */
2838
- badge?: JSX.Element;
2839
- /**
2840
- * The content of the MenuItem
2841
- */
2842
- children?: ReactNode;
2843
- /**
2844
- * Keyboard shortcut to bind to the MenuItem. Won't be shown if `badge` is set.
2845
- * *Note:* This is just visual, it doesn't actually bind the key command.
2846
- */
2847
- command?: ReactNode;
2848
- /**
2849
- * Icon to show before the MenuItem text. Ignored if children is provided or if `appearance` is `gated`
2850
- */
2851
- icon?: ButtonProps['leftIcon'];
2852
- /**
2853
- * @ignore
2854
- */
2855
- leftIcon?: ButtonProps['leftIcon'];
2856
- /**
2857
- * @ignore
2858
- */
2859
- rightIcon?: ButtonProps['rightIcon'];
2860
- /**
2861
- * @ignore
2862
- */
2863
- fullWidth?: never;
2864
- /**
2865
- * @ignore
2866
- */
2867
- asChild?: never;
2868
- /**
2869
- * @ignore
2870
- */
2871
- variant?: never;
2872
- /**
2873
- * @ignore
2874
- */
2875
- size?: never;
2876
- /**
2877
- * @ignore
2878
- */
2879
- unstyled?: never;
2880
- };
2881
-
2882
- declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
2883
- beforeAction?: (() => Promise<void>) | (() => void);
2884
- children: react.ReactNode;
2885
- colorScheme?: ColorSchemeTypes;
2886
- disabled?: boolean;
2887
- leftIcon?: react.ReactNode | undefined;
2888
- rightIcon?: react.ReactNode | undefined;
2889
- type?: LinkTypes | undefined;
2890
- underline?: "always" | "hover" | "none";
2891
- } & Omit<react.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & {
2892
- reloadDocument?: boolean;
2893
- replace?: boolean;
2894
- state?: any;
2895
- preventScrollReset?: boolean;
2896
- viewTransition?: boolean;
2897
- } & {
2898
- href: string | undefined;
2899
- type?: LinkTypes;
2900
- } & {
2901
- href: string | undefined;
2902
- children: react.ReactNode;
2903
- beforeAction?: (() => Promise<void>) | (() => void);
2904
- type?: LinkTypes;
2905
- } & {
2906
- appearance?: "dangerous" | "default" | "gated";
2907
- badge?: react.JSX.Element;
2908
- children?: react.ReactNode;
2909
- command?: react.ReactNode;
2910
- icon?: ButtonProps["leftIcon"];
2911
- leftIcon?: ButtonProps["leftIcon"];
2912
- rightIcon?: ButtonProps["rightIcon"];
2913
- fullWidth?: never;
2914
- asChild?: never;
2915
- variant?: never;
2916
- size?: never;
2917
- unstyled?: never;
2918
- } & {
2919
- /**
2920
- * Treats the menu item as a link when provided
2921
- */
2922
- href?: MenuItemButtonProps["href"];
2923
- }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
2924
- beforeAction?: (() => Promise<void>) | (() => void);
2925
- children: react.ReactNode;
2926
- colorScheme?: ColorSchemeTypes;
2927
- disabled?: boolean;
2928
- leftIcon?: react.ReactNode | undefined;
2929
- rightIcon?: react.ReactNode | undefined;
2930
- type?: LinkTypes | undefined;
2931
- underline?: "always" | "hover" | "none";
2932
- } & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
2933
- href?: never;
2934
- type?: "button" | "reset" | "submit";
2935
- } & {
2936
- href: string | undefined;
2937
- children: react.ReactNode;
2938
- beforeAction?: (() => Promise<void>) | (() => void);
2939
- type?: LinkTypes;
2940
- } & {
2941
- appearance?: "dangerous" | "default" | "gated";
2942
- badge?: react.JSX.Element;
2943
- children?: react.ReactNode;
2944
- command?: react.ReactNode;
2945
- icon?: ButtonProps["leftIcon"];
2946
- leftIcon?: ButtonProps["leftIcon"];
2947
- rightIcon?: ButtonProps["rightIcon"];
2948
- fullWidth?: never;
2949
- asChild?: never;
2950
- variant?: never;
2951
- size?: never;
2952
- unstyled?: never;
2953
- } & {
2954
- /**
2955
- * Treats the menu item as a link when provided
2956
- */
2957
- href?: MenuItemButtonProps["href"];
2958
- }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
2959
- href?: never;
2960
- type?: "button" | "reset" | "submit";
2961
- children: react.ReactNode;
2962
- } & {
2963
- appearance?: "dangerous" | "default" | "gated";
2964
- badge?: react.JSX.Element;
2965
- children?: react.ReactNode;
2966
- command?: react.ReactNode;
2967
- icon?: ButtonProps["leftIcon"];
2968
- leftIcon?: ButtonProps["leftIcon"];
2969
- rightIcon?: ButtonProps["rightIcon"];
2970
- fullWidth?: never;
2971
- asChild?: never;
2972
- variant?: never;
2973
- size?: never;
2974
- unstyled?: never;
2975
- } & {
2976
- /**
2977
- * Treats the menu item as a link when provided
2978
- */
2979
- href?: MenuItemButtonProps["href"];
2980
- }, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
2981
-
2982
- type MenuItemLabelProps = {
2983
- /**
2984
- * The content of the label
2985
- */
2986
- children: ReactNode;
2987
- };
2988
- type MenuItemDescriptionProps = {
2989
- /**
2990
- * The content of the description
2991
- */
2992
- children: ReactNode;
2993
- };
2994
- declare const MenuItemLabel: ({ children }: MenuItemLabelProps) => react_jsx_runtime.JSX.Element;
2995
- declare const MenuItemDescription: ({ children }: MenuItemDescriptionProps) => react_jsx_runtime.JSX.Element;
2996
-
2997
- type MenuRadioGroupProps = DropdownMenuRadioGroupProps & {
2998
- /**
2999
- * The radio items
3000
- */
3001
- children: ReactNode | ReactNode[];
3002
- /**
3003
- * @ignore
3004
- */
3005
- asChild?: never;
3006
- };
3007
- declare const MenuRadioGroup: {
3008
- ({ children, ...props }: MenuRadioGroupProps): react_jsx_runtime.JSX.Element;
3009
- displayName: string;
3010
- };
3011
-
3012
- type RadioMenuItemProps = DropdownMenuRadioItemProps & MenuItemButtonProps & {
3013
- /**
3014
- * Optional `Icon` to use as the indicator that the radio item is selected. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
3015
- */
3016
- indicator?: ReactNode;
3017
- /**
3018
- * The value of the item
3019
- */
3020
- value: DropdownMenuRadioItemProps['value'];
3021
- /**
3022
- * @ignore
3023
- */
3024
- href?: never;
3025
- /**
3026
- * @ignore
3027
- */
3028
- isLoading?: never;
3029
- /**
3030
- * @ignore
3031
- */
3032
- ref?: never;
3033
- };
3034
- declare const RadioMenuItem: {
3035
- ({ onSelect, value, indicator, ...props }: RadioMenuItemProps): react_jsx_runtime.JSX.Element;
3036
- displayName: string;
3037
- };
3038
-
3039
- type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps & MenuItemButtonProps & {
3040
- /** Callback to fire when the checked status changes */
3041
- onCheckedChange: (checked: boolean) => void;
3042
- /**
3043
- * Optional `Icon` to use as the indicator that the checkbox item is selected. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
3044
- */
3045
- indicator?: ReactNode;
3046
- /**
3047
- * The checked state of the menu item
3048
- */
3049
- checked: boolean;
3050
- /**
3051
- * @ignore
3052
- */
3053
- href?: never;
3054
- /**
3055
- * @ignore
3056
- */
3057
- isLoading?: never;
3058
- /**
3059
- * @ignore
3060
- */
3061
- ref?: never;
3062
- };
3063
- declare const CheckboxMenuItem: {
3064
- ({ onSelect, checked, onCheckedChange, ...props }: CheckboxMenuItemProps): react_jsx_runtime.JSX.Element;
3065
- displayName: string;
3066
- };
3067
-
3068
- type FilterMenuProps = MenuProps & {
3069
- /**
3070
- * The selected values of the filter Menu
3071
- * */
3072
- value: string[];
3073
- /**
3074
- * Callback for when the selected values change
3075
- */
3076
- onChange: (value: string[]) => void;
3077
- /**
3078
- * The current search value
3079
- */
3080
- searchValue: string;
3081
- /**
3082
- * Callback for when the search value changes (by searching the input)
3083
- */
3084
- onSearchValueChange: (value: string) => void;
3085
- };
3086
- declare const FilterMenuItem: {
3087
- ({ onSelect, checked, onCheckedChange, ...props }: _radix_ui_react_dropdown_menu.DropdownMenuCheckboxItemProps & (MenuItemButtonProps & {
3088
- onCheckedChange: (checked: boolean) => void;
3089
- indicator?: react.ReactNode;
3090
- checked: boolean;
3091
- href?: never;
3092
- isLoading?: never;
3093
- ref?: never;
3094
- })): react_jsx_runtime.JSX.Element;
3095
- displayName: string;
3096
- };
3097
- declare const FilterMenu: react.ForwardRefExoticComponent<FilterMenuProps & react.RefAttributes<HTMLButtonElement>>;
3098
-
3099
- type ModalProps = ComponentPropsWithoutRef<'div'> & {
3100
- /**
3101
- * The content of the modal.
3102
- */
3103
- children: ReactNode;
3104
- /**
3105
- * Content that should be static at the bottom of the modal here (e.g. action buttons).
3106
- */
3107
- footer?: ReactNode;
3108
- /**
3109
- * The variant of the modal position
3110
- */
3111
- positionVariant?: 'centered' | 'fixed-top' | 'right-side-panel';
3112
- /**
3113
- * Ref to the element that should receive focus when the modal opens
3114
- */
3115
- initialFocusRef?: RefObject<HTMLElement | null>;
3116
- /**
3117
- * Determines if the modal is currently open
3118
- */
3119
- isOpen: boolean;
3120
- /**
3121
- * Determines if the close button is visible (if false, `esc` will still close the Modal)
3122
- */
3123
- hideCloseButton?: boolean;
3124
- /**
3125
- * Determines if the title is visible
3126
- */
3127
- hideTitle?: boolean;
3128
- /**
3129
- * When the Modal is dismissed, this function will be called. You'll typically want to set the
3130
- * state of `isOpen` to false here
3131
- */
3132
- onRequestClose?: () => void;
3133
- /**
3134
- * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
3135
- * and the title will be hidden but still accessible to screen readers.
3136
- */
3137
- title: string;
3138
- /**
3139
- * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3140
- */
3141
- width?: string;
3142
- };
3143
- /**
3144
- * A Modal is a focused UI element that appears atop the main interface, requiring
3145
- * user interaction or dismissal before returning to the underlying content.
3146
- */
3147
- declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3148
- /**
3149
- * The content of the modal.
3150
- */
3151
- children: ReactNode;
3152
- /**
3153
- * Content that should be static at the bottom of the modal here (e.g. action buttons).
3154
- */
3155
- footer?: ReactNode;
3156
- /**
3157
- * The variant of the modal position
3158
- */
3159
- positionVariant?: "centered" | "fixed-top" | "right-side-panel";
3160
- /**
3161
- * Ref to the element that should receive focus when the modal opens
3162
- */
3163
- initialFocusRef?: RefObject<HTMLElement | null>;
3164
- /**
3165
- * Determines if the modal is currently open
3166
- */
3167
- isOpen: boolean;
3168
- /**
3169
- * Determines if the close button is visible (if false, `esc` will still close the Modal)
3170
- */
3171
- hideCloseButton?: boolean;
3172
- /**
3173
- * Determines if the title is visible
3174
- */
3175
- hideTitle?: boolean;
3176
- /**
3177
- * When the Modal is dismissed, this function will be called. You'll typically want to set the
3178
- * state of `isOpen` to false here
3179
- */
3180
- onRequestClose?: () => void;
3181
- /**
3182
- * The title for the modal. If you want to hide the title, set the `hideTitle` prop to `true`
3183
- * and the title will be hidden but still accessible to screen readers.
3184
- */
3185
- title: string;
3186
- /**
3187
- * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3188
- */
3189
- width?: string;
3190
- } & react.RefAttributes<HTMLDivElement>>;
3191
-
3192
- type ModalCalloutsProps = {
3193
- /**
3194
- * The content to be displayed in the modal callout.
3195
- */
3196
- children?: ReactNode;
3197
- };
3198
- declare const ModalCallouts: {
3199
- ({ children }: ModalCalloutsProps): react_jsx_runtime.JSX.Element;
3200
- displayName: string;
3201
- };
3202
- type ModalCalloutProps = {
3203
- title: string;
3204
- image: JSX.Element;
3205
- /**
3206
- * The content to be displayed in the modal callout.
3207
- */
3208
- children?: ReactNode;
3209
- };
3210
- declare const ModalCallout: {
3211
- ({ title, image, children }: ModalCalloutProps): react_jsx_runtime.JSX.Element;
3212
- displayName: string;
3213
- };
3214
-
3215
- type ControlledPopoverProps = {
3216
- /**
3217
- * Is the popover open.
3218
- * Must be used with `onOpenChange`.
3219
- */
3220
- isOpen: boolean;
3221
- /** When an attempt to toggle the popover is triggered.
3222
- * Must be used with `isOpen`.
3223
- */
3224
- onOpenChange: (isOpen: boolean) => void;
3225
- };
3226
- type UncontrolledPopoverProps = {
3227
- isOpen?: never;
3228
- onOpenChange?: never;
3229
- };
3230
- type PopoverControlProps = ControlledPopoverProps | UncontrolledPopoverProps;
3231
- type ContentProps = Omit<PopoverContentProps, 'alignOffset' | 'arrowPadding' | 'asChild' | 'collisionPadding' | 'hideWhenDetached' | 'sideOffset' | 'updatePositionStrategy'>;
3232
- type PopoverProps = ContentProps & PopoverControlProps & {
3233
- /**
3234
- * The content of the popover
3235
- */
3236
- children: ReactNode;
3237
- /**
3238
- * The maximum width of the popover
3239
- */
3240
- maxWidth?: string;
3241
- /**
3242
- * The maximum height of the popover
3243
- */
3244
- maxHeight?: string;
3245
- /**
3246
- * Determines if the close button is visible (if false, `esc` will still close the Modal)
3247
- */
3248
- hideCloseButton?: boolean;
3249
- /**
3250
- * An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
3251
- */
3252
- trigger: JSX.Element;
3253
- /**
3254
- * If true, the popover will use the unstyled Content component instead of StyledContent
3255
- */
3256
- unstyled?: boolean;
3257
- /**
3258
- * If true, the popover will use a custom radix arrow to trigger
3259
- */
3260
- withArrow?: boolean;
3261
- /**
3262
- * Only works if `withArrow` is true, animates the hotspot attached to the arrow
3263
- */
3264
- isAnimated?: boolean;
3265
- colorScheme?: ColorSchemeTypes;
3266
- };
3267
- /**
3268
- * Displays rich content in a portal, triggered by a button.
3269
- */
3270
- declare const Popover: {
3271
- ({ children, trigger, isOpen, hideCloseButton, maxWidth, maxHeight, onOpenChange, unstyled, withArrow, isAnimated, colorScheme, ...props }: PopoverProps): JSX.Element;
3272
- displayName: string;
3273
- };
3274
-
3275
- type ProgressBarProps = ComponentPropsWithoutRef<'div'> & {
3276
- /**
3277
- * Current numeric level of the progress (0 -> max)
3278
- */
3279
- progress: number;
3280
- /**
3281
- * The maximum progress value
3282
- */
3283
- max?: number;
3284
- /**
3285
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
3286
- */
3287
- colorScheme?: ColorSchemeTypes;
3288
- /**
3289
- * Slot for additional content to be rendered to the left of the progress bar
3290
- */
3291
- labelLeft?: ReactNode;
3292
- /**
3293
- * Slot for additional content to be rendered to the right of the progress bar
3294
- */
3295
- labelRight?: ReactNode;
3296
- };
3297
- /**
3298
- * A progress component that visually represents the completion status of a task
3299
- */
3300
- declare const ProgressBar: {
3301
- ({ progress, max, children, labelLeft, labelRight, colorScheme, ...props }: ProgressBarProps): JSX.Element;
3302
- displayName: string;
3303
- };
3304
-
3305
- type RadioSizeType = 'lg' | 'md' | 'sm';
3306
- type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'onChange' | 'size' | 'value'> & {
3307
- /**
3308
- * Indicates the state of the radio
3309
- */
3310
- checked?: boolean;
3311
- /**
3312
- * Disables input
3313
- */
3314
- disabled?: boolean;
3315
- /**
3316
- * Indicates that there is an error with the input
3317
- */
3318
- 'aria-invalid'?: boolean;
3319
- /**
3320
- * Provides an ID for the input
3321
- */
3322
- id?: string;
3323
- /**
3324
- * The label for the input
3325
- */
3326
- label: ReactNode;
3327
- /**
3328
- * The description for the radio
3329
- */
3330
- description?: ReactNode | undefined;
3331
- /**
3332
- * Should match the ID attribute of the radio.
3333
- * Can be used to group together multiple radios
3334
- */
3335
- name?: string;
3336
- /**
3337
- * Callback function invoked when the value changes
3338
- */
3339
- onChange?: (event: ChangeEvent) => unknown;
3340
- /**
3341
- * Indicates if the input is required
3342
- */
3343
- required?: boolean;
3344
- /**
3345
- * A predefined size for the radio
3346
- */
3347
- size?: RadioSizeType;
3348
- /**
3349
- * The value attribute of the input
3350
- */
3351
- value?: string;
3352
- /**
3353
- * Whether to visually hide the label (it will still be available to screen readers)
3354
- */
3355
- hideLabel?: boolean;
3356
- };
3357
- declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "value" | "label" | "onChange" | "hideLabel"> & {
3358
- /**
3359
- * Indicates the state of the radio
3360
- */
3361
- checked?: boolean;
3362
- /**
3363
- * Disables input
3364
- */
3365
- disabled?: boolean;
3366
- /**
3367
- * Indicates that there is an error with the input
3368
- */
3369
- 'aria-invalid'?: boolean;
3370
- /**
3371
- * Provides an ID for the input
3372
- */
3373
- id?: string;
3374
- /**
3375
- * The label for the input
3376
- */
3377
- label: ReactNode;
3378
- /**
3379
- * The description for the radio
3380
- */
3381
- description?: ReactNode | undefined;
3382
- /**
3383
- * Should match the ID attribute of the radio.
3384
- * Can be used to group together multiple radios
3385
- */
3386
- name?: string;
3387
- /**
3388
- * Callback function invoked when the value changes
3389
- */
3390
- onChange?: (event: ChangeEvent) => unknown;
3391
- /**
3392
- * Indicates if the input is required
3393
- */
3394
- required?: boolean;
3395
- /**
3396
- * A predefined size for the radio
3397
- */
3398
- size?: RadioSizeType;
3399
- /**
3400
- * The value attribute of the input
3401
- */
3402
- value?: string;
3403
- /**
3404
- * Whether to visually hide the label (it will still be available to screen readers)
3405
- */
3406
- hideLabel?: boolean;
3407
- } & react.RefAttributes<HTMLInputElement>>;
3408
-
3409
- type RadioCardDefaultLayoutProps = {
3410
- /**
3411
- * The icon to display
3412
- */
3413
- icon?: JSX.Element | undefined;
3414
- /**
3415
- * The main label text for the card.
3416
- *
3417
- * *Note: `label` only allows for a string as any interactive elements inside of a RadioCard would be an accessibility violation.*
3418
- */
3419
- label?: string | undefined;
3420
- /**
3421
- * The description text for the card
3422
- *
3423
- * *Note: `description` only allows for a string as any interactive elements inside of a RadioCard would be an accessibility violation.*
3424
- */
3425
- description?: string | undefined;
3426
- /**
3427
- * Whether to show the indicator
3428
- */
3429
- showIndicator?: boolean | undefined;
3430
- };
3431
-
3432
- type BaseRadioCardProps = Omit<ComponentPropsWithoutRef<'input'>, 'checked' | 'disabled' | 'id' | 'name' | 'onChange' | 'value'> & {
3433
- /**
3434
- * Indicates the state of the radio
3435
- */
3436
- checked?: boolean;
3437
- /**
3438
- * Disables the card
3439
- */
3440
- disabled?: boolean;
3441
- /**
3442
- * Provides an ID for the input
3443
- */
3444
- id?: string;
3445
- /**
3446
- * The name attribute of the input
3447
- */
3448
- name?: string;
3449
- /**
3450
- * Callback function invoked when the value changes
3451
- */
3452
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
3453
- /**
3454
- * The value attribute of the input
3455
- */
3456
- value: string;
3457
- };
3458
- type RadioCardWithChildren = BaseRadioCardProps & {
3459
- /**
3460
- * Custom content to display inside the card.
3461
- */
3462
- children: ReactNode;
3463
- icon?: never;
3464
- label?: never;
3465
- description?: never;
3466
- showIndicator?: never;
3467
- };
3468
- type RadioCardWithDefaultLayout = BaseRadioCardProps & RadioCardDefaultLayoutProps & {
3469
- children?: never;
3470
- };
3471
- type RadioCardProps = RadioCardWithChildren | RadioCardWithDefaultLayout;
3472
- declare const RadioCard: react.ForwardRefExoticComponent<RadioCardProps & react.RefAttributes<HTMLInputElement>>;
3473
-
3474
- type RadioCardImageProps = Omit<ComponentPropsWithoutRef<'input'>, 'onChange'> & {
3475
- /**
3476
- * Indicates the state of the radio
3477
- */
3478
- checked?: boolean;
3479
- /**
3480
- * Disables the card
3481
- */
3482
- disabled?: boolean;
3483
- /**
3484
- * Provides an ID for the input
3485
- */
3486
- id?: string;
3487
- /**
3488
- * The name attribute of the input
3489
- */
3490
- name?: string;
3491
- /**
3492
- * Callback function invoked when the value changes
3493
- */
3494
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
3495
- /**
3496
- * The value attribute of the input
3497
- */
3498
- value: string;
3499
- /**
3500
- * The label text for the radio card
3501
- */
3502
- label: string;
3503
- /**
3504
- * The source URL for the image to display
3505
- */
3506
- imageSrc: string;
3507
- /**
3508
- * The aspect ratio of the card
3509
- */
3510
- aspectRatio?: string;
3511
- /**
3512
- * The padding of the card
3513
- */
3514
- padding?: Spacings;
3515
- };
3516
- declare const RadioCardImage: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange"> & {
3517
- /**
3518
- * Indicates the state of the radio
3519
- */
3520
- checked?: boolean;
3521
- /**
3522
- * Disables the card
3523
- */
3524
- disabled?: boolean;
3525
- /**
3526
- * Provides an ID for the input
3527
- */
3528
- id?: string;
3529
- /**
3530
- * The name attribute of the input
3531
- */
3532
- name?: string;
3533
- /**
3534
- * Callback function invoked when the value changes
3535
- */
3536
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
3537
- /**
3538
- * The value attribute of the input
3539
- */
3540
- value: string;
3541
- /**
3542
- * The label text for the radio card
3543
- */
3544
- label: string;
3545
- /**
3546
- * The source URL for the image to display
3547
- */
3548
- imageSrc: string;
3549
- /**
3550
- * The aspect ratio of the card
3551
- */
3552
- aspectRatio?: string;
3553
- /**
3554
- * The padding of the card
3555
- */
3556
- padding?: Spacings;
3557
- } & react.RefAttributes<HTMLInputElement>>;
3558
-
3559
- type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
3560
- /**
3561
- * Pass an arbitrary child node
3562
- */
3563
- children?: ReactNode;
3564
- /**
3565
- * Display content _only_ when it's focused.
3566
- */
3567
- focusable?: boolean;
3568
- /**
3569
- * The text that will appear to screenreaders but not be displayed on screen
3570
- * (alternatively you can pass children)
3571
- */
3572
- text?: ReactNode;
3573
- };
3574
- /**
3575
- * Used to hide content from the visual client, but keep it readable for screen readers.
3576
- */
3577
- declare const ScreenReaderOnly: {
3578
- ({ text, children, focusable, ...props }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
3579
- displayName: string;
3580
- };
3581
-
3582
- /**
3583
- * ScrollArea is a simple scrollable container with shadow effects to indicate
3584
- * scrollability.
3585
- */
3586
- declare const ScrollArea: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
3587
- /**
3588
- * When true, disables scrolling. Useful to temporarily prevent scrolling,
3589
- * like when drag-and-dropping an item from inside to outside of the scroll
3590
- * area.
3591
- */
3592
- locked?: boolean;
3593
- } & react.RefAttributes<HTMLDivElement>>;
3594
-
3595
- type SegmentedControlProps = Omit<ToggleGroupSingleProps, 'type'> & {
3596
- /**
3597
- * `SegmentedControlItem`s that will be rendered in grouping
3598
- */
3599
- children?: ReactNode;
3600
- /**
3601
- * Set the entire `SegmentedControl` to be disabled
3602
- */
3603
- disabled?: boolean | undefined;
3604
- /**
3605
- * Force `SegmentedControl` to fill the width of it's container
3606
- */
3607
- fullWidth?: boolean | undefined;
3608
- /**
3609
- * Callback function invoked when the `SegmentedControlItem` value changes
3610
- */
3611
- onSelectedValueChange: (value: string) => void;
3612
- /**
3613
- * The value of the `SegmentedControlItem` which should be selected
3614
- */
3615
- selectedValue: string;
3616
- };
3617
- /**
3618
- * Provides a horizontal set of segments for switching between different values
3619
- */
3620
- declare const SegmentedControl: ForwardRefExoticComponent<RefAttributes<HTMLDivElement> & SegmentedControlProps>;
3621
-
3622
- type BaseProps$1 = {
3623
- /**
3624
- * Disable the `SegmentedControlItem`
3625
- */
3626
- disabled?: boolean | undefined;
3627
- /**
3628
- * The value of the item
3629
- */
3630
- value: string;
3631
- };
3632
- type IconWithLabel$1 = {
3633
- /**
3634
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
3635
- */
3636
- icon?: JSX.Element;
3637
- /**
3638
- * The label of the item
3639
- */
3640
- label?: ReactNode | string | undefined;
3641
- 'aria-label'?: never;
3642
- };
3643
- type IconWithAriaLabel$1 = {
3644
- /**
3645
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
3646
- */
3647
- icon?: JSX.Element;
3648
- /**
3649
- * Use this when displaying an icon without a label
3650
- */
3651
- 'aria-label'?: string | undefined;
3652
- label?: never;
3653
- };
3654
- type NoIcon$1 = {
3655
- icon?: undefined;
3656
- /**
3657
- * The label of the item
3658
- */
3659
- label?: ReactNode | string | undefined;
3660
- 'aria-label'?: never;
3661
- };
3662
- type SegmentedControlItemProps = BaseProps$1 & (IconWithAriaLabel$1 | IconWithLabel$1 | NoIcon$1);
3663
- declare const SegmentedControlItem: react.ForwardRefExoticComponent<SegmentedControlItemProps & react.RefAttributes<HTMLButtonElement>>;
3664
-
3665
- type SelectProps = {
3666
- /**
3667
- * Sets the validity status of the input
3668
- *
3669
- * @default false
3670
- */
3671
- 'aria-invalid'?: boolean;
3672
- /**
3673
- * A group of `Option` or `OptionGroup`s
3674
- */
3675
- children: ReactNode;
3676
- /**
3677
- * The color scheme of the select.
3678
- *
3679
- * @default inherit
3680
- */
3681
- colorScheme?: ColorSchemeTypes;
3682
- /**
3683
- * When true, the select can't be interacted with.
3684
- *
3685
- * @default false
3686
- */
3687
- disabled?: boolean;
3688
- /**
3689
- * @ignore
3690
- * Force the Select to be open without user interaction (for debugging and CI)
3691
- */
3692
- forceOpen?: boolean;
3693
- /**
3694
- * If true, the select will fill its container
3695
- */
3696
- fullWidth?: ResponsiveObject<boolean> | boolean;
3697
- /**
3698
- * Called when the select is opened or closed
3699
- */
3700
- onOpenChange?: (open: boolean) => void;
3701
- /**
3702
- * Called when a value is changed.
3703
- */
3704
- onChange?: (value: string) => void;
3705
- /**
3706
- * Text shown when no value is selected
3707
- */
3708
- placeholder?: string;
3709
- /**
3710
- * The controlled value. Must be used in conjunction with `onChange`.
3711
- */
3712
- value?: string;
3713
- };
3714
- /**
3715
- * Display a list of options and choose one of them. Replacement for the native Select HTML element.
3716
- */
3717
- declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
3718
-
3719
- type SelectOptionProps = {
3720
- /**
3721
- * The visual content of the select
3722
- */
3723
- children: ReactNode;
3724
- /**
3725
- * The value to set. Leave this empty to define a placeholder option.
3726
- */
3727
- value: string;
3728
- /**
3729
- * When true, this option will not be selectable
3730
- *
3731
- * @default false
3732
- */
3733
- disabled?: boolean;
3734
- /**
3735
- * Optional content to display in the trigger when the option is selected. If undefined, it will show the `children`
3736
- * prop instead.
3737
- */
3738
- selectedDisplayValue?: ReactNode;
3739
- /**
3740
- * Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the Option.
3741
- * Use this when the content is complex, or you have non-textual content inside.
3742
- */
3743
- textValue?: string;
3744
- /**
3745
- * Vertical alignment of the checkmark icon when this option is selected.
3746
- */
3747
- checkmarkVerticalAlign?: 'center' | 'top';
3748
- };
3749
- declare const SelectOption: react.ForwardRefExoticComponent<SelectOptionProps & react.RefAttributes<HTMLDivElement>>;
3750
-
3751
- type SelectOptionGroupProps = {
3752
- /** The label of the group */
3753
- label: string;
3754
- /** At least one `Option` */
3755
- children: ReactNode;
3756
- };
3757
- declare const SelectOptionGroup: ({ children, label, ...props }: SelectOptionGroupProps) => react_jsx_runtime.JSX.Element;
3758
-
3759
- type SliderProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
3760
- /**
3761
- * aria-label for screen-readers to apply to the slider
3762
- */
3763
- 'aria-label'?: string;
3764
- /**
3765
- * aria-labelledby for screen-readers to apply to the slider
3766
- */
3767
- 'aria-labelledby'?: string;
3768
- /**
3769
- * @ignore
3770
- */
3771
- 'data-testid'?: string;
3772
- /**
3773
- * Determines the initial position(s) of the thumb(s)
3774
- * Must be an array of numbers.
3775
- */
3776
- initialValue?: number[];
3777
- /**
3778
- * If `true` the thumbs can't be moved.
3779
- */
3780
- disabled?: boolean;
3781
- /**
3782
- * The maximum value of the slider.
3783
- */
3784
- max?: number;
3785
- /**
3786
- * The minimum value of the slider.
3787
- */
3788
- min?: number;
3789
- /**
3790
- * Callback called on value change
3791
- */
3792
- onChange?: (value: number[]) => void;
3793
- /**
3794
- * Value to be added or subtracted on each step
3795
- */
3796
- step?: number;
3797
- /**
3798
- * Current value of the slider
3799
- * Must be an array of numbers if provided.
3800
- */
3801
- value?: number[];
3802
- };
3803
- declare const Slider: {
3804
- ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled, initialValue, max, min, onChange, step, value, "data-testid": dataTestId, ...otherProps }: SliderProps): JSX.Element;
3805
- displayName: string;
3806
- };
3807
-
3808
- type StackProps = {
3809
- /**
3810
- * Optional children
3811
- */
3812
- children?: ReactNode | undefined;
3813
- /**
3814
- * The gap between each item in the stack. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
3815
- * TODO: add link to Spacing docs
3816
- *
3817
- */
3818
- gap?: ResponsiveObject<Spacings> | Spacings;
3819
- /**
3820
- * Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
3821
- * The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
3822
- */
3823
- direction?: ResponsiveObject<'horizontal' | 'vertical'> | 'horizontal' | 'vertical';
3824
- /**
3825
- * Controls how items are aligned along the cross-axis.
3826
- * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
3827
- *
3828
- * @type 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch' | ResponsiveObject<'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
3829
- */
3830
- alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
3831
- renderAs?: ElementType;
3832
- };
3833
- /**
3834
- * Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
3835
- * This allows for layouting children in a consistent way without needing to manually add margins or padding.
3836
- */
3837
- declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & UnknownRecord;
3838
-
3839
- type SwitchSizeType = 'lg' | 'md' | 'sm';
3840
- type SwitchProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'size'> & {
3841
- /**
3842
- * The alignment of the switch relative to the label
3843
- */
3844
- align?: 'left' | 'right';
3845
- /**
3846
- * Indicates the state of the switch
3847
- */
3848
- checked?: boolean;
3849
- /**
3850
- * Disables switch
3851
- */
3852
- disabled?: boolean;
3853
- /**
3854
- * Optional ID attribute
3855
- */
3856
- id?: string | undefined;
3857
- /**
3858
- * The label for the switch
3859
- */
3860
- label: ReactNode;
3861
- /**
3862
- * The description for the switch
3863
- */
3864
- description?: ReactNode | undefined;
3865
- /**
3866
- * The name of the switch. Submitted with its owning form as part of a name/value pair.
3867
- */
3868
- name?: string | undefined;
3869
- /**
3870
- * Callback function invoked when the value changes
3871
- */
3872
- onChange?: (event: ChangeEvent) => unknown;
3873
- /**
3874
- * Indicates if the input is required
3875
- */
3876
- required?: boolean;
3877
- /**
3878
- * A predefined size for the switch
3879
- */
3880
- size?: SwitchSizeType;
3881
- /**
3882
- * The value given as data when submitted with a `name`.
3883
- */
3884
- value?: string;
3885
- /**
3886
- * Whether to visually hide the label (it will still be available to screen readers)
3887
- */
3888
- hideLabel?: boolean;
3889
- };
3890
- declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "label" | "hideLabel"> & {
3891
- /**
3892
- * The alignment of the switch relative to the label
3893
- */
3894
- align?: "left" | "right";
3895
- /**
3896
- * Indicates the state of the switch
3897
- */
3898
- checked?: boolean;
3899
- /**
3900
- * Disables switch
3901
- */
3902
- disabled?: boolean;
3903
- /**
3904
- * Optional ID attribute
3905
- */
3906
- id?: string | undefined;
3907
- /**
3908
- * The label for the switch
3909
- */
3910
- label: ReactNode;
3911
- /**
3912
- * The description for the switch
3913
- */
3914
- description?: ReactNode | undefined;
3915
- /**
3916
- * The name of the switch. Submitted with its owning form as part of a name/value pair.
3917
- */
3918
- name?: string | undefined;
3919
- /**
3920
- * Callback function invoked when the value changes
3921
- */
3922
- onChange?: (event: ChangeEvent) => unknown;
3923
- /**
3924
- * Indicates if the input is required
3925
- */
3926
- required?: boolean;
3927
- /**
3928
- * A predefined size for the switch
3929
- */
3930
- size?: SwitchSizeType;
3931
- /**
3932
- * The value given as data when submitted with a `name`.
3933
- */
3934
- value?: string;
3935
- /**
3936
- * Whether to visually hide the label (it will still be available to screen readers)
3937
- */
3938
- hideLabel?: boolean;
3939
- } & react.RefAttributes<HTMLInputElement>>;
3940
-
3941
- type TableBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
3942
- children?: ReactNode;
3943
- };
3944
- declare const TableBody: ({ children, ...props }: TableBodyProps) => JSX.Element;
3945
-
3946
- type CellAttrs = Omit<TdHTMLAttributes<HTMLTableCellElement>, 'ref'> & Omit<ThHTMLAttributes<HTMLTableCellElement>, 'ref'>;
3947
- type TableCellProps = CellAttrs & {
3948
- children?: ReactNode;
3949
- };
3950
- declare const TableCell: ({ children, ...props }: TableCellProps) => JSX.Element;
3951
-
3952
- type TableFootProps = HTMLAttributes<HTMLTableSectionElement> & {
3953
- children?: ReactNode;
3954
- };
3955
- declare const TableFoot: ({ children, ...props }: TableFootProps) => JSX.Element;
3956
-
3957
- type TableHeadProps = HTMLAttributes<HTMLTableSectionElement> & {
3958
- children?: ReactNode;
3959
- };
3960
- declare const TableHead: ({ children, ...props }: TableHeadProps) => JSX.Element;
3961
-
3962
- type TableProps = ComponentPropsWithoutRef<'table'> & {
3963
- /**
3964
- * Should be some combination of `TableHead` and/or `TableBody` and/or `TableFoot`
3965
- */
3966
- children: ReactNode;
3967
- /**
3968
- * If true, will add dividing lines between rows
3969
- */
3970
- divided?: boolean;
3971
- /**
3972
- * If true, will stripe every other row
3973
- */
3974
- striped?: boolean;
3975
- /**
3976
- * If true, will visually hide the table header while keeping it accessible to screen readers
3977
- *
3978
- * @see https://www.accessibility-developer-guide.com/examples/tables/hidden-headers/
3979
- */
3980
- visuallyHiddenHeader?: boolean;
3981
- };
3982
- /**
3983
- * Semantic table element for presenting data
3984
- */
3985
- declare const Table: ({ children, divided, striped, visuallyHiddenHeader, ...props }: TableProps) => JSX.Element;
3986
-
3987
- type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
3988
- children?: ReactNode;
3989
- };
3990
- declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
3991
-
3992
- type TabsProps = Pick<TabsProps$1, 'children' | 'defaultValue' | 'onValueChange' | 'value'>;
3993
- declare const Tabs: {
3994
- ({ children, value: valueProp, onValueChange: onValueChangeProp, defaultValue, ...props }: TabsProps): JSX.Element;
3995
- displayName: string;
3996
- };
3997
-
3998
- type TabsContentProps = Pick<TabsContentProps$1, 'children' | 'value'>;
3999
- declare const TabsContent: {
4000
- ({ children, value }: TabsContentProps): JSX.Element;
4001
- displayName: string;
4002
- };
4003
-
4004
- type TabsListProps = Pick<TabsListProps$1, 'aria-label'> & PropsWithChildren<{
4005
- fullWidth?: boolean;
4006
- }>;
4007
- declare const TabsList: {
4008
- ({ children, fullWidth, ...props }: TabsListProps): JSX.Element;
4009
- displayName: string;
4010
- };
4011
-
4012
- type BaseProps = Pick<TabsTriggerProps$1, 'disabled' | 'value'>;
4013
- type IconWithLabel = {
4014
- /**
4015
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
4016
- */
4017
- icon?: JSX.Element;
4018
- /**
4019
- * The label of the item
4020
- */
4021
- label?: ReactNode | string;
4022
- 'aria-label'?: never;
4023
- };
4024
- type IconWithAriaLabel = {
4025
- /**
4026
- * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
4027
- */
4028
- icon?: JSX.Element;
4029
- /**
4030
- * Use this when displaying an icon without a label
4031
- */
4032
- 'aria-label'?: string;
4033
- label?: never;
4034
- };
4035
- type NoIcon = {
4036
- icon?: undefined;
4037
- /**
4038
- * The label of the item
4039
- */
4040
- label?: ReactNode | string;
4041
- 'aria-label'?: never;
4042
- };
4043
- type TabsTriggerProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
4044
- declare const TabsTrigger: react.ForwardRefExoticComponent<TabsTriggerProps & react.RefAttributes<HTMLButtonElement>>;
4045
-
4046
- type TagProps = ComponentPropsWithoutRef<'div'> & {
4047
- /**
4048
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
4049
- */
4050
- colorScheme?: ColorSchemeTypes;
4051
- /**
4052
- * Valid URL for the `Tag` label to link to
4053
- */
4054
- href?: string;
4055
- /**
4056
- * Optional icon to display before the label
4057
- */
4058
- icon?: JSX.Element | undefined;
4059
- /**
4060
- * Text label for the `Tag`
4061
- */
4062
- label: ReactNode;
4063
- /**
4064
- * Callback function to be called when the `x` button is clicked
4065
- */
4066
- onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
4067
- /**
4068
- * Accessible label for the `x` button (ie. "Remove tag")
4069
- */
4070
- onClickRemoveLabel?: string | undefined;
4071
- };
4072
- /**
4073
- * A `Tag` is an optionally linked label, with an optional action button, to categorize content.
4074
- */
4075
- declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4076
- /**
4077
- * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
4078
- */
4079
- colorScheme?: ColorSchemeTypes;
4080
- /**
4081
- * Valid URL for the `Tag` label to link to
4082
- */
4083
- href?: string;
4084
- /**
4085
- * Optional icon to display before the label
4086
- */
4087
- icon?: JSX.Element | undefined;
4088
- /**
4089
- * Text label for the `Tag`
4090
- */
4091
- label: ReactNode;
4092
- /**
4093
- * Callback function to be called when the `x` button is clicked
4094
- */
4095
- onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
4096
- /**
4097
- * Accessible label for the `x` button (ie. "Remove tag")
4098
- */
4099
- onClickRemoveLabel?: string | undefined;
4100
- } & react.RefAttributes<HTMLDivElement>>;
4101
-
4102
- type ThumbnailBadgeProps = {
4103
- /**
4104
- * Icon to display on the left side of the badge
4105
- */
4106
- icon?: JSX.Element | undefined;
4107
- /**
4108
- * Text content to display in the badge
4109
- */
4110
- label: string;
4111
- };
4112
- declare const ThumbnailBadge: {
4113
- ({ icon, label, ...props }: ThumbnailBadgeProps): JSX.Element;
4114
- displayName: string;
4115
- };
4116
-
4117
- declare const gradients: {
4118
- defaultDarkOne: styled_components.RuleSet<object>;
4119
- defaultDarkTwo: styled_components.RuleSet<object>;
4120
- defaultLightOne: styled_components.RuleSet<object>;
4121
- defaultLightTwo: styled_components.RuleSet<object>;
4122
- defaultMidOne: styled_components.RuleSet<object>;
4123
- defaultMidTwo: styled_components.RuleSet<object>;
4124
- green: styled_components.RuleSet<object>;
4125
- greenWithPop: styled_components.RuleSet<object>;
4126
- pink: styled_components.RuleSet<object>;
4127
- pinkWithPop: styled_components.RuleSet<object>;
4128
- playfulGradientOne: styled_components.RuleSet<object>;
4129
- playfulGradientTwo: styled_components.RuleSet<object>;
4130
- purple: styled_components.RuleSet<object>;
4131
- purpleWithPop: styled_components.RuleSet<object>;
4132
- yellow: styled_components.RuleSet<object>;
4133
- yellowWithPop: styled_components.RuleSet<object>;
4134
- };
4135
- type GradientNameType = keyof typeof gradients;
4136
-
4137
- type AspectRatioType = 'square' | 'wide';
4138
- type Storyboard = {
4139
- __typename?: string;
4140
- aspectRatio: number;
4141
- frameCount: number;
4142
- frameHeight: number;
4143
- frameWidth: number;
4144
- height: number;
4145
- id?: string;
4146
- url: string;
4147
- width: number;
4148
- };
4149
- type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
4150
- /**
4151
- * The desired display of the thumbnail, either wide or square
4152
- */
4153
- thumbnailImageType?: 'square' | 'wide' | undefined;
4154
- /**
4155
- * The URL of the thumbnail image to display
4156
- */
4157
- thumbnailUrl: string | null | undefined;
4158
- /**
4159
- * Children to render inside the thumbnail; must be a `ThumbnailBadge` component
4160
- */
4161
- children?: ReactNode;
4162
- /**
4163
- * The type of gradient to show either behind the icon or when there is no thumbnail image
4164
- */
4165
- gradientBackground?: GradientNameType;
4166
- /**
4167
- * The storyboard data for "scrubbing" functionality
4168
- */
4169
- storyboard?: Storyboard;
4170
- /**
4171
- * Width of the thumbnail. By default, the thumbnail will grow to fit its container.
4172
- * Example: '320px'
4173
- */
4174
- width?: string;
4175
- /**
4176
- * The height of the thumbnail container when using storyboard.
4177
- * Example: '180px'
4178
- */
4179
- height?: string;
4180
- /**
4181
- * The aspect ratio of the thumbnail container.
4182
- * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4183
- */
4184
- aspectRatio?: AspectRatioType;
4185
- };
4186
- /**
4187
- * A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
4188
- */
4189
- declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
4190
- /**
4191
- * The desired display of the thumbnail, either wide or square
4192
- */
4193
- thumbnailImageType?: "square" | "wide" | undefined;
4194
- /**
4195
- * The URL of the thumbnail image to display
4196
- */
4197
- thumbnailUrl: string | null | undefined;
4198
- /**
4199
- * Children to render inside the thumbnail; must be a `ThumbnailBadge` component
4200
- */
4201
- children?: ReactNode;
4202
- /**
4203
- * The type of gradient to show either behind the icon or when there is no thumbnail image
4204
- */
4205
- gradientBackground?: GradientNameType;
4206
- /**
4207
- * The storyboard data for "scrubbing" functionality
4208
- */
4209
- storyboard?: Storyboard;
4210
- /**
4211
- * Width of the thumbnail. By default, the thumbnail will grow to fit its container.
4212
- * Example: '320px'
4213
- */
4214
- width?: string;
4215
- /**
4216
- * The height of the thumbnail container when using storyboard.
4217
- * Example: '180px'
4218
- */
4219
- height?: string;
4220
- /**
4221
- * The aspect ratio of the thumbnail container.
4222
- * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4223
- */
4224
- aspectRatio?: AspectRatioType;
4225
- } & react.RefAttributes<HTMLDivElement>>;
4226
-
4227
- type ThumbnailCollageProps = {
4228
- /**
4229
- * An array of `Thumbnail` components to show in the collage. Supports up to 3 `Thumbnail`s.
4230
- */
4231
- children?: ReactElement<ThumbnailProps>[] | undefined;
4232
- /**
4233
- * The type of gradient to show if no `Thumbnail`s are provided
4234
- */
4235
- gradientBackground?: GradientNameType;
4236
- };
4237
- /**
4238
- * A `ThumbnailCollage` is a component that displays multiple `Thumbnail` components in a responsive grid layout.
4239
- * It supports up to 3 thumbnails arranged in different configurations based on the number of children provided.
4240
- * If no thumbnails are provided, it displays a fallback thumbnail with a gradient background.
4241
- */
4242
- declare const ThumbnailCollage: ({ children, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
4243
-
4244
- type TooltipProps = {
4245
- /**
4246
- * The content of the tooltip
4247
- */
4248
- content: ReactNode;
4249
- /**
4250
- * The button or other interactive element that triggers the tooltip
4251
- */
4252
- children: ReactNode;
4253
- /**
4254
- * The delay in milliseconds before the tooltip appears
4255
- */
4256
- delay?: number;
4257
- /**
4258
- * The preferred direction to render the tooltip if no collisions prevent it
4259
- */
4260
- direction?: 'bottom' | 'left' | 'right' | 'top';
4261
- /**
4262
- * @ignore
4263
- * Force the tooltip to be open without user interaction (for debugging and CI)
4264
- */
4265
- forceOpen?: boolean;
4266
- /**
4267
- * Hides the arrow
4268
- */
4269
- hideArrow?: boolean;
4270
- /**
4271
- * Specify a container element to portal the tooltip into.
4272
- * Useful for rendering tooltips in contexts like pip windows.
4273
- * @default document.body
4274
- */
4275
- container?: Element | null;
4276
- };
4277
- /**
4278
- * Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
4279
- * For elements that are not interactive, consider using a [Popover]() instead.
4280
- *
4281
- */
4282
- declare const Tooltip: {
4283
- ({ delay, direction, content, children, forceOpen, hideArrow, container, }: TooltipProps): JSX.Element;
4284
- displayName: string;
4285
- };
4286
-
4287
- type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'height' | 'href'> & {
4288
- /**
4289
- * An optional accessible description for the logo
4290
- */
4291
- description?: string;
4292
- /**
4293
- * Height, in pixels, of the logo
4294
- */
4295
- height?: number;
4296
- /**
4297
- * If provided, will wrap the logo in a link
4298
- */
4299
- href?: string;
4300
- /**
4301
- * @ignore
4302
- * Change the color when hovering over the logo
4303
- */
4304
- hoverColor?: string;
4305
- /**
4306
- * Display just the icon portion of the logo (ie. hide `Wistia` text)
4307
- * note: there is no analogue to this because by brand guidelines, the
4308
- * `Wistia` text must not be displayed without the "flags" iconography
4309
- */
4310
- iconOnly?: boolean;
4311
- /**
4312
- * An accessible title for the logo (defaults to "Wistia Logo")
4313
- */
4314
- title?: string;
4315
- /**
4316
- * Style of the logo
4317
- */
4318
- variant?: 'dark' | 'light' | 'standard';
4319
- /**
4320
- * If true, the logo will be optically centered within its container
4321
- */
4322
- opticallyCentered?: boolean;
4323
- };
4324
- /**
4325
- * Render the Wistia logo in various ways.
4326
- */
4327
- declare const WistiaLogo: {
4328
- ({ description, height, hoverColor, href, iconOnly, opticallyCentered, title, variant, ...props }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
4329
- displayName: string;
4330
- };
4331
-
4332
- type SplitButtonProps = {
4333
- /**
4334
- * The text for the primary button
4335
- */
4336
- children?: ButtonProps['children'];
4337
- colorScheme?: ButtonProps['colorScheme'];
4338
- /**
4339
- * The icon to use for the menu toggle, defaults to a down caret
4340
- * @default <Icon type="caret-down" />
4341
- */
4342
- menuIcon?: JSX.Element;
4343
- /**
4344
- * The menu items to render within the menu. If the secondary behavior of `SplitButton` should be a button, rather than a menu, omit `menuItems` and use `secondaryAction` instead.
4345
- */
4346
- menuItems?: ReactNode;
4347
- /**
4348
- * The label to use for the menu, only for screenreaders
4349
- */
4350
- menuLabel?: string;
4351
- /**
4352
- * If using `menuItems`, any additional props to pass to the `Menu` component
4353
- */
4354
- menuProps?: Omit<ComponentProps<typeof Menu>, 'children' | 'disabled' | 'trigger'>;
4355
- /**
4356
- * Secondary action should not be used when menuItems is set
4357
- */
4358
- secondaryAction?: JSX.Element;
4359
- /**
4360
- * The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
4361
- */
4362
- size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
4363
- /**
4364
- * A visual style for the button
4365
- */
4366
- variant?: ButtonVariants;
4367
- } & (ButtonAsButtonProps | ButtonAsLinkProps);
4368
- /**
4369
- * A SplitButton is an extension of [Button]() that adds a menu to the right hand side of the button.
4370
- */
4371
- declare const SplitButton: {
4372
- ({ children, menuLabel, menuIcon, menuItems, disabled, colorScheme, variant, secondaryAction, size, unstyled, menuProps, ...props }: SplitButtonProps): JSX.Element;
4373
- displayName: string;
4374
- };
4375
-
4376
- type CustomizableTokens = '--wui-color-backdrop' | '--wui-color-bg-app' | '--wui-color-bg-fill-active' | '--wui-color-bg-fill-hover' | '--wui-color-bg-fill-white ' | '--wui-color-bg-fill' | '--wui-color-bg-surface-active' | '--wui-color-bg-surface-disabled' | '--wui-color-bg-surface-hover' | '--wui-color-bg-surface-secondary-active' | '--wui-color-bg-surface-secondary-hover' | '--wui-color-bg-surface-secondary' | '--wui-color-bg-surface-selected-active' | '--wui-color-bg-surface-selected-hover' | '--wui-color-bg-surface-selected' | '--wui-color-bg-surface-tertiary' | '--wui-color-bg-surface' | '--wui-color-bg-tooltip' | '--wui-color-border-active-selected' | '--wui-color-border-active' | '--wui-color-border-disabled' | '--wui-color-border-hover-selected' | '--wui-color-border-hover' | '--wui-color-border-secondary-active' | '--wui-color-border-secondary-hover' | '--wui-color-border-secondary' | '--wui-color-border-selected' | '--wui-color-border' | '--wui-color-drop-shadow' | '--wui-color-focus-color' | '--wui-color-focus-ring-disabled' | '--wui-color-focus-ring' | '--wui-color-icon-disabled' | '--wui-color-icon-on-fill' | '--wui-color-icon-selected' | '--wui-color-icon' | '--wui-color-invalid-indicator' | '--wui-color-notification-pill-color' | '--wui-color-segmented-control-checked-background' | '--wui-color-text-button' | '--wui-color-text-disabled' | '--wui-color-text-link' | '--wui-color-text-on-fill-white-selected' | '--wui-color-text-on-fill' | '--wui-color-text-secondary' | '--wui-color-text-selected' | '--wui-color-text' | '--wui-typography-family-brand' | '--wui-typography-family-default' | '--wui-typography-family-mono' | '--wui-typography-weight-body-bold' | '--wui-typography-weight-body' | '--wui-typography-weight-heading' | '--wui-typography-weight-label-bold' | '--wui-typography-weight-label';
4377
- type CustomizableThemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
4378
- children: ReactNode;
4379
- overrides: Partial<Record<CustomizableTokens, number | string>>;
4380
- };
4381
- /**
4382
- * Used for overriding the default theme tokens with custom values.
4383
- * This should only be used when the ui systems team has been consulted first.
4384
- */
4385
- declare const CustomizableThemeWrapper: {
4386
- ({ children, overrides, ...props }: CustomizableThemeWrapperProps): JSX.Element;
4387
- displayName: string;
4388
- };
4389
-
4390
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, BannerImage, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, CustomizableThemeWrapper, type CustomizableThemeWrapperProps, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Mark, type MarkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, ModalCallout, ModalCallouts, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, SplitButton, type SplitButtonProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseActiveMqReturnType, type UseIsHoveredReturnType, type UseMqReturnType, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };