@wistia/vhs 4.0.3 → 5.0.0-beta.c198dcef.645d027

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,3487 +0,0 @@
1
- import * as styled_components from 'styled-components';
2
- import { css, DefaultTheme } from 'styled-components';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import * as react from 'react';
5
- import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
6
- import { FormikProps, FormikHelpers, FormikErrors, Field } from 'formik';
7
- export { useFormikContext } from 'formik';
8
- import { BaseEditor, Descendant } from 'slate';
9
- import { ReactEditor } from 'slate-react';
10
- import { HistoryEditor } from 'slate-history';
11
- import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps } from '@radix-ui/react-dropdown-menu';
12
- export { DropdownMenuRadioGroup as MenuRadioGroup } from '@radix-ui/react-dropdown-menu';
13
- import * as styled_components_dist_types from 'styled-components/dist/types';
14
-
15
- interface VHSTheme {
16
- readonly breakpoint: {
17
- readonly xs: string;
18
- readonly sm: string;
19
- readonly md: string;
20
- readonly lg: string;
21
- readonly xl: string;
22
- };
23
- readonly color: {
24
- readonly brandBlue100: string;
25
- readonly brandBlue200: string;
26
- readonly brandBlue300: string;
27
- readonly brandBlue400: string;
28
- readonly brandBlue500: string;
29
- readonly brandBlue600: string;
30
- readonly brandBlue700: string;
31
- readonly brandBlue800: string;
32
- readonly purple100: string;
33
- readonly purple200: string;
34
- readonly purple300: string;
35
- readonly purple400: string;
36
- readonly purple500: string;
37
- readonly purple600: string;
38
- readonly purple700: string;
39
- readonly purple800: string;
40
- readonly green100: string;
41
- readonly green200: string;
42
- readonly green300: string;
43
- readonly green400: string;
44
- readonly green500: string;
45
- readonly green600: string;
46
- readonly green700: string;
47
- readonly green800: string;
48
- readonly blue100: string;
49
- readonly blue200: string;
50
- readonly blue300: string;
51
- readonly blue400: string;
52
- readonly blue500: string;
53
- readonly blue600: string;
54
- readonly blue700: string;
55
- readonly blue800: string;
56
- readonly pink100: string;
57
- readonly pink200: string;
58
- readonly pink300: string;
59
- readonly pink400: string;
60
- readonly pink500: string;
61
- readonly pink600: string;
62
- readonly pink700: string;
63
- readonly pink800: string;
64
- readonly red100: string;
65
- readonly red200: string;
66
- readonly red300: string;
67
- readonly red400: string;
68
- readonly red500: string;
69
- readonly red600: string;
70
- readonly red700: string;
71
- readonly red800: string;
72
- readonly yellow100: string;
73
- readonly yellow200: string;
74
- readonly yellow300: string;
75
- readonly yellow400: string;
76
- readonly yellow500: string;
77
- readonly yellow600: string;
78
- readonly yellow700: string;
79
- readonly yellow800: string;
80
- readonly orange100: string;
81
- readonly orange200: string;
82
- readonly orange300: string;
83
- readonly orange400: string;
84
- readonly orange500: string;
85
- readonly orange600: string;
86
- readonly orange700: string;
87
- readonly orange800: string;
88
- readonly grey100: string;
89
- readonly grey200: string;
90
- readonly grey300: string;
91
- readonly grey400: string;
92
- readonly grey500: string;
93
- readonly grey600: string;
94
- readonly grey700: string;
95
- readonly grey800: string;
96
- readonly grey900: string;
97
- readonly grey1000: string;
98
- readonly grey1100: string;
99
- readonly error100: string;
100
- readonly error200: string;
101
- readonly error300: string;
102
- readonly error400: string;
103
- readonly error500: string;
104
- readonly error600: string;
105
- readonly error700: string;
106
- readonly error800: string;
107
- readonly success100: string;
108
- readonly success200: string;
109
- readonly success300: string;
110
- readonly success400: string;
111
- readonly success500: string;
112
- readonly success600: string;
113
- readonly success700: string;
114
- readonly success800: string;
115
- readonly warning100: string;
116
- readonly warning200: string;
117
- readonly warning300: string;
118
- readonly warning400: string;
119
- readonly warning500: string;
120
- readonly warning600: string;
121
- readonly warning700: string;
122
- readonly warning800: string;
123
- };
124
- readonly duration: {
125
- readonly productive: {
126
- readonly fast: string;
127
- readonly moderate: string;
128
- readonly slow: string;
129
- };
130
- readonly expressive: {
131
- readonly fast: string;
132
- readonly moderate: string;
133
- readonly slow: string;
134
- };
135
- };
136
- readonly easing: {
137
- readonly standard: {
138
- readonly productive: string;
139
- readonly expressive: string;
140
- };
141
- readonly entrance: {
142
- readonly productive: string;
143
- readonly expressive: string;
144
- };
145
- readonly exit: {
146
- readonly productive: string;
147
- readonly expressive: string;
148
- };
149
- };
150
- readonly font: {
151
- readonly family: {
152
- readonly default: string;
153
- readonly monospace: string;
154
- };
155
- readonly size: {
156
- readonly default: string;
157
- readonly small: string;
158
- };
159
- readonly weight: {
160
- readonly thin: number;
161
- readonly extraLight: number;
162
- readonly light: number;
163
- readonly regular: number;
164
- readonly medium: number;
165
- readonly semiBold: number;
166
- readonly bold: number;
167
- readonly extraBold: number;
168
- };
169
- };
170
- readonly shadow: {
171
- readonly elevation0: string;
172
- readonly elevation1: string;
173
- readonly elevation2: string;
174
- };
175
- readonly spacing: {
176
- readonly space01: string;
177
- readonly space02: string;
178
- readonly space03: string;
179
- readonly space04: string;
180
- readonly space05: string;
181
- readonly space06: string;
182
- readonly space07: string;
183
- readonly space08: string;
184
- readonly space09: string;
185
- readonly space10: string;
186
- readonly space11: string;
187
- };
188
- readonly zIndex: {
189
- readonly ModalCloseButton: number;
190
- readonly Backdrop: number;
191
- readonly ActionModal: number;
192
- readonly FullScreenModal: number;
193
- readonly RangeSelector: number;
194
- readonly MenuComponent: number;
195
- readonly Toast: number;
196
- readonly Tooltip: number;
197
- readonly BackdropElevated: number;
198
- };
199
- readonly button: {
200
- readonly borderRadius: string;
201
- };
202
- readonly buttonGroup: {
203
- readonly gap: string;
204
- };
205
- readonly headline: {
206
- readonly family: {
207
- readonly default: string;
208
- readonly monospace: string;
209
- };
210
- readonly headline1: {
211
- readonly weight: number;
212
- };
213
- readonly headline2: {
214
- readonly weight: number;
215
- };
216
- readonly headline3: {
217
- readonly weight: number;
218
- };
219
- };
220
- readonly paper: {
221
- readonly elevation0: string;
222
- readonly elevation1: string;
223
- readonly elevation2: string;
224
- };
225
- }
226
-
227
- /**
228
- * Copies a string to user's clipboard for easy pasting in another location
229
- *
230
- * @param {string} textToCopy - the string that will be copied to users clipboard
231
- * @returns {Promise} - Promise object that represents the copied string
232
- */
233
- declare const copyToClipboard: (textToCopy: string) => Promise<void>;
234
-
235
- declare const datetimeHelpers: {
236
- isDate: (date: unknown) => date is Date;
237
- dateOnlyString: (date: unknown, { timeZone }?: {
238
- timeZone?: string;
239
- omitYear?: boolean;
240
- }) => string;
241
- dateOnlyStringNumeric: (date: unknown, { timeZone }?: {
242
- timeZone?: string;
243
- omitYear?: boolean;
244
- }) => string;
245
- dateOnlyISOString: (date: unknown, { timeZone }?: {
246
- timeZone?: string;
247
- omitYear?: boolean;
248
- }) => string;
249
- monthDayStringNumeric: (date: unknown, { timeZone }?: {
250
- timeZone?: string;
251
- omitYear?: boolean;
252
- }) => string;
253
- dayOfWeekString: (date: Date | null, { timeZone }?: {
254
- timeZone?: string;
255
- omitYear?: boolean;
256
- }) => string;
257
- timeOnlyString: (date: unknown, { timeZone }?: {
258
- timeZone?: string;
259
- omitYear?: boolean;
260
- }) => string;
261
- dateTimeString: (date: Date | number | string | null | undefined, { timeZone, omitYear }?: {
262
- timeZone?: string;
263
- omitYear?: boolean;
264
- }) => string;
265
- dateTimeStringForSentence: (date: unknown, { timeZone }?: {
266
- timeZone?: string;
267
- omitYear?: boolean;
268
- }) => string;
269
- dateOnlyStringForSentence: (date: unknown, { timeZone }?: {
270
- timeZone?: string;
271
- omitYear?: boolean;
272
- }) => string;
273
- timeAgoString: (date: Date, { nowAnchor, includeTime }?: {
274
- nowAnchor?: Date;
275
- includeTime?: boolean;
276
- }) => string;
277
- dateUTCOffset: (date: Date) => string;
278
- buildTimeDuration: (numberOfMilliseconds: number) => {
279
- seconds: number;
280
- minutes: number;
281
- hours: number;
282
- };
283
- mediaDurationString: (numberOfMilliseconds: number) => string;
284
- sessionDurationString: (numberOfMilliseconds: number) => string;
285
- dateToDateTime: (date: Date | null | undefined) => {
286
- minutes: number;
287
- hours: number;
288
- dayOfMonth: number;
289
- year: number;
290
- month: number;
291
- } | null;
292
- dateTimeToDate: (dateTime: Partial<{
293
- minutes: number;
294
- hours: number;
295
- dayOfMonth: number;
296
- year: number;
297
- month: number;
298
- }> | null | undefined) => Date | null;
299
- dateTimeToISO: (dateTime: Partial<{
300
- minutes: number;
301
- hours: number;
302
- dayOfMonth: number;
303
- year: number;
304
- month: number;
305
- }>) => string | null;
306
- dateTimeRounded: {
307
- (dateTime: Date, toISOString?: true): string | null;
308
- (dateTime: Date, toISOString: false): Date | null;
309
- };
310
- millisecondsToDurationISOString: (numberOfMilliseconds: number) => string;
311
- };
312
-
313
- declare const gradients: {
314
- defaultDarkOne: styled_components.RuleSet<object>;
315
- defaultDarkTwo: styled_components.RuleSet<object>;
316
- defaultLightOne: styled_components.RuleSet<object>;
317
- defaultLightTwo: styled_components.RuleSet<object>;
318
- defaultMidOne: styled_components.RuleSet<object>;
319
- defaultMidTwo: styled_components.RuleSet<object>;
320
- green: styled_components.RuleSet<object>;
321
- greenWithPop: styled_components.RuleSet<object>;
322
- pink: styled_components.RuleSet<object>;
323
- pinkWithPop: styled_components.RuleSet<object>;
324
- playfulGradientOne: styled_components.RuleSet<object>;
325
- playfulGradientTwo: styled_components.RuleSet<object>;
326
- purple: styled_components.RuleSet<object>;
327
- purpleWithPop: styled_components.RuleSet<object>;
328
- yellow: styled_components.RuleSet<object>;
329
- yellowWithPop: styled_components.RuleSet<object>;
330
- };
331
- type GradientNameType = keyof typeof gradients;
332
- type GetBackgroundGradientType = GradientNameType | undefined;
333
- /**
334
- * Retrieves the CSS background gradient corresponding to the given gradient name.
335
- * If the specified gradient name is not found, the default gradient ('defaultDarkOne') is returned.
336
- * @param {GradientName} gradientName - The name of the gradient to retrieve.
337
- * @returns {FlattenSimpleInterpolation} The CSS string representing the specified gradient.
338
- */
339
- declare const getBackgroundGradient: (gradientName?: GetBackgroundGradientType) => ReturnType<typeof css>;
340
-
341
- /**
342
- * Retrieves a semi-random background gradient based on the given id.
343
- *
344
- * @param {string} id - The id to use to generate the semi-random background gradient.
345
- * @returns {GradientName} gradientName
346
- */
347
- declare const getSemiRandomBackgroundGradient: (id: string) => GradientNameType | undefined;
348
-
349
- declare const mq: {
350
- xsAndUp: <T extends DefaultTheme = DefaultTheme>({ theme }: {
351
- theme: T;
352
- }) => string;
353
- smAndUp: <T extends DefaultTheme = DefaultTheme>({ theme }: {
354
- theme: T;
355
- }) => string;
356
- mdAndUp: <T extends DefaultTheme = DefaultTheme>({ theme }: {
357
- theme: T;
358
- }) => string;
359
- lgAndUp: <T extends DefaultTheme = DefaultTheme>({ theme }: {
360
- theme: T;
361
- }) => string;
362
- xlAndUp: <T extends DefaultTheme = DefaultTheme>({ theme }: {
363
- theme: T;
364
- }) => string;
365
- xsAndDown: <T extends DefaultTheme = DefaultTheme>({ theme }: {
366
- theme: T;
367
- }) => string;
368
- smAndDown: <T extends DefaultTheme = DefaultTheme>({ theme }: {
369
- theme: T;
370
- }) => string;
371
- mdAndDown: <T extends DefaultTheme = DefaultTheme>({ theme }: {
372
- theme: T;
373
- }) => string;
374
- lgAndDown: <T extends DefaultTheme = DefaultTheme>({ theme }: {
375
- theme: T;
376
- }) => string;
377
- xlAndDown: <T extends DefaultTheme = DefaultTheme>({ theme }: {
378
- theme: T;
379
- }) => string;
380
- };
381
-
382
- declare const objectHelpers: {
383
- isObject: (value: unknown) => value is Record<string, unknown>;
384
- deepFreeze: (obj: Record<string, unknown>) => Record<string, unknown>;
385
- merge: (target: Record<string, unknown>, ...sources: Record<string, unknown>[]) => Record<string, unknown>;
386
- selectKeys: (obj: Record<string, unknown>, keys: string[]) => Record<string, unknown>;
387
- };
388
-
389
- declare const stringHelpers: {
390
- camelCase: (str?: string) => string;
391
- coerceToBoolean: (value: unknown) => boolean;
392
- coerceToString: (value: unknown) => string;
393
- isHttpUrl: (str: unknown) => boolean;
394
- isString: (value: unknown) => value is string;
395
- isUrl: (str: unknown) => boolean;
396
- lowerFirst: (str?: string) => string;
397
- removeNewlines: (str: string) => string;
398
- stripExtension: (str: string) => string;
399
- truncate: (str: string, maxChars: number) => string;
400
- upperFirst: (str?: string) => string;
401
- };
402
-
403
- type LinkURLParameters = Record<string, string>;
404
- type LinkTypes = 'default' | 'email' | 'external' | 'phone';
405
- type DefaultLinkWrapperProps = {
406
- [anchorProps: string]: unknown;
407
- RenderedLink: ({ ...args }: {
408
- [x: string]: any;
409
- }) => JSX.Element;
410
- children: ReactNode;
411
- };
412
- type LinkProps = ComponentPropsWithoutRef<'a'> & {
413
- /**
414
- * A Promise to invoke before navigating to location.
415
- * _Caution: if used with `external` type prop a new window will **not** be opened_
416
- */
417
- beforeAction?: (() => Promise<void>) | (() => void);
418
- /**
419
- * The content that will be rendered inside the link
420
- */
421
- children: ReactNode;
422
- /**
423
- * Disables Link
424
- */
425
- disabled?: boolean;
426
- /**
427
- * @ignore
428
- * Force a Link into a particular css state (for debugging)
429
- */
430
- forceState?: 'active' | 'focus' | 'hover';
431
- /**
432
- * The entity to link to (url, email address, telephone number)
433
- */
434
- href: string;
435
- /**
436
- * Use this if your link is "nested" inside another link
437
- */
438
- nested?: boolean;
439
- /**
440
- * An object that will be converted into a search parameter string and appended to
441
- * the `to` prop value
442
- */
443
- params?: LinkURLParameters;
444
- /**
445
- * Type of link to display
446
- *
447
- * * `email` creates a mailto
448
- * * `phone` creates a telephone number
449
- * * `external` will open links in a new window
450
- */
451
- type?: LinkTypes;
452
- /**
453
- * Will only display an underline when the Link is in a hover state
454
- */
455
- underlineOnHover?: boolean;
456
- /**
457
- * Renders a link without any of the default styling applied
458
- */
459
- unstyled?: boolean;
460
- /**
461
- * The visual type of Link to display
462
- */
463
- variant?: 'dangerous' | 'primary' | 'secondary';
464
- };
465
- declare const Link: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
466
- /**
467
- * A Promise to invoke before navigating to location.
468
- * _Caution: if used with `external` type prop a new window will **not** be opened_
469
- */
470
- beforeAction?: (() => Promise<void>) | (() => void);
471
- /**
472
- * The content that will be rendered inside the link
473
- */
474
- children: ReactNode;
475
- /**
476
- * Disables Link
477
- */
478
- disabled?: boolean;
479
- /**
480
- * @ignore
481
- * Force a Link into a particular css state (for debugging)
482
- */
483
- forceState?: "active" | "focus" | "hover";
484
- /**
485
- * The entity to link to (url, email address, telephone number)
486
- */
487
- href: string;
488
- /**
489
- * Use this if your link is "nested" inside another link
490
- */
491
- nested?: boolean;
492
- /**
493
- * An object that will be converted into a search parameter string and appended to
494
- * the `to` prop value
495
- */
496
- params?: LinkURLParameters;
497
- /**
498
- * Type of link to display
499
- *
500
- * * `email` creates a mailto
501
- * * `phone` creates a telephone number
502
- * * `external` will open links in a new window
503
- */
504
- type?: LinkTypes;
505
- /**
506
- * Will only display an underline when the Link is in a hover state
507
- */
508
- underlineOnHover?: boolean;
509
- /**
510
- * Renders a link without any of the default styling applied
511
- */
512
- unstyled?: boolean;
513
- /**
514
- * The visual type of Link to display
515
- */
516
- variant?: "dangerous" | "primary" | "secondary";
517
- } & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
518
-
519
- type WrapperProviderLinkType = ((props: DefaultLinkWrapperProps) => JSX.Element) | undefined;
520
-
521
- type VHSProviderProps = {
522
- children: ReactNode;
523
- globalStylesIncluded?: boolean;
524
- Link?: WrapperProviderLinkType;
525
- skipAnimations?: boolean;
526
- theme?: Record<string, unknown>;
527
- };
528
- declare const VHSProvider: ({ children, theme, globalStylesIncluded, skipAnimations, Link, }: VHSProviderProps) => react_jsx_runtime.JSX.Element;
529
-
530
- type UseBooleanReturn = [
531
- boolean,
532
- () => void,
533
- () => void,
534
- () => void,
535
- Dispatch<SetStateAction<boolean>>
536
- ];
537
- declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
538
-
539
- declare const useClipboard: (textToCopy: string, timeout?: number) => [() => Promise<void>, boolean, boolean];
540
-
541
- type Rect = {
542
- width: number;
543
- height: number;
544
- top: number;
545
- left: number;
546
- bottom: number;
547
- right: number;
548
- x: number;
549
- y: number;
550
- };
551
- declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
552
-
553
- type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
554
- type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
555
- declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
556
-
557
- type UseFocusTrapOptions = {
558
- disableAriaHider?: boolean;
559
- focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
560
- };
561
- declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
562
-
563
- declare const useForceUpdate: () => (() => void);
564
-
565
- type HoverProps = {
566
- onFocus: () => void;
567
- onMouseEnter: () => void;
568
- onBlur: () => void;
569
- onMouseLeave: () => void;
570
- onMouseMove?: () => void;
571
- };
572
- declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
573
-
574
- type KeyFilterPredicate = (evt: KeyboardEvent) => boolean;
575
- type KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;
576
- type EventHandler = (event: KeyboardEvent) => unknown;
577
- type UseKeyOptions = {
578
- eventName?: string;
579
- eventTarget?: Parameters<typeof useEvent>[2];
580
- eventOptions?: Parameters<typeof useEvent>[3];
581
- };
582
- declare const useKey: (key: KeyFilter, eventHandler: EventHandler, options?: UseKeyOptions, dependencies?: unknown[]) => void;
583
-
584
- type KeyPressState = [boolean, KeyboardEvent | null];
585
- declare const useKeyPress: (keyFilter: Parameters<typeof useKey>[0]) => KeyPressState;
586
-
587
- type KeyEventHandler = (keyboardEvent: KeyboardEvent) => unknown;
588
- declare const useKeyPressOnce: (key: Parameters<typeof useKeyPress>[0], keydownHandler?: KeyEventHandler | null | undefined, keyupHandler?: KeyEventHandler | null | undefined) => void;
589
-
590
- type SetItemType = Storage['setItem'];
591
- declare const useLocalStorage: <T, _>(key: Parameters<SetItemType>[0], initialValue: T, storage?: Storage) => [T | undefined, (newValue: T) => void, () => void];
592
-
593
- type AcceptedElementTypes = HTMLElement | JSX.Element | ReactNode;
594
- type AcceptedRefs = MutableRefObject<unknown> | ((element: AcceptedElementTypes) => unknown) | null | undefined;
595
- declare const useMergedRefs: (refs: AcceptedRefs[]) => (element: AcceptedElementTypes) => void;
596
-
597
- type MediaQueryBooleans = {
598
- isXsAndUp: boolean;
599
- isSmAndUp: boolean;
600
- isMdAndUp: boolean;
601
- isLgAndUp: boolean;
602
- isXlAndUp: boolean;
603
- isXsAndDown: boolean;
604
- isSmAndDown: boolean;
605
- isMdAndDown: boolean;
606
- isLgAndDown: boolean;
607
- isXlAndDown: boolean;
608
- };
609
- declare const useMq: () => MediaQueryBooleans;
610
-
611
- declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown) => void;
612
-
613
- declare const usePreventScroll: (locked: boolean) => void;
614
-
615
- declare const usePreviousValue: <T>(value: T) => T | undefined;
616
-
617
- declare const useTheme: <T extends DefaultTheme = DefaultTheme>() => T;
618
-
619
- type ColorKeysFromTheme<Theme extends DefaultTheme = DefaultTheme> = keyof Theme['color'];
620
- type UseThemeColor = {
621
- (): DefaultTheme['color'];
622
- <T extends DefaultTheme, K extends ColorKeysFromTheme<T>>(param: K): T['color'][K];
623
- <T extends DefaultTheme, K extends ColorKeysFromTheme<T>[]>(param: [...K]): {
624
- [I in keyof K]: T['color'][K[I] & keyof T['color']];
625
- };
626
- };
627
- declare const useThemeColor: UseThemeColor;
628
-
629
- declare const useWindowSize: (interval?: number) => {
630
- width: number;
631
- height: number;
632
- };
633
-
634
- type OnBeforeHideInterface = {
635
- shouldShowMessage: boolean;
636
- message: string;
637
- };
638
- type ModalBaseContentProps = {
639
- /**
640
- * Class name applied to the modal root
641
- */
642
- className?: string | undefined;
643
- /**
644
- * Render the modal initially in shown state
645
- */
646
- initialShownState?: boolean;
647
- /**
648
- * The modal can be dismissed via esc button
649
- */
650
- isDismissible?: boolean;
651
- /**
652
- * Callback invoked before the modal is hidden
653
- */
654
- onBeforeHide?: (() => OnBeforeHideInterface) | undefined;
655
- /**
656
- * Callback invoked when the modal is dismissed
657
- */
658
- onHide?: ((...args: unknown[]) => unknown) | undefined;
659
- /**
660
- * Callback invoked when the modal is shown
661
- */
662
- onShow?: ((...args: unknown[]) => unknown) | undefined;
663
- /**
664
- * Optional function that exposes the `hide` function at the call site allowing
665
- * the option to call the `hide` function from outside of this component
666
- */
667
- render?: (attemptHide: () => unknown) => ReactNode;
668
- /**
669
- * function(show, ref) that returns a node to open the modal
670
- */
671
- toggle?: ((show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode) | undefined;
672
- };
673
- declare const ModalBase: {
674
- (props: ModalBaseContentProps): react_jsx_runtime.JSX.Element;
675
- displayName: string;
676
- };
677
-
678
- type ActionModalProps = ComponentPropsWithoutRef<'div'> & {
679
- /**
680
- * Horizontally align modal to the left, center, or right of the container
681
- */
682
- alignHorizontal?: 'center' | 'left' | 'normal' | 'right';
683
- /**
684
- * Vertically align modal to the top, center, or bottom of the container
685
- */
686
- alignVertical?: 'bottom' | 'center' | 'normal' | 'top';
687
- /**
688
- * Buttons to be shown at the bottom of the modal
689
- */
690
- buttons?: ReactNode | ((hide: () => void) => ReactNode);
691
- /**
692
- * Contents of the modal
693
- */
694
- children?: ReactNode;
695
- /**
696
- * Class to be applied to the base element of the modal
697
- */
698
- className?: string;
699
- /**
700
- * A prop that determines whether the modal will span the entirety of the screen vertically
701
- */
702
- fullHeight?: boolean;
703
- /**
704
- * Allows user to override default icon color
705
- */
706
- closeIconColorOverride?: string;
707
- /**
708
- * Increase the zIndex of the Modal, this should be used when calling ActionModal from a Menu
709
- * this will prevent the Menu from staying above the ActionModal
710
- */
711
- elevated?: boolean;
712
- /**
713
- * Optional illustration to display alongside the modal
714
- */
715
- illustration?: ReactNode;
716
- /**
717
- * Background color that appears behind the optional illustration
718
- * Can be any css background color or "blue", "brandBlue", "green",
719
- * "pink", "purple", or "yellow" for theme colors
720
- */
721
- illustrationBackgroundColor?: string;
722
- /**
723
- * Render the modal initially in shown state
724
- */
725
- initialShownState?: boolean;
726
- /**
727
- * Allow the user to close the modal via x button or backdrop click
728
- */
729
- isDismissible?: boolean;
730
- /**
731
- * Callback invoked before the modal is hidden
732
- */
733
- onBeforeHide?: () => OnBeforeHideInterface;
734
- /**
735
- * Callback invoked when the modal is dismissed
736
- */
737
- onHide?: () => void;
738
- /**
739
- * Callback invoked when the modal is shown
740
- */
741
- onShow?: () => void;
742
- /**
743
- * Optional function that exposes the `hide` function at the call site allowing
744
- * the option to call the `hide` function from outside of this component
745
- */
746
- render?: (hide: (event?: MouseEvent) => void) => ReactNode;
747
- /**
748
- * Title to display in the modal
749
- */
750
- title: string;
751
- /**
752
- * function(show, ref) that returns a node to open the modal
753
- */
754
- toggle?: (show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode;
755
- /**
756
- * The css width property of the modal. Ex - 'max-content', '532px', '100%', etc
757
- */
758
- width?: string;
759
- };
760
- /**
761
- * @deprecated Please use Modal component, see [documentation](?path=/docs/components-modal--docs).
762
- *
763
- * #### Why ActionModal is being deprecated
764
- * ActionModal's API tightly couples the modal itself with the button or element that toggles it. This makes it difficult to
765
- * implement in several scenarios (such as within a Menu) or if it needs to be programatically opened by an external action.
766
- *
767
- * [Modal](?path=/docs/components-modal--docs) allows for a separate state control to toggle its visibility and is also more composable
768
- * allowing for more variation.
769
- */
770
- declare const ActionModal: {
771
- ({ alignHorizontal, alignVertical, buttons, children, className, elevated, fullHeight, closeIconColorOverride, illustration, illustrationBackgroundColor, initialShownState, isDismissible, onBeforeHide, onHide, onShow, render, title, toggle, width, ...otherProps }: ActionModalProps): react_jsx_runtime.JSX.Element;
772
- displayName: string;
773
- };
774
-
775
- type AvatarInstanceType = 'image' | 'initials';
776
- type AvatarProps = ComponentPropsWithoutRef<'div'> & {
777
- /**
778
- * The height and width of the avatar
779
- */
780
- heightAndWidth?: number;
781
- /**
782
- * The URL of the image to display
783
- */
784
- imageUrl?: string | null;
785
- /**
786
- * Initials to display if no image is provided
787
- *
788
- * _note: only first initial shown regardless of characters provided_
789
- */
790
- initials?: string | null;
791
- /**
792
- * A string that will deterministicly set the background color of the avatar
793
- */
794
- name?: string | null;
795
- /**
796
- * A callback that is invoked after the image has loaded or failed to load
797
- */
798
- onImageLoad?: (avatarType: AvatarInstanceType) => void;
799
- };
800
- declare const Avatar: {
801
- ({ imageUrl, heightAndWidth, initials, name, onImageLoad, ...otherProps }: AvatarProps): JSX.Element;
802
- displayName: string;
803
- };
804
-
805
- declare const alignVerticalMap: {
806
- normal: string;
807
- top: string;
808
- center: string;
809
- bottom: string;
810
- };
811
- declare const alignHorizontalMap: {
812
- normal: string;
813
- left: string;
814
- center: string;
815
- right: string;
816
- };
817
- type BackdropProps = ComponentPropsWithoutRef<'div'> & {
818
- /**
819
- * Optional prop to align the child content along the horizontal axis
820
- */
821
- alignHorizontal?: keyof typeof alignHorizontalMap;
822
- /**
823
- * Optional prop to align the child content along the vertical axis
824
- */
825
- alignVertical?: keyof typeof alignVerticalMap;
826
- /**
827
- * Color of the backdrop
828
- */
829
- backgroundColor?: string;
830
- /**
831
- * Pass an arbitrary child node
832
- */
833
- children?: ReactNode;
834
- /**
835
- * increase the z-index (workaround for ActionModals called within Menu)
836
- */
837
- elevated?: boolean;
838
- };
839
- declare const Backdrop: {
840
- ({ alignHorizontal, alignVertical, backgroundColor, children, elevated, ...otherProps }: BackdropProps): JSX.Element;
841
- displayName: string;
842
- };
843
-
844
- type OverflowObject = {
845
- horizontal: string;
846
- vertical: string;
847
- };
848
- type BackgroundImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'src'> & {
849
- /**
850
- * The content that will be rendered inside
851
- */
852
- children?: ReactNode;
853
- /**
854
- * Sets whether a background image's position is fixed within the viewport,
855
- * or scrolls with its containing block. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment).
856
- */
857
- attachment?: string;
858
- /**
859
- * Sets whether an element's background extends underneath its border box,
860
- * padding box, or content box. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip).
861
- */
862
- clip?: string;
863
- /**
864
- * Color (as hex) of the component
865
- */
866
- color?: string | undefined;
867
- /**
868
- * Height of the component
869
- */
870
- height?: string;
871
- /**
872
- * Sets the background's origin: from the border start, inside the border, or inside the padding.
873
- * _Note: origin is ignored when attachment is `fixed`._
874
- * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin).
875
- */
876
- origin?: string;
877
- /**
878
- * Sets the desired behavior for an element's overflow (i.e. when an element's content is
879
- * too big to fit in its block formatting context).
880
- * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow).
881
- */
882
- overflow?: OverflowObject | string;
883
- /**
884
- * Sets the initial position for each image; relative to the position layer
885
- * set by origin. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position).
886
- */
887
- position?: string;
888
- /**
889
- * Sets how background images are repeated.
890
- * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat).
891
- */
892
- repeat?: string;
893
- /**
894
- * Sets the size of the element's background image.
895
- * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size).
896
- */
897
- size?: string;
898
- /**
899
- * URL(s) to image file
900
- */
901
- src?: string[] | string;
902
- /**
903
- * Width of the component
904
- */
905
- width?: string;
906
- };
907
- declare const BackgroundImage: {
908
- ({ children, attachment: bgAttachment, clip: bgClip, color: bgColor, height: elHeight, origin: bgOrigin, overflow: elOverflow, position: bgPosition, repeat: bgRepeat, size: bgSize, src: bgImage, width: elWidth, ...otherProps }: BackgroundImageProps): react_jsx_runtime.JSX.Element;
909
- displayName: string;
910
- };
911
-
912
- declare const iconMap: {
913
- 'ab-test': string;
914
- 'all-content': string;
915
- archived: string;
916
- 'arrow-down': string;
917
- 'arrow-left': string;
918
- 'arrow-right': string;
919
- 'arrow-up': string;
920
- asterisk: string;
921
- audience: string;
922
- calendar: string;
923
- camera: string;
924
- 'caret-down': string;
925
- 'caret-left': string;
926
- 'caret-right': string;
927
- 'caret-up': string;
928
- channel: string;
929
- checkmark: string;
930
- 'checkmark-circle': string;
931
- 'checkmark-circle-outline': string;
932
- 'checkmark-circle-three-quarters': string;
933
- 'checkmark-underlined': string;
934
- close: string;
935
- 'close-circle': string;
936
- 'collect-video': string;
937
- collection: string;
938
- comment: string;
939
- community: string;
940
- 'contact-us': string;
941
- copy: string;
942
- 'copy-disabled': string;
943
- create: string;
944
- delete: string;
945
- 'delete-sm': string;
946
- 'dottie-clock': string;
947
- download: string;
948
- draggable: string;
949
- edit: string;
950
- ellipsis: string;
951
- 'ellipsis-vertical': string;
952
- embed: string;
953
- episodes: string;
954
- error: string;
955
- expand: string;
956
- export: string;
957
- favorite: string;
958
- 'favorite-outline': string;
959
- filter: string;
960
- gear: string;
961
- 'getting-started': string;
962
- globe: string;
963
- 'grid-view': string;
964
- 'group-record': string;
965
- hamburger: string;
966
- hazard: string;
967
- 'help-center': string;
968
- hide: string;
969
- home: string;
970
- hourglass: string;
971
- import: string;
972
- info: string;
973
- integrations: string;
974
- invite: string;
975
- 'invite-to-record': string;
976
- 'lightning-bolt': string;
977
- link: string;
978
- 'list-view': string;
979
- live: string;
980
- lock: string;
981
- logout: string;
982
- media: string;
983
- megaphone: string;
984
- 'more-options': string;
985
- 'open-new': string;
986
- overview: string;
987
- paint: string;
988
- pencil: string;
989
- play: string;
990
- playlist: string;
991
- podcast: string;
992
- preview: string;
993
- 'private-user-sessions': string;
994
- project: string;
995
- 'question-mark': string;
996
- react: string;
997
- record: string;
998
- redo: string;
999
- 'remove-from-channel': string;
1000
- replace: string;
1001
- reply: string;
1002
- 'save-copy': string;
1003
- scissors: string;
1004
- search: string;
1005
- send: string;
1006
- settings: string;
1007
- share: string;
1008
- soapbox: string;
1009
- sort: string;
1010
- sparkle: string;
1011
- spinner: string;
1012
- stats: string;
1013
- 'switch-accounts': string;
1014
- tag: string;
1015
- team: string;
1016
- 'thumbs-down': string;
1017
- 'thumbs-up': string;
1018
- triangle: string;
1019
- undo: string;
1020
- unlock: string;
1021
- upload: string;
1022
- 'users-permissions': string;
1023
- 'view-stream': string;
1024
- wand: string;
1025
- 'zoom-in': string;
1026
- 'zoom-out': string;
1027
- };
1028
- type IconNameType = keyof typeof iconMap;
1029
-
1030
- type BadgeColorScheme = 'brandBlue' | 'error' | 'green' | 'grey' | 'orange' | 'pink' | 'purple' | 'red' | 'success' | 'warning' | 'yellow';
1031
- type BadgeProps = ComponentPropsWithoutRef<'div'> & {
1032
- /**
1033
- * The color scheme to use for the badge
1034
- */
1035
- colorScheme?: BadgeColorScheme;
1036
- /**
1037
- * The icon to display in the badge
1038
- */
1039
- icon?: IconNameType;
1040
- /**
1041
- * The text to display in the badge
1042
- */
1043
- label: string;
1044
- };
1045
- declare const Badge: {
1046
- ({ colorScheme, label, icon, ...otherProps }: BadgeProps): JSX.Element;
1047
- displayName: string;
1048
- };
1049
-
1050
- type BannerProps = ComponentPropsWithoutRef<'div'> & {
1051
- /**
1052
- * color string
1053
- */
1054
- backgroundColor?: string;
1055
- /**
1056
- * Pass an arbitrary child node
1057
- */
1058
- children?: ReactNode;
1059
- /**
1060
- * icon name from the icon library to be displayed on left side of banner
1061
- */
1062
- icon?: ReactNode;
1063
- };
1064
- declare const Banner: {
1065
- ({ backgroundColor, icon, children, ...otherProps }: BannerProps): react_jsx_runtime.JSX.Element;
1066
- Body: ({ children }: {
1067
- children?: ReactNode;
1068
- }) => react_jsx_runtime.JSX.Element;
1069
- RightGutter: ({ verticalAlign, children }: {
1070
- children?: ReactNode;
1071
- verticalAlign?: string;
1072
- }) => react_jsx_runtime.JSX.Element;
1073
- Title: ({ children }: {
1074
- children?: ReactNode;
1075
- }) => react_jsx_runtime.JSX.Element;
1076
- displayName: string;
1077
- };
1078
-
1079
- type Gap = {
1080
- column: number | string;
1081
- row: number | string;
1082
- };
1083
- type BoxProps = ComponentPropsWithoutRef<'div'> & {
1084
- /**
1085
- * Specifies how the browser distributes space between and around
1086
- * items along the cross-axis of their container; has no effect on
1087
- * single line flexible boxes
1088
- */
1089
- alignContent?: 'around' | 'between' | 'center' | 'end' | 'start' | 'stretch';
1090
- /**
1091
- * Specifies how the browser distributes space between and around
1092
- * items along the cross-axis of their container; the difference
1093
- * to the alignContent prop is that alignItems specifies the
1094
- * alignment of the items within the current container's line,
1095
- * whereas alignContent specifies the alignment of the lines themselves
1096
- */
1097
- alignItems?: 'baseline' | 'center' | 'end' | 'start' | 'stretch';
1098
- /**
1099
- * Specifies how the browser aligns items of the current line, overriding the
1100
- * alignItems value of parent; if any of the item's cross-axis margin is set to auto,
1101
- * then alignSelf is ignored
1102
- *
1103
- * *Note: only works for nested `<Box />`*
1104
- */
1105
- alignSelf?: 'auto' | 'baseline' | 'center' | 'end' | 'start' | 'stretch';
1106
- /**
1107
- * Specifies the initial main size of an item
1108
- *
1109
- * *Note: only works for nested `<Box />`*
1110
- */
1111
- basis?: number | string;
1112
- /**
1113
- * Pass an arbitrary child node
1114
- */
1115
- children?: ReactNode;
1116
- /**
1117
- * Specifies the main axis of the container
1118
- */
1119
- direction?: 'column-reverse' | 'column' | 'row-reverse' | 'row';
1120
- /**
1121
- * Specifies whether the width and/or height should fill the container
1122
- */
1123
- fill?: boolean | 'horizontal' | 'vertical';
1124
- /**
1125
- * Specifies whether the width and/or height should fill the viewport
1126
- */
1127
- fillViewport?: boolean | 'horizontal' | 'vertical';
1128
- /**
1129
- * Specifies the gaps (gutters) between rows and columns
1130
- */
1131
- gap?: Gap | number | string;
1132
- /**
1133
- * Specifies what amount of space inside the flex container the item should take up
1134
- *
1135
- * *Note: only works for nested `<Box />`*
1136
- */
1137
- grow?: number;
1138
- /**
1139
- * Make Layout behave like an inline element but still lay out its content according to flexbox model
1140
- */
1141
- inline?: boolean;
1142
- /**
1143
- * Specifies how the browser distributes space between and around
1144
- * items along the main axis of their container
1145
- */
1146
- justifyContent?: 'around' | 'between' | 'center' | 'end' | 'evenly' | 'start';
1147
- /**
1148
- * Specifies the order used to lay out an item in its container. Items within the same
1149
- * container are rendered in ascending order according to their order values.
1150
- * Elements with the _same_ order value are rendered in the order in which they appear in code
1151
- *
1152
- * *Note: only works for nested `<Box />`*
1153
- */
1154
- order?: number | 'inherit' | 'initial' | 'unset';
1155
- /**
1156
- * The DOM tag to use for the element
1157
- */
1158
- renderAs?: keyof JSX.IntrinsicElements;
1159
- /**
1160
- * Specifies how items will shrink inside the container when the default size of
1161
- * items is larger than their container
1162
- *
1163
- * *Note: only works for nested `<Box />`*
1164
- */
1165
- shrink?: number;
1166
- /**
1167
- * Specifies whether items are forced into a single line or can be wrapped onto multiple lines
1168
- */
1169
- wrapItems?: boolean;
1170
- };
1171
- declare const Box: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1172
- /**
1173
- * Specifies how the browser distributes space between and around
1174
- * items along the cross-axis of their container; has no effect on
1175
- * single line flexible boxes
1176
- */
1177
- alignContent?: "around" | "between" | "center" | "end" | "start" | "stretch";
1178
- /**
1179
- * Specifies how the browser distributes space between and around
1180
- * items along the cross-axis of their container; the difference
1181
- * to the alignContent prop is that alignItems specifies the
1182
- * alignment of the items within the current container's line,
1183
- * whereas alignContent specifies the alignment of the lines themselves
1184
- */
1185
- alignItems?: "baseline" | "center" | "end" | "start" | "stretch";
1186
- /**
1187
- * Specifies how the browser aligns items of the current line, overriding the
1188
- * alignItems value of parent; if any of the item's cross-axis margin is set to auto,
1189
- * then alignSelf is ignored
1190
- *
1191
- * *Note: only works for nested `<Box />`*
1192
- */
1193
- alignSelf?: "auto" | "baseline" | "center" | "end" | "start" | "stretch";
1194
- /**
1195
- * Specifies the initial main size of an item
1196
- *
1197
- * *Note: only works for nested `<Box />`*
1198
- */
1199
- basis?: number | string;
1200
- /**
1201
- * Pass an arbitrary child node
1202
- */
1203
- children?: ReactNode;
1204
- /**
1205
- * Specifies the main axis of the container
1206
- */
1207
- direction?: "column-reverse" | "column" | "row-reverse" | "row";
1208
- /**
1209
- * Specifies whether the width and/or height should fill the container
1210
- */
1211
- fill?: boolean | "horizontal" | "vertical";
1212
- /**
1213
- * Specifies whether the width and/or height should fill the viewport
1214
- */
1215
- fillViewport?: boolean | "horizontal" | "vertical";
1216
- /**
1217
- * Specifies the gaps (gutters) between rows and columns
1218
- */
1219
- gap?: Gap | number | string;
1220
- /**
1221
- * Specifies what amount of space inside the flex container the item should take up
1222
- *
1223
- * *Note: only works for nested `<Box />`*
1224
- */
1225
- grow?: number;
1226
- /**
1227
- * Make Layout behave like an inline element but still lay out its content according to flexbox model
1228
- */
1229
- inline?: boolean;
1230
- /**
1231
- * Specifies how the browser distributes space between and around
1232
- * items along the main axis of their container
1233
- */
1234
- justifyContent?: "around" | "between" | "center" | "end" | "evenly" | "start";
1235
- /**
1236
- * Specifies the order used to lay out an item in its container. Items within the same
1237
- * container are rendered in ascending order according to their order values.
1238
- * Elements with the _same_ order value are rendered in the order in which they appear in code
1239
- *
1240
- * *Note: only works for nested `<Box />`*
1241
- */
1242
- order?: number | "inherit" | "initial" | "unset";
1243
- /**
1244
- * The DOM tag to use for the element
1245
- */
1246
- renderAs?: keyof JSX.IntrinsicElements;
1247
- /**
1248
- * Specifies how items will shrink inside the container when the default size of
1249
- * items is larger than their container
1250
- *
1251
- * *Note: only works for nested `<Box />`*
1252
- */
1253
- shrink?: number;
1254
- /**
1255
- * Specifies whether items are forced into a single line or can be wrapped onto multiple lines
1256
- */
1257
- wrapItems?: boolean;
1258
- } & react.RefAttributes<HTMLDivElement>>;
1259
-
1260
- type TextAlignValues = 'center' | 'left' | 'right';
1261
- type ButtonProps = ComponentPropsWithRef<'button'> & {
1262
- /**
1263
- * Text that appears inside of the button *THIS WILL OVERRIDE THE LABEL PROP*
1264
- */
1265
- children?: ReactNode;
1266
- /**
1267
- * Allows user to override default button colors
1268
- */
1269
- colorOverride?: string;
1270
- /**
1271
- * Disables button
1272
- */
1273
- disabled?: boolean;
1274
- /**
1275
- * @ignore
1276
- * Force a button into a particular css state (for debugging)
1277
- */
1278
- forceState?: 'active' | 'focus' | 'hover' | undefined;
1279
- /**
1280
- * Is the button full-width?
1281
- */
1282
- fullWidth?: boolean;
1283
- /**
1284
- * An SVG component
1285
- */
1286
- icon?: ReactNode;
1287
- /**
1288
- * The "type" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*
1289
- */
1290
- iconName?: keyof typeof iconMap;
1291
- /**
1292
- * Should the icon appear at the start of the button or the end?
1293
- */
1294
- iconPosition?: 'end' | 'start';
1295
- /**
1296
- * Show a spinner when the button is in a loading state
1297
- */
1298
- isLoading?: boolean;
1299
- /**
1300
- * Text that appears inside the button
1301
- */
1302
- label?: string;
1303
- /**
1304
- * Should the label wrap if the button container is too narrow to fit the label text on one line
1305
- * @deprecated Apply white-space styling as needed
1306
- */
1307
- labelWrap?: boolean;
1308
- /**
1309
- * Provides a button without any styling (useful for wrapping another element)
1310
- */
1311
- noStyle?: boolean;
1312
- /**
1313
- * Callback function invoked when the button is clicked
1314
- */
1315
- onClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
1316
- /**
1317
- * The size of button to display
1318
- */
1319
- size?: 'lg' | 'md' | 'sm';
1320
- /**
1321
- * If true then rounded corners will be squared
1322
- */
1323
- square?: boolean;
1324
- /**
1325
- * Alignment of the button label
1326
- */
1327
- textAlign?: TextAlignValues;
1328
- /**
1329
- * The type of button element that should be rendered
1330
- */
1331
- type?: 'button' | 'reset' | 'submit';
1332
- /**
1333
- * The visual type of button to display
1334
- */
1335
- variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';
1336
- };
1337
- declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1338
-
1339
- type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
1340
- /**
1341
- * Align buttons to the left or right of their container
1342
- */
1343
- align?: 'center' | 'left' | 'right';
1344
- /**
1345
- * Buttons that will be rendered in grouping
1346
- */
1347
- children?: ReactNode;
1348
- /**
1349
- * Force ButtonGroup to fill the width of it's container
1350
- */
1351
- fullWidth?: boolean;
1352
- };
1353
- declare const ButtonGroup: {
1354
- ({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
1355
- displayName: string;
1356
- };
1357
-
1358
- type ButtonLinkProps = ComponentPropsWithRef<'a'> & {
1359
- /**
1360
- * A Promise to invoke before navigating to location.
1361
- * _Caution: if used with `external` type prop a new window will **not** be opened_
1362
- */
1363
- beforeAction?: (() => Promise<void>) | (() => void);
1364
- /**
1365
- * The content that will be rendered inside the button
1366
- */
1367
- children?: ReactNode;
1368
- /**
1369
- * Option CSS color string
1370
- */
1371
- colorOverride?: string;
1372
- /**
1373
- * Disables Link
1374
- */
1375
- disabled?: boolean;
1376
- /**
1377
- * @ignore
1378
- * Force a Link into a particular css state (for debugging)
1379
- */
1380
- forceState?: 'active' | 'focus' | 'hover';
1381
- /**
1382
- * Is the button full-width?
1383
- */
1384
- fullWidth?: boolean;
1385
- /**
1386
- * The entity to link to (url, email address, telephone number)
1387
- */
1388
- href: string;
1389
- /**
1390
- * An SVG component
1391
- */
1392
- icon?: ReactNode;
1393
- /**
1394
- * The "type" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*
1395
- */
1396
- iconName?: keyof typeof iconMap;
1397
- /**
1398
- * Should the icon appear at the start of the button or the end?
1399
- */
1400
- iconPosition?: 'end' | 'start';
1401
- /**
1402
- * Text that appears inside the button
1403
- */
1404
- label?: string;
1405
- /**
1406
- * Should the label wrap if the button container is too narrow to fit the label text on one line
1407
- */
1408
- labelWrap?: boolean;
1409
- /**
1410
- * An object that will be converted into a search parameter string and appended to
1411
- * the `to` prop value
1412
- */
1413
- params?: Record<string, string>;
1414
- /**
1415
- * The size of button to display
1416
- */
1417
- size?: 'lg' | 'md' | 'sm';
1418
- /**
1419
- * If true, rounded corners are disabled
1420
- */
1421
- square?: boolean;
1422
- /**
1423
- * Alignment of the button label
1424
- */
1425
- textAlign?: TextAlignValues;
1426
- /**
1427
- * Type of link to display
1428
- *
1429
- * * `email` creates a mailto
1430
- * * `phone` creates a telephone number
1431
- * * `external` will open links in a new window
1432
- */
1433
- type?: 'default' | 'email' | 'external' | 'phone';
1434
- /**
1435
- * The visual type of button to display
1436
- */
1437
- variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';
1438
- };
1439
- /**
1440
- * The `ButtonLink` component is useful for getting the functionality of a
1441
- * `Link` with the styling of a `Button`.
1442
- *
1443
- * A useful heuristic for using this component: Do you have an `href`? Some of the advantages are having a right-click
1444
- * context menu available opening a new tab, and copying the URL.
1445
- *
1446
- * **Note:** the props table below is incomplete; please
1447
- * refer to [Link](?path=/docs/link--link-stories) for additional props.
1448
- */
1449
- declare const ButtonLink: react.ForwardRefExoticComponent<Omit<ButtonLinkProps, "ref"> & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
1450
-
1451
- type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
1452
- /**
1453
- * Indicates the state of the checkbox
1454
- */
1455
- checked?: boolean;
1456
- /**
1457
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
1458
- */
1459
- direction?: 'column' | 'row';
1460
- /**
1461
- * Disables checkbox
1462
- */
1463
- disabled?: boolean;
1464
- /**
1465
- * @ignore
1466
- * Force a Checkbox into a particular css state (for debugging)
1467
- */
1468
- forceState?: 'focus' | 'hover';
1469
- /**
1470
- * Indicates that there is an error with the input
1471
- */
1472
- hasError?: boolean;
1473
- /**
1474
- * Provides an ID for the checkbox
1475
- */
1476
- id?: string;
1477
- /**
1478
- * The label for the checkbox
1479
- */
1480
- label?: JSX.Element | string | undefined;
1481
- /**
1482
- * The description for the checkbox
1483
- */
1484
- labelDescription?: JSX.Element | string | undefined;
1485
- /**
1486
- * Should match the ID attribute of the checkbox.
1487
- * Can be used to group together multiple checkboxes
1488
- */
1489
- name?: string;
1490
- /**
1491
- * Callback function invoked when the checkbox value changes
1492
- */
1493
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
1494
- /**
1495
- * Make Input a required element
1496
- */
1497
- required?: boolean;
1498
- /**
1499
- * The value attribute of the checkbox
1500
- */
1501
- value?: string;
1502
- };
1503
- declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLLabelElement>>;
1504
-
1505
- type CheckboxPropsWithName = Omit<CheckboxProps, 'name'> & {
1506
- name: string;
1507
- };
1508
- type CheckboxGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
1509
- /**
1510
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
1511
- */
1512
- direction?: 'column' | 'row';
1513
- /**
1514
- * Whether CheckboxGroup is disabled
1515
- */
1516
- disabled?: boolean;
1517
- /**
1518
- * Error message to be displayed
1519
- */
1520
- error?: string | undefined;
1521
- /**
1522
- * The label for the form field
1523
- */
1524
- label?: JSX.Element | string | undefined;
1525
- /**
1526
- * The hint/helper text under the label
1527
- */
1528
- labelDescription?: JSX.Element | string | undefined;
1529
- /**
1530
- * Props that are passed through to the underlying `<Label>` component
1531
- */
1532
- labelProps?: {
1533
- disabled?: boolean;
1534
- screenReaderOnly?: boolean;
1535
- };
1536
- /**
1537
- * Name of the form element
1538
- */
1539
- name: string;
1540
- /**
1541
- * Callback function invoked when the value changes
1542
- */
1543
- onChange?: (event: ChangeEvent<HTMLInputElement>, name: string) => unknown;
1544
- /**
1545
- * Array of checkbox attributes
1546
- */
1547
- options: CheckboxPropsWithName[];
1548
- /**
1549
- * Currently selected checkbox value
1550
- */
1551
- value?: string[] | boolean | undefined;
1552
- };
1553
- declare const CheckboxGroup: {
1554
- ({ direction, disabled, error, label, labelDescription, labelProps, name, onChange, options, value, ...otherProps }: CheckboxGroupProps): JSX.Element;
1555
- displayName: string;
1556
- };
1557
-
1558
- type ClickAreaProps = ComponentPropsWithRef<'div'> & {
1559
- /**
1560
- * Supply an element or Component to render as the root compoennt (default is div)
1561
- */
1562
- renderAs?: ElementType;
1563
- /**
1564
- * The content within the clickarea
1565
- */
1566
- children: ReactNode;
1567
- /**
1568
- * If provided, this click event happens instead of the target ref's click event
1569
- */
1570
- onClick?: (event: Event) => void;
1571
- /**
1572
- * A ref to the element within chldren that will be used as the target of the click event
1573
- * Should typically be a button or link
1574
- */
1575
- targetRef: RefObject<HTMLElement | null>;
1576
- };
1577
- /**
1578
- * ClickArea is useful when you want an entire element to be clickable, such as a card or an item in a list. Making the
1579
- * entire element clickable provides a better click target for users, especially on mobile devices. The problem with this is
1580
- * clickable divs are not accessible or tabbable. Using a `button` or `a` tag causes both styling and screenreader problems.
1581
- *
1582
- * To solve these issues, `ClickArea` maps a click event on the container element to a click event on a button or link within
1583
- * it, via a ref. Assistive devices can utilize the target element and ignore the container element's click property.
1584
- *
1585
- * ClickArea also makes having interactive elements within the clickable container easier. For example, if you have a card element
1586
- * that is clickable but with a "close" button in the top right, include `event.preventDefault()` in the close button's click handler
1587
- * to prevent the container's click handler from firing.
1588
- *
1589
- */
1590
- declare const ClickArea: react.ForwardRefExoticComponent<Omit<ClickAreaProps, "ref"> & react.RefAttributes<HTMLElement>>;
1591
-
1592
- type CloseButtonProps = ComponentPropsWithoutRef<'button'> & {
1593
- /**
1594
- * Callback function invoked when the button is clicked
1595
- */
1596
- onClick?: () => void;
1597
- };
1598
- declare const CloseButton: {
1599
- ({ onClick, ...otherProps }: CloseButtonProps): JSX.Element;
1600
- displayName: string;
1601
- };
1602
-
1603
- declare const VARIANT_BRAND_BLUE = "brandblue";
1604
- declare const CARET_DIRECTION_UP = "up";
1605
- declare const CARET_DIRECTION_DOWN = "down";
1606
- declare const CARET_DIRECTION_LEFT = "left";
1607
- declare const CARET_DIRECTION_RIGHT = "right";
1608
- type CollapsibleGroupProps = {
1609
- /**
1610
- * Slot for adjacent options
1611
- */
1612
- actions?: ReactNode;
1613
- /**
1614
- * Custom background color
1615
- */
1616
- backgroundColor?: string;
1617
- /**
1618
- * Custom direction of the caret when open or closed
1619
- */
1620
- caretDirection?: {
1621
- closed: typeof CARET_DIRECTION_DOWN | typeof CARET_DIRECTION_LEFT | typeof CARET_DIRECTION_RIGHT | typeof CARET_DIRECTION_UP;
1622
- open: typeof CARET_DIRECTION_DOWN | typeof CARET_DIRECTION_LEFT | typeof CARET_DIRECTION_RIGHT | typeof CARET_DIRECTION_UP;
1623
- };
1624
- /**
1625
- * Toggleable contents
1626
- */
1627
- children?: ReactNode;
1628
- /**
1629
- * Optional CSS padding to be applied to the content container
1630
- */
1631
- contentPadding?: string | null;
1632
- /**
1633
- * The control has a caret by default. Set this to true to suppress the caret
1634
- */
1635
- hideCaret?: boolean;
1636
- /**
1637
- * Optional ID attribute
1638
- */
1639
- id?: string;
1640
- /**
1641
- * Control the initial open state. If not provided, the default is to start closed.
1642
- */
1643
- isOpen?: boolean;
1644
- /**
1645
- * Clickable text label for the control, or perhaps an inline editable
1646
- * control? Whatever suits you */
1647
- label?: ReactNode | (({ open, caret }: {
1648
- open: boolean;
1649
- caret: JSX.Element;
1650
- }) => ReactNode);
1651
- /**
1652
- * Choose on which side the caret shows
1653
- */
1654
- layout?: 'leading' | 'trailing';
1655
- /**
1656
- * Callback function invoked when the button is clicked
1657
- */
1658
- onClick?: () => unknown;
1659
- /**
1660
- * Callback function invoked when the open state changes
1661
- */
1662
- onOpenChange?: (newOpen: boolean) => unknown;
1663
- /**
1664
- * Extra actions are hidden by default and shown on hover. Set this to false
1665
- * to make always visible
1666
- */
1667
- showActionsOnHover?: boolean;
1668
- /**
1669
- * Display the open / close transition animation
1670
- */
1671
- showTransition?: boolean;
1672
- /**
1673
- * Changes the styling of the collapsible group banner when active
1674
- */
1675
- variant?: typeof VARIANT_BRAND_BLUE;
1676
- };
1677
- declare const CollapsibleGroup: {
1678
- ({ actions, backgroundColor, caretDirection, children, contentPadding, hideCaret, id, isOpen, label, layout, onOpenChange, showActionsOnHover, showTransition, variant, ...otherProps }: CollapsibleGroupProps): react_jsx_runtime.JSX.Element;
1679
- displayName: string;
1680
- };
1681
-
1682
- type DividerProps = ComponentPropsWithoutRef<'hr'> & {
1683
- /**
1684
- * Allows user to override default divider color
1685
- */
1686
- colorOverride?: string;
1687
- /**
1688
- * Height (in pixels) of divider
1689
- */
1690
- height?: number;
1691
- /**
1692
- * The visual type of divider to display
1693
- */
1694
- variant?: 'dashed' | 'solid';
1695
- };
1696
- declare const Divider: {
1697
- ({ colorOverride, height, variant, ...otherProps }: DividerProps): JSX.Element;
1698
- displayName: string;
1699
- };
1700
-
1701
- declare const ellipsisStyle: styled_components.RuleSet<object>;
1702
- declare const ellipsisFlexParentStyle: styled_components.RuleSet<object>;
1703
- type EllipsisProps = ComponentPropsWithoutRef<'div'> & {
1704
- /**
1705
- * The text that will be truncated with an ellipsis
1706
- */
1707
- children?: ReactNode;
1708
- /**
1709
- * The number that will be truncated with an ellipsis
1710
- */
1711
- lines?: number;
1712
- };
1713
- declare const Ellipsis: {
1714
- ({ children, lines, ...otherProps }: EllipsisProps): JSX.Element;
1715
- displayName: string;
1716
- };
1717
-
1718
- type FileSelectProps = {
1719
- /**
1720
- * Allowlist of file types that the server will accept
1721
- * (see: <a href="https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-accept">file input docs</a>)
1722
- */
1723
- accept: string;
1724
- /**
1725
- * Pass an arbitrary child node
1726
- */
1727
- children: ReactNode;
1728
- /**
1729
- * Disable the input. <em>Note: Does not "disable" the child component, only the hidden input</em>
1730
- */
1731
- disabled?: boolean;
1732
- /**
1733
- * ID of the input
1734
- */
1735
- id: string;
1736
- /**
1737
- * File size limit specified in MB
1738
- */
1739
- maxSize?: number;
1740
- /**
1741
- * Allow multiple files to be selected
1742
- */
1743
- multiple?: boolean;
1744
- /**
1745
- * Name of the input
1746
- */
1747
- name?: string;
1748
- /**
1749
- * Callback invoked when file has been selected
1750
- */
1751
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
1752
- /**
1753
- * Callback invoked when the file input is clicked (before the file has been selected)
1754
- */
1755
- onClick?: (...args: unknown[]) => unknown;
1756
- /**
1757
- * Callback invoked when there is an error selecting file(s)
1758
- */
1759
- onError?: (error: Error) => void;
1760
- };
1761
- declare const FileSelect: react.ForwardRefExoticComponent<FileSelectProps & react.RefAttributes<HTMLInputElement>>;
1762
-
1763
- type ValuesType = Record<string, unknown>;
1764
- type Values = Record<string, unknown>;
1765
- type FormState = FormikProps<Values>;
1766
- type FormProps = {
1767
- /**
1768
- * Pass an arbitrary child node
1769
- */
1770
- children?: ReactNode;
1771
- /**
1772
- * Class(es) to be applied to formik container
1773
- */
1774
- className?: string;
1775
- /**
1776
- * Unique ID for Form, used for React Testing Library
1777
- */
1778
- formId: string;
1779
- /**
1780
- * Ref required to be ref of FormGlobalError. Simply assign `const globalErrorRef = useRef(null)`. Either a function or the instance of a DOM native element.
1781
- */
1782
- globalErrorRef: RefObject<HTMLElement | null | undefined>;
1783
- /**
1784
- * Form input values on initial load, often populated from server
1785
- */
1786
- initialValues: ValuesType;
1787
- /**
1788
- * Ref to access the form's state and API
1789
- */
1790
- innerRef?: Ref<FormState>;
1791
- /**
1792
- * On-submit callback
1793
- */
1794
- onSubmit: (values: Record<string, unknown>, ref: FormikHelpers<Values>) => unknown;
1795
- /**
1796
- * On form submission with errors (isValid=false), scroll to GlobalError section
1797
- */
1798
- scrollToFormErrorsOnSubmit?: boolean;
1799
- /**
1800
- * On-validate callback, params include values, and the rest of the form state params available in [Formik](https://jaredpalmer.com/formik/docs/api/formik#props-1)
1801
- */
1802
- shareFormContext?: (props: FormikProps<Values>) => unknown;
1803
- /**
1804
- * Show a top-level rundown of all the errors in the form
1805
- */
1806
- showGlobalError?: boolean;
1807
- /**
1808
- * Style object applied to Form component
1809
- */
1810
- style?: Record<string, string>;
1811
- /**
1812
- * Should form submit when an input's onChange is invoked?
1813
- */
1814
- submitOnChange?: boolean;
1815
- /**
1816
- * Validate function passed to formik
1817
- */
1818
- validate?: (values: Values) => Promise<FormikErrors<Values>> | object | void;
1819
- /**
1820
- * Should form run validate function on form blur?
1821
- */
1822
- validateOnBlur?: boolean;
1823
- /**
1824
- * Should form run validate function on form change?
1825
- */
1826
- validateOnChange?: boolean;
1827
- /**
1828
- * __[`yup` schema](https://github.com/jquense/yup#yup)__
1829
- */
1830
- validationSchema?: ValidationSchemaType;
1831
- };
1832
- type ValidationSchemaType = {
1833
- fields: Record<string, unknown>;
1834
- };
1835
- declare const Form: {
1836
- ({ children, className, formId, initialValues, onSubmit, scrollToFormErrorsOnSubmit, shareFormContext, style, submitOnChange, validate, validateOnBlur, validateOnChange, validationSchema, globalErrorRef, showGlobalError, innerRef, }: FormProps): react_jsx_runtime.JSX.Element;
1837
- displayName: string;
1838
- };
1839
-
1840
- type ButtonsType = {
1841
- [key: string]: unknown;
1842
- name: string;
1843
- type?: 'button' | 'reset' | 'submit' | undefined;
1844
- };
1845
- type FormButtonsProps = {
1846
- /**
1847
- * Align button left (typically on a page) or right (typically on a modal).
1848
- */
1849
- align?: 'left' | 'right';
1850
- /**
1851
- * Each button object must have a name, but can also be passed any props that apply to a Button component.
1852
- */
1853
- buttons: ButtonsType[];
1854
- };
1855
- declare const FormButtons: {
1856
- ({ buttons, align, ...props }: FormButtonsProps): JSX.Element;
1857
- displayName: string;
1858
- };
1859
-
1860
- type CustomComponentClass = {
1861
- field: {
1862
- name: string;
1863
- value?: unknown;
1864
- };
1865
- form: {
1866
- errors?: Record<string, string> | undefined;
1867
- setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;
1868
- values?: Record<string, string> | undefined;
1869
- };
1870
- };
1871
-
1872
- type NodeElementObject = {
1873
- attributes?: Record<string, string>;
1874
- children?: NodeLeafObject[];
1875
- type?: string;
1876
- url?: string;
1877
- };
1878
- type NodeObject = NodeElementObject | NodeLeafObject;
1879
- type NodeLeafObject = {
1880
- attributes?: Record<string, string>;
1881
- bold?: boolean;
1882
- code?: boolean;
1883
- italic?: boolean;
1884
- parent?: NodeObject;
1885
- children?: NodeLeafObject[];
1886
- strikethrough?: boolean;
1887
- text?: string;
1888
- type?: string;
1889
- url?: string;
1890
- underline?: boolean;
1891
- };
1892
- type CustomEditor = BaseEditor & HistoryEditor & ReactEditor;
1893
- declare module 'slate' {
1894
- interface CustomTypes {
1895
- Editor: CustomEditor;
1896
- Element: NodeElementObject;
1897
- Text: NodeLeafObject;
1898
- }
1899
- }
1900
-
1901
- declare const rteFormatTypes: Readonly<{
1902
- BOLD: "BOLD";
1903
- ITALIC: "ITALIC";
1904
- UNDERLINE: "UNDERLINE";
1905
- STRIKETHROUGH: "STRIKETHROUGH";
1906
- HEADING_1: "HEADING_1";
1907
- HEADING_2: "HEADING_2";
1908
- BLOCKQUOTE: "BLOCKQUOTE";
1909
- NUMBERED_LIST: "NUMBERED_LIST";
1910
- BULLETED_LIST: "BULLETED_LIST";
1911
- LINK: "LINK";
1912
- IMAGE: "IMAGE";
1913
- }>;
1914
-
1915
- type FormFieldProps = Omit<ComponentPropsWithRef<'input'>, 'placeholder'> & {
1916
- /**
1917
- * A custom component that acts as a field and that needs access to Formik fields
1918
- */
1919
- customComponent?: ComponentClass<CustomComponentClass> | ((arg?: ComponentProps<typeof Field>) => ReactNode) | ((arg?: Record<string, unknown>) => ReactNode) | undefined;
1920
- /**
1921
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
1922
- */
1923
- direction?: 'column' | 'row';
1924
- /**
1925
- * Disables form field
1926
- */
1927
- disabled?: boolean;
1928
- /**
1929
- * Only takes effect if type is richTextEditor. An array of formats that should be enabled in the toolbar.
1930
- */
1931
- enabledFormats?: (keyof typeof rteFormatTypes)[];
1932
- /**
1933
- * Visual label above the input
1934
- */
1935
- label?: JSX.Element | string | undefined;
1936
- /**
1937
- * The hint/helper text under the label
1938
- */
1939
- labelDescription?: ReactNode;
1940
- /**
1941
- * Props that are passed through to the underlying `<Label>` component
1942
- */
1943
- labelProps?: {
1944
- disabled?: boolean;
1945
- screenReaderOnly?: boolean;
1946
- };
1947
- /**
1948
- * HTML "name" attribute. Also needs to be unique in the form
1949
- */
1950
- name?: string;
1951
- /**
1952
- * Custom onChange callback add-on. args: "value"
1953
- */
1954
- onChangeCustom?: (value: string) => unknown;
1955
- /**
1956
- * Options passed down to the `<Field>` component
1957
- */
1958
- options?: Record<string, unknown>[];
1959
- /**
1960
- * Input's visual placeholder text
1961
- */
1962
- placeholder?: string | null | undefined;
1963
- /**
1964
- * Allows user to vertically or horizontally resize the form field, or to disable resizing altogether
1965
- */
1966
- resize?: 'horizontal' | 'none' | 'vertical';
1967
- /**
1968
- * The type of the field sets the type of input or select, texarea, radio, checkbox, etc.
1969
- */
1970
- type: 'checkbox' | 'custom' | 'email' | 'hidden' | 'multiline' | 'number' | 'password' | 'radio' | 'richTextEditor' | 'select' | 'text' | 'url';
1971
- };
1972
- declare const FormField: react.ForwardRefExoticComponent<Omit<FormFieldProps, "ref"> & react.RefAttributes<unknown>>;
1973
-
1974
- type FormFieldErrorProps = ComponentPropsWithoutRef<'div'> & {
1975
- children?: ReactNode | undefined;
1976
- };
1977
- declare const FormFieldError: {
1978
- ({ children, ...otherProps }: FormFieldErrorProps): JSX.Element | null;
1979
- displayName: string;
1980
- };
1981
-
1982
- declare const FormGlobalError: react.ForwardRefExoticComponent<react.RefAttributes<HTMLDivElement>>;
1983
-
1984
- type FullScreenModalProps = {
1985
- /**
1986
- * Color of the modal background
1987
- */
1988
- backgroundColor?: string;
1989
- /**
1990
- * Contents of the modal
1991
- */
1992
- content: (hide: () => unknown) => ReactNode;
1993
- /**
1994
- * Render the modal initially in shown state
1995
- */
1996
- initialShownState?: boolean;
1997
- /**
1998
- * Callback invoked before the modal is hidden
1999
- */
2000
- onBeforeHide?: (() => OnBeforeHideInterface) | undefined;
2001
- /**
2002
- * Callback invoked when the modal is shown
2003
- */
2004
- onHide?: () => unknown;
2005
- /**
2006
- * function(show, ref) that returns a node to open the modal
2007
- */
2008
- toggle?: ((show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode) | undefined;
2009
- };
2010
- declare const FullScreenModal: {
2011
- ({ content, toggle, backgroundColor, initialShownState, onBeforeHide, onHide, }: FullScreenModalProps): react_jsx_runtime.JSX.Element;
2012
- displayName: string;
2013
- };
2014
-
2015
- declare const iconSizeMap: {
2016
- sm: string;
2017
- md: string;
2018
- lg: string;
2019
- xl: string;
2020
- xxl: string;
2021
- };
2022
- type IconProps = ComponentPropsWithoutRef<'svg'> & {
2023
- /**
2024
- * Color (as hex) of the Icon
2025
- */
2026
- color?: string;
2027
- /**
2028
- * The size of the icon to display
2029
- */
2030
- size?: keyof typeof iconSizeMap;
2031
- /**
2032
- * @ignore
2033
- */
2034
- style?: Record<string, unknown>;
2035
- /**
2036
- * Determines which icon to display
2037
- */
2038
- type: IconNameType;
2039
- };
2040
- declare const Icon: {
2041
- ({ color, size, style, type, ...otherProps }: IconProps): JSX.Element;
2042
- displayName: string;
2043
- };
2044
-
2045
- declare const sizeMap: {
2046
- sm: string;
2047
- md: string;
2048
- lg: string;
2049
- };
2050
- declare const componentStyleMap: {
2051
- light: string;
2052
- dark: string;
2053
- };
2054
- type sizeType = keyof typeof sizeMap;
2055
- type componentStyleType = keyof typeof componentStyleMap;
2056
- type IconButtonProps = ComponentPropsWithRef<'button'> & {
2057
- /**
2058
- * Allows user to override default button colors
2059
- */
2060
- colorOverride?: string | undefined;
2061
- /**
2062
- * Choose light styles if this component appears on a dark background
2063
- */
2064
- componentStyle?: componentStyleType;
2065
- /**
2066
- * Disables button
2067
- */
2068
- disabled?: boolean;
2069
- /**
2070
- * An SVG component
2071
- */
2072
- icon?: ReactNode;
2073
- /**
2074
- * Text that appears as a tooltip when the user hovers over the button
2075
- */
2076
- label?: string;
2077
- /**
2078
- * Callback function invoked when the button is clicked
2079
- */
2080
- onClick?: ((event: MouseEvent) => void) | undefined;
2081
- /**
2082
- * Prevent a Tooltip from appearing on hover
2083
- */
2084
- preventTooltip?: boolean;
2085
- /**
2086
- * The size of the button
2087
- */
2088
- size?: sizeType;
2089
- /**
2090
- * The direction of the tooltip
2091
- */
2092
- tooltipDirection?: 'bottom' | 'left' | 'right' | 'top';
2093
- };
2094
- declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
2095
-
2096
- type ImageProps = ComponentPropsWithoutRef<'img'> & {
2097
- /**
2098
- * Accessible text to apply to the image
2099
- */
2100
- alt: string;
2101
- /**
2102
- * Specifies whether the width and/or height should fill the container
2103
- *
2104
- * *Note: this will override height/width attributes*
2105
- */
2106
- fill?: boolean | 'horizontal' | 'vertical';
2107
- /**
2108
- * Specifies how the image's intrinsic size (ie. its natural size) should
2109
- * be adjusted to fit within its container
2110
- */
2111
- fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
2112
- /**
2113
- * Indicates how the browser should load the image; `eager`loads the image immediately,
2114
- * `lazy` defers loading the image until it reaches a calculated distance from the viewport.
2115
- * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
2116
- */
2117
- loading?: 'eager' | 'lazy';
2118
- /**
2119
- * Specifies how the image will align itself in its container
2120
- */
2121
- position?: string;
2122
- /**
2123
- * URL to image file
2124
- */
2125
- src: string;
2126
- };
2127
- declare const Image: {
2128
- ({ src, alt, fill: fillContainer, fit: objFit, loading, position: objPosition, ...otherProps }: ImageProps): JSX.Element;
2129
- displayName: string;
2130
- };
2131
-
2132
- type IconPositionStrings = 'end' | 'start';
2133
- type ForcedStateStrings = 'active' | 'focus' | 'hover';
2134
- type InputProps = ComponentPropsWithRef<'input'> & {
2135
- /**
2136
- * Copy-to-clipboard-on-click of input's value with copy icon
2137
- */
2138
- clickToCopy?: boolean;
2139
- /**
2140
- * Disables Input
2141
- */
2142
- disabled?: boolean | undefined;
2143
- /**
2144
- * @ignore
2145
- * Force an Input into a particular css state (for debugging)
2146
- */
2147
- forceState?: ForcedStateStrings;
2148
- /**
2149
- * Should Input occupy 100% of available space
2150
- */
2151
- fullWidth?: boolean;
2152
- /**
2153
- * Indicates that there is an error with the input
2154
- */
2155
- hasError?: boolean;
2156
- /**
2157
- * An SVG component that will appear on the right-hand side of the input
2158
- * _Note:_ some input types will apply a icon by default
2159
- */
2160
- icon?: ReactNode;
2161
- /**
2162
- * Indicates on which side of the input the icon should render. Will default to `end` unless the `type` prop is `search`.
2163
- */
2164
- iconPosition?: IconPositionStrings;
2165
- /**
2166
- * @ignore
2167
- * This is a prop that is here for use by FormField. Otherwise,
2168
- * the ref prop should just be used
2169
- */
2170
- innerRef?: RefObject<HTMLInputElement | null>;
2171
- /**
2172
- * Displays text in monospace font
2173
- */
2174
- monospace?: boolean;
2175
- /**
2176
- * Callback function invoked when the input focus blurs
2177
- */
2178
- onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
2179
- /**
2180
- * Callback function invoked when the input value changes
2181
- */
2182
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
2183
- /**
2184
- * Callback function invoked when the input value is copied
2185
- */
2186
- onClickToCopy?: () => void;
2187
- /**
2188
- * Callback function invoked when the input is focused
2189
- */
2190
- onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
2191
- /**
2192
- * Callback function that will select input text when input is focused;
2193
- * receives event object but if that is not needed just pass a no-op function
2194
- */
2195
- onFocusToSelect?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2196
- /**
2197
- * A short hint for the user about what value the Input expects
2198
- */
2199
- placeholder?: string | undefined;
2200
- /**
2201
- * Prevent the Input from being writable (different styling from disabled)
2202
- */
2203
- readOnly?: boolean;
2204
- /**
2205
- * Make Input a required element
2206
- */
2207
- required?: boolean;
2208
- /**
2209
- * The type of Input to render
2210
- */
2211
- type?: HTMLInputTypeAttribute;
2212
- /**
2213
- * The content of Input
2214
- */
2215
- value?: number | string | undefined;
2216
- };
2217
- declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
2218
-
2219
- 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';
2220
- type ModifierKeys = 'Alt' | 'Cmd' | 'Ctrl' | 'Meta' | 'Option' | 'Shift';
2221
- type WhitespaceKeys = 'Enter' | 'Space' | 'Tab';
2222
- type ArrowKeys = 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp';
2223
- type KeyboardKeys = AlphanumericKeyboardKeys | ArrowKeys | ModifierKeys | WhitespaceKeys | '?' | 'Backspace' | 'Esc';
2224
-
2225
- type KeyboardShortcutProps = ComponentPropsWithoutRef<'div'> & {
2226
- /**
2227
- * @description The visual style of the keyboard shortcut. Choose light if the background is dark and dark if the background is light.
2228
- */
2229
- componentStyle?: 'dark' | 'light';
2230
- /**
2231
- * @description If set to true, the keyboard shortcut will stretch the full width of its container.
2232
- */
2233
- fullWidth?: boolean;
2234
- /**
2235
- * @description The keys displayed.
2236
- */
2237
- keyboardKeys: KeyboardKeys | KeyboardKeys[];
2238
- /**
2239
- * @description A visual label for the keyboard shortcut.
2240
- */
2241
- label?: string;
2242
- };
2243
- declare const KeyboardShortcut: {
2244
- ({ label, keyboardKeys, fullWidth, componentStyle, ...otherProps }: KeyboardShortcutProps): JSX.Element;
2245
- displayName: string;
2246
- };
2247
-
2248
- type LabelProps = ComponentPropsWithoutRef<'label'> & {
2249
- /**
2250
- * Pass an arbitrary child node
2251
- */
2252
- children?: ReactNode;
2253
- /**
2254
- * To indicate that the label is for a disabled form component
2255
- */
2256
- disabled?: boolean;
2257
- /**
2258
- * ID of the form component that the label should be associated with
2259
- */
2260
- htmlFor?: string | undefined;
2261
- /**
2262
- * To use 'legend', 'p', 'span', or other instead of 'label'
2263
- */
2264
- renderAs?: 'div' | 'label' | 'legend' | 'p' | 'span' | undefined;
2265
- /**
2266
- * Use if label describes a required form component
2267
- */
2268
- required?: boolean;
2269
- /**
2270
- * For label text that needs to be available to assistive technology (e.g. screen readers)
2271
- * but otherwise hidden on screen.
2272
- */
2273
- screenReaderOnly?: boolean;
2274
- };
2275
- declare const Label: {
2276
- ({ renderAs, children, disabled, htmlFor, required, screenReaderOnly, ...otherProps }: LabelProps): JSX.Element;
2277
- displayName: string;
2278
- };
2279
-
2280
- type LabelDescriptionProps = ComponentPropsWithoutRef<'div'> & {
2281
- children: ReactNode;
2282
- disabled?: boolean;
2283
- };
2284
- declare const LabelDescription: {
2285
- ({ children, disabled, ...otherProps }: LabelDescriptionProps): JSX.Element;
2286
- displayName: string;
2287
- };
2288
-
2289
- type LinkButtonProps = ComponentPropsWithoutRef<'button'> & {
2290
- /**
2291
- * Pass an arbitrary child node
2292
- */
2293
- children?: ReactNode;
2294
- /**
2295
- * Disables Button
2296
- */
2297
- disabled?: boolean;
2298
- /**
2299
- * @ignore
2300
- * Force a Button into a particular css state (for debugging)
2301
- */
2302
- forceState?: 'active' | 'focus' | 'hover';
2303
- /**
2304
- * Text that appears inside the button
2305
- */
2306
- label?: string;
2307
- /**
2308
- * Provides a button without any styling (useful for wrapping another element)
2309
- */
2310
- noStyle?: boolean;
2311
- /**
2312
- * Callback function invoked when the button is clicked
2313
- */
2314
- onClick?: (event: KeyboardEvent$1 | MouseEvent) => void;
2315
- /**
2316
- * Will only display an underline when the Link is in a hover state
2317
- */
2318
- underlineOnHover?: boolean;
2319
- /**
2320
- * The visual type of Button to display
2321
- */
2322
- variant?: 'primary' | 'secondary';
2323
- };
2324
- declare const LinkButton: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2325
- /**
2326
- * Pass an arbitrary child node
2327
- */
2328
- children?: ReactNode;
2329
- /**
2330
- * Disables Button
2331
- */
2332
- disabled?: boolean;
2333
- /**
2334
- * @ignore
2335
- * Force a Button into a particular css state (for debugging)
2336
- */
2337
- forceState?: "active" | "focus" | "hover";
2338
- /**
2339
- * Text that appears inside the button
2340
- */
2341
- label?: string;
2342
- /**
2343
- * Provides a button without any styling (useful for wrapping another element)
2344
- */
2345
- noStyle?: boolean;
2346
- /**
2347
- * Callback function invoked when the button is clicked
2348
- */
2349
- onClick?: (event: KeyboardEvent$1 | MouseEvent) => void;
2350
- /**
2351
- * Will only display an underline when the Link is in a hover state
2352
- */
2353
- underlineOnHover?: boolean;
2354
- /**
2355
- * The visual type of Button to display
2356
- */
2357
- variant?: "primary" | "secondary";
2358
- } & react.RefAttributes<HTMLSpanElement>>;
2359
-
2360
- type VariantType = 'breadcrumbs' | 'bullets' | 'commas' | 'ordered' | 'slashes' | 'spaces' | 'unbulleted';
2361
- type ItemType = ItemType[] | string[] | string;
2362
- type ListProps = ComponentPropsWithoutRef<'ul'> & {
2363
- /**
2364
- * Children should be wrapped in `<ListItem>`
2365
- */
2366
- children?: ReactNode;
2367
- /**
2368
- * As an alternative to passing children you can supply an array of strings that
2369
- * will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.
2370
- */
2371
- items?: ItemType[];
2372
- /**
2373
- * The kind of list to render
2374
- */
2375
- variant?: VariantType;
2376
- };
2377
- declare const List: {
2378
- ({ children, items, variant, ...otherProps }: ListProps): JSX.Element | null;
2379
- displayName: string;
2380
- };
2381
-
2382
- type ListItemProps = {
2383
- /**
2384
- * Pass an arbitrary child node
2385
- */
2386
- children?: ReactNode;
2387
- };
2388
- declare const ListItem: {
2389
- ({ children }: ListItemProps): JSX.Element | null;
2390
- displayName: string;
2391
- };
2392
-
2393
- type ControlledMenuProps = {
2394
- /** Is the menu open. Must be used with `onOpenChange`. */
2395
- isOpen: boolean;
2396
- /** When an attempt to toggle the menu is triggered,
2397
- * must be used with `isOpen`.
2398
- */
2399
- onOpenChange: (isOpen: boolean) => void;
2400
- };
2401
- type UncontrolledMenuProps = {
2402
- isOpen?: never;
2403
- onOpenChange?: never;
2404
- };
2405
- type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
2406
- type DefaultMenuProps = DropdownMenuProps & MenuControlProps & {
2407
- /** The position of the Menu */
2408
- align?: 'center' | 'end' | 'start';
2409
- children: ReactNode;
2410
- /** Callback for when the user clicks or focuses outside of the menu */
2411
- onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
2412
- /** Props to pass to the trigger component, the default trigger is Button */
2413
- triggerProps?: ButtonProps;
2414
- };
2415
- type MenuPropsWithLabel = DefaultMenuProps & {
2416
- /** The label for the trigger element */
2417
- label: string;
2418
- trigger?: never;
2419
- };
2420
- type MenuPropsWithCustomTrigger = DefaultMenuProps & {
2421
- label?: never;
2422
- /** Replace the default trigger */
2423
- trigger: JSX.Element;
2424
- };
2425
- type MenuProps = MenuPropsWithCustomTrigger | MenuPropsWithLabel;
2426
- declare const Menu: {
2427
- ({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
2428
- displayName: string;
2429
- };
2430
-
2431
- type MenuItemPropsWithLabelDescription = {
2432
- href?: string;
2433
- badge?: ReactNode;
2434
- children?: never;
2435
- label: ReactNode | string;
2436
- description?: ReactNode | string;
2437
- icon?: ReactNode;
2438
- indicator?: ReactNode;
2439
- renderAs?: ElementType;
2440
- target?: HTMLAnchorElement['target'];
2441
- variant?: 'dangerous' | 'pricing' | 'primary';
2442
- };
2443
- type MenuItemPropsWithChildren = {
2444
- href?: string;
2445
- children: ReactNode | string;
2446
- badge?: never;
2447
- label?: never;
2448
- description?: never;
2449
- icon?: never;
2450
- indicator?: ReactNode;
2451
- renderAs?: ElementType;
2452
- target?: HTMLAnchorElement['target'];
2453
- variant?: 'dangerous' | 'pricing' | 'primary';
2454
- };
2455
- type MenuItemProps = DropdownMenuItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
2456
- type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
2457
- type RadioMenuItemProps = DropdownMenuRadioItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
2458
- declare const MenuItem: ({ children, label, description, badge, icon, renderAs, href, target, variant, ...props }: MenuItemProps) => react_jsx_runtime.JSX.Element;
2459
- declare const CheckboxMenuItem: ({ children, label, description, badge, icon, indicator, ...props }: CheckboxMenuItemProps) => react_jsx_runtime.JSX.Element;
2460
- declare const RadioMenuItem: ({ children, label, badge, description, icon, indicator, ...props }: RadioMenuItemProps) => react_jsx_runtime.JSX.Element;
2461
-
2462
- type MenuLabelProps = {
2463
- children: ReactNode | string;
2464
- };
2465
- declare const MenuLabel: ({ children, ...props }: MenuLabelProps) => react_jsx_runtime.JSX.Element;
2466
-
2467
- type SubMenuProps = {
2468
- label: string;
2469
- children: ReactNode;
2470
- icon?: ReactNode;
2471
- description?: ReactNode;
2472
- };
2473
- declare const SubMenu: ({ label, icon, description, children }: SubMenuProps) => react_jsx_runtime.JSX.Element;
2474
-
2475
- type MenuButtonProps = ButtonProps & {
2476
- /**
2477
- * Disables button
2478
- */
2479
- disabled?: boolean;
2480
- /**
2481
- * Use this prop to pass an IconButton as the "trigger" instead of a standard Button
2482
- */
2483
- iconButtonComponent?: JSX.Element | ReactElement;
2484
- /**
2485
- * Text that appears inside the button
2486
- */
2487
- label: string;
2488
- /**
2489
- * Which side of the button should the menu be aligned
2490
- */
2491
- menuAlignment?: 'left' | 'right';
2492
- /**
2493
- * An array of Button/Link components
2494
- */
2495
- menuItems?: JSX.Element[];
2496
- /**
2497
- * Where should the menu appear relative to the button
2498
- */
2499
- menuPosition?: 'above' | 'below';
2500
- /**
2501
- * Can be a CSS width value string, 'fullWidth' or 'maxItem' (sized to the largest item width)
2502
- */
2503
- menuWidth?: string;
2504
- /**
2505
- * Function that is called after the menu is closed
2506
- */
2507
- onMenuClosed?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
2508
- /**
2509
- * Function that is called when the menu button is clicked
2510
- */
2511
- onMenuClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
2512
- /**
2513
- * A custom node to be displayed in the menu on extra small screens.
2514
- */
2515
- overrideMenuHeader?: ReactNode;
2516
- /**
2517
- * The size of button to display
2518
- */
2519
- size?: 'lg' | 'md' | 'sm';
2520
- };
2521
- /**
2522
- * @deprecated Please use Menu with a Button trigger, see [documentation](https://wistia.github.io/vhs/?path=/docs-components-menu--docs).
2523
- *
2524
- * #### Why MenuButton is being deprecated
2525
- *
2526
- * The [Menu](https://wistia.github.io/vhs/?path=/docs-components-menu--docs) component is preferred over MenuButton for several reasons:
2527
- * 1. Menu has better alignment and collision detection.
2528
- * 2. Menu supports submenus.
2529
- * 3. Menu is properly portalled.
2530
- */
2531
- declare const MenuButton: {
2532
- ({ label, menuAlignment, menuItems, menuPosition, menuWidth, onMenuClick, onMenuClosed, disabled, iconButtonComponent, overrideMenuHeader, size, ...otherProps }: MenuButtonProps): JSX.Element;
2533
- displayName: string;
2534
- };
2535
-
2536
- type ModalProps = ComponentPropsWithoutRef<'div'> & {
2537
- /**
2538
- * Horizontally align modal to the left, center, or right of the container
2539
- */
2540
- alignHorizontal?: 'center' | 'left' | 'normal' | 'right';
2541
- /**
2542
- * Vertically align modal to the top, center, or bottom of the container
2543
- */
2544
- alignVertical?: 'bottom' | 'center' | 'normal' | 'top';
2545
- /**
2546
- * Whether or not the modal should be allowed to exceed the viewport bounds.
2547
- * If it exceeds the bounds, the entire backdrop will be scrollable.
2548
- */
2549
- allowModalToExceedViewportBounds?: boolean;
2550
- /**
2551
- * Contents of the modal
2552
- */
2553
- children?: ReactNode;
2554
- /**
2555
- * Class to be applied to the base element of the modal
2556
- */
2557
- className?: string;
2558
- /**
2559
- * Whether or not the modal should take up the full height of the viewport
2560
- */
2561
- fullHeight?: boolean;
2562
- /**
2563
- * Ref to the element that should receive focus when the modal opens
2564
- */
2565
- initialFocusRef?: RefObject<HTMLElement | null>;
2566
- /**
2567
- * Whether or not the modal is open, and should be rendered
2568
- */
2569
- isOpen: boolean;
2570
- /**
2571
- * When the Modal is dismissed, this function will be called. You'll typically want to set the
2572
- * state of `isOpen` to false here
2573
- * @returns
2574
- */
2575
- onRequestClose?: () => void;
2576
- /**
2577
- * Whether or not the modal should be closed when the user clicks outside of it
2578
- * @default true
2579
- */
2580
- shouldCloseOnClickOutside?: boolean;
2581
- /**
2582
- * Whether or not the modal should trap focus within itself
2583
- *
2584
- */
2585
- shouldTrapFocus?: boolean;
2586
- /** The base width to apply to the Modal */
2587
- width?: string;
2588
- /**
2589
- * The overflow behavior to apply to the modal
2590
- * @default 'auto'
2591
- */
2592
- overflow?: 'auto' | 'clip' | 'hidden' | 'scroll' | 'visible';
2593
- };
2594
- declare const Modal: {
2595
- (props: ModalProps): JSX.Element;
2596
- displayName: string;
2597
- };
2598
-
2599
- declare const ModalHeader: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2600
- declare const ModalBody: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2601
- declare const ModalFooter: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2602
- type ModalCloseButtonProps = {
2603
- /**
2604
- * Callback invoked when the button is clicked
2605
- */
2606
- onClick?: (event: MouseEvent) => void;
2607
- };
2608
- declare const ModalCloseButton: ({ onClick, ...props }: ModalCloseButtonProps) => JSX.Element;
2609
-
2610
- type PaperProps = ComponentPropsWithoutRef<'div'> & {
2611
- /**
2612
- * The content within Paper component
2613
- */
2614
- children: ReactNode;
2615
- /**
2616
- * The "elevation" level of the Paper component
2617
- */
2618
- elevation?: 0 | 1 | 2 | undefined;
2619
- };
2620
- declare const Paper: {
2621
- ({ children, elevation, ...otherProps }: PaperProps): JSX.Element;
2622
- displayName: string;
2623
- };
2624
-
2625
- type ProgressBarProps = ComponentPropsWithoutRef<'div'> & {
2626
- /**
2627
- * Whether the progress bar has a label
2628
- */
2629
- hasLabel?: boolean;
2630
- /**
2631
- * Current numeric level of the progress (0 -> 1)
2632
- */
2633
- progress?: number;
2634
- /**
2635
- * Allows user to override default progress bar label colors
2636
- */
2637
- labelColorOverride?: string;
2638
- /**
2639
- * Allows user to override default progress bar meter background colors
2640
- */
2641
- meterBgColorOverride?: string;
2642
- /**
2643
- * Allows user to override default colors
2644
- */
2645
- colorOverride?: string;
2646
- };
2647
- declare const ProgressBar: {
2648
- ({ hasLabel, progress, colorOverride, labelColorOverride, meterBgColorOverride, ...otherProps }: ProgressBarProps): JSX.Element;
2649
- displayName: string;
2650
- };
2651
-
2652
- type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'value'> & {
2653
- /**
2654
- * Indicates the state of the radio
2655
- */
2656
- checked?: boolean;
2657
- /**
2658
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
2659
- */
2660
- direction?: 'column' | 'row';
2661
- /**
2662
- * Disables input
2663
- */
2664
- disabled?: boolean;
2665
- /**
2666
- * @ignore // I don't know what to do with this
2667
- * Force a Radio into a particular css state (for debugging)
2668
- */
2669
- forceState?: 'focus' | 'hover';
2670
- /**
2671
- * Indicates that there is an error with the input
2672
- */
2673
- hasError?: boolean;
2674
- /**
2675
- * Provides an ID for the input
2676
- */
2677
- id?: string;
2678
- /**
2679
- * The label for the input
2680
- */
2681
- label: JSX.Element | string;
2682
- /**
2683
- * The description for the input
2684
- */
2685
- labelDescription?: JSX.Element | string | undefined;
2686
- /**
2687
- * Should match the ID attribute of the radio.
2688
- * Can be used to group together multiple radios
2689
- */
2690
- name?: string;
2691
- /**
2692
- * Callback function invoked when the value changes
2693
- */
2694
- onChange?: (event: ChangeEvent) => unknown;
2695
- /**
2696
- * The value attribute of the input
2697
- */
2698
- value?: string;
2699
- };
2700
- declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value"> & {
2701
- /**
2702
- * Indicates the state of the radio
2703
- */
2704
- checked?: boolean;
2705
- /**
2706
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
2707
- */
2708
- direction?: "column" | "row";
2709
- /**
2710
- * Disables input
2711
- */
2712
- disabled?: boolean;
2713
- /**
2714
- * @ignore // I don't know what to do with this
2715
- * Force a Radio into a particular css state (for debugging)
2716
- */
2717
- forceState?: "focus" | "hover";
2718
- /**
2719
- * Indicates that there is an error with the input
2720
- */
2721
- hasError?: boolean;
2722
- /**
2723
- * Provides an ID for the input
2724
- */
2725
- id?: string;
2726
- /**
2727
- * The label for the input
2728
- */
2729
- label: JSX.Element | string;
2730
- /**
2731
- * The description for the input
2732
- */
2733
- labelDescription?: JSX.Element | string | undefined;
2734
- /**
2735
- * Should match the ID attribute of the radio.
2736
- * Can be used to group together multiple radios
2737
- */
2738
- name?: string;
2739
- /**
2740
- * Callback function invoked when the value changes
2741
- */
2742
- onChange?: (event: ChangeEvent) => unknown;
2743
- /**
2744
- * The value attribute of the input
2745
- */
2746
- value?: string;
2747
- } & react.RefAttributes<HTMLLabelElement>>;
2748
-
2749
- type RadioGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
2750
- /**
2751
- * Should the radio buttons be displayed vertically as a column or horizontally as a row
2752
- */
2753
- direction?: 'column' | 'row';
2754
- /**
2755
- * Whether RadioGroup is disabled
2756
- */
2757
- disabled?: boolean;
2758
- /**
2759
- * Error message to be displayed
2760
- */
2761
- error?: string | undefined;
2762
- /**
2763
- * The label for the form field
2764
- */
2765
- label?: JSX.Element | string | null | undefined;
2766
- /**
2767
- * The hint/helper text under the label
2768
- */
2769
- labelDescription?: JSX.Element | string | undefined;
2770
- /**
2771
- * Props that are passed through to the underlying `<Label>` component
2772
- */
2773
- labelProps?: {
2774
- disabled?: boolean;
2775
- screenReaderOnly?: boolean;
2776
- };
2777
- /**
2778
- * Should match the ID attribute of the radio. Can be used to group together multiple radios
2779
- */
2780
- name: string;
2781
- /**
2782
- * Fires on checking or unchecking radios in group
2783
- */
2784
- onChange?: (event: ChangeEvent, value: RadioProps['value']) => unknown;
2785
- /**
2786
- * Array of radios attributes
2787
- */
2788
- options: Pick<RadioProps, 'disabled' | 'label' | 'labelDescription' | 'value'>[];
2789
- /**
2790
- * Currently selected radio value
2791
- */
2792
- value?: string | undefined;
2793
- };
2794
- declare const RadioGroup: {
2795
- ({ direction, disabled, error, label, labelDescription, labelProps, name, onChange, options, value, ...otherProps }: RadioGroupProps): JSX.Element;
2796
- displayName: string;
2797
- };
2798
-
2799
- type DateRangeType = {
2800
- start: Date;
2801
- end: Date;
2802
- };
2803
-
2804
- type Preset = {
2805
- label?: string;
2806
- value: {
2807
- end: Date;
2808
- start: Date;
2809
- };
2810
- tooltipText?: string;
2811
- };
2812
- type RangeSelectorProps = {
2813
- /**
2814
- * Align the popup to the left or the right of the tigger button
2815
- */
2816
- align?: 'left' | 'right';
2817
- /**
2818
- * The variant to be passed to the button component
2819
- */
2820
- buttonVariant?: 'input' | 'primary' | 'secondary' | 'tertiary';
2821
- /**
2822
- * The earliest selectable date
2823
- */
2824
- earliestDate?: Date;
2825
- /**
2826
- * The latest selectable date
2827
- */
2828
- latestDate?: Date;
2829
- /**
2830
- * Text to display in the footer
2831
- */
2832
- footerText?: JSX.Element | string;
2833
- /**
2834
- * A function that receives a date range object and returns a string to be rendered in the
2835
- * trigger button
2836
- */
2837
- format?: (dataRange: DateRangeType) => JSX.Element | string;
2838
- /**
2839
- * Callback fired when the date range changes
2840
- */
2841
- onChange?: (dateRange: DateRangeType) => unknown;
2842
- presets?: Preset[];
2843
- /**
2844
- * The date range to be displayed in the picker
2845
- */
2846
- range?: DateRangeType;
2847
- /**
2848
- * Prevent dates in the future from being selected
2849
- */
2850
- shouldPreventFuture?: boolean;
2851
- /**
2852
- * If true, the button will take up the full width of its container
2853
- */
2854
- fullWidth?: boolean;
2855
- /**
2856
- * A custom width for the RangeSelector component (in px, %, or other CSS units)
2857
- */
2858
- width?: number | string;
2859
- /**
2860
- * A custom React component to use as the trigger button. The component should accept onClick,
2861
- * children, and other standard button props.
2862
- */
2863
- customTriggerComponent?: ComponentType<Record<string, any>>;
2864
- };
2865
- declare const RangeSelector: {
2866
- ({ align, buttonVariant, earliestDate, latestDate, format, fullWidth, footerText, onChange, presets, range, shouldPreventFuture, customTriggerComponent, width, ...props }: RangeSelectorProps): JSX.Element;
2867
- displayName: string;
2868
- };
2869
-
2870
- type RichTextEditorProps = {
2871
- /**
2872
- * Optional id to set aria-labelledby
2873
- */
2874
- ariaLabelledBy?: string | undefined;
2875
- /**
2876
- * @ignore
2877
- */
2878
- 'data-testid'?: string;
2879
- /**
2880
- * Determines whether editor is clickable/read-only
2881
- */
2882
- disabled?: boolean;
2883
- /**
2884
- * Formats to enable in editor, restricted to rteFormatTypes
2885
- */
2886
- enabledFormats?: (keyof typeof rteFormatTypes)[];
2887
- /**
2888
- * Function to be called after editor state update
2889
- */
2890
- onChange?: ((value: NodeElementObject[]) => void) | undefined;
2891
- /**
2892
- * Function to be called when editor loses focus
2893
- */
2894
- onBlur?: ((value: NodeElementObject[]) => void) | undefined;
2895
- /**
2896
- * Placeholder text
2897
- */
2898
- placeholder?: string;
2899
- /**
2900
- * Value of editor based on controlled input
2901
- */
2902
- value?: Descendant[];
2903
- /**
2904
- * Whether to update the editor when the value prop changes
2905
- */
2906
- useExternalValue: boolean;
2907
- /**
2908
- * Custom height of editor
2909
- */
2910
- height?: string | undefined;
2911
- };
2912
- declare const RichTextEditor: {
2913
- ({ enabledFormats, value, onChange, onBlur, placeholder, disabled, ariaLabelledBy, useExternalValue, "data-testid": dataTestId, height, ...otherProps }: RichTextEditorProps): JSX.Element;
2914
- displayName: string;
2915
- };
2916
-
2917
- declare const rteSerializeToHTML: (value: Descendant[]) => string | null;
2918
- declare const rteDeserializeHTML: (htmlString: string) => (Descendant | string | null)[] | Descendant | string | null | undefined;
2919
-
2920
- declare const screenReaderOnlyStyle: styled_components.RuleSet<object>;
2921
- type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
2922
- /**
2923
- * Pass an arbitrary child node
2924
- */
2925
- children?: ReactNode;
2926
- /**
2927
- * Display content _only_ when it's focused.
2928
- */
2929
- focusable?: boolean;
2930
- /**
2931
- * The text that will appear to screenreaders but not be displayed on screen
2932
- * (alternatively you can pass children)
2933
- */
2934
- text?: ReactNode;
2935
- };
2936
- declare const ScreenReaderOnly: {
2937
- ({ text, children, focusable, ...otherProps }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
2938
- displayName: string;
2939
- };
2940
-
2941
- type GroupOptionType = {
2942
- disabled?: boolean;
2943
- groupLabel?: string;
2944
- groupOptions: OptionType[];
2945
- };
2946
- type OptionType = {
2947
- disabled?: boolean;
2948
- label?: string;
2949
- value?: boolean | number | string;
2950
- };
2951
- type OptionsType = GroupOptionType[] | OptionType[];
2952
- type SelectProps = Omit<ComponentPropsWithRef<'select'>, 'placeholder'> & {
2953
- /**
2954
- * Optional accessible label for when there is no accompanying <label> element
2955
- */
2956
- ariaLabel?: string;
2957
- /**
2958
- * Disables Select
2959
- */
2960
- disabled?: boolean;
2961
- /**
2962
- * @ignore
2963
- * Force a Select into a particular css state (for debugging)
2964
- */
2965
- forceState?: 'active' | 'focus' | 'hover';
2966
- /**
2967
- * Should Select occupy 100% of available space
2968
- */
2969
- fullWidth?: boolean;
2970
- /**
2971
- * Indicates that there is an error with the Select
2972
- */
2973
- hasError?: boolean;
2974
- /**
2975
- * Change option's label name from "label"
2976
- */
2977
- labelName?: string;
2978
- /**
2979
- * Allow multiple options in the list to be selected at the same time
2980
- */
2981
- multiple?: boolean;
2982
- /**
2983
- * Data structure to populate option labels & values. (`{ label, value, disabled }`)
2984
- * Additionally this can be used to render option groupings. (`{ groupLabel, groupOptions, disabled }`)
2985
- */
2986
- options: OptionsType;
2987
- /**
2988
- * Value of text to appear by default as first option in Select, use `null` for none
2989
- */
2990
- placeholder?: string | null | undefined;
2991
- /**
2992
- * Prevent the placeholder value from being selected
2993
- */
2994
- preventPlaceholderSelection?: boolean;
2995
- /**
2996
- * Make Select a required element
2997
- */
2998
- required?: boolean;
2999
- /**
3000
- * Change option's value name from "value"
3001
- */
3002
- valueName?: string;
3003
- };
3004
- declare const Select: react.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & react.RefAttributes<HTMLSelectElement>>;
3005
-
3006
- type ComponentPropsWithoutRefWithoutOnChange = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'>;
3007
- type SliderProps = ComponentPropsWithoutRefWithoutOnChange & {
3008
- /**
3009
- * aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb.
3010
- * The length of the array must match the number of thumbs in the value array.
3011
- */
3012
- ariaLabel?: string[] | string | undefined;
3013
- /**
3014
- * aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label.
3015
- * Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.
3016
- */
3017
- ariaLabelledby?: string[] | string | undefined;
3018
- /**
3019
- *
3020
- */
3021
- ariaValuetext?: string | ((state: Record<string, unknown>) => unknown);
3022
- /**
3023
- * @ignore
3024
- */
3025
- 'data-testid'?: string;
3026
- /**
3027
- * Determines the initial position(s) of the thumb(s) and the number of thumbs.
3028
- *
3029
- * If a number is passed a slider with one thumb will be rendered.
3030
- * If an array is passed each value will determine the position of one thumb.
3031
- * The values in the array must be sorted.
3032
- *
3033
- * Don't pass a default value if the slider is controlled (i.e. if you already
3034
- * use the `value` prop).
3035
- */
3036
- initialValue?: number[] | number | undefined;
3037
- /**
3038
- * If `true` the thumbs can't be moved.
3039
- */
3040
- disabled?: boolean;
3041
- /**
3042
- * The maximum value of the slider.
3043
- */
3044
- max?: number;
3045
- /**
3046
- * The minimum value of the slider.
3047
- */
3048
- min?: number;
3049
- /**
3050
- * Callback called on every value change. The function will be called with two arguments,
3051
- * the first being the new value(s) the second being thumb index. **It does not return an event.**
3052
- */
3053
- onChange?: (value: number, index?: number) => unknown;
3054
- /**
3055
- * Value to be added or subtracted on each step the slider makes. Must be greater than zero.
3056
- * max - min should be evenly divisible by the step value.
3057
- */
3058
- step?: number;
3059
- /**
3060
- * Like 'initialValue' but for controlled components.
3061
- */
3062
- value?: number[] | number;
3063
- };
3064
- declare const Slider: {
3065
- ({ ariaLabel, ariaLabelledby, ariaValuetext, disabled, initialValue, max, min, onChange, step, value, "data-testid": passedDataTestId, ...otherProps }: SliderProps): JSX.Element;
3066
- displayName: string;
3067
- };
3068
-
3069
- type StackProps<T extends ElementType> = ComponentPropsWithoutRef<T> & PropsWithChildren & {
3070
- /**
3071
- * The gap between each item in the stack. Should be one of the spacing values from the theme
3072
- */
3073
- gap?: keyof DefaultTheme['spacing'];
3074
- /**
3075
- * Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
3076
- * The default behavior is `vertical`.
3077
- */
3078
- direction?: 'horizontal' | 'vertical';
3079
- /**
3080
- * The element (e.g. div, span, p) or component to render as the root element.
3081
- */
3082
- renderAs?: T | 'div';
3083
- };
3084
- declare const Stack: react.ForwardRefExoticComponent<Omit<StackProps<ElementType>, "ref"> & react.RefAttributes<HTMLDivElement>>;
3085
-
3086
- type SwitchProps = Omit<ComponentPropsWithoutRef<'button'>, 'onChange'> & {
3087
- /**
3088
- * Allows user to override default "on" color
3089
- */
3090
- colorOverride?: string;
3091
- /**
3092
- * Controls the `aria-disabled` property of the Switch
3093
- */
3094
- disabled?: boolean;
3095
- /**
3096
- * Determines if switch is checked
3097
- */
3098
- isChecked?: boolean;
3099
- /**
3100
- * Callback function invoked when the switch checked state changes
3101
- */
3102
- onChange?: (isChecked: boolean) => unknown;
3103
- /**
3104
- * Controls wether or not the ON / OFF text is shown
3105
- */
3106
- hideText?: boolean;
3107
- };
3108
- declare const Switch: {
3109
- ({ disabled, isChecked, onChange, colorOverride, hideText, ...otherProps }: SwitchProps): JSX.Element;
3110
- displayName: string;
3111
- };
3112
-
3113
- declare const alignMap: {
3114
- left: string;
3115
- right: string;
3116
- center: string;
3117
- justify: string;
3118
- };
3119
- declare const renderMap: {
3120
- h1: string;
3121
- h2: string;
3122
- h3: string;
3123
- h4: string;
3124
- h5: string;
3125
- h6: string;
3126
- div: string;
3127
- label: string;
3128
- p: string;
3129
- pre: string;
3130
- span: string;
3131
- };
3132
- declare const variantStyleMap: {
3133
- headline1: styled_components.RuleSet<object>;
3134
- headline2: styled_components.RuleSet<object>;
3135
- headline3: styled_components.RuleSet<object>;
3136
- overline: styled_components.RuleSet<object>;
3137
- body1: styled_components.RuleSet<object>;
3138
- body2: styled_components.RuleSet<object>;
3139
- caption: styled_components.RuleSet<object>;
3140
- subtitle1: styled_components.RuleSet<object>;
3141
- subtitle2: styled_components.RuleSet<object>;
3142
- monospace: styled_components.RuleSet<object>;
3143
- };
3144
- type TextProps = ComponentPropsWithoutRef<'div'> & {
3145
- /**
3146
- * The horizontal alignment
3147
- * <br />
3148
- * _Note: this only affects block elements_
3149
- */
3150
- align?: keyof typeof alignMap;
3151
- /**
3152
- * Displays text as bold type
3153
- */
3154
- bold?: boolean;
3155
- /**
3156
- * Pass an arbitrary child node
3157
- */
3158
- children?: ReactNode | undefined;
3159
- /**
3160
- * Allows user to override default button colors
3161
- */
3162
- colorOverride?: string;
3163
- /**
3164
- * Used to indicate text is part of a "disabled" UI
3165
- */
3166
- disabled?: boolean;
3167
- /**
3168
- * Attempt to keep the text to a single line by truncating with an ellipsis
3169
- * <br />
3170
- * _Note: this only affects block elements_
3171
- */
3172
- ellipsis?: boolean;
3173
- /**
3174
- * Display the text as inline content
3175
- */
3176
- inline?: boolean;
3177
- /**
3178
- * Displays text as italic type
3179
- */
3180
- italic?: boolean;
3181
- /**
3182
- * Prevents text from being highlighted and copied
3183
- */
3184
- preventUserSelect?: boolean;
3185
- /**
3186
- * The type of html element to render as
3187
- */
3188
- renderAs?: keyof typeof renderMap;
3189
- /**
3190
- * The text style to display
3191
- */
3192
- variant?: keyof typeof variantStyleMap;
3193
- };
3194
- declare const Text: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3195
- /**
3196
- * The horizontal alignment
3197
- * <br />
3198
- * _Note: this only affects block elements_
3199
- */
3200
- align?: keyof typeof alignMap;
3201
- /**
3202
- * Displays text as bold type
3203
- */
3204
- bold?: boolean;
3205
- /**
3206
- * Pass an arbitrary child node
3207
- */
3208
- children?: ReactNode | undefined;
3209
- /**
3210
- * Allows user to override default button colors
3211
- */
3212
- colorOverride?: string;
3213
- /**
3214
- * Used to indicate text is part of a "disabled" UI
3215
- */
3216
- disabled?: boolean;
3217
- /**
3218
- * Attempt to keep the text to a single line by truncating with an ellipsis
3219
- * <br />
3220
- * _Note: this only affects block elements_
3221
- */
3222
- ellipsis?: boolean;
3223
- /**
3224
- * Display the text as inline content
3225
- */
3226
- inline?: boolean;
3227
- /**
3228
- * Displays text as italic type
3229
- */
3230
- italic?: boolean;
3231
- /**
3232
- * Prevents text from being highlighted and copied
3233
- */
3234
- preventUserSelect?: boolean;
3235
- /**
3236
- * The type of html element to render as
3237
- */
3238
- renderAs?: keyof typeof renderMap;
3239
- /**
3240
- * The text style to display
3241
- */
3242
- variant?: keyof typeof variantStyleMap;
3243
- } & react.RefAttributes<HTMLElement>>;
3244
-
3245
- type IconThumbnailProps = {
3246
- /**
3247
- * The desired display of the thumbnail, either wide or square
3248
- */
3249
- thumbnailImageType?: never;
3250
- /**
3251
- * The URL of the thumbnail image to display
3252
- */
3253
- thumbnailUrl?: never;
3254
- /**
3255
- * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
3256
- */
3257
- icon: IconNameType;
3258
- /**
3259
- * The color of the icon
3260
- */
3261
- iconColor?: string;
3262
- };
3263
- type ImageThumbnailProps = {
3264
- /**
3265
- * The desired display of the thumbnail, either wide or square
3266
- */
3267
- thumbnailImageType?: 'square' | 'wide' | undefined;
3268
- /**
3269
- * The URL of the thumbnail image to display
3270
- */
3271
- thumbnailUrl: string[] | string | null;
3272
- /**
3273
- * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
3274
- */
3275
- icon?: never;
3276
- /**
3277
- * The color of the icon
3278
- */
3279
- iconColor?: never;
3280
- };
3281
- type ThumbnailProps = ComponentPropsWithoutRef<'div'> & {
3282
- /**
3283
- * Text that displays in the bottom right hand corner of the thumbnail, usually the media duration
3284
- */
3285
- bottomRightText?: string;
3286
- /**
3287
- * Icon to display in bottom right corner of the thumbnail
3288
- */
3289
- bottomRightIcon?: IconNameType;
3290
- /**
3291
- * The type of gradient to show either behind the icon or when there is no thumbnail image
3292
- */
3293
- gradientBackground?: GradientNameType;
3294
- /**
3295
- * Width of the thumbnail. By default, the thumbnail will grow to fit its container.
3296
- */
3297
- width?: string;
3298
- } & (IconThumbnailProps | ImageThumbnailProps);
3299
- declare const Thumbnail: {
3300
- ({ bottomRightText, thumbnailUrl, thumbnailImageType, icon, bottomRightIcon, width, gradientBackground, iconColor, ...otherProps }: ThumbnailProps): JSX.Element;
3301
- displayName: string;
3302
- };
3303
-
3304
- type ThumbnailCollageProps = {
3305
- /**
3306
- * An array of image urls to show in the thumbnail. Supports up to 3 images
3307
- */
3308
- thumbnailUrls: string[];
3309
- /**
3310
- * The type of gradient to show when there are no thumbnail urls
3311
- */
3312
- gradientBackground?: GradientNameType;
3313
- };
3314
- declare const ThumbnailCollage: ({ thumbnailUrls, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
3315
-
3316
- type ToastVariants = 'dangerous' | 'error' | 'success' | 'warning';
3317
- type ToastProps = ComponentPropsWithoutRef<'div'> & {
3318
- /**
3319
- * A function that will be invoked when the action button is clicked instead of the internal handler
3320
- */
3321
- actionInterceptor?: (() => void) | undefined;
3322
- /**
3323
- * The text of the "action" button on the right
3324
- */
3325
- actionLabel?: string | undefined;
3326
- /**
3327
- * A hex value that will override the color values defined by `variant`
3328
- */
3329
- colorOverride?: string | undefined;
3330
- /**
3331
- * @ignore
3332
- * Avoids animation and positions Toast in normal flow for documentation/testing purposes
3333
- */
3334
- renderInPlace?: boolean;
3335
- /**
3336
- * Determines whether Toast is displayed
3337
- */
3338
- isOpen?: boolean;
3339
- /**
3340
- * The message displayed in the toast
3341
- */
3342
- message: string;
3343
- /**
3344
- * Callback that is invoked when toasts closes (via timeout or close button)
3345
- */
3346
- onClose: () => void;
3347
- /**
3348
- * The time in ms before the Toast calls the onClose function
3349
- */
3350
- timeout?: number | undefined;
3351
- /**
3352
- * The kind of Toast to display
3353
- */
3354
- variant?: ToastVariants | undefined;
3355
- };
3356
- declare const Toast: react.MemoExoticComponent<({ actionInterceptor, actionLabel, colorOverride, renderInPlace, isOpen, message, onClose, timeout, variant, ...otherProps }: ToastProps) => react_jsx_runtime.JSX.Element>;
3357
-
3358
- type UseToastProps = {
3359
- message: string;
3360
- variant?: ToastVariants;
3361
- actionLabel?: string;
3362
- actionInterceptor?: () => void;
3363
- timeout?: number;
3364
- colorOverride?: string | undefined;
3365
- };
3366
- type UseToastFn = (props: UseToastProps) => void;
3367
-
3368
- declare const useToast: () => UseToastFn;
3369
-
3370
- declare const ToastProvider: ({ children }: {
3371
- children: ReactNode;
3372
- }) => react_jsx_runtime.JSX.Element;
3373
-
3374
- type TooltipProps = Omit<ComponentPropsWithoutRef<'div'>, 'id'> & {
3375
- /**
3376
- * The node that will be wrapped by the Tooltip
3377
- */
3378
- children: ReactNode;
3379
- /**
3380
- * Where the tooltip should appear in relation to wrapped component
3381
- */
3382
- direction?: 'bottom' | 'left' | 'right' | 'top';
3383
- /**
3384
- * Length of time to wait before dismissing Tooltip for click eventType
3385
- */
3386
- duration?: boolean | number | string;
3387
- /**
3388
- * The type of event that triggers display of Tooltip
3389
- */
3390
- eventType?: 'click' | 'hover';
3391
- /**
3392
- * @ignore
3393
- * Force a Tooltip to display it's content without user interaction (for debugging)
3394
- */
3395
- forceState?: 'open' | undefined;
3396
- /**
3397
- * ID for tooltip (automatically created if omitted)
3398
- */
3399
- id?: string | null | undefined;
3400
- /**
3401
- * The content that will appear in the Tooltip popup
3402
- */
3403
- label: ReactNode;
3404
- /**
3405
- * The maximum number of characters to display inside the Tooltip
3406
- */
3407
- maxChars?: number | null;
3408
- /**
3409
- * Whether content within the label should wrap
3410
- */
3411
- shouldWrap?: boolean;
3412
- /**
3413
- * Color to override background of the tooltip.
3414
- */
3415
- backgroundColorOverride?: string;
3416
- /**
3417
- * Color to override font color of the tooltip.
3418
- */
3419
- fontColorOverride?: string;
3420
- };
3421
- declare const Tooltip: {
3422
- ({ label, direction, duration, eventType, forceState, maxChars, children, id, shouldWrap, backgroundColorOverride, fontColorOverride, ...otherProps }: TooltipProps): JSX.Element;
3423
- displayName: string;
3424
- };
3425
-
3426
- type TruncateProps = {
3427
- /**
3428
- * Prevent ellipsis from truncating mid-word
3429
- */
3430
- breakOnWords?: boolean;
3431
- /**
3432
- * The string to be truncated
3433
- */
3434
- children: string | null | undefined;
3435
- /**
3436
- * The maximum number of characters to display inside the Tooltip
3437
- */
3438
- maxChars: number;
3439
- /**
3440
- * A string to append to the truncated string
3441
- */
3442
- terminator?: string;
3443
- };
3444
- declare const Truncate: {
3445
- ({ children, maxChars, terminator, breakOnWords, }: TruncateProps): JSX.Element | null;
3446
- displayName: string;
3447
- };
3448
-
3449
- type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
3450
- /**
3451
- * An optional accessible description for the logo
3452
- */
3453
- description?: string;
3454
- /**
3455
- * Height, in pixels, of the logo
3456
- */
3457
- height?: number;
3458
- /**
3459
- * @ignore
3460
- * Change the color when hovering over the logo
3461
- */
3462
- hoverColor?: string;
3463
- /**
3464
- * Display just the icon portion of the logo (ie. hide `Wistia` text)
3465
- * note: there is no analogue to this because by brand guidelines, the
3466
- * `Wistia` text must not be displayed without the "flags" iconography
3467
- */
3468
- iconOnly?: boolean;
3469
- /**
3470
- * If provided, will wrap the logo in a link
3471
- */
3472
- href?: string;
3473
- /**
3474
- * An accessible title for the logo (defaults to "Wistia Logo")
3475
- */
3476
- title?: string;
3477
- /**
3478
- * Style of the logo
3479
- */
3480
- variant?: 'dark' | 'light' | 'standard';
3481
- };
3482
- declare const WistiaLogo: {
3483
- ({ description, height, hoverColor, href, iconOnly, title, variant, ...otherProps }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
3484
- displayName: string;
3485
- };
3486
-
3487
- export { ActionModal, type ActionModalProps, Avatar, type AvatarInstanceType, type AvatarProps, Backdrop, type BackdropProps, BackgroundImage, type BackgroundImageProps, Badge, type BadgeColorScheme, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, CheckboxMenuItem, type CheckboxMenuItemProps, type CheckboxProps, ClickArea, type ClickAreaProps, CloseButton, type CloseButtonProps, CollapsibleGroup, type CollapsibleGroupProps, Divider, type DividerProps, Ellipsis, type EllipsisProps, FileSelect, type FileSelectProps, Form, FormButtons, type FormButtonsProps, FormField, FormFieldError, type FormFieldErrorProps, type FormFieldProps, FormGlobalError, type FormProps, type FormState, FullScreenModal, type FullScreenModalProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, LabelDescription, type LabelDescriptionProps, type LabelProps, Link, LinkButton, type LinkButtonProps, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, Modal, ModalBase, type ModalBaseContentProps, ModalBody, ModalCloseButton, type ModalCloseButtonProps, ModalFooter, ModalHeader, type ModalProps, type NodeElementObject, type OnBeforeHideInterface, type OptionsType, Paper, type PaperProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, type RadioGroupProps, RadioMenuItem, type RadioMenuItemProps, type RadioProps, RangeSelector, type RangeSelectorProps, RichTextEditor, type RichTextEditorProps, ScreenReaderOnly, type ScreenReaderOnlyProps, Select, type SelectProps, Slider, type SliderProps, Stack, type StackProps, SubMenu, Switch, type SwitchProps, Text, type TextProps, Thumbnail, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Toast, type ToastProps, ToastProvider, type ToastVariants, Tooltip, type TooltipProps, Truncate, type TruncateProps, VHSProvider, type VHSProviderProps, type VHSTheme, WistiaLogo, type WistiaLogoProps, type WrapperProviderLinkType, copyToClipboard, datetimeHelpers, ellipsisFlexParentStyle, ellipsisStyle, getBackgroundGradient, getSemiRandomBackgroundGradient, iconSizeMap, mq, objectHelpers, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, stringHelpers, useBoolean, useClipboard, useElementObserver, useEvent, useFocusTrap, useForceUpdate, useIsHovered, useKey, useKeyPress, useKeyPressOnce, useLocalStorage, useMergedRefs, useMq, useOnClickOutside, usePreventScroll, usePreviousValue, useTheme, useThemeColor, useToast, useWindowSize };