@wistia/vhs 6.0.0 → 6.0.1-beta.0abd038c.e1a4b42
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.ts +1060 -1122
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4326 -4304
- package/dist/index.js.map +1 -1
- package/package.json +35 -36
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import { DefaultTheme, IStyledComponent, RuleSet, css } from "styled-components";
|
|
3
2
|
import { ChangeEvent, ComponentClass, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, DetailedHTMLProps, ElementType, FC, FocusEvent, ForwardRefExoticComponent, HTMLAttributes, HTMLInputTypeAttribute, JSX, KeyboardEvent, MemoExoticComponent, MouseEvent, PropsWithChildren, ReactElement, ReactNode, Ref, RefAttributes, RefObject } from "react";
|
|
3
|
+
import { DefaultTheme, IStyledComponent, RuleSet, css } from "styled-components";
|
|
4
4
|
import { Field, FormikErrors, FormikHelpers, FormikProps, useFormikContext } from "formik";
|
|
5
|
+
import { Editor } from "slate";
|
|
6
|
+
import "slate-history";
|
|
5
7
|
import { ReactEditor } from "slate-react";
|
|
6
|
-
import { BaseEditor, Descendant, Editor } from "slate";
|
|
7
|
-
import { HistoryEditor } from "slate-history";
|
|
8
8
|
import { DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuRadioGroup as MenuRadioGroup, DropdownMenuRadioItemProps } from "@radix-ui/react-dropdown-menu";
|
|
9
|
-
|
|
10
9
|
//#region src/@types/vhs-theme.d.ts
|
|
11
10
|
interface VHSTheme {
|
|
12
11
|
readonly breakpoint: {
|
|
@@ -230,55 +229,55 @@ type DefaultLinkWrapperProps = {
|
|
|
230
229
|
};
|
|
231
230
|
type LinkProps = ComponentPropsWithoutRef<"a"> & {
|
|
232
231
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
* A Promise to invoke before navigating to location.
|
|
233
|
+
* _Caution: if used with `external` type prop a new window will **not** be opened_
|
|
234
|
+
*/
|
|
236
235
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
237
236
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
* The content that will be rendered inside the link
|
|
238
|
+
*/
|
|
240
239
|
children: ReactNode;
|
|
241
240
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
* Disables Link
|
|
242
|
+
*/
|
|
244
243
|
disabled?: boolean;
|
|
245
244
|
/**
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
* @ignore
|
|
246
|
+
* Force a Link into a particular css state (for debugging)
|
|
247
|
+
*/
|
|
249
248
|
forceState?: "active" | "focus" | "hover";
|
|
250
249
|
/**
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
* The entity to link to (url, email address, telephone number)
|
|
251
|
+
*/
|
|
253
252
|
href: string;
|
|
254
253
|
/**
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
* Use this if your link is "nested" inside another link
|
|
255
|
+
*/
|
|
257
256
|
nested?: boolean;
|
|
258
257
|
/**
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
* An object that will be converted into a search parameter string and appended to
|
|
259
|
+
* the `to` prop value
|
|
260
|
+
*/
|
|
262
261
|
params?: LinkURLParameters;
|
|
263
262
|
/**
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
263
|
+
* Type of link to display
|
|
264
|
+
*
|
|
265
|
+
* * `email` creates a mailto
|
|
266
|
+
* * `phone` creates a telephone number
|
|
267
|
+
* * `external` will open links in a new window
|
|
268
|
+
*/
|
|
270
269
|
type?: LinkTypes;
|
|
271
270
|
/**
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
* Will only display an underline when the Link is in a hover state
|
|
272
|
+
*/
|
|
274
273
|
underlineOnHover?: boolean;
|
|
275
274
|
/**
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
* Renders a link without any of the default styling applied
|
|
276
|
+
*/
|
|
278
277
|
unstyled?: boolean;
|
|
279
278
|
/**
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
* The visual type of Link to display
|
|
280
|
+
*/
|
|
282
281
|
variant?: "dangerous" | "primary" | "secondary";
|
|
283
282
|
};
|
|
284
283
|
declare const Link$1: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
@@ -294,13 +293,7 @@ type VHSProviderProps = {
|
|
|
294
293
|
skipAnimations?: boolean;
|
|
295
294
|
theme?: Record<string, unknown>;
|
|
296
295
|
};
|
|
297
|
-
declare const VHSProvider: ({
|
|
298
|
-
children,
|
|
299
|
-
theme,
|
|
300
|
-
globalStylesIncluded,
|
|
301
|
-
skipAnimations,
|
|
302
|
-
Link
|
|
303
|
-
}: VHSProviderProps) => ReactNode;
|
|
296
|
+
declare const VHSProvider: ({ children, theme, globalStylesIncluded, skipAnimations, Link }: VHSProviderProps) => ReactNode;
|
|
304
297
|
//#endregion
|
|
305
298
|
//#region src/hooks/useTheme/useTheme.d.ts
|
|
306
299
|
declare const useTheme: <T extends DefaultTheme = DefaultTheme>() => T;
|
|
@@ -310,7 +303,7 @@ type ColorKeysFromTheme<Theme extends DefaultTheme = DefaultTheme> = keyof Theme
|
|
|
310
303
|
type UseThemeColor = {
|
|
311
304
|
(): DefaultTheme["color"];
|
|
312
305
|
<T extends DefaultTheme, K extends ColorKeysFromTheme<T>>(param: K): T["color"][K];
|
|
313
|
-
<T extends DefaultTheme, K extends ColorKeysFromTheme<T>[]>(param: [...K]): { [Index in keyof K]: T["color"][K[Index] & keyof T["color"]] };
|
|
306
|
+
<T extends DefaultTheme, K extends ColorKeysFromTheme<T>[]>(param: [...K]): { [Index in keyof K]: T["color"][K[Index] & keyof T["color"]]; };
|
|
314
307
|
};
|
|
315
308
|
declare const useThemeColor: UseThemeColor;
|
|
316
309
|
//#endregion
|
|
@@ -321,37 +314,37 @@ type OnBeforeHideInterface = {
|
|
|
321
314
|
};
|
|
322
315
|
type ModalBaseContentProps = {
|
|
323
316
|
/**
|
|
324
|
-
|
|
325
|
-
|
|
317
|
+
* Class name applied to the modal root
|
|
318
|
+
*/
|
|
326
319
|
className?: string | undefined;
|
|
327
320
|
/**
|
|
328
|
-
|
|
329
|
-
|
|
321
|
+
* Render the modal initially in shown state
|
|
322
|
+
*/
|
|
330
323
|
initialShownState?: boolean;
|
|
331
324
|
/**
|
|
332
|
-
|
|
333
|
-
|
|
325
|
+
* The modal can be dismissed via esc button
|
|
326
|
+
*/
|
|
334
327
|
isDismissible?: boolean;
|
|
335
328
|
/**
|
|
336
|
-
|
|
337
|
-
|
|
329
|
+
* Callback invoked before the modal is hidden
|
|
330
|
+
*/
|
|
338
331
|
onBeforeHide?: (() => OnBeforeHideInterface) | undefined;
|
|
339
332
|
/**
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
* Callback invoked when the modal is dismissed
|
|
334
|
+
*/
|
|
342
335
|
onHide?: ((...args: unknown[]) => unknown) | undefined;
|
|
343
336
|
/**
|
|
344
|
-
|
|
345
|
-
|
|
337
|
+
* Callback invoked when the modal is shown
|
|
338
|
+
*/
|
|
346
339
|
onShow?: ((...args: unknown[]) => unknown) | undefined;
|
|
347
340
|
/**
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
341
|
+
* Optional function that exposes the `hide` function at the call site allowing
|
|
342
|
+
* the option to call the `hide` function from outside of this component
|
|
343
|
+
*/
|
|
351
344
|
render?: (attemptHide: () => unknown) => ReactNode;
|
|
352
345
|
/**
|
|
353
|
-
|
|
354
|
-
|
|
346
|
+
* function(show, ref) that returns a node to open the modal
|
|
347
|
+
*/
|
|
355
348
|
toggle?: ((show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode) | undefined;
|
|
356
349
|
};
|
|
357
350
|
declare const ModalBase: FC<ModalBaseContentProps>;
|
|
@@ -359,122 +352,122 @@ declare const ModalBase: FC<ModalBaseContentProps>;
|
|
|
359
352
|
//#region src/components/ActionModal/ActionModal.d.ts
|
|
360
353
|
type ActionModalProps = ComponentPropsWithoutRef<"div"> & {
|
|
361
354
|
/**
|
|
362
|
-
|
|
363
|
-
|
|
355
|
+
* Horizontally align modal to the left, center, or right of the container
|
|
356
|
+
*/
|
|
364
357
|
alignHorizontal?: "center" | "left" | "normal" | "right";
|
|
365
358
|
/**
|
|
366
|
-
|
|
367
|
-
|
|
359
|
+
* Vertically align modal to the top, center, or bottom of the container
|
|
360
|
+
*/
|
|
368
361
|
alignVertical?: "bottom" | "center" | "normal" | "top";
|
|
369
362
|
/**
|
|
370
|
-
|
|
371
|
-
|
|
363
|
+
* Buttons to be shown at the bottom of the modal
|
|
364
|
+
*/
|
|
372
365
|
buttons?: ReactNode | ((hide: () => void) => ReactNode);
|
|
373
366
|
/**
|
|
374
|
-
|
|
375
|
-
|
|
367
|
+
* Contents of the modal
|
|
368
|
+
*/
|
|
376
369
|
children?: ReactNode;
|
|
377
370
|
/**
|
|
378
|
-
|
|
379
|
-
|
|
371
|
+
* Class to be applied to the base element of the modal
|
|
372
|
+
*/
|
|
380
373
|
className?: string;
|
|
381
374
|
/**
|
|
382
|
-
|
|
383
|
-
|
|
375
|
+
* A prop that determines whether the modal will span the entirety of the screen vertically
|
|
376
|
+
*/
|
|
384
377
|
fullHeight?: boolean;
|
|
385
378
|
/**
|
|
386
|
-
|
|
387
|
-
|
|
379
|
+
* Allows user to override default icon color
|
|
380
|
+
*/
|
|
388
381
|
closeIconColorOverride?: string;
|
|
389
382
|
/**
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
383
|
+
* Increase the zIndex of the Modal, this should be used when calling ActionModal from a Menu
|
|
384
|
+
* this will prevent the Menu from staying above the ActionModal
|
|
385
|
+
*/
|
|
393
386
|
elevated?: boolean;
|
|
394
387
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
388
|
+
* Optional illustration to display alongside the modal
|
|
389
|
+
*/
|
|
397
390
|
illustration?: ReactNode;
|
|
398
391
|
/**
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
392
|
+
* Background color that appears behind the optional illustration
|
|
393
|
+
* Can be any css background color or "blue", "brandBlue", "green",
|
|
394
|
+
* "pink", "purple", or "yellow" for theme colors
|
|
395
|
+
*/
|
|
403
396
|
illustrationBackgroundColor?: string;
|
|
404
397
|
/**
|
|
405
|
-
|
|
406
|
-
|
|
398
|
+
* Render the modal initially in shown state
|
|
399
|
+
*/
|
|
407
400
|
initialShownState?: boolean;
|
|
408
401
|
/**
|
|
409
|
-
|
|
410
|
-
|
|
402
|
+
* Allow the user to close the modal via x button or backdrop click
|
|
403
|
+
*/
|
|
411
404
|
isDismissible?: boolean;
|
|
412
405
|
/**
|
|
413
|
-
|
|
414
|
-
|
|
406
|
+
* Callback invoked before the modal is hidden
|
|
407
|
+
*/
|
|
415
408
|
onBeforeHide?: () => OnBeforeHideInterface;
|
|
416
409
|
/**
|
|
417
|
-
|
|
418
|
-
|
|
410
|
+
* Callback invoked when the modal is dismissed
|
|
411
|
+
*/
|
|
419
412
|
onHide?: () => void;
|
|
420
413
|
/**
|
|
421
|
-
|
|
422
|
-
|
|
414
|
+
* Callback invoked when the modal is shown
|
|
415
|
+
*/
|
|
423
416
|
onShow?: () => void;
|
|
424
417
|
/**
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
418
|
+
* Optional function that exposes the `hide` function at the call site allowing
|
|
419
|
+
* the option to call the `hide` function from outside of this component
|
|
420
|
+
*/
|
|
428
421
|
render?: (hide: (event?: MouseEvent) => void) => ReactNode;
|
|
429
422
|
/**
|
|
430
|
-
|
|
431
|
-
|
|
423
|
+
* Title to display in the modal
|
|
424
|
+
*/
|
|
432
425
|
title: string;
|
|
433
426
|
/**
|
|
434
|
-
|
|
435
|
-
|
|
427
|
+
* function(show, ref) that returns a node to open the modal
|
|
428
|
+
*/
|
|
436
429
|
toggle?: (show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode;
|
|
437
430
|
/**
|
|
438
|
-
|
|
439
|
-
|
|
431
|
+
* The css width property of the modal. Ex - 'max-content', '532px', '100%', etc
|
|
432
|
+
*/
|
|
440
433
|
width?: string;
|
|
441
434
|
};
|
|
442
435
|
/**
|
|
443
|
-
* @deprecated Please use Modal component, see [documentation](?path=/docs/components-modal--docs).
|
|
444
|
-
*
|
|
445
|
-
* #### Why ActionModal is being deprecated
|
|
446
|
-
* ActionModal's API tightly couples the modal itself with the button or element that toggles it. This makes it difficult to
|
|
447
|
-
* implement in several scenarios (such as within a Menu) or if it needs to be programatically opened by an external action.
|
|
448
|
-
*
|
|
449
|
-
* [Modal](?path=/docs/components-modal--docs) allows for a separate state control to toggle its visibility and is also more composable
|
|
450
|
-
* allowing for more variation.
|
|
451
|
-
*/
|
|
436
|
+
* @deprecated Please use Modal component, see [documentation](?path=/docs/components-modal--docs).
|
|
437
|
+
*
|
|
438
|
+
* #### Why ActionModal is being deprecated
|
|
439
|
+
* ActionModal's API tightly couples the modal itself with the button or element that toggles it. This makes it difficult to
|
|
440
|
+
* implement in several scenarios (such as within a Menu) or if it needs to be programatically opened by an external action.
|
|
441
|
+
*
|
|
442
|
+
* [Modal](?path=/docs/components-modal--docs) allows for a separate state control to toggle its visibility and is also more composable
|
|
443
|
+
* allowing for more variation.
|
|
444
|
+
*/
|
|
452
445
|
declare const ActionModal: FC<ActionModalProps>;
|
|
453
446
|
//#endregion
|
|
454
447
|
//#region src/components/Avatar/Avatar.d.ts
|
|
455
448
|
type AvatarInstanceType = "image" | "initials";
|
|
456
449
|
type AvatarProps = ComponentPropsWithoutRef<"div"> & {
|
|
457
450
|
/**
|
|
458
|
-
|
|
459
|
-
|
|
451
|
+
* The height and width of the avatar
|
|
452
|
+
*/
|
|
460
453
|
heightAndWidth?: number;
|
|
461
454
|
/**
|
|
462
|
-
|
|
463
|
-
|
|
455
|
+
* The URL of the image to display
|
|
456
|
+
*/
|
|
464
457
|
imageUrl?: string | null;
|
|
465
458
|
/**
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
459
|
+
* Initials to display if no image is provided
|
|
460
|
+
*
|
|
461
|
+
* _note: only first initial shown regardless of characters provided_
|
|
462
|
+
*/
|
|
470
463
|
initials?: string | null;
|
|
471
464
|
/**
|
|
472
|
-
|
|
473
|
-
|
|
465
|
+
* A string that will deterministicly set the background color of the avatar
|
|
466
|
+
*/
|
|
474
467
|
name?: string | null;
|
|
475
468
|
/**
|
|
476
|
-
|
|
477
|
-
|
|
469
|
+
* A callback that is invoked after the image has loaded or failed to load
|
|
470
|
+
*/
|
|
478
471
|
onImageLoad?: (avatarType: AvatarInstanceType) => void;
|
|
479
472
|
};
|
|
480
473
|
declare const Avatar: FC<AvatarProps>;
|
|
@@ -494,24 +487,24 @@ declare const alignHorizontalMap: {
|
|
|
494
487
|
};
|
|
495
488
|
type BackdropProps = ComponentPropsWithoutRef<"div"> & {
|
|
496
489
|
/**
|
|
497
|
-
|
|
498
|
-
|
|
490
|
+
* Optional prop to align the child content along the horizontal axis
|
|
491
|
+
*/
|
|
499
492
|
alignHorizontal?: keyof typeof alignHorizontalMap;
|
|
500
493
|
/**
|
|
501
|
-
|
|
502
|
-
|
|
494
|
+
* Optional prop to align the child content along the vertical axis
|
|
495
|
+
*/
|
|
503
496
|
alignVertical?: keyof typeof alignVerticalMap;
|
|
504
497
|
/**
|
|
505
|
-
|
|
506
|
-
|
|
498
|
+
* Color of the backdrop
|
|
499
|
+
*/
|
|
507
500
|
backgroundColor?: string;
|
|
508
501
|
/**
|
|
509
|
-
|
|
510
|
-
|
|
502
|
+
* Pass an arbitrary child node
|
|
503
|
+
*/
|
|
511
504
|
children?: ReactNode;
|
|
512
505
|
/**
|
|
513
|
-
|
|
514
|
-
|
|
506
|
+
* increase the z-index (workaround for ActionModals called within Menu)
|
|
507
|
+
*/
|
|
515
508
|
elevated?: boolean;
|
|
516
509
|
};
|
|
517
510
|
declare const Backdrop: FC<BackdropProps>;
|
|
@@ -523,61 +516,61 @@ type OverflowObject = {
|
|
|
523
516
|
};
|
|
524
517
|
type BackgroundImageProps = Omit<ComponentPropsWithoutRef<"img">, "src"> & {
|
|
525
518
|
/**
|
|
526
|
-
|
|
527
|
-
|
|
519
|
+
* The content that will be rendered inside
|
|
520
|
+
*/
|
|
528
521
|
children?: ReactNode;
|
|
529
522
|
/**
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
523
|
+
* Sets whether a background image's position is fixed within the viewport,
|
|
524
|
+
* or scrolls with its containing block. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment).
|
|
525
|
+
*/
|
|
533
526
|
attachment?: string;
|
|
534
527
|
/**
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
528
|
+
* Sets whether an element's background extends underneath its border box,
|
|
529
|
+
* padding box, or content box. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip).
|
|
530
|
+
*/
|
|
538
531
|
clip?: string;
|
|
539
532
|
/**
|
|
540
|
-
|
|
541
|
-
|
|
533
|
+
* Color (as hex) of the component
|
|
534
|
+
*/
|
|
542
535
|
color?: string | undefined;
|
|
543
536
|
/**
|
|
544
|
-
|
|
545
|
-
|
|
537
|
+
* Height of the component
|
|
538
|
+
*/
|
|
546
539
|
height?: string;
|
|
547
540
|
/**
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
541
|
+
* Sets the background's origin: from the border start, inside the border, or inside the padding.
|
|
542
|
+
* _Note: origin is ignored when attachment is `fixed`._
|
|
543
|
+
* [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin).
|
|
544
|
+
*/
|
|
552
545
|
origin?: string;
|
|
553
546
|
/**
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
547
|
+
* Sets the desired behavior for an element's overflow (i.e. when an element's content is
|
|
548
|
+
* too big to fit in its block formatting context).
|
|
549
|
+
* [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow).
|
|
550
|
+
*/
|
|
558
551
|
overflow?: OverflowObject | string;
|
|
559
552
|
/**
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
553
|
+
* Sets the initial position for each image; relative to the position layer
|
|
554
|
+
* set by origin. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position).
|
|
555
|
+
*/
|
|
563
556
|
position?: string;
|
|
564
557
|
/**
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
558
|
+
* Sets how background images are repeated.
|
|
559
|
+
* [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat).
|
|
560
|
+
*/
|
|
568
561
|
repeat?: string;
|
|
569
562
|
/**
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
563
|
+
* Sets the size of the element's background image.
|
|
564
|
+
* [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size).
|
|
565
|
+
*/
|
|
573
566
|
size?: string;
|
|
574
567
|
/**
|
|
575
|
-
|
|
576
|
-
|
|
568
|
+
* URL(s) to image file
|
|
569
|
+
*/
|
|
577
570
|
src?: string[] | string;
|
|
578
571
|
/**
|
|
579
|
-
|
|
580
|
-
|
|
572
|
+
* Width of the component
|
|
573
|
+
*/
|
|
581
574
|
width?: string;
|
|
582
575
|
};
|
|
583
576
|
declare const BackgroundImage: FC<BackgroundImageProps>;
|
|
@@ -705,16 +698,16 @@ type IconNameType = keyof typeof iconMap;
|
|
|
705
698
|
type BadgeColorScheme = "brandBlue" | "error" | "green" | "grey" | "orange" | "pink" | "purple" | "red" | "success" | "warning" | "yellow";
|
|
706
699
|
type BadgeProps = ComponentPropsWithoutRef<"div"> & {
|
|
707
700
|
/**
|
|
708
|
-
|
|
709
|
-
|
|
701
|
+
* The color scheme to use for the badge
|
|
702
|
+
*/
|
|
710
703
|
colorScheme?: BadgeColorScheme;
|
|
711
704
|
/**
|
|
712
|
-
|
|
713
|
-
|
|
705
|
+
* The icon to display in the badge
|
|
706
|
+
*/
|
|
714
707
|
icon?: IconNameType;
|
|
715
708
|
/**
|
|
716
|
-
|
|
717
|
-
|
|
709
|
+
* The text to display in the badge
|
|
710
|
+
*/
|
|
718
711
|
label: string;
|
|
719
712
|
};
|
|
720
713
|
declare const Badge: FC<BadgeProps>;
|
|
@@ -723,37 +716,30 @@ declare const Badge: FC<BadgeProps>;
|
|
|
723
716
|
type BodyProps = {
|
|
724
717
|
children?: ReactNode;
|
|
725
718
|
};
|
|
726
|
-
declare const Body: ({
|
|
727
|
-
children
|
|
728
|
-
}: BodyProps) => JSX.Element;
|
|
719
|
+
declare const Body: ({ children }: BodyProps) => JSX.Element;
|
|
729
720
|
type TitleProps = {
|
|
730
721
|
children?: ReactNode;
|
|
731
722
|
};
|
|
732
|
-
declare const Title: ({
|
|
733
|
-
children
|
|
734
|
-
}: TitleProps) => JSX.Element;
|
|
723
|
+
declare const Title: ({ children }: TitleProps) => JSX.Element;
|
|
735
724
|
type RightGutterProps = {
|
|
736
725
|
children?: ReactNode;
|
|
737
726
|
verticalAlign?: string;
|
|
738
727
|
};
|
|
739
|
-
declare const RightGutter: ({
|
|
740
|
-
verticalAlign,
|
|
741
|
-
children
|
|
742
|
-
}: RightGutterProps) => JSX.Element;
|
|
728
|
+
declare const RightGutter: ({ verticalAlign, children }: RightGutterProps) => JSX.Element;
|
|
743
729
|
//#endregion
|
|
744
730
|
//#region src/components/Banner/Banner.d.ts
|
|
745
731
|
type BannerProps = ComponentPropsWithoutRef<"div"> & {
|
|
746
732
|
/**
|
|
747
|
-
|
|
748
|
-
|
|
733
|
+
* color string
|
|
734
|
+
*/
|
|
749
735
|
backgroundColor?: string;
|
|
750
736
|
/**
|
|
751
|
-
|
|
752
|
-
|
|
737
|
+
* Pass an arbitrary child node
|
|
738
|
+
*/
|
|
753
739
|
children?: ReactNode;
|
|
754
740
|
/**
|
|
755
|
-
|
|
756
|
-
|
|
741
|
+
* icon name from the icon library to be displayed on left side of banner
|
|
742
|
+
*/
|
|
757
743
|
icon?: ReactNode;
|
|
758
744
|
};
|
|
759
745
|
declare const Banner: FC<BannerProps> & {
|
|
@@ -769,90 +755,90 @@ type Gap = {
|
|
|
769
755
|
};
|
|
770
756
|
type BoxProps = ComponentPropsWithoutRef<"div"> & {
|
|
771
757
|
/**
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
758
|
+
* Specifies how the browser distributes space between and around
|
|
759
|
+
* items along the cross-axis of their container; has no effect on
|
|
760
|
+
* single line flexible boxes
|
|
761
|
+
*/
|
|
776
762
|
alignContent?: "around" | "between" | "center" | "end" | "start" | "stretch";
|
|
777
763
|
/**
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
764
|
+
* Specifies how the browser distributes space between and around
|
|
765
|
+
* items along the cross-axis of their container; the difference
|
|
766
|
+
* to the alignContent prop is that alignItems specifies the
|
|
767
|
+
* alignment of the items within the current container's line,
|
|
768
|
+
* whereas alignContent specifies the alignment of the lines themselves
|
|
769
|
+
*/
|
|
784
770
|
alignItems?: "baseline" | "center" | "end" | "start" | "stretch";
|
|
785
771
|
/**
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
772
|
+
* Specifies how the browser aligns items of the current line, overriding the
|
|
773
|
+
* alignItems value of parent; if any of the item's cross-axis margin is set to auto,
|
|
774
|
+
* then alignSelf is ignored
|
|
775
|
+
*
|
|
776
|
+
* *Note: only works for nested `<Box />`*
|
|
777
|
+
*/
|
|
792
778
|
alignSelf?: "auto" | "baseline" | "center" | "end" | "start" | "stretch";
|
|
793
779
|
/**
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
780
|
+
* Specifies the initial main size of an item
|
|
781
|
+
*
|
|
782
|
+
* *Note: only works for nested `<Box />`*
|
|
783
|
+
*/
|
|
798
784
|
basis?: number | string;
|
|
799
785
|
/**
|
|
800
|
-
|
|
801
|
-
|
|
786
|
+
* Pass an arbitrary child node
|
|
787
|
+
*/
|
|
802
788
|
children?: ReactNode;
|
|
803
789
|
/**
|
|
804
|
-
|
|
805
|
-
|
|
790
|
+
* Specifies the main axis of the container
|
|
791
|
+
*/
|
|
806
792
|
direction?: "column-reverse" | "column" | "row-reverse" | "row";
|
|
807
793
|
/**
|
|
808
|
-
|
|
809
|
-
|
|
794
|
+
* Specifies whether the width and/or height should fill the container
|
|
795
|
+
*/
|
|
810
796
|
fill?: boolean | "horizontal" | "vertical";
|
|
811
797
|
/**
|
|
812
|
-
|
|
813
|
-
|
|
798
|
+
* Specifies whether the width and/or height should fill the viewport
|
|
799
|
+
*/
|
|
814
800
|
fillViewport?: boolean | "horizontal" | "vertical";
|
|
815
801
|
/**
|
|
816
|
-
|
|
817
|
-
|
|
802
|
+
* Specifies the gaps (gutters) between rows and columns
|
|
803
|
+
*/
|
|
818
804
|
gap?: Gap | number | string;
|
|
819
805
|
/**
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
806
|
+
* Specifies what amount of space inside the flex container the item should take up
|
|
807
|
+
*
|
|
808
|
+
* *Note: only works for nested `<Box />`*
|
|
809
|
+
*/
|
|
824
810
|
grow?: number;
|
|
825
811
|
/**
|
|
826
|
-
|
|
827
|
-
|
|
812
|
+
* Make Layout behave like an inline element but still lay out its content according to flexbox model
|
|
813
|
+
*/
|
|
828
814
|
inline?: boolean;
|
|
829
815
|
/**
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
816
|
+
* Specifies how the browser distributes space between and around
|
|
817
|
+
* items along the main axis of their container
|
|
818
|
+
*/
|
|
833
819
|
justifyContent?: "around" | "between" | "center" | "end" | "evenly" | "start";
|
|
834
820
|
/**
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
821
|
+
* Specifies the order used to lay out an item in its container. Items within the same
|
|
822
|
+
* container are rendered in ascending order according to their order values.
|
|
823
|
+
* Elements with the _same_ order value are rendered in the order in which they appear in code
|
|
824
|
+
*
|
|
825
|
+
* *Note: only works for nested `<Box />`*
|
|
826
|
+
*/
|
|
841
827
|
order?: number | "inherit" | "initial" | "unset";
|
|
842
828
|
/**
|
|
843
|
-
|
|
844
|
-
|
|
829
|
+
* The DOM tag to use for the element
|
|
830
|
+
*/
|
|
845
831
|
renderAs?: keyof JSX.IntrinsicElements;
|
|
846
832
|
/**
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
833
|
+
* Specifies how items will shrink inside the container when the default size of
|
|
834
|
+
* items is larger than their container
|
|
835
|
+
*
|
|
836
|
+
* *Note: only works for nested `<Box />`*
|
|
837
|
+
*/
|
|
852
838
|
shrink?: number;
|
|
853
839
|
/**
|
|
854
|
-
|
|
855
|
-
|
|
840
|
+
* Specifies whether items are forced into a single line or can be wrapped onto multiple lines
|
|
841
|
+
*/
|
|
856
842
|
wrapItems?: boolean;
|
|
857
843
|
};
|
|
858
844
|
declare const Box: ForwardRefExoticComponent<BoxProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -861,78 +847,78 @@ declare const Box: ForwardRefExoticComponent<BoxProps & RefAttributes<HTMLDivEle
|
|
|
861
847
|
type TextAlignValues = "center" | "left" | "right";
|
|
862
848
|
type ButtonProps = ComponentPropsWithRef<"button"> & {
|
|
863
849
|
/**
|
|
864
|
-
|
|
865
|
-
|
|
850
|
+
* Text that appears inside of the button *THIS WILL OVERRIDE THE LABEL PROP*
|
|
851
|
+
*/
|
|
866
852
|
children?: ReactNode;
|
|
867
853
|
/**
|
|
868
|
-
|
|
869
|
-
|
|
854
|
+
* Allows user to override default button colors
|
|
855
|
+
*/
|
|
870
856
|
colorOverride?: string;
|
|
871
857
|
/**
|
|
872
|
-
|
|
873
|
-
|
|
858
|
+
* Disables button
|
|
859
|
+
*/
|
|
874
860
|
disabled?: boolean;
|
|
875
861
|
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
862
|
+
* @ignore
|
|
863
|
+
* Force a button into a particular css state (for debugging)
|
|
864
|
+
*/
|
|
879
865
|
forceState?: "active" | "focus" | "hover" | undefined;
|
|
880
866
|
/**
|
|
881
|
-
|
|
882
|
-
|
|
867
|
+
* Is the button full-width?
|
|
868
|
+
*/
|
|
883
869
|
fullWidth?: boolean;
|
|
884
870
|
/**
|
|
885
|
-
|
|
886
|
-
|
|
871
|
+
* An SVG component
|
|
872
|
+
*/
|
|
887
873
|
icon?: ReactNode;
|
|
888
874
|
/**
|
|
889
|
-
|
|
890
|
-
|
|
875
|
+
* The "type" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*
|
|
876
|
+
*/
|
|
891
877
|
iconName?: keyof typeof iconMap;
|
|
892
878
|
/**
|
|
893
|
-
|
|
894
|
-
|
|
879
|
+
* Should the icon appear at the start of the button or the end?
|
|
880
|
+
*/
|
|
895
881
|
iconPosition?: "end" | "start";
|
|
896
882
|
/**
|
|
897
|
-
|
|
898
|
-
|
|
883
|
+
* Show a spinner when the button is in a loading state
|
|
884
|
+
*/
|
|
899
885
|
isLoading?: boolean;
|
|
900
886
|
/**
|
|
901
|
-
|
|
902
|
-
|
|
887
|
+
* Text that appears inside the button
|
|
888
|
+
*/
|
|
903
889
|
label?: string;
|
|
904
890
|
/**
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
891
|
+
* Should the label wrap if the button container is too narrow to fit the label text on one line
|
|
892
|
+
* @deprecated Apply white-space styling as needed
|
|
893
|
+
*/
|
|
908
894
|
labelWrap?: boolean;
|
|
909
895
|
/**
|
|
910
|
-
|
|
911
|
-
|
|
896
|
+
* Provides a button without any styling (useful for wrapping another element)
|
|
897
|
+
*/
|
|
912
898
|
noStyle?: boolean;
|
|
913
899
|
/**
|
|
914
|
-
|
|
915
|
-
|
|
900
|
+
* Callback function invoked when the button is clicked
|
|
901
|
+
*/
|
|
916
902
|
onClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
|
|
917
903
|
/**
|
|
918
|
-
|
|
919
|
-
|
|
904
|
+
* The size of button to display
|
|
905
|
+
*/
|
|
920
906
|
size?: "lg" | "md" | "sm";
|
|
921
907
|
/**
|
|
922
|
-
|
|
923
|
-
|
|
908
|
+
* If true then rounded corners will be squared
|
|
909
|
+
*/
|
|
924
910
|
square?: boolean;
|
|
925
911
|
/**
|
|
926
|
-
|
|
927
|
-
|
|
912
|
+
* Alignment of the button label
|
|
913
|
+
*/
|
|
928
914
|
textAlign?: TextAlignValues;
|
|
929
915
|
/**
|
|
930
|
-
|
|
931
|
-
|
|
916
|
+
* The type of button element that should be rendered
|
|
917
|
+
*/
|
|
932
918
|
type?: "button" | "reset" | "submit";
|
|
933
919
|
/**
|
|
934
|
-
|
|
935
|
-
|
|
920
|
+
* The visual type of button to display
|
|
921
|
+
*/
|
|
936
922
|
variant?: "dangerous" | "primary" | "secondary" | "tertiary";
|
|
937
923
|
};
|
|
938
924
|
declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -940,16 +926,16 @@ declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTML
|
|
|
940
926
|
//#region src/components/ButtonGroup/ButtonGroup.d.ts
|
|
941
927
|
type ButtonGroupProps = ComponentPropsWithoutRef<"div"> & {
|
|
942
928
|
/**
|
|
943
|
-
|
|
944
|
-
|
|
929
|
+
* Align buttons to the left or right of their container
|
|
930
|
+
*/
|
|
945
931
|
align?: "center" | "left" | "right";
|
|
946
932
|
/**
|
|
947
|
-
|
|
948
|
-
|
|
933
|
+
* Buttons that will be rendered in grouping
|
|
934
|
+
*/
|
|
949
935
|
children?: ReactNode;
|
|
950
936
|
/**
|
|
951
|
-
|
|
952
|
-
|
|
937
|
+
* Force ButtonGroup to fill the width of it's container
|
|
938
|
+
*/
|
|
953
939
|
fullWidth?: boolean;
|
|
954
940
|
};
|
|
955
941
|
declare const ButtonGroup: FC<ButtonGroupProps>;
|
|
@@ -957,148 +943,148 @@ declare const ButtonGroup: FC<ButtonGroupProps>;
|
|
|
957
943
|
//#region src/components/ButtonLink/ButtonLink.d.ts
|
|
958
944
|
type ButtonLinkProps = ComponentPropsWithRef<"a"> & {
|
|
959
945
|
/**
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
946
|
+
* A Promise to invoke before navigating to location.
|
|
947
|
+
* _Caution: if used with `external` type prop a new window will **not** be opened_
|
|
948
|
+
*/
|
|
963
949
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
964
950
|
/**
|
|
965
|
-
|
|
966
|
-
|
|
951
|
+
* The content that will be rendered inside the button
|
|
952
|
+
*/
|
|
967
953
|
children?: ReactNode;
|
|
968
954
|
/**
|
|
969
|
-
|
|
970
|
-
|
|
955
|
+
* Option CSS color string
|
|
956
|
+
*/
|
|
971
957
|
colorOverride?: string;
|
|
972
958
|
/**
|
|
973
|
-
|
|
974
|
-
|
|
959
|
+
* Disables Link
|
|
960
|
+
*/
|
|
975
961
|
disabled?: boolean;
|
|
976
962
|
/**
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
963
|
+
* @ignore
|
|
964
|
+
* Force a Link into a particular css state (for debugging)
|
|
965
|
+
*/
|
|
980
966
|
forceState?: "active" | "focus" | "hover";
|
|
981
967
|
/**
|
|
982
|
-
|
|
983
|
-
|
|
968
|
+
* Is the button full-width?
|
|
969
|
+
*/
|
|
984
970
|
fullWidth?: boolean;
|
|
985
971
|
/**
|
|
986
|
-
|
|
987
|
-
|
|
972
|
+
* The entity to link to (url, email address, telephone number)
|
|
973
|
+
*/
|
|
988
974
|
href: string;
|
|
989
975
|
/**
|
|
990
|
-
|
|
991
|
-
|
|
976
|
+
* An SVG component
|
|
977
|
+
*/
|
|
992
978
|
icon?: ReactNode;
|
|
993
979
|
/**
|
|
994
|
-
|
|
995
|
-
|
|
980
|
+
* The "type" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*
|
|
981
|
+
*/
|
|
996
982
|
iconName?: keyof typeof iconMap;
|
|
997
983
|
/**
|
|
998
|
-
|
|
999
|
-
|
|
984
|
+
* Should the icon appear at the start of the button or the end?
|
|
985
|
+
*/
|
|
1000
986
|
iconPosition?: "end" | "start";
|
|
1001
987
|
/**
|
|
1002
|
-
|
|
1003
|
-
|
|
988
|
+
* Text that appears inside the button
|
|
989
|
+
*/
|
|
1004
990
|
label?: string;
|
|
1005
991
|
/**
|
|
1006
|
-
|
|
1007
|
-
|
|
992
|
+
* Should the label wrap if the button container is too narrow to fit the label text on one line
|
|
993
|
+
*/
|
|
1008
994
|
labelWrap?: boolean;
|
|
1009
995
|
/**
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
996
|
+
* An object that will be converted into a search parameter string and appended to
|
|
997
|
+
* the `to` prop value
|
|
998
|
+
*/
|
|
1013
999
|
params?: Record<string, string>;
|
|
1014
1000
|
/**
|
|
1015
|
-
|
|
1016
|
-
|
|
1001
|
+
* The size of button to display
|
|
1002
|
+
*/
|
|
1017
1003
|
size?: "lg" | "md" | "sm";
|
|
1018
1004
|
/**
|
|
1019
|
-
|
|
1020
|
-
|
|
1005
|
+
* If true, rounded corners are disabled
|
|
1006
|
+
*/
|
|
1021
1007
|
square?: boolean;
|
|
1022
1008
|
/**
|
|
1023
|
-
|
|
1024
|
-
|
|
1009
|
+
* Alignment of the button label
|
|
1010
|
+
*/
|
|
1025
1011
|
textAlign?: TextAlignValues;
|
|
1026
1012
|
/**
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1013
|
+
* Type of link to display
|
|
1014
|
+
*
|
|
1015
|
+
* * `email` creates a mailto
|
|
1016
|
+
* * `phone` creates a telephone number
|
|
1017
|
+
* * `external` will open links in a new window
|
|
1018
|
+
*/
|
|
1033
1019
|
type?: "default" | "email" | "external" | "phone";
|
|
1034
1020
|
/**
|
|
1035
|
-
|
|
1036
|
-
|
|
1021
|
+
* The visual type of button to display
|
|
1022
|
+
*/
|
|
1037
1023
|
variant?: "dangerous" | "primary" | "secondary" | "tertiary";
|
|
1038
1024
|
};
|
|
1039
1025
|
/**
|
|
1040
|
-
* The `ButtonLink` component is useful for getting the functionality of a
|
|
1041
|
-
* `Link` with the styling of a `Button`.
|
|
1042
|
-
*
|
|
1043
|
-
* A useful heuristic for using this component: Do you have an `href`? Some of the advantages are having a right-click
|
|
1044
|
-
* context menu available opening a new tab, and copying the URL.
|
|
1045
|
-
*
|
|
1046
|
-
* **Note:** the props table below is incomplete; please
|
|
1047
|
-
* refer to [Link](?path=/docs/link--link-stories) for additional props.
|
|
1048
|
-
*/
|
|
1026
|
+
* The `ButtonLink` component is useful for getting the functionality of a
|
|
1027
|
+
* `Link` with the styling of a `Button`.
|
|
1028
|
+
*
|
|
1029
|
+
* A useful heuristic for using this component: Do you have an `href`? Some of the advantages are having a right-click
|
|
1030
|
+
* context menu available opening a new tab, and copying the URL.
|
|
1031
|
+
*
|
|
1032
|
+
* **Note:** the props table below is incomplete; please
|
|
1033
|
+
* refer to [Link](?path=/docs/link--link-stories) for additional props.
|
|
1034
|
+
*/
|
|
1049
1035
|
declare const ButtonLink: ForwardRefExoticComponent<ButtonLinkProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
1050
1036
|
//#endregion
|
|
1051
1037
|
//#region src/components/Checkbox/Checkbox.d.ts
|
|
1052
1038
|
type CheckboxProps = Omit<ComponentPropsWithRef<"label">, "onChange"> & {
|
|
1053
1039
|
/**
|
|
1054
|
-
|
|
1055
|
-
|
|
1040
|
+
* Indicates the state of the checkbox
|
|
1041
|
+
*/
|
|
1056
1042
|
checked?: boolean;
|
|
1057
1043
|
/**
|
|
1058
|
-
|
|
1059
|
-
|
|
1044
|
+
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
1045
|
+
*/
|
|
1060
1046
|
direction?: "column" | "row";
|
|
1061
1047
|
/**
|
|
1062
|
-
|
|
1063
|
-
|
|
1048
|
+
* Disables checkbox
|
|
1049
|
+
*/
|
|
1064
1050
|
disabled?: boolean;
|
|
1065
1051
|
/**
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1052
|
+
* @ignore
|
|
1053
|
+
* Force a Checkbox into a particular css state (for debugging)
|
|
1054
|
+
*/
|
|
1069
1055
|
forceState?: "focus" | "hover";
|
|
1070
1056
|
/**
|
|
1071
|
-
|
|
1072
|
-
|
|
1057
|
+
* Indicates that there is an error with the input
|
|
1058
|
+
*/
|
|
1073
1059
|
hasError?: boolean;
|
|
1074
1060
|
/**
|
|
1075
|
-
|
|
1076
|
-
|
|
1061
|
+
* Provides an ID for the checkbox
|
|
1062
|
+
*/
|
|
1077
1063
|
id?: string;
|
|
1078
1064
|
/**
|
|
1079
|
-
|
|
1080
|
-
|
|
1065
|
+
* The label for the checkbox
|
|
1066
|
+
*/
|
|
1081
1067
|
label?: JSX.Element | string | undefined;
|
|
1082
1068
|
/**
|
|
1083
|
-
|
|
1084
|
-
|
|
1069
|
+
* The description for the checkbox
|
|
1070
|
+
*/
|
|
1085
1071
|
labelDescription?: JSX.Element | string | undefined;
|
|
1086
1072
|
/**
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1073
|
+
* Should match the ID attribute of the checkbox.
|
|
1074
|
+
* Can be used to group together multiple checkboxes
|
|
1075
|
+
*/
|
|
1090
1076
|
name?: string;
|
|
1091
1077
|
/**
|
|
1092
|
-
|
|
1093
|
-
|
|
1078
|
+
* Callback function invoked when the checkbox value changes
|
|
1079
|
+
*/
|
|
1094
1080
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
1095
1081
|
/**
|
|
1096
|
-
|
|
1097
|
-
|
|
1082
|
+
* Make Input a required element
|
|
1083
|
+
*/
|
|
1098
1084
|
required?: boolean;
|
|
1099
1085
|
/**
|
|
1100
|
-
|
|
1101
|
-
|
|
1086
|
+
* The value attribute of the checkbox
|
|
1087
|
+
*/
|
|
1102
1088
|
value?: string;
|
|
1103
1089
|
};
|
|
1104
1090
|
declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -1109,47 +1095,47 @@ type CheckboxPropsWithName = Omit<CheckboxProps, "name"> & {
|
|
|
1109
1095
|
};
|
|
1110
1096
|
type CheckboxGroupProps = Omit<ComponentPropsWithoutRef<"div">, "onChange"> & {
|
|
1111
1097
|
/**
|
|
1112
|
-
|
|
1113
|
-
|
|
1098
|
+
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
1099
|
+
*/
|
|
1114
1100
|
direction?: "column" | "row";
|
|
1115
1101
|
/**
|
|
1116
|
-
|
|
1117
|
-
|
|
1102
|
+
* Whether CheckboxGroup is disabled
|
|
1103
|
+
*/
|
|
1118
1104
|
disabled?: boolean;
|
|
1119
1105
|
/**
|
|
1120
|
-
|
|
1121
|
-
|
|
1106
|
+
* Error message to be displayed
|
|
1107
|
+
*/
|
|
1122
1108
|
error?: string | undefined;
|
|
1123
1109
|
/**
|
|
1124
|
-
|
|
1125
|
-
|
|
1110
|
+
* The label for the form field
|
|
1111
|
+
*/
|
|
1126
1112
|
label?: JSX.Element | string | undefined;
|
|
1127
1113
|
/**
|
|
1128
|
-
|
|
1129
|
-
|
|
1114
|
+
* The hint/helper text under the label
|
|
1115
|
+
*/
|
|
1130
1116
|
labelDescription?: JSX.Element | string | undefined;
|
|
1131
1117
|
/**
|
|
1132
|
-
|
|
1133
|
-
|
|
1118
|
+
* Props that are passed through to the underlying `<Label>` component
|
|
1119
|
+
*/
|
|
1134
1120
|
labelProps?: {
|
|
1135
1121
|
disabled?: boolean;
|
|
1136
1122
|
screenReaderOnly?: boolean;
|
|
1137
1123
|
};
|
|
1138
1124
|
/**
|
|
1139
|
-
|
|
1140
|
-
|
|
1125
|
+
* Name of the form element
|
|
1126
|
+
*/
|
|
1141
1127
|
name: string;
|
|
1142
1128
|
/**
|
|
1143
|
-
|
|
1144
|
-
|
|
1129
|
+
* Callback function invoked when the value changes
|
|
1130
|
+
*/
|
|
1145
1131
|
onChange?: (event: ChangeEvent<HTMLInputElement>, name: string) => unknown;
|
|
1146
1132
|
/**
|
|
1147
|
-
|
|
1148
|
-
|
|
1133
|
+
* Array of checkbox attributes
|
|
1134
|
+
*/
|
|
1149
1135
|
options: CheckboxPropsWithName[];
|
|
1150
1136
|
/**
|
|
1151
|
-
|
|
1152
|
-
|
|
1137
|
+
* Currently selected checkbox value
|
|
1138
|
+
*/
|
|
1153
1139
|
value?: string[] | boolean | undefined;
|
|
1154
1140
|
};
|
|
1155
1141
|
declare const CheckboxGroup: FC<CheckboxGroupProps>;
|
|
@@ -1157,43 +1143,43 @@ declare const CheckboxGroup: FC<CheckboxGroupProps>;
|
|
|
1157
1143
|
//#region src/components/ClickArea/ClickArea.d.ts
|
|
1158
1144
|
type ClickAreaProps = ComponentPropsWithRef<"div"> & {
|
|
1159
1145
|
/**
|
|
1160
|
-
|
|
1161
|
-
|
|
1146
|
+
* Supply an element or Component to render as the root compoennt (default is div)
|
|
1147
|
+
*/
|
|
1162
1148
|
renderAs?: ElementType;
|
|
1163
1149
|
/**
|
|
1164
|
-
|
|
1165
|
-
|
|
1150
|
+
* The content within the clickarea
|
|
1151
|
+
*/
|
|
1166
1152
|
children: ReactNode;
|
|
1167
1153
|
/**
|
|
1168
|
-
|
|
1169
|
-
|
|
1154
|
+
* If provided, this click event happens instead of the target ref's click event
|
|
1155
|
+
*/
|
|
1170
1156
|
onClick?: (event: Event) => void;
|
|
1171
1157
|
/**
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1158
|
+
* A ref to the element within chldren that will be used as the target of the click event
|
|
1159
|
+
* Should typically be a button or link
|
|
1160
|
+
*/
|
|
1175
1161
|
targetRef: RefObject<HTMLElement | null>;
|
|
1176
1162
|
};
|
|
1177
1163
|
/**
|
|
1178
|
-
* ClickArea is useful when you want an entire element to be clickable, such as a card or an item in a list. Making the
|
|
1179
|
-
* entire element clickable provides a better click target for users, especially on mobile devices. The problem with this is
|
|
1180
|
-
* clickable divs are not accessible or tabbable. Using a `button` or `a` tag causes both styling and screenreader problems.
|
|
1181
|
-
*
|
|
1182
|
-
* To solve these issues, `ClickArea` maps a click event on the container element to a click event on a button or link within
|
|
1183
|
-
* it, via a ref. Assistive devices can utilize the target element and ignore the container element's click property.
|
|
1184
|
-
*
|
|
1185
|
-
* ClickArea also makes having interactive elements within the clickable container easier. For example, if you have a card element
|
|
1186
|
-
* that is clickable but with a "close" button in the top right, include `event.preventDefault()` in the close button's click handler
|
|
1187
|
-
* to prevent the container's click handler from firing.
|
|
1188
|
-
*
|
|
1189
|
-
*/
|
|
1164
|
+
* ClickArea is useful when you want an entire element to be clickable, such as a card or an item in a list. Making the
|
|
1165
|
+
* entire element clickable provides a better click target for users, especially on mobile devices. The problem with this is
|
|
1166
|
+
* clickable divs are not accessible or tabbable. Using a `button` or `a` tag causes both styling and screenreader problems.
|
|
1167
|
+
*
|
|
1168
|
+
* To solve these issues, `ClickArea` maps a click event on the container element to a click event on a button or link within
|
|
1169
|
+
* it, via a ref. Assistive devices can utilize the target element and ignore the container element's click property.
|
|
1170
|
+
*
|
|
1171
|
+
* ClickArea also makes having interactive elements within the clickable container easier. For example, if you have a card element
|
|
1172
|
+
* that is clickable but with a "close" button in the top right, include `event.preventDefault()` in the close button's click handler
|
|
1173
|
+
* to prevent the container's click handler from firing.
|
|
1174
|
+
*
|
|
1175
|
+
*/
|
|
1190
1176
|
declare const ClickArea: ForwardRefExoticComponent<ClickAreaProps & RefAttributes<HTMLElement>>;
|
|
1191
1177
|
//#endregion
|
|
1192
1178
|
//#region src/components/CloseButton/CloseButton.d.ts
|
|
1193
1179
|
type CloseButtonProps = ComponentPropsWithoutRef<"button"> & {
|
|
1194
1180
|
/**
|
|
1195
|
-
|
|
1196
|
-
|
|
1181
|
+
* Callback function invoked when the button is clicked
|
|
1182
|
+
*/
|
|
1197
1183
|
onClick?: () => void;
|
|
1198
1184
|
};
|
|
1199
1185
|
declare const CloseButton: FC<CloseButtonProps>;
|
|
@@ -1206,74 +1192,71 @@ declare const CARET_DIRECTION_LEFT = "left";
|
|
|
1206
1192
|
declare const CARET_DIRECTION_RIGHT = "right";
|
|
1207
1193
|
type CollapsibleGroupProps = {
|
|
1208
1194
|
/**
|
|
1209
|
-
|
|
1210
|
-
|
|
1195
|
+
* Slot for adjacent options
|
|
1196
|
+
*/
|
|
1211
1197
|
actions?: ReactNode;
|
|
1212
1198
|
/**
|
|
1213
|
-
|
|
1214
|
-
|
|
1199
|
+
* Custom background color
|
|
1200
|
+
*/
|
|
1215
1201
|
backgroundColor?: string;
|
|
1216
1202
|
/**
|
|
1217
|
-
|
|
1218
|
-
|
|
1203
|
+
* Custom direction of the caret when open or closed
|
|
1204
|
+
*/
|
|
1219
1205
|
caretDirection?: {
|
|
1220
1206
|
closed: typeof CARET_DIRECTION_DOWN | typeof CARET_DIRECTION_LEFT | typeof CARET_DIRECTION_RIGHT | typeof CARET_DIRECTION_UP;
|
|
1221
1207
|
open: typeof CARET_DIRECTION_DOWN | typeof CARET_DIRECTION_LEFT | typeof CARET_DIRECTION_RIGHT | typeof CARET_DIRECTION_UP;
|
|
1222
1208
|
};
|
|
1223
1209
|
/**
|
|
1224
|
-
|
|
1225
|
-
|
|
1210
|
+
* Toggleable contents
|
|
1211
|
+
*/
|
|
1226
1212
|
children?: ReactNode;
|
|
1227
1213
|
/**
|
|
1228
|
-
|
|
1229
|
-
|
|
1214
|
+
* Optional CSS padding to be applied to the content container
|
|
1215
|
+
*/
|
|
1230
1216
|
contentPadding?: string | null;
|
|
1231
1217
|
/**
|
|
1232
|
-
|
|
1233
|
-
|
|
1218
|
+
* The control has a caret by default. Set this to true to suppress the caret
|
|
1219
|
+
*/
|
|
1234
1220
|
hideCaret?: boolean;
|
|
1235
1221
|
/**
|
|
1236
|
-
|
|
1237
|
-
|
|
1222
|
+
* Optional ID attribute
|
|
1223
|
+
*/
|
|
1238
1224
|
id?: string;
|
|
1239
1225
|
/**
|
|
1240
|
-
|
|
1241
|
-
|
|
1226
|
+
* Control the initial open state. If not provided, the default is to start closed.
|
|
1227
|
+
*/
|
|
1242
1228
|
isOpen?: boolean;
|
|
1243
1229
|
/**
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
label?: ReactNode | (({
|
|
1247
|
-
open,
|
|
1248
|
-
caret
|
|
1249
|
-
}: {
|
|
1230
|
+
* Clickable text label for the control, or perhaps an inline editable
|
|
1231
|
+
* control? Whatever suits you */
|
|
1232
|
+
label?: ReactNode | (({ open, caret }: {
|
|
1250
1233
|
open: boolean;
|
|
1251
1234
|
caret: JSX.Element;
|
|
1252
1235
|
}) => ReactNode);
|
|
1253
1236
|
/**
|
|
1254
|
-
|
|
1255
|
-
|
|
1237
|
+
* Choose on which side the caret shows
|
|
1238
|
+
*/
|
|
1256
1239
|
layout?: "leading" | "trailing";
|
|
1257
1240
|
/**
|
|
1258
|
-
|
|
1259
|
-
|
|
1241
|
+
* Callback function invoked when the button is clicked
|
|
1242
|
+
*/
|
|
1260
1243
|
onClick?: () => unknown;
|
|
1261
1244
|
/**
|
|
1262
|
-
|
|
1263
|
-
|
|
1245
|
+
* Callback function invoked when the open state changes
|
|
1246
|
+
*/
|
|
1264
1247
|
onOpenChange?: (newOpen: boolean) => unknown;
|
|
1265
1248
|
/**
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1249
|
+
* Extra actions are hidden by default and shown on hover. Set this to false
|
|
1250
|
+
* to make always visible
|
|
1251
|
+
*/
|
|
1269
1252
|
showActionsOnHover?: boolean;
|
|
1270
1253
|
/**
|
|
1271
|
-
|
|
1272
|
-
|
|
1254
|
+
* Display the open / close transition animation
|
|
1255
|
+
*/
|
|
1273
1256
|
showTransition?: boolean;
|
|
1274
1257
|
/**
|
|
1275
|
-
|
|
1276
|
-
|
|
1258
|
+
* Changes the styling of the collapsible group banner when active
|
|
1259
|
+
*/
|
|
1277
1260
|
variant?: typeof VARIANT_BRAND_BLUE;
|
|
1278
1261
|
};
|
|
1279
1262
|
declare const CollapsibleGroup: FC<CollapsibleGroupProps>;
|
|
@@ -1281,16 +1264,16 @@ declare const CollapsibleGroup: FC<CollapsibleGroupProps>;
|
|
|
1281
1264
|
//#region src/components/Divider/Divider.d.ts
|
|
1282
1265
|
type DividerProps = ComponentPropsWithoutRef<"hr"> & {
|
|
1283
1266
|
/**
|
|
1284
|
-
|
|
1285
|
-
|
|
1267
|
+
* Allows user to override default divider color
|
|
1268
|
+
*/
|
|
1286
1269
|
colorOverride?: string;
|
|
1287
1270
|
/**
|
|
1288
|
-
|
|
1289
|
-
|
|
1271
|
+
* Height (in pixels) of divider
|
|
1272
|
+
*/
|
|
1290
1273
|
height?: number;
|
|
1291
1274
|
/**
|
|
1292
|
-
|
|
1293
|
-
|
|
1275
|
+
* The visual type of divider to display
|
|
1276
|
+
*/
|
|
1294
1277
|
variant?: "dashed" | "solid";
|
|
1295
1278
|
};
|
|
1296
1279
|
declare const Divider: FC<DividerProps>;
|
|
@@ -1300,12 +1283,12 @@ declare const ellipsisStyle: RuleSet<object>;
|
|
|
1300
1283
|
declare const ellipsisFlexParentStyle: RuleSet<object>;
|
|
1301
1284
|
type EllipsisProps = ComponentPropsWithoutRef<"div"> & {
|
|
1302
1285
|
/**
|
|
1303
|
-
|
|
1304
|
-
|
|
1286
|
+
* The text that will be truncated with an ellipsis
|
|
1287
|
+
*/
|
|
1305
1288
|
children?: ReactNode;
|
|
1306
1289
|
/**
|
|
1307
|
-
|
|
1308
|
-
|
|
1290
|
+
* The number that will be truncated with an ellipsis
|
|
1291
|
+
*/
|
|
1309
1292
|
lines?: number;
|
|
1310
1293
|
};
|
|
1311
1294
|
declare const Ellipsis: FC<EllipsisProps>;
|
|
@@ -1313,45 +1296,45 @@ declare const Ellipsis: FC<EllipsisProps>;
|
|
|
1313
1296
|
//#region src/components/FileSelect/FileSelect.d.ts
|
|
1314
1297
|
type FileSelectProps = {
|
|
1315
1298
|
/**
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1299
|
+
* Allowlist of file types that the server will accept
|
|
1300
|
+
* (see: <a href="https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-accept">file input docs</a>)
|
|
1301
|
+
*/
|
|
1319
1302
|
accept: string;
|
|
1320
1303
|
/**
|
|
1321
|
-
|
|
1322
|
-
|
|
1304
|
+
* Pass an arbitrary child node
|
|
1305
|
+
*/
|
|
1323
1306
|
children: ReactNode;
|
|
1324
1307
|
/**
|
|
1325
|
-
|
|
1326
|
-
|
|
1308
|
+
* Disable the input. <em>Note: Does not "disable" the child component, only the hidden input</em>
|
|
1309
|
+
*/
|
|
1327
1310
|
disabled?: boolean;
|
|
1328
1311
|
/**
|
|
1329
|
-
|
|
1330
|
-
|
|
1312
|
+
* ID of the input
|
|
1313
|
+
*/
|
|
1331
1314
|
id: string;
|
|
1332
1315
|
/**
|
|
1333
|
-
|
|
1334
|
-
|
|
1316
|
+
* File size limit specified in MB
|
|
1317
|
+
*/
|
|
1335
1318
|
maxSize?: number;
|
|
1336
1319
|
/**
|
|
1337
|
-
|
|
1338
|
-
|
|
1320
|
+
* Allow multiple files to be selected
|
|
1321
|
+
*/
|
|
1339
1322
|
multiple?: boolean;
|
|
1340
1323
|
/**
|
|
1341
|
-
|
|
1342
|
-
|
|
1324
|
+
* Name of the input
|
|
1325
|
+
*/
|
|
1343
1326
|
name?: string;
|
|
1344
1327
|
/**
|
|
1345
|
-
|
|
1346
|
-
|
|
1328
|
+
* Callback invoked when file has been selected
|
|
1329
|
+
*/
|
|
1347
1330
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
1348
1331
|
/**
|
|
1349
|
-
|
|
1350
|
-
|
|
1332
|
+
* Callback invoked when the file input is clicked (before the file has been selected)
|
|
1333
|
+
*/
|
|
1351
1334
|
onClick?: (...args: unknown[]) => unknown;
|
|
1352
1335
|
/**
|
|
1353
|
-
|
|
1354
|
-
|
|
1336
|
+
* Callback invoked when there is an error selecting file(s)
|
|
1337
|
+
*/
|
|
1355
1338
|
onError?: (error: Error) => void;
|
|
1356
1339
|
};
|
|
1357
1340
|
declare const FileSelect: ForwardRefExoticComponent<FileSelectProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -1362,68 +1345,68 @@ type Values = Record<string, unknown>;
|
|
|
1362
1345
|
type FormState = FormikProps<Values>;
|
|
1363
1346
|
type FormProps = {
|
|
1364
1347
|
/**
|
|
1365
|
-
|
|
1366
|
-
|
|
1348
|
+
* Pass an arbitrary child node
|
|
1349
|
+
*/
|
|
1367
1350
|
children?: ReactNode;
|
|
1368
1351
|
/**
|
|
1369
|
-
|
|
1370
|
-
|
|
1352
|
+
* Class(es) to be applied to formik container
|
|
1353
|
+
*/
|
|
1371
1354
|
className?: string;
|
|
1372
1355
|
/**
|
|
1373
|
-
|
|
1374
|
-
|
|
1356
|
+
* Unique ID for Form, used for React Testing Library
|
|
1357
|
+
*/
|
|
1375
1358
|
formId: string;
|
|
1376
1359
|
/**
|
|
1377
|
-
|
|
1378
|
-
|
|
1360
|
+
* Ref required to be ref of FormGlobalError. Simply assign `const globalErrorRef = useRef(null)`. Either a function or the instance of a DOM native element.
|
|
1361
|
+
*/
|
|
1379
1362
|
globalErrorRef: RefObject<HTMLElement | null | undefined>;
|
|
1380
1363
|
/**
|
|
1381
|
-
|
|
1382
|
-
|
|
1364
|
+
* Form input values on initial load, often populated from server
|
|
1365
|
+
*/
|
|
1383
1366
|
initialValues: ValuesType;
|
|
1384
1367
|
/**
|
|
1385
|
-
|
|
1386
|
-
|
|
1368
|
+
* Ref to access the form's state and API
|
|
1369
|
+
*/
|
|
1387
1370
|
innerRef?: Ref<FormState>;
|
|
1388
1371
|
/**
|
|
1389
|
-
|
|
1390
|
-
|
|
1372
|
+
* On-submit callback
|
|
1373
|
+
*/
|
|
1391
1374
|
onSubmit: (values: Record<string, unknown>, ref: FormikHelpers<Values>) => unknown;
|
|
1392
1375
|
/**
|
|
1393
|
-
|
|
1394
|
-
|
|
1376
|
+
* On form submission with errors (isValid=false), scroll to GlobalError section
|
|
1377
|
+
*/
|
|
1395
1378
|
scrollToFormErrorsOnSubmit?: boolean;
|
|
1396
1379
|
/**
|
|
1397
|
-
|
|
1398
|
-
|
|
1380
|
+
* 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)
|
|
1381
|
+
*/
|
|
1399
1382
|
shareFormContext?: (props: FormikProps<Values>) => unknown;
|
|
1400
1383
|
/**
|
|
1401
|
-
|
|
1402
|
-
|
|
1384
|
+
* Show a top-level rundown of all the errors in the form
|
|
1385
|
+
*/
|
|
1403
1386
|
showGlobalError?: boolean;
|
|
1404
1387
|
/**
|
|
1405
|
-
|
|
1406
|
-
|
|
1388
|
+
* Style object applied to Form component
|
|
1389
|
+
*/
|
|
1407
1390
|
style?: Record<string, string>;
|
|
1408
1391
|
/**
|
|
1409
|
-
|
|
1410
|
-
|
|
1392
|
+
* Should form submit when an input's onChange is invoked?
|
|
1393
|
+
*/
|
|
1411
1394
|
submitOnChange?: boolean;
|
|
1412
1395
|
/**
|
|
1413
|
-
|
|
1414
|
-
|
|
1396
|
+
* Validate function passed to formik
|
|
1397
|
+
*/
|
|
1415
1398
|
validate?: (values: Values) => Promise<FormikErrors<Values>> | object | void;
|
|
1416
1399
|
/**
|
|
1417
|
-
|
|
1418
|
-
|
|
1400
|
+
* Should form run validate function on form blur?
|
|
1401
|
+
*/
|
|
1419
1402
|
validateOnBlur?: boolean;
|
|
1420
1403
|
/**
|
|
1421
|
-
|
|
1422
|
-
|
|
1404
|
+
* Should form run validate function on form change?
|
|
1405
|
+
*/
|
|
1423
1406
|
validateOnChange?: boolean;
|
|
1424
1407
|
/**
|
|
1425
|
-
|
|
1426
|
-
|
|
1408
|
+
* __[`yup` schema](https://github.com/jquense/yup#yup)__
|
|
1409
|
+
*/
|
|
1427
1410
|
validationSchema?: ValidationSchemaType;
|
|
1428
1411
|
};
|
|
1429
1412
|
type ValidationSchemaType = {
|
|
@@ -1439,12 +1422,12 @@ type ButtonsType = {
|
|
|
1439
1422
|
};
|
|
1440
1423
|
type FormButtonsProps = {
|
|
1441
1424
|
/**
|
|
1442
|
-
|
|
1443
|
-
|
|
1425
|
+
* Align button left (typically on a page) or right (typically on a modal).
|
|
1426
|
+
*/
|
|
1444
1427
|
align?: "left" | "right";
|
|
1445
1428
|
/**
|
|
1446
|
-
|
|
1447
|
-
|
|
1429
|
+
* Each button object must have a name, but can also be passed any props that apply to a Button component.
|
|
1430
|
+
*/
|
|
1448
1431
|
buttons: ButtonsType[];
|
|
1449
1432
|
};
|
|
1450
1433
|
declare const FormButtons: FC<FormButtonsProps>;
|
|
@@ -1483,14 +1466,6 @@ type NodeLeafObject = {
|
|
|
1483
1466
|
url?: string;
|
|
1484
1467
|
underline?: boolean;
|
|
1485
1468
|
};
|
|
1486
|
-
type CustomEditor = BaseEditor & HistoryEditor & ReactEditor;
|
|
1487
|
-
declare module "slate" {
|
|
1488
|
-
interface CustomTypes {
|
|
1489
|
-
Editor: CustomEditor;
|
|
1490
|
-
Element: NodeElementObject;
|
|
1491
|
-
Text: NodeLeafObject;
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
1469
|
//#endregion
|
|
1495
1470
|
//#region src/components/RichTextEditor/utilities/rteFormatTypes.d.ts
|
|
1496
1471
|
declare const rteFormatTypes: {
|
|
@@ -1510,59 +1485,59 @@ declare const rteFormatTypes: {
|
|
|
1510
1485
|
//#region src/components/FormField/FormField.d.ts
|
|
1511
1486
|
type FormFieldProps = Omit<ComponentPropsWithRef<"input">, "placeholder"> & {
|
|
1512
1487
|
/**
|
|
1513
|
-
|
|
1514
|
-
|
|
1488
|
+
* A custom component that acts as a field and that needs access to Formik fields
|
|
1489
|
+
*/
|
|
1515
1490
|
customComponent?: ComponentClass<CustomComponentClass> | ((arg?: ComponentProps<typeof Field>) => ReactNode) | ((arg?: Record<string, unknown>) => ReactNode) | undefined;
|
|
1516
1491
|
/**
|
|
1517
|
-
|
|
1518
|
-
|
|
1492
|
+
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
1493
|
+
*/
|
|
1519
1494
|
direction?: "column" | "row";
|
|
1520
1495
|
/**
|
|
1521
|
-
|
|
1522
|
-
|
|
1496
|
+
* Disables form field
|
|
1497
|
+
*/
|
|
1523
1498
|
disabled?: boolean;
|
|
1524
1499
|
/**
|
|
1525
|
-
|
|
1526
|
-
|
|
1500
|
+
* Only takes effect if type is richTextEditor. An array of formats that should be enabled in the toolbar.
|
|
1501
|
+
*/
|
|
1527
1502
|
enabledFormats?: (keyof typeof rteFormatTypes)[];
|
|
1528
1503
|
/**
|
|
1529
|
-
|
|
1530
|
-
|
|
1504
|
+
* Visual label above the input
|
|
1505
|
+
*/
|
|
1531
1506
|
label?: JSX.Element | string | undefined;
|
|
1532
1507
|
/**
|
|
1533
|
-
|
|
1534
|
-
|
|
1508
|
+
* The hint/helper text under the label
|
|
1509
|
+
*/
|
|
1535
1510
|
labelDescription?: ReactNode;
|
|
1536
1511
|
/**
|
|
1537
|
-
|
|
1538
|
-
|
|
1512
|
+
* Props that are passed through to the underlying `<Label>` component
|
|
1513
|
+
*/
|
|
1539
1514
|
labelProps?: {
|
|
1540
1515
|
disabled?: boolean;
|
|
1541
1516
|
screenReaderOnly?: boolean;
|
|
1542
1517
|
};
|
|
1543
1518
|
/**
|
|
1544
|
-
|
|
1545
|
-
|
|
1519
|
+
* HTML "name" attribute. Also needs to be unique in the form
|
|
1520
|
+
*/
|
|
1546
1521
|
name?: string;
|
|
1547
1522
|
/**
|
|
1548
|
-
|
|
1549
|
-
|
|
1523
|
+
* Custom onChange callback add-on. args: "value"
|
|
1524
|
+
*/
|
|
1550
1525
|
onChangeCustom?: (value: string) => unknown;
|
|
1551
1526
|
/**
|
|
1552
|
-
|
|
1553
|
-
|
|
1527
|
+
* Options passed down to the `<Field>` component
|
|
1528
|
+
*/
|
|
1554
1529
|
options?: Record<string, unknown>[];
|
|
1555
1530
|
/**
|
|
1556
|
-
|
|
1557
|
-
|
|
1531
|
+
* Input's visual placeholder text
|
|
1532
|
+
*/
|
|
1558
1533
|
placeholder?: string | null | undefined;
|
|
1559
1534
|
/**
|
|
1560
|
-
|
|
1561
|
-
|
|
1535
|
+
* Allows user to vertically or horizontally resize the form field, or to disable resizing altogether
|
|
1536
|
+
*/
|
|
1562
1537
|
resize?: "horizontal" | "none" | "vertical";
|
|
1563
1538
|
/**
|
|
1564
|
-
|
|
1565
|
-
|
|
1539
|
+
* The type of the field sets the type of input or select, texarea, radio, checkbox, etc.
|
|
1540
|
+
*/
|
|
1566
1541
|
type: "checkbox" | "custom" | "email" | "hidden" | "multiline" | "number" | "password" | "radio" | "richTextEditor" | "select" | "text" | "url";
|
|
1567
1542
|
};
|
|
1568
1543
|
declare const FormField: ForwardRefExoticComponent<FormFieldProps & RefAttributes<HTMLElement>>;
|
|
@@ -1579,28 +1554,28 @@ declare const FormGlobalError: ForwardRefExoticComponent<RefAttributes<HTMLDivEl
|
|
|
1579
1554
|
//#region src/components/FullScreenModal/FullScreenModal.d.ts
|
|
1580
1555
|
type FullScreenModalProps = {
|
|
1581
1556
|
/**
|
|
1582
|
-
|
|
1583
|
-
|
|
1557
|
+
* Color of the modal background
|
|
1558
|
+
*/
|
|
1584
1559
|
backgroundColor?: string;
|
|
1585
1560
|
/**
|
|
1586
|
-
|
|
1587
|
-
|
|
1561
|
+
* Contents of the modal
|
|
1562
|
+
*/
|
|
1588
1563
|
content: (hide: () => unknown) => ReactNode;
|
|
1589
1564
|
/**
|
|
1590
|
-
|
|
1591
|
-
|
|
1565
|
+
* Render the modal initially in shown state
|
|
1566
|
+
*/
|
|
1592
1567
|
initialShownState?: boolean;
|
|
1593
1568
|
/**
|
|
1594
|
-
|
|
1595
|
-
|
|
1569
|
+
* Callback invoked before the modal is hidden
|
|
1570
|
+
*/
|
|
1596
1571
|
onBeforeHide?: (() => OnBeforeHideInterface) | undefined;
|
|
1597
1572
|
/**
|
|
1598
|
-
|
|
1599
|
-
|
|
1573
|
+
* Callback invoked when the modal is shown
|
|
1574
|
+
*/
|
|
1600
1575
|
onHide?: () => unknown;
|
|
1601
1576
|
/**
|
|
1602
|
-
|
|
1603
|
-
|
|
1577
|
+
* function(show, ref) that returns a node to open the modal
|
|
1578
|
+
*/
|
|
1604
1579
|
toggle?: ((show: () => unknown, toggleButtonRef?: RefObject<HTMLElement | null | undefined>) => ReactNode) | undefined;
|
|
1605
1580
|
};
|
|
1606
1581
|
declare const FullScreenModal: FC<FullScreenModalProps>;
|
|
@@ -1615,20 +1590,20 @@ declare const iconSizeMap: {
|
|
|
1615
1590
|
};
|
|
1616
1591
|
type IconProps = ComponentPropsWithoutRef<"svg"> & {
|
|
1617
1592
|
/**
|
|
1618
|
-
|
|
1619
|
-
|
|
1593
|
+
* Color (as hex) of the Icon
|
|
1594
|
+
*/
|
|
1620
1595
|
color?: string;
|
|
1621
1596
|
/**
|
|
1622
|
-
|
|
1623
|
-
|
|
1597
|
+
* The size of the icon to display
|
|
1598
|
+
*/
|
|
1624
1599
|
size?: keyof typeof iconSizeMap;
|
|
1625
1600
|
/**
|
|
1626
|
-
|
|
1627
|
-
|
|
1601
|
+
* @ignore
|
|
1602
|
+
*/
|
|
1628
1603
|
style?: Record<string, unknown>;
|
|
1629
1604
|
/**
|
|
1630
|
-
|
|
1631
|
-
|
|
1605
|
+
* Determines which icon to display
|
|
1606
|
+
*/
|
|
1632
1607
|
type: IconNameType;
|
|
1633
1608
|
};
|
|
1634
1609
|
declare const Icon: FC<IconProps>;
|
|
@@ -1647,40 +1622,40 @@ type sizeType = keyof typeof sizeMap;
|
|
|
1647
1622
|
type componentStyleType = keyof typeof componentStyleMap;
|
|
1648
1623
|
type IconButtonProps = ComponentPropsWithRef<"button"> & {
|
|
1649
1624
|
/**
|
|
1650
|
-
|
|
1651
|
-
|
|
1625
|
+
* Allows user to override default button colors
|
|
1626
|
+
*/
|
|
1652
1627
|
colorOverride?: string | undefined;
|
|
1653
1628
|
/**
|
|
1654
|
-
|
|
1655
|
-
|
|
1629
|
+
* Choose light styles if this component appears on a dark background
|
|
1630
|
+
*/
|
|
1656
1631
|
componentStyle?: componentStyleType;
|
|
1657
1632
|
/**
|
|
1658
|
-
|
|
1659
|
-
|
|
1633
|
+
* Disables button
|
|
1634
|
+
*/
|
|
1660
1635
|
disabled?: boolean;
|
|
1661
1636
|
/**
|
|
1662
|
-
|
|
1663
|
-
|
|
1637
|
+
* An SVG component
|
|
1638
|
+
*/
|
|
1664
1639
|
icon?: ReactNode;
|
|
1665
1640
|
/**
|
|
1666
|
-
|
|
1667
|
-
|
|
1641
|
+
* Text that appears as a tooltip when the user hovers over the button
|
|
1642
|
+
*/
|
|
1668
1643
|
label?: string;
|
|
1669
1644
|
/**
|
|
1670
|
-
|
|
1671
|
-
|
|
1645
|
+
* Callback function invoked when the button is clicked
|
|
1646
|
+
*/
|
|
1672
1647
|
onClick?: ((event: MouseEvent) => void) | undefined;
|
|
1673
1648
|
/**
|
|
1674
|
-
|
|
1675
|
-
|
|
1649
|
+
* Prevent a Tooltip from appearing on hover
|
|
1650
|
+
*/
|
|
1676
1651
|
preventTooltip?: boolean;
|
|
1677
1652
|
/**
|
|
1678
|
-
|
|
1679
|
-
|
|
1653
|
+
* The size of the button
|
|
1654
|
+
*/
|
|
1680
1655
|
size?: sizeType;
|
|
1681
1656
|
/**
|
|
1682
|
-
|
|
1683
|
-
|
|
1657
|
+
* The direction of the tooltip
|
|
1658
|
+
*/
|
|
1684
1659
|
tooltipDirection?: "bottom" | "left" | "right" | "top";
|
|
1685
1660
|
};
|
|
1686
1661
|
declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -1688,33 +1663,33 @@ declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttribu
|
|
|
1688
1663
|
//#region src/components/Image/Image.d.ts
|
|
1689
1664
|
type ImageProps = ComponentPropsWithoutRef<"img"> & {
|
|
1690
1665
|
/**
|
|
1691
|
-
|
|
1692
|
-
|
|
1666
|
+
* Accessible text to apply to the image
|
|
1667
|
+
*/
|
|
1693
1668
|
alt: string;
|
|
1694
1669
|
/**
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1670
|
+
* Specifies whether the width and/or height should fill the container
|
|
1671
|
+
*
|
|
1672
|
+
* *Note: this will override height/width attributes*
|
|
1673
|
+
*/
|
|
1699
1674
|
fill?: boolean | "horizontal" | "vertical";
|
|
1700
1675
|
/**
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1676
|
+
* Specifies how the image's intrinsic size (ie. its natural size) should
|
|
1677
|
+
* be adjusted to fit within its container
|
|
1678
|
+
*/
|
|
1704
1679
|
fit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
1705
1680
|
/**
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1681
|
+
* Indicates how the browser should load the image; `eager`loads the image immediately,
|
|
1682
|
+
* `lazy` defers loading the image until it reaches a calculated distance from the viewport.
|
|
1683
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
|
|
1684
|
+
*/
|
|
1710
1685
|
loading?: "eager" | "lazy";
|
|
1711
1686
|
/**
|
|
1712
|
-
|
|
1713
|
-
|
|
1687
|
+
* Specifies how the image will align itself in its container
|
|
1688
|
+
*/
|
|
1714
1689
|
position?: string;
|
|
1715
1690
|
/**
|
|
1716
|
-
|
|
1717
|
-
|
|
1691
|
+
* URL to image file
|
|
1692
|
+
*/
|
|
1718
1693
|
src: string;
|
|
1719
1694
|
};
|
|
1720
1695
|
declare const Image: FC<ImageProps>;
|
|
@@ -1724,85 +1699,85 @@ type IconPositionStrings = "end" | "start";
|
|
|
1724
1699
|
type ForcedStateStrings = "active" | "focus" | "hover";
|
|
1725
1700
|
type InputProps = ComponentPropsWithRef<"input"> & {
|
|
1726
1701
|
/**
|
|
1727
|
-
|
|
1728
|
-
|
|
1702
|
+
* Copy-to-clipboard-on-click of input's value with copy icon
|
|
1703
|
+
*/
|
|
1729
1704
|
clickToCopy?: boolean;
|
|
1730
1705
|
/**
|
|
1731
|
-
|
|
1732
|
-
|
|
1706
|
+
* Disables Input
|
|
1707
|
+
*/
|
|
1733
1708
|
disabled?: boolean | undefined;
|
|
1734
1709
|
/**
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1710
|
+
* @ignore
|
|
1711
|
+
* Force an Input into a particular css state (for debugging)
|
|
1712
|
+
*/
|
|
1738
1713
|
forceState?: ForcedStateStrings;
|
|
1739
1714
|
/**
|
|
1740
|
-
|
|
1741
|
-
|
|
1715
|
+
* Should Input occupy 100% of available space
|
|
1716
|
+
*/
|
|
1742
1717
|
fullWidth?: boolean;
|
|
1743
1718
|
/**
|
|
1744
|
-
|
|
1745
|
-
|
|
1719
|
+
* Indicates that there is an error with the input
|
|
1720
|
+
*/
|
|
1746
1721
|
hasError?: boolean;
|
|
1747
1722
|
/**
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1723
|
+
* An SVG component that will appear on the right-hand side of the input
|
|
1724
|
+
* _Note:_ some input types will apply a icon by default
|
|
1725
|
+
*/
|
|
1751
1726
|
icon?: ReactNode;
|
|
1752
1727
|
/**
|
|
1753
|
-
|
|
1754
|
-
|
|
1728
|
+
* Indicates on which side of the input the icon should render. Will default to `end` unless the `type` prop is `search`.
|
|
1729
|
+
*/
|
|
1755
1730
|
iconPosition?: IconPositionStrings;
|
|
1756
1731
|
/**
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1732
|
+
* @ignore
|
|
1733
|
+
* This is a prop that is here for use by FormField. Otherwise,
|
|
1734
|
+
* the ref prop should just be used
|
|
1735
|
+
*/
|
|
1761
1736
|
innerRef?: RefObject<HTMLInputElement | null>;
|
|
1762
1737
|
/**
|
|
1763
|
-
|
|
1764
|
-
|
|
1738
|
+
* Displays text in monospace font
|
|
1739
|
+
*/
|
|
1765
1740
|
monospace?: boolean;
|
|
1766
1741
|
/**
|
|
1767
|
-
|
|
1768
|
-
|
|
1742
|
+
* Callback function invoked when the input focus blurs
|
|
1743
|
+
*/
|
|
1769
1744
|
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
1770
1745
|
/**
|
|
1771
|
-
|
|
1772
|
-
|
|
1746
|
+
* Callback function invoked when the input value changes
|
|
1747
|
+
*/
|
|
1773
1748
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
1774
1749
|
/**
|
|
1775
|
-
|
|
1776
|
-
|
|
1750
|
+
* Callback function invoked when the input value is copied
|
|
1751
|
+
*/
|
|
1777
1752
|
onClickToCopy?: () => void;
|
|
1778
1753
|
/**
|
|
1779
|
-
|
|
1780
|
-
|
|
1754
|
+
* Callback function invoked when the input is focused
|
|
1755
|
+
*/
|
|
1781
1756
|
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
1782
1757
|
/**
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1758
|
+
* Callback function that will select input text when input is focused;
|
|
1759
|
+
* receives event object but if that is not needed just pass a no-op function
|
|
1760
|
+
*/
|
|
1786
1761
|
onFocusToSelect?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
1787
1762
|
/**
|
|
1788
|
-
|
|
1789
|
-
|
|
1763
|
+
* A short hint for the user about what value the Input expects
|
|
1764
|
+
*/
|
|
1790
1765
|
placeholder?: string | undefined;
|
|
1791
1766
|
/**
|
|
1792
|
-
|
|
1793
|
-
|
|
1767
|
+
* Prevent the Input from being writable (different styling from disabled)
|
|
1768
|
+
*/
|
|
1794
1769
|
readOnly?: boolean;
|
|
1795
1770
|
/**
|
|
1796
|
-
|
|
1797
|
-
|
|
1771
|
+
* Make Input a required element
|
|
1772
|
+
*/
|
|
1798
1773
|
required?: boolean;
|
|
1799
1774
|
/**
|
|
1800
|
-
|
|
1801
|
-
|
|
1775
|
+
* The type of Input to render
|
|
1776
|
+
*/
|
|
1802
1777
|
type?: HTMLInputTypeAttribute;
|
|
1803
1778
|
/**
|
|
1804
|
-
|
|
1805
|
-
|
|
1779
|
+
* The content of Input
|
|
1780
|
+
*/
|
|
1806
1781
|
value?: number | string | undefined;
|
|
1807
1782
|
};
|
|
1808
1783
|
declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -1817,20 +1792,20 @@ type KeyboardKeys = AlphanumericKeyboardKeys | ArrowKeys | ModifierKeys | Whites
|
|
|
1817
1792
|
//#region src/components/KeyboardShortcut/KeyboardShortcut.d.ts
|
|
1818
1793
|
type KeyboardShortcutProps = ComponentPropsWithoutRef<"div"> & {
|
|
1819
1794
|
/**
|
|
1820
|
-
|
|
1821
|
-
|
|
1795
|
+
* @description The visual style of the keyboard shortcut. Choose light if the background is dark and dark if the background is light.
|
|
1796
|
+
*/
|
|
1822
1797
|
componentStyle?: "dark" | "light";
|
|
1823
1798
|
/**
|
|
1824
|
-
|
|
1825
|
-
|
|
1799
|
+
* @description If set to true, the keyboard shortcut will stretch the full width of its container.
|
|
1800
|
+
*/
|
|
1826
1801
|
fullWidth?: boolean;
|
|
1827
1802
|
/**
|
|
1828
|
-
|
|
1829
|
-
|
|
1803
|
+
* @description The keys displayed.
|
|
1804
|
+
*/
|
|
1830
1805
|
keyboardKeys: KeyboardKeys | KeyboardKeys[];
|
|
1831
1806
|
/**
|
|
1832
|
-
|
|
1833
|
-
|
|
1807
|
+
* @description A visual label for the keyboard shortcut.
|
|
1808
|
+
*/
|
|
1834
1809
|
label?: string;
|
|
1835
1810
|
};
|
|
1836
1811
|
declare const KeyboardShortcut: FC<KeyboardShortcutProps>;
|
|
@@ -1838,29 +1813,29 @@ declare const KeyboardShortcut: FC<KeyboardShortcutProps>;
|
|
|
1838
1813
|
//#region src/components/Label/Label.d.ts
|
|
1839
1814
|
type LabelProps = ComponentPropsWithoutRef<"label"> & {
|
|
1840
1815
|
/**
|
|
1841
|
-
|
|
1842
|
-
|
|
1816
|
+
* Pass an arbitrary child node
|
|
1817
|
+
*/
|
|
1843
1818
|
children?: ReactNode;
|
|
1844
1819
|
/**
|
|
1845
|
-
|
|
1846
|
-
|
|
1820
|
+
* To indicate that the label is for a disabled form component
|
|
1821
|
+
*/
|
|
1847
1822
|
disabled?: boolean;
|
|
1848
1823
|
/**
|
|
1849
|
-
|
|
1850
|
-
|
|
1824
|
+
* ID of the form component that the label should be associated with
|
|
1825
|
+
*/
|
|
1851
1826
|
htmlFor?: string | undefined;
|
|
1852
1827
|
/**
|
|
1853
|
-
|
|
1854
|
-
|
|
1828
|
+
* To use 'legend', 'p', 'span', or other instead of 'label'
|
|
1829
|
+
*/
|
|
1855
1830
|
renderAs?: "div" | "label" | "legend" | "p" | "span" | undefined;
|
|
1856
1831
|
/**
|
|
1857
|
-
|
|
1858
|
-
|
|
1832
|
+
* Use if label describes a required form component
|
|
1833
|
+
*/
|
|
1859
1834
|
required?: boolean;
|
|
1860
1835
|
/**
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1836
|
+
* For label text that needs to be available to assistive technology (e.g. screen readers)
|
|
1837
|
+
* but otherwise hidden on screen.
|
|
1838
|
+
*/
|
|
1864
1839
|
screenReaderOnly?: boolean;
|
|
1865
1840
|
};
|
|
1866
1841
|
declare const Label: FC<LabelProps>;
|
|
@@ -1875,37 +1850,37 @@ declare const LabelDescription: FC<LabelDescriptionProps>;
|
|
|
1875
1850
|
//#region src/components/LinkButton/LinkButton.d.ts
|
|
1876
1851
|
type LinkButtonProps = ComponentPropsWithoutRef<"button"> & {
|
|
1877
1852
|
/**
|
|
1878
|
-
|
|
1879
|
-
|
|
1853
|
+
* Pass an arbitrary child node
|
|
1854
|
+
*/
|
|
1880
1855
|
children?: ReactNode;
|
|
1881
1856
|
/**
|
|
1882
|
-
|
|
1883
|
-
|
|
1857
|
+
* Disables Button
|
|
1858
|
+
*/
|
|
1884
1859
|
disabled?: boolean;
|
|
1885
1860
|
/**
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1861
|
+
* @ignore
|
|
1862
|
+
* Force a Button into a particular css state (for debugging)
|
|
1863
|
+
*/
|
|
1889
1864
|
forceState?: "active" | "focus" | "hover";
|
|
1890
1865
|
/**
|
|
1891
|
-
|
|
1892
|
-
|
|
1866
|
+
* Text that appears inside the button
|
|
1867
|
+
*/
|
|
1893
1868
|
label?: string;
|
|
1894
1869
|
/**
|
|
1895
|
-
|
|
1896
|
-
|
|
1870
|
+
* Provides a button without any styling (useful for wrapping another element)
|
|
1871
|
+
*/
|
|
1897
1872
|
noStyle?: boolean;
|
|
1898
1873
|
/**
|
|
1899
|
-
|
|
1900
|
-
|
|
1874
|
+
* Callback function invoked when the button is clicked
|
|
1875
|
+
*/
|
|
1901
1876
|
onClick?: (event: KeyboardEvent | MouseEvent) => void;
|
|
1902
1877
|
/**
|
|
1903
|
-
|
|
1904
|
-
|
|
1878
|
+
* Will only display an underline when the Link is in a hover state
|
|
1879
|
+
*/
|
|
1905
1880
|
underlineOnHover?: boolean;
|
|
1906
1881
|
/**
|
|
1907
|
-
|
|
1908
|
-
|
|
1882
|
+
* The visual type of Button to display
|
|
1883
|
+
*/
|
|
1909
1884
|
variant?: "primary" | "secondary";
|
|
1910
1885
|
};
|
|
1911
1886
|
declare const LinkButton: ForwardRefExoticComponent<LinkButtonProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -1915,17 +1890,17 @@ type VariantType = "breadcrumbs" | "bullets" | "commas" | "ordered" | "slashes"
|
|
|
1915
1890
|
type ItemType = ItemType[] | string[] | string;
|
|
1916
1891
|
type ListProps = ComponentPropsWithoutRef<"ul"> & {
|
|
1917
1892
|
/**
|
|
1918
|
-
|
|
1919
|
-
|
|
1893
|
+
* Children should be wrapped in `<ListItem>`
|
|
1894
|
+
*/
|
|
1920
1895
|
children?: ReactNode;
|
|
1921
1896
|
/**
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1897
|
+
* As an alternative to passing children you can supply an array of strings that
|
|
1898
|
+
* will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.
|
|
1899
|
+
*/
|
|
1925
1900
|
items?: ItemType[];
|
|
1926
1901
|
/**
|
|
1927
|
-
|
|
1928
|
-
|
|
1902
|
+
* The kind of list to render
|
|
1903
|
+
*/
|
|
1929
1904
|
variant?: VariantType;
|
|
1930
1905
|
};
|
|
1931
1906
|
declare const List: FC<ListProps>;
|
|
@@ -1933,18 +1908,19 @@ declare const List: FC<ListProps>;
|
|
|
1933
1908
|
//#region src/components/List/ListItem.d.ts
|
|
1934
1909
|
type ListItemProps = {
|
|
1935
1910
|
/**
|
|
1936
|
-
|
|
1937
|
-
|
|
1911
|
+
* Pass an arbitrary child node
|
|
1912
|
+
*/
|
|
1938
1913
|
children?: ReactNode;
|
|
1939
1914
|
};
|
|
1940
1915
|
declare const ListItem: FC<ListItemProps>;
|
|
1941
1916
|
//#endregion
|
|
1942
1917
|
//#region src/components/Menu/Menu.d.ts
|
|
1943
1918
|
type ControlledMenuProps = {
|
|
1944
|
-
/** Is the menu open. Must be used with `onOpenChange`. */
|
|
1919
|
+
/** Is the menu open. Must be used with `onOpenChange`. */
|
|
1920
|
+
isOpen: boolean;
|
|
1945
1921
|
/** When an attempt to toggle the menu is triggered,
|
|
1946
|
-
|
|
1947
|
-
|
|
1922
|
+
* must be used with `isOpen`.
|
|
1923
|
+
*/
|
|
1948
1924
|
onOpenChange: (isOpen: boolean) => void;
|
|
1949
1925
|
};
|
|
1950
1926
|
type UncontrolledMenuProps = {
|
|
@@ -1953,17 +1929,22 @@ type UncontrolledMenuProps = {
|
|
|
1953
1929
|
};
|
|
1954
1930
|
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
1955
1931
|
type DefaultMenuProps = DropdownMenuProps & MenuControlProps & {
|
|
1956
|
-
/** The position of the Menu */
|
|
1957
|
-
|
|
1958
|
-
|
|
1932
|
+
/** The position of the Menu */
|
|
1933
|
+
align?: "center" | "end" | "start";
|
|
1934
|
+
children: ReactNode;
|
|
1935
|
+
/** Callback for when the user clicks or focuses outside of the menu */
|
|
1936
|
+
onInteractOutside?: DropdownMenuContentProps["onInteractOutside"];
|
|
1937
|
+
/** Props to pass to the trigger component, the default trigger is Button */
|
|
1959
1938
|
triggerProps?: ButtonProps;
|
|
1960
1939
|
};
|
|
1961
1940
|
type MenuPropsWithLabel = DefaultMenuProps & {
|
|
1962
|
-
/** The label for the trigger element */
|
|
1941
|
+
/** The label for the trigger element */
|
|
1942
|
+
label: string;
|
|
1963
1943
|
trigger?: never;
|
|
1964
1944
|
};
|
|
1965
1945
|
type MenuPropsWithCustomTrigger = DefaultMenuProps & {
|
|
1966
|
-
label?: never;
|
|
1946
|
+
label?: never;
|
|
1947
|
+
/** Replace the default trigger */
|
|
1967
1948
|
trigger: JSX.Element;
|
|
1968
1949
|
};
|
|
1969
1950
|
type MenuProps = MenuPropsWithCustomTrigger | MenuPropsWithLabel;
|
|
@@ -1997,45 +1978,15 @@ type MenuItemPropsWithChildren = {
|
|
|
1997
1978
|
type MenuItemProps = DropdownMenuItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
|
|
1998
1979
|
type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
|
|
1999
1980
|
type RadioMenuItemProps = DropdownMenuRadioItemProps & (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);
|
|
2000
|
-
declare const MenuItem: ({
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
description,
|
|
2004
|
-
badge,
|
|
2005
|
-
icon,
|
|
2006
|
-
renderAs,
|
|
2007
|
-
href,
|
|
2008
|
-
target,
|
|
2009
|
-
variant,
|
|
2010
|
-
...props
|
|
2011
|
-
}: MenuItemProps) => JSX.Element;
|
|
2012
|
-
declare const CheckboxMenuItem: ({
|
|
2013
|
-
children,
|
|
2014
|
-
label,
|
|
2015
|
-
description,
|
|
2016
|
-
badge,
|
|
2017
|
-
icon,
|
|
2018
|
-
indicator,
|
|
2019
|
-
...props
|
|
2020
|
-
}: CheckboxMenuItemProps) => JSX.Element;
|
|
2021
|
-
declare const RadioMenuItem: ({
|
|
2022
|
-
children,
|
|
2023
|
-
label,
|
|
2024
|
-
badge,
|
|
2025
|
-
description,
|
|
2026
|
-
icon,
|
|
2027
|
-
indicator,
|
|
2028
|
-
...props
|
|
2029
|
-
}: RadioMenuItemProps) => JSX.Element;
|
|
1981
|
+
declare const MenuItem: ({ children, label, description, badge, icon, renderAs, href, target, variant, ...props }: MenuItemProps) => JSX.Element;
|
|
1982
|
+
declare const CheckboxMenuItem: ({ children, label, description, badge, icon, indicator, ...props }: CheckboxMenuItemProps) => JSX.Element;
|
|
1983
|
+
declare const RadioMenuItem: ({ children, label, badge, description, icon, indicator, ...props }: RadioMenuItemProps) => JSX.Element;
|
|
2030
1984
|
//#endregion
|
|
2031
1985
|
//#region src/components/Menu/MenuLabel.d.ts
|
|
2032
1986
|
type MenuLabelProps = {
|
|
2033
1987
|
children: ReactNode | string;
|
|
2034
1988
|
};
|
|
2035
|
-
declare const MenuLabel: ({
|
|
2036
|
-
children,
|
|
2037
|
-
...props
|
|
2038
|
-
}: MenuLabelProps) => JSX.Element;
|
|
1989
|
+
declare const MenuLabel: ({ children, ...props }: MenuLabelProps) => JSX.Element;
|
|
2039
1990
|
//#endregion
|
|
2040
1991
|
//#region src/components/Menu/SubMenu.d.ts
|
|
2041
1992
|
type SubMenuProps = {
|
|
@@ -2044,128 +1995,124 @@ type SubMenuProps = {
|
|
|
2044
1995
|
icon?: ReactNode;
|
|
2045
1996
|
description?: ReactNode;
|
|
2046
1997
|
};
|
|
2047
|
-
declare const SubMenu: ({
|
|
2048
|
-
label,
|
|
2049
|
-
icon,
|
|
2050
|
-
description,
|
|
2051
|
-
children
|
|
2052
|
-
}: SubMenuProps) => JSX.Element;
|
|
1998
|
+
declare const SubMenu: ({ label, icon, description, children }: SubMenuProps) => JSX.Element;
|
|
2053
1999
|
//#endregion
|
|
2054
2000
|
//#region src/components/MenuButton/MenuButton.d.ts
|
|
2055
2001
|
type MenuButtonProps = ButtonProps & {
|
|
2056
2002
|
/**
|
|
2057
|
-
|
|
2058
|
-
|
|
2003
|
+
* Disables button
|
|
2004
|
+
*/
|
|
2059
2005
|
disabled?: boolean;
|
|
2060
2006
|
/**
|
|
2061
|
-
|
|
2062
|
-
|
|
2007
|
+
* Use this prop to pass an IconButton as the "trigger" instead of a standard Button
|
|
2008
|
+
*/
|
|
2063
2009
|
iconButtonComponent?: JSX.Element | ReactElement;
|
|
2064
2010
|
/**
|
|
2065
|
-
|
|
2066
|
-
|
|
2011
|
+
* Text that appears inside the button
|
|
2012
|
+
*/
|
|
2067
2013
|
label: string;
|
|
2068
2014
|
/**
|
|
2069
|
-
|
|
2070
|
-
|
|
2015
|
+
* Which side of the button should the menu be aligned
|
|
2016
|
+
*/
|
|
2071
2017
|
menuAlignment?: "left" | "right";
|
|
2072
2018
|
/**
|
|
2073
|
-
|
|
2074
|
-
|
|
2019
|
+
* An array of Button/Link components
|
|
2020
|
+
*/
|
|
2075
2021
|
menuItems?: JSX.Element[];
|
|
2076
2022
|
/**
|
|
2077
|
-
|
|
2078
|
-
|
|
2023
|
+
* Where should the menu appear relative to the button
|
|
2024
|
+
*/
|
|
2079
2025
|
menuPosition?: "above" | "below";
|
|
2080
2026
|
/**
|
|
2081
|
-
|
|
2082
|
-
|
|
2027
|
+
* Can be a CSS width value string, 'fullWidth' or 'maxItem' (sized to the largest item width)
|
|
2028
|
+
*/
|
|
2083
2029
|
menuWidth?: string;
|
|
2084
2030
|
/**
|
|
2085
|
-
|
|
2086
|
-
|
|
2031
|
+
* Function that is called after the menu is closed
|
|
2032
|
+
*/
|
|
2087
2033
|
onMenuClosed?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
|
|
2088
2034
|
/**
|
|
2089
|
-
|
|
2090
|
-
|
|
2035
|
+
* Function that is called when the menu button is clicked
|
|
2036
|
+
*/
|
|
2091
2037
|
onMenuClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;
|
|
2092
2038
|
/**
|
|
2093
|
-
|
|
2094
|
-
|
|
2039
|
+
* A custom node to be displayed in the menu on extra small screens.
|
|
2040
|
+
*/
|
|
2095
2041
|
overrideMenuHeader?: ReactNode;
|
|
2096
2042
|
/**
|
|
2097
|
-
|
|
2098
|
-
|
|
2043
|
+
* The size of button to display
|
|
2044
|
+
*/
|
|
2099
2045
|
size?: "lg" | "md" | "sm";
|
|
2100
2046
|
};
|
|
2101
2047
|
/**
|
|
2102
|
-
* @deprecated Please use Menu with a Button trigger, see [documentation](https://wistia.github.io/vhs/?path=/docs-components-menu--docs).
|
|
2103
|
-
*
|
|
2104
|
-
* #### Why MenuButton is being deprecated
|
|
2105
|
-
*
|
|
2106
|
-
* The [Menu](https://wistia.github.io/vhs/?path=/docs-components-menu--docs) component is preferred over MenuButton for several reasons:
|
|
2107
|
-
* 1. Menu has better alignment and collision detection.
|
|
2108
|
-
* 2. Menu supports submenus.
|
|
2109
|
-
* 3. Menu is properly portalled.
|
|
2110
|
-
*/
|
|
2048
|
+
* @deprecated Please use Menu with a Button trigger, see [documentation](https://wistia.github.io/vhs/?path=/docs-components-menu--docs).
|
|
2049
|
+
*
|
|
2050
|
+
* #### Why MenuButton is being deprecated
|
|
2051
|
+
*
|
|
2052
|
+
* The [Menu](https://wistia.github.io/vhs/?path=/docs-components-menu--docs) component is preferred over MenuButton for several reasons:
|
|
2053
|
+
* 1. Menu has better alignment and collision detection.
|
|
2054
|
+
* 2. Menu supports submenus.
|
|
2055
|
+
* 3. Menu is properly portalled.
|
|
2056
|
+
*/
|
|
2111
2057
|
declare const MenuButton: FC<MenuButtonProps>;
|
|
2112
2058
|
//#endregion
|
|
2113
2059
|
//#region src/components/Modal/Modal.d.ts
|
|
2114
2060
|
type ModalProps = ComponentPropsWithoutRef<"div"> & {
|
|
2115
2061
|
/**
|
|
2116
|
-
|
|
2117
|
-
|
|
2062
|
+
* Horizontally align modal to the left, center, or right of the container
|
|
2063
|
+
*/
|
|
2118
2064
|
alignHorizontal?: "center" | "left" | "normal" | "right";
|
|
2119
2065
|
/**
|
|
2120
|
-
|
|
2121
|
-
|
|
2066
|
+
* Vertically align modal to the top, center, or bottom of the container
|
|
2067
|
+
*/
|
|
2122
2068
|
alignVertical?: "bottom" | "center" | "normal" | "top";
|
|
2123
2069
|
/**
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2070
|
+
* Whether or not the modal should be allowed to exceed the viewport bounds.
|
|
2071
|
+
* If it exceeds the bounds, the entire backdrop will be scrollable.
|
|
2072
|
+
*/
|
|
2127
2073
|
allowModalToExceedViewportBounds?: boolean;
|
|
2128
2074
|
/**
|
|
2129
|
-
|
|
2130
|
-
|
|
2075
|
+
* Contents of the modal
|
|
2076
|
+
*/
|
|
2131
2077
|
children?: ReactNode;
|
|
2132
2078
|
/**
|
|
2133
|
-
|
|
2134
|
-
|
|
2079
|
+
* Class to be applied to the base element of the modal
|
|
2080
|
+
*/
|
|
2135
2081
|
className?: string;
|
|
2136
2082
|
/**
|
|
2137
|
-
|
|
2138
|
-
|
|
2083
|
+
* Whether or not the modal should take up the full height of the viewport
|
|
2084
|
+
*/
|
|
2139
2085
|
fullHeight?: boolean;
|
|
2140
2086
|
/**
|
|
2141
|
-
|
|
2142
|
-
|
|
2087
|
+
* Ref to the element that should receive focus when the modal opens
|
|
2088
|
+
*/
|
|
2143
2089
|
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
2144
2090
|
/**
|
|
2145
|
-
|
|
2146
|
-
|
|
2091
|
+
* Whether or not the modal is open, and should be rendered
|
|
2092
|
+
*/
|
|
2147
2093
|
isOpen: boolean;
|
|
2148
2094
|
/**
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2095
|
+
* When the Modal is dismissed, this function will be called. You'll typically want to set the
|
|
2096
|
+
* state of `isOpen` to false here
|
|
2097
|
+
* @returns
|
|
2098
|
+
*/
|
|
2153
2099
|
onRequestClose?: () => void;
|
|
2154
2100
|
/**
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2101
|
+
* Whether or not the modal should be closed when the user clicks outside of it
|
|
2102
|
+
* @default true
|
|
2103
|
+
*/
|
|
2158
2104
|
shouldCloseOnClickOutside?: boolean;
|
|
2159
2105
|
/**
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
shouldTrapFocus?: boolean;
|
|
2106
|
+
* Whether or not the modal should trap focus within itself
|
|
2107
|
+
*
|
|
2108
|
+
*/
|
|
2109
|
+
shouldTrapFocus?: boolean;
|
|
2110
|
+
/** The base width to apply to the Modal */
|
|
2164
2111
|
width?: string;
|
|
2165
2112
|
/**
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2113
|
+
* The overflow behavior to apply to the modal
|
|
2114
|
+
* @default 'auto'
|
|
2115
|
+
*/
|
|
2169
2116
|
overflow?: "auto" | "clip" | "hidden" | "scroll" | "visible";
|
|
2170
2117
|
};
|
|
2171
2118
|
declare const Modal: FC<ModalProps>;
|
|
@@ -2177,24 +2124,21 @@ declare const ModalBody: IStyledComponent<"web", DivProps>;
|
|
|
2177
2124
|
declare const ModalFooter: IStyledComponent<"web", DivProps>;
|
|
2178
2125
|
type ModalCloseButtonProps = {
|
|
2179
2126
|
/**
|
|
2180
|
-
|
|
2181
|
-
|
|
2127
|
+
* Callback invoked when the button is clicked
|
|
2128
|
+
*/
|
|
2182
2129
|
onClick?: (event: MouseEvent) => void;
|
|
2183
2130
|
};
|
|
2184
|
-
declare const ModalCloseButton: ({
|
|
2185
|
-
onClick,
|
|
2186
|
-
...props
|
|
2187
|
-
}: ModalCloseButtonProps) => JSX.Element;
|
|
2131
|
+
declare const ModalCloseButton: ({ onClick, ...props }: ModalCloseButtonProps) => JSX.Element;
|
|
2188
2132
|
//#endregion
|
|
2189
2133
|
//#region src/components/Paper/Paper.d.ts
|
|
2190
2134
|
type PaperProps = ComponentPropsWithoutRef<"div"> & {
|
|
2191
2135
|
/**
|
|
2192
|
-
|
|
2193
|
-
|
|
2136
|
+
* The content within Paper component
|
|
2137
|
+
*/
|
|
2194
2138
|
children: ReactNode;
|
|
2195
2139
|
/**
|
|
2196
|
-
|
|
2197
|
-
|
|
2140
|
+
* The "elevation" level of the Paper component
|
|
2141
|
+
*/
|
|
2198
2142
|
elevation?: 0 | 1 | 2 | undefined;
|
|
2199
2143
|
};
|
|
2200
2144
|
declare const Paper: FC<PaperProps>;
|
|
@@ -2202,24 +2146,24 @@ declare const Paper: FC<PaperProps>;
|
|
|
2202
2146
|
//#region src/components/ProgressBar/ProgressBar.d.ts
|
|
2203
2147
|
type ProgressBarProps = ComponentPropsWithoutRef<"div"> & {
|
|
2204
2148
|
/**
|
|
2205
|
-
|
|
2206
|
-
|
|
2149
|
+
* Whether the progress bar has a label
|
|
2150
|
+
*/
|
|
2207
2151
|
hasLabel?: boolean;
|
|
2208
2152
|
/**
|
|
2209
|
-
|
|
2210
|
-
|
|
2153
|
+
* Current numeric level of the progress (0 -> 1)
|
|
2154
|
+
*/
|
|
2211
2155
|
progress?: number;
|
|
2212
2156
|
/**
|
|
2213
|
-
|
|
2214
|
-
|
|
2157
|
+
* Allows user to override default progress bar label colors
|
|
2158
|
+
*/
|
|
2215
2159
|
labelColorOverride?: string;
|
|
2216
2160
|
/**
|
|
2217
|
-
|
|
2218
|
-
|
|
2161
|
+
* Allows user to override default progress bar meter background colors
|
|
2162
|
+
*/
|
|
2219
2163
|
meterBgColorOverride?: string;
|
|
2220
2164
|
/**
|
|
2221
|
-
|
|
2222
|
-
|
|
2165
|
+
* Allows user to override default colors
|
|
2166
|
+
*/
|
|
2223
2167
|
colorOverride?: string;
|
|
2224
2168
|
};
|
|
2225
2169
|
declare const ProgressBar: FC<ProgressBarProps>;
|
|
@@ -2227,50 +2171,50 @@ declare const ProgressBar: FC<ProgressBarProps>;
|
|
|
2227
2171
|
//#region src/components/Radio/Radio.d.ts
|
|
2228
2172
|
type RadioProps = Omit<ComponentPropsWithoutRef<"input">, "value"> & {
|
|
2229
2173
|
/**
|
|
2230
|
-
|
|
2231
|
-
|
|
2174
|
+
* Indicates the state of the radio
|
|
2175
|
+
*/
|
|
2232
2176
|
checked?: boolean;
|
|
2233
2177
|
/**
|
|
2234
|
-
|
|
2235
|
-
|
|
2178
|
+
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
2179
|
+
*/
|
|
2236
2180
|
direction?: "column" | "row";
|
|
2237
2181
|
/**
|
|
2238
|
-
|
|
2239
|
-
|
|
2182
|
+
* Disables input
|
|
2183
|
+
*/
|
|
2240
2184
|
disabled?: boolean;
|
|
2241
2185
|
/**
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2186
|
+
* @ignore // I don't know what to do with this
|
|
2187
|
+
* Force a Radio into a particular css state (for debugging)
|
|
2188
|
+
*/
|
|
2245
2189
|
forceState?: "focus" | "hover";
|
|
2246
2190
|
/**
|
|
2247
|
-
|
|
2248
|
-
|
|
2191
|
+
* Indicates that there is an error with the input
|
|
2192
|
+
*/
|
|
2249
2193
|
hasError?: boolean;
|
|
2250
2194
|
/**
|
|
2251
|
-
|
|
2252
|
-
|
|
2195
|
+
* Provides an ID for the input
|
|
2196
|
+
*/
|
|
2253
2197
|
id?: string;
|
|
2254
2198
|
/**
|
|
2255
|
-
|
|
2256
|
-
|
|
2199
|
+
* The label for the input
|
|
2200
|
+
*/
|
|
2257
2201
|
label: JSX.Element | string;
|
|
2258
2202
|
/**
|
|
2259
|
-
|
|
2260
|
-
|
|
2203
|
+
* The description for the input
|
|
2204
|
+
*/
|
|
2261
2205
|
labelDescription?: JSX.Element | string | undefined;
|
|
2262
2206
|
/**
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2207
|
+
* Should match the ID attribute of the radio.
|
|
2208
|
+
* Can be used to group together multiple radios
|
|
2209
|
+
*/
|
|
2266
2210
|
name?: string;
|
|
2267
2211
|
/**
|
|
2268
|
-
|
|
2269
|
-
|
|
2212
|
+
* Callback function invoked when the value changes
|
|
2213
|
+
*/
|
|
2270
2214
|
onChange?: (event: ChangeEvent) => unknown;
|
|
2271
2215
|
/**
|
|
2272
|
-
|
|
2273
|
-
|
|
2216
|
+
* The value attribute of the input
|
|
2217
|
+
*/
|
|
2274
2218
|
value?: string;
|
|
2275
2219
|
};
|
|
2276
2220
|
declare const Radio: ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -2278,47 +2222,47 @@ declare const Radio: ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLLa
|
|
|
2278
2222
|
//#region src/components/RadioGroup/RadioGroup.d.ts
|
|
2279
2223
|
type RadioGroupProps = Omit<ComponentPropsWithoutRef<"div">, "onChange"> & {
|
|
2280
2224
|
/**
|
|
2281
|
-
|
|
2282
|
-
|
|
2225
|
+
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
2226
|
+
*/
|
|
2283
2227
|
direction?: "column" | "row";
|
|
2284
2228
|
/**
|
|
2285
|
-
|
|
2286
|
-
|
|
2229
|
+
* Whether RadioGroup is disabled
|
|
2230
|
+
*/
|
|
2287
2231
|
disabled?: boolean;
|
|
2288
2232
|
/**
|
|
2289
|
-
|
|
2290
|
-
|
|
2233
|
+
* Error message to be displayed
|
|
2234
|
+
*/
|
|
2291
2235
|
error?: string | undefined;
|
|
2292
2236
|
/**
|
|
2293
|
-
|
|
2294
|
-
|
|
2237
|
+
* The label for the form field
|
|
2238
|
+
*/
|
|
2295
2239
|
label?: JSX.Element | string | null | undefined;
|
|
2296
2240
|
/**
|
|
2297
|
-
|
|
2298
|
-
|
|
2241
|
+
* The hint/helper text under the label
|
|
2242
|
+
*/
|
|
2299
2243
|
labelDescription?: JSX.Element | string | undefined;
|
|
2300
2244
|
/**
|
|
2301
|
-
|
|
2302
|
-
|
|
2245
|
+
* Props that are passed through to the underlying `<Label>` component
|
|
2246
|
+
*/
|
|
2303
2247
|
labelProps?: {
|
|
2304
2248
|
disabled?: boolean;
|
|
2305
2249
|
screenReaderOnly?: boolean;
|
|
2306
2250
|
};
|
|
2307
2251
|
/**
|
|
2308
|
-
|
|
2309
|
-
|
|
2252
|
+
* Should match the ID attribute of the radio. Can be used to group together multiple radios
|
|
2253
|
+
*/
|
|
2310
2254
|
name: string;
|
|
2311
2255
|
/**
|
|
2312
|
-
|
|
2313
|
-
|
|
2256
|
+
* Fires on checking or unchecking radios in group
|
|
2257
|
+
*/
|
|
2314
2258
|
onChange?: (event: ChangeEvent, value: RadioProps["value"]) => unknown;
|
|
2315
2259
|
/**
|
|
2316
|
-
|
|
2317
|
-
|
|
2260
|
+
* Array of radios attributes
|
|
2261
|
+
*/
|
|
2318
2262
|
options: Pick<RadioProps, "disabled" | "label" | "labelDescription" | "value">[];
|
|
2319
2263
|
/**
|
|
2320
|
-
|
|
2321
|
-
|
|
2264
|
+
* Currently selected radio value
|
|
2265
|
+
*/
|
|
2322
2266
|
value?: string | undefined;
|
|
2323
2267
|
};
|
|
2324
2268
|
declare const RadioGroup: FC<RadioGroupProps>;
|
|
@@ -2340,55 +2284,55 @@ type Preset = {
|
|
|
2340
2284
|
};
|
|
2341
2285
|
type RangeSelectorProps = {
|
|
2342
2286
|
/**
|
|
2343
|
-
|
|
2344
|
-
|
|
2287
|
+
* Align the popup to the left or the right of the tigger button
|
|
2288
|
+
*/
|
|
2345
2289
|
align?: "left" | "right";
|
|
2346
2290
|
/**
|
|
2347
|
-
|
|
2348
|
-
|
|
2291
|
+
* The variant to be passed to the button component
|
|
2292
|
+
*/
|
|
2349
2293
|
buttonVariant?: "input" | "primary" | "secondary" | "tertiary";
|
|
2350
2294
|
/**
|
|
2351
|
-
|
|
2352
|
-
|
|
2295
|
+
* The earliest selectable date
|
|
2296
|
+
*/
|
|
2353
2297
|
earliestDate?: Date;
|
|
2354
2298
|
/**
|
|
2355
|
-
|
|
2356
|
-
|
|
2299
|
+
* The latest selectable date
|
|
2300
|
+
*/
|
|
2357
2301
|
latestDate?: Date;
|
|
2358
2302
|
/**
|
|
2359
|
-
|
|
2360
|
-
|
|
2303
|
+
* Text to display in the footer
|
|
2304
|
+
*/
|
|
2361
2305
|
footerText?: JSX.Element | string;
|
|
2362
2306
|
/**
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2307
|
+
* A function that receives a date range object and returns a string to be rendered in the
|
|
2308
|
+
* trigger button
|
|
2309
|
+
*/
|
|
2366
2310
|
format?: (dataRange: DateRangeType) => JSX.Element | string;
|
|
2367
2311
|
/**
|
|
2368
|
-
|
|
2369
|
-
|
|
2312
|
+
* Callback fired when the date range changes
|
|
2313
|
+
*/
|
|
2370
2314
|
onChange?: (dateRange: DateRangeType) => unknown;
|
|
2371
2315
|
presets?: Preset[];
|
|
2372
2316
|
/**
|
|
2373
|
-
|
|
2374
|
-
|
|
2317
|
+
* The date range to be displayed in the picker
|
|
2318
|
+
*/
|
|
2375
2319
|
range?: DateRangeType;
|
|
2376
2320
|
/**
|
|
2377
|
-
|
|
2378
|
-
|
|
2321
|
+
* Prevent dates in the future from being selected
|
|
2322
|
+
*/
|
|
2379
2323
|
shouldPreventFuture?: boolean;
|
|
2380
2324
|
/**
|
|
2381
|
-
|
|
2382
|
-
|
|
2325
|
+
* If true, the button will take up the full width of its container
|
|
2326
|
+
*/
|
|
2383
2327
|
fullWidth?: boolean;
|
|
2384
2328
|
/**
|
|
2385
|
-
|
|
2386
|
-
|
|
2329
|
+
* A custom width for the RangeSelector component (in px, %, or other CSS units)
|
|
2330
|
+
*/
|
|
2387
2331
|
width?: number | string;
|
|
2388
2332
|
/**
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2333
|
+
* A custom React component to use as the trigger button. The component should accept onClick,
|
|
2334
|
+
* children, and other standard button props.
|
|
2335
|
+
*/
|
|
2392
2336
|
customTriggerComponent?: ComponentType<Record<string, any>>;
|
|
2393
2337
|
};
|
|
2394
2338
|
declare const RangeSelector: FC<RangeSelectorProps>;
|
|
@@ -2396,67 +2340,67 @@ declare const RangeSelector: FC<RangeSelectorProps>;
|
|
|
2396
2340
|
//#region src/components/RichTextEditor/RichTextEditor.d.ts
|
|
2397
2341
|
type RichTextEditorProps = {
|
|
2398
2342
|
/**
|
|
2399
|
-
|
|
2400
|
-
|
|
2343
|
+
* Optional id to set aria-labelledby
|
|
2344
|
+
*/
|
|
2401
2345
|
ariaLabelledBy?: string | undefined;
|
|
2402
2346
|
/**
|
|
2403
|
-
|
|
2404
|
-
|
|
2347
|
+
* @ignore
|
|
2348
|
+
*/
|
|
2405
2349
|
"data-testid"?: string;
|
|
2406
2350
|
/**
|
|
2407
|
-
|
|
2408
|
-
|
|
2351
|
+
* Determines whether editor is clickable/read-only
|
|
2352
|
+
*/
|
|
2409
2353
|
disabled?: boolean;
|
|
2410
2354
|
/**
|
|
2411
|
-
|
|
2412
|
-
|
|
2355
|
+
* Formats to enable in editor, restricted to rteFormatTypes
|
|
2356
|
+
*/
|
|
2413
2357
|
enabledFormats?: (keyof typeof rteFormatTypes)[];
|
|
2414
2358
|
/**
|
|
2415
|
-
|
|
2416
|
-
|
|
2359
|
+
* Function to be called after editor state update
|
|
2360
|
+
*/
|
|
2417
2361
|
onChange?: ((value: NodeElementObject[]) => void) | undefined;
|
|
2418
2362
|
/**
|
|
2419
|
-
|
|
2420
|
-
|
|
2363
|
+
* Function to be called when editor loses focus
|
|
2364
|
+
*/
|
|
2421
2365
|
onBlur?: ((value: NodeElementObject[]) => void) | undefined;
|
|
2422
2366
|
/**
|
|
2423
|
-
|
|
2424
|
-
|
|
2367
|
+
* Placeholder text
|
|
2368
|
+
*/
|
|
2425
2369
|
placeholder?: string;
|
|
2426
2370
|
/**
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
value?:
|
|
2371
|
+
* Value of editor based on controlled input
|
|
2372
|
+
*/
|
|
2373
|
+
value?: NodeObject[];
|
|
2430
2374
|
/**
|
|
2431
|
-
|
|
2432
|
-
|
|
2375
|
+
* Whether to update the editor when the value prop changes
|
|
2376
|
+
*/
|
|
2433
2377
|
useExternalValue: boolean;
|
|
2434
2378
|
/**
|
|
2435
|
-
|
|
2436
|
-
|
|
2379
|
+
* Custom height of editor
|
|
2380
|
+
*/
|
|
2437
2381
|
height?: string | undefined;
|
|
2438
2382
|
};
|
|
2439
2383
|
declare const RichTextEditor: FC<RichTextEditorProps>;
|
|
2440
2384
|
//#endregion
|
|
2441
2385
|
//#region src/components/RichTextEditor/serializers.d.ts
|
|
2442
|
-
declare const rteSerializeToHTML: (value:
|
|
2443
|
-
declare const rteDeserializeHTML: (htmlString: string) => (
|
|
2386
|
+
declare const rteSerializeToHTML: (value: NodeObject[]) => string | null;
|
|
2387
|
+
declare const rteDeserializeHTML: (htmlString: string) => (NodeObject | string | null)[] | NodeObject | string | null | undefined;
|
|
2444
2388
|
//#endregion
|
|
2445
2389
|
//#region src/components/ScreenReaderOnly/ScreenReaderOnly.d.ts
|
|
2446
2390
|
declare const screenReaderOnlyStyle: RuleSet<object>;
|
|
2447
2391
|
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<"div"> & {
|
|
2448
2392
|
/**
|
|
2449
|
-
|
|
2450
|
-
|
|
2393
|
+
* Pass an arbitrary child node
|
|
2394
|
+
*/
|
|
2451
2395
|
children?: ReactNode;
|
|
2452
2396
|
/**
|
|
2453
|
-
|
|
2454
|
-
|
|
2397
|
+
* Display content _only_ when it's focused.
|
|
2398
|
+
*/
|
|
2455
2399
|
focusable?: boolean;
|
|
2456
2400
|
/**
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2401
|
+
* The text that will appear to screenreaders but not be displayed on screen
|
|
2402
|
+
* (alternatively you can pass children)
|
|
2403
|
+
*/
|
|
2460
2404
|
text?: ReactNode;
|
|
2461
2405
|
};
|
|
2462
2406
|
declare const ScreenReaderOnly: FC<ScreenReaderOnlyProps>;
|
|
@@ -2475,54 +2419,54 @@ type OptionType = {
|
|
|
2475
2419
|
type OptionsType = GroupOptionType[] | OptionType[];
|
|
2476
2420
|
type SelectProps = Omit<ComponentPropsWithRef<"select">, "placeholder"> & {
|
|
2477
2421
|
/**
|
|
2478
|
-
|
|
2479
|
-
|
|
2422
|
+
* Optional accessible label for when there is no accompanying <label> element
|
|
2423
|
+
*/
|
|
2480
2424
|
ariaLabel?: string;
|
|
2481
2425
|
/**
|
|
2482
|
-
|
|
2483
|
-
|
|
2426
|
+
* Disables Select
|
|
2427
|
+
*/
|
|
2484
2428
|
disabled?: boolean;
|
|
2485
2429
|
/**
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2430
|
+
* @ignore
|
|
2431
|
+
* Force a Select into a particular css state (for debugging)
|
|
2432
|
+
*/
|
|
2489
2433
|
forceState?: "active" | "focus" | "hover";
|
|
2490
2434
|
/**
|
|
2491
|
-
|
|
2492
|
-
|
|
2435
|
+
* Should Select occupy 100% of available space
|
|
2436
|
+
*/
|
|
2493
2437
|
fullWidth?: boolean;
|
|
2494
2438
|
/**
|
|
2495
|
-
|
|
2496
|
-
|
|
2439
|
+
* Indicates that there is an error with the Select
|
|
2440
|
+
*/
|
|
2497
2441
|
hasError?: boolean;
|
|
2498
2442
|
/**
|
|
2499
|
-
|
|
2500
|
-
|
|
2443
|
+
* Change option's label name from "label"
|
|
2444
|
+
*/
|
|
2501
2445
|
labelName?: string;
|
|
2502
2446
|
/**
|
|
2503
|
-
|
|
2504
|
-
|
|
2447
|
+
* Allow multiple options in the list to be selected at the same time
|
|
2448
|
+
*/
|
|
2505
2449
|
multiple?: boolean;
|
|
2506
2450
|
/**
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2451
|
+
* Data structure to populate option labels & values. (`{ label, value, disabled }`)
|
|
2452
|
+
* Additionally this can be used to render option groupings. (`{ groupLabel, groupOptions, disabled }`)
|
|
2453
|
+
*/
|
|
2510
2454
|
options: OptionsType;
|
|
2511
2455
|
/**
|
|
2512
|
-
|
|
2513
|
-
|
|
2456
|
+
* Value of text to appear by default as first option in Select, use `null` for none
|
|
2457
|
+
*/
|
|
2514
2458
|
placeholder?: string | null | undefined;
|
|
2515
2459
|
/**
|
|
2516
|
-
|
|
2517
|
-
|
|
2460
|
+
* Prevent the placeholder value from being selected
|
|
2461
|
+
*/
|
|
2518
2462
|
preventPlaceholderSelection?: boolean;
|
|
2519
2463
|
/**
|
|
2520
|
-
|
|
2521
|
-
|
|
2464
|
+
* Make Select a required element
|
|
2465
|
+
*/
|
|
2522
2466
|
required?: boolean;
|
|
2523
2467
|
/**
|
|
2524
|
-
|
|
2525
|
-
|
|
2468
|
+
* Change option's value name from "value"
|
|
2469
|
+
*/
|
|
2526
2470
|
valueName?: string;
|
|
2527
2471
|
};
|
|
2528
2472
|
declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
|
|
@@ -2531,59 +2475,59 @@ declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTML
|
|
|
2531
2475
|
type ComponentPropsWithoutRefWithoutOnChange = Omit<ComponentPropsWithoutRef<"div">, "onChange">;
|
|
2532
2476
|
type SliderProps = ComponentPropsWithoutRefWithoutOnChange & {
|
|
2533
2477
|
/**
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2478
|
+
* aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb.
|
|
2479
|
+
* The length of the array must match the number of thumbs in the value array.
|
|
2480
|
+
*/
|
|
2537
2481
|
ariaLabel?: string[] | string | undefined;
|
|
2538
2482
|
/**
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2483
|
+
* aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label.
|
|
2484
|
+
* Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.
|
|
2485
|
+
*/
|
|
2542
2486
|
ariaLabelledby?: string[] | string | undefined;
|
|
2543
2487
|
/**
|
|
2544
|
-
|
|
2545
|
-
|
|
2488
|
+
*
|
|
2489
|
+
*/
|
|
2546
2490
|
ariaValuetext?: string | ((state: Record<string, unknown>) => unknown);
|
|
2547
2491
|
/**
|
|
2548
|
-
|
|
2549
|
-
|
|
2492
|
+
* @ignore
|
|
2493
|
+
*/
|
|
2550
2494
|
"data-testid"?: string;
|
|
2551
2495
|
/**
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2496
|
+
* Determines the initial position(s) of the thumb(s) and the number of thumbs.
|
|
2497
|
+
*
|
|
2498
|
+
* If a number is passed a slider with one thumb will be rendered.
|
|
2499
|
+
* If an array is passed each value will determine the position of one thumb.
|
|
2500
|
+
* The values in the array must be sorted.
|
|
2501
|
+
*
|
|
2502
|
+
* Don't pass a default value if the slider is controlled (i.e. if you already
|
|
2503
|
+
* use the `value` prop).
|
|
2504
|
+
*/
|
|
2561
2505
|
initialValue?: number[] | number | undefined;
|
|
2562
2506
|
/**
|
|
2563
|
-
|
|
2564
|
-
|
|
2507
|
+
* If `true` the thumbs can't be moved.
|
|
2508
|
+
*/
|
|
2565
2509
|
disabled?: boolean;
|
|
2566
2510
|
/**
|
|
2567
|
-
|
|
2568
|
-
|
|
2511
|
+
* The maximum value of the slider.
|
|
2512
|
+
*/
|
|
2569
2513
|
max?: number;
|
|
2570
2514
|
/**
|
|
2571
|
-
|
|
2572
|
-
|
|
2515
|
+
* The minimum value of the slider.
|
|
2516
|
+
*/
|
|
2573
2517
|
min?: number;
|
|
2574
2518
|
/**
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2519
|
+
* Callback called on every value change. The function will be called with two arguments,
|
|
2520
|
+
* the first being the new value(s) the second being thumb index. **It does not return an event.**
|
|
2521
|
+
*/
|
|
2578
2522
|
onChange?: (value: number, index?: number) => unknown;
|
|
2579
2523
|
/**
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2524
|
+
* Value to be added or subtracted on each step the slider makes. Must be greater than zero.
|
|
2525
|
+
* max - min should be evenly divisible by the step value.
|
|
2526
|
+
*/
|
|
2583
2527
|
step?: number;
|
|
2584
2528
|
/**
|
|
2585
|
-
|
|
2586
|
-
|
|
2529
|
+
* Like 'initialValue' but for controlled components.
|
|
2530
|
+
*/
|
|
2587
2531
|
value?: number[] | number;
|
|
2588
2532
|
};
|
|
2589
2533
|
declare const Slider: FC<SliderProps>;
|
|
@@ -2591,17 +2535,17 @@ declare const Slider: FC<SliderProps>;
|
|
|
2591
2535
|
//#region src/components/Stack/Stack.d.ts
|
|
2592
2536
|
type StackProps<T extends ElementType> = ComponentPropsWithoutRef<T> & PropsWithChildren & {
|
|
2593
2537
|
/**
|
|
2594
|
-
|
|
2595
|
-
|
|
2538
|
+
* The gap between each item in the stack. Should be one of the spacing values from the theme
|
|
2539
|
+
*/
|
|
2596
2540
|
gap?: keyof DefaultTheme["spacing"];
|
|
2597
2541
|
/**
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2542
|
+
* Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
|
|
2543
|
+
* The default behavior is `vertical`.
|
|
2544
|
+
*/
|
|
2601
2545
|
direction?: "horizontal" | "vertical";
|
|
2602
2546
|
/**
|
|
2603
|
-
|
|
2604
|
-
|
|
2547
|
+
* The element (e.g. div, span, p) or component to render as the root element.
|
|
2548
|
+
*/
|
|
2605
2549
|
renderAs?: T | "div";
|
|
2606
2550
|
};
|
|
2607
2551
|
declare const Stack: ForwardRefExoticComponent<StackProps<ElementType> & RefAttributes<HTMLDivElement>>;
|
|
@@ -2609,24 +2553,24 @@ declare const Stack: ForwardRefExoticComponent<StackProps<ElementType> & RefAttr
|
|
|
2609
2553
|
//#region src/components/Switch/Switch.d.ts
|
|
2610
2554
|
type SwitchProps = Omit<ComponentPropsWithoutRef<"button">, "onChange"> & {
|
|
2611
2555
|
/**
|
|
2612
|
-
|
|
2613
|
-
|
|
2556
|
+
* Allows user to override default "on" color
|
|
2557
|
+
*/
|
|
2614
2558
|
colorOverride?: string;
|
|
2615
2559
|
/**
|
|
2616
|
-
|
|
2617
|
-
|
|
2560
|
+
* Controls the `aria-disabled` property of the Switch
|
|
2561
|
+
*/
|
|
2618
2562
|
disabled?: boolean;
|
|
2619
2563
|
/**
|
|
2620
|
-
|
|
2621
|
-
|
|
2564
|
+
* Determines if switch is checked
|
|
2565
|
+
*/
|
|
2622
2566
|
isChecked?: boolean;
|
|
2623
2567
|
/**
|
|
2624
|
-
|
|
2625
|
-
|
|
2568
|
+
* Callback function invoked when the switch checked state changes
|
|
2569
|
+
*/
|
|
2626
2570
|
onChange?: (isChecked: boolean) => unknown;
|
|
2627
2571
|
/**
|
|
2628
|
-
|
|
2629
|
-
|
|
2572
|
+
* Controls wether or not the ON / OFF text is shown
|
|
2573
|
+
*/
|
|
2630
2574
|
hideText?: boolean;
|
|
2631
2575
|
};
|
|
2632
2576
|
declare const Switch: FC<SwitchProps>;
|
|
@@ -2665,52 +2609,52 @@ declare const variantStyleMap: {
|
|
|
2665
2609
|
};
|
|
2666
2610
|
type TextProps = ComponentPropsWithoutRef<"div"> & {
|
|
2667
2611
|
/**
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2612
|
+
* The horizontal alignment
|
|
2613
|
+
* <br />
|
|
2614
|
+
* _Note: this only affects block elements_
|
|
2615
|
+
*/
|
|
2672
2616
|
align?: keyof typeof alignMap;
|
|
2673
2617
|
/**
|
|
2674
|
-
|
|
2675
|
-
|
|
2618
|
+
* Displays text as bold type
|
|
2619
|
+
*/
|
|
2676
2620
|
bold?: boolean;
|
|
2677
2621
|
/**
|
|
2678
|
-
|
|
2679
|
-
|
|
2622
|
+
* Pass an arbitrary child node
|
|
2623
|
+
*/
|
|
2680
2624
|
children?: ReactNode | undefined;
|
|
2681
2625
|
/**
|
|
2682
|
-
|
|
2683
|
-
|
|
2626
|
+
* Allows user to override default button colors
|
|
2627
|
+
*/
|
|
2684
2628
|
colorOverride?: string;
|
|
2685
2629
|
/**
|
|
2686
|
-
|
|
2687
|
-
|
|
2630
|
+
* Used to indicate text is part of a "disabled" UI
|
|
2631
|
+
*/
|
|
2688
2632
|
disabled?: boolean;
|
|
2689
2633
|
/**
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2634
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
2635
|
+
* <br />
|
|
2636
|
+
* _Note: this only affects block elements_
|
|
2637
|
+
*/
|
|
2694
2638
|
ellipsis?: boolean;
|
|
2695
2639
|
/**
|
|
2696
|
-
|
|
2697
|
-
|
|
2640
|
+
* Display the text as inline content
|
|
2641
|
+
*/
|
|
2698
2642
|
inline?: boolean;
|
|
2699
2643
|
/**
|
|
2700
|
-
|
|
2701
|
-
|
|
2644
|
+
* Displays text as italic type
|
|
2645
|
+
*/
|
|
2702
2646
|
italic?: boolean;
|
|
2703
2647
|
/**
|
|
2704
|
-
|
|
2705
|
-
|
|
2648
|
+
* Prevents text from being highlighted and copied
|
|
2649
|
+
*/
|
|
2706
2650
|
preventUserSelect?: boolean;
|
|
2707
2651
|
/**
|
|
2708
|
-
|
|
2709
|
-
|
|
2652
|
+
* The type of html element to render as
|
|
2653
|
+
*/
|
|
2710
2654
|
renderAs?: keyof typeof renderMap;
|
|
2711
2655
|
/**
|
|
2712
|
-
|
|
2713
|
-
|
|
2656
|
+
* The text style to display
|
|
2657
|
+
*/
|
|
2714
2658
|
variant?: keyof typeof variantStyleMap;
|
|
2715
2659
|
};
|
|
2716
2660
|
declare const Text: ForwardRefExoticComponent<TextProps & RefAttributes<HTMLElement>>;
|
|
@@ -2721,56 +2665,56 @@ type GradientNameType = "defaultDarkOne" | "defaultDarkTwo" | "defaultLightOne"
|
|
|
2721
2665
|
//#region src/components/Thumbnail/Thumbnail.d.ts
|
|
2722
2666
|
type IconThumbnailProps = {
|
|
2723
2667
|
/**
|
|
2724
|
-
|
|
2725
|
-
|
|
2668
|
+
* The desired display of the thumbnail, either wide or square
|
|
2669
|
+
*/
|
|
2726
2670
|
thumbnailImageType?: never;
|
|
2727
2671
|
/**
|
|
2728
|
-
|
|
2729
|
-
|
|
2672
|
+
* The URL of the thumbnail image to display
|
|
2673
|
+
*/
|
|
2730
2674
|
thumbnailUrl?: never;
|
|
2731
2675
|
/**
|
|
2732
|
-
|
|
2733
|
-
|
|
2676
|
+
* The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
|
|
2677
|
+
*/
|
|
2734
2678
|
icon: IconNameType;
|
|
2735
2679
|
/**
|
|
2736
|
-
|
|
2737
|
-
|
|
2680
|
+
* The color of the icon
|
|
2681
|
+
*/
|
|
2738
2682
|
iconColor?: string;
|
|
2739
2683
|
};
|
|
2740
2684
|
type ImageThumbnailProps = {
|
|
2741
2685
|
/**
|
|
2742
|
-
|
|
2743
|
-
|
|
2686
|
+
* The desired display of the thumbnail, either wide or square
|
|
2687
|
+
*/
|
|
2744
2688
|
thumbnailImageType?: "square" | "wide" | undefined;
|
|
2745
2689
|
/**
|
|
2746
|
-
|
|
2747
|
-
|
|
2690
|
+
* The URL of the thumbnail image to display
|
|
2691
|
+
*/
|
|
2748
2692
|
thumbnailUrl: string[] | string | null;
|
|
2749
2693
|
/**
|
|
2750
|
-
|
|
2751
|
-
|
|
2694
|
+
* The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
|
|
2695
|
+
*/
|
|
2752
2696
|
icon?: never;
|
|
2753
2697
|
/**
|
|
2754
|
-
|
|
2755
|
-
|
|
2698
|
+
* The color of the icon
|
|
2699
|
+
*/
|
|
2756
2700
|
iconColor?: never;
|
|
2757
2701
|
};
|
|
2758
2702
|
type ThumbnailProps = ComponentPropsWithoutRef<"div"> & {
|
|
2759
2703
|
/**
|
|
2760
|
-
|
|
2761
|
-
|
|
2704
|
+
* Text that displays in the bottom right hand corner of the thumbnail, usually the media duration
|
|
2705
|
+
*/
|
|
2762
2706
|
bottomRightText?: string;
|
|
2763
2707
|
/**
|
|
2764
|
-
|
|
2765
|
-
|
|
2708
|
+
* Icon to display in bottom right corner of the thumbnail
|
|
2709
|
+
*/
|
|
2766
2710
|
bottomRightIcon?: IconNameType;
|
|
2767
2711
|
/**
|
|
2768
|
-
|
|
2769
|
-
|
|
2712
|
+
* The type of gradient to show either behind the icon or when there is no thumbnail image
|
|
2713
|
+
*/
|
|
2770
2714
|
gradientBackground?: GradientNameType;
|
|
2771
2715
|
/**
|
|
2772
|
-
|
|
2773
|
-
|
|
2716
|
+
* Width of the thumbnail. By default, the thumbnail will grow to fit its container.
|
|
2717
|
+
*/
|
|
2774
2718
|
width?: string;
|
|
2775
2719
|
} & (IconThumbnailProps | ImageThumbnailProps);
|
|
2776
2720
|
declare const Thumbnail: FC<ThumbnailProps>;
|
|
@@ -2778,59 +2722,55 @@ declare const Thumbnail: FC<ThumbnailProps>;
|
|
|
2778
2722
|
//#region src/components/ThumbnailCollage/ThumbnailCollage.d.ts
|
|
2779
2723
|
type ThumbnailCollageProps = {
|
|
2780
2724
|
/**
|
|
2781
|
-
|
|
2782
|
-
|
|
2725
|
+
* An array of image urls to show in the thumbnail. Supports up to 3 images
|
|
2726
|
+
*/
|
|
2783
2727
|
thumbnailUrls: string[];
|
|
2784
2728
|
/**
|
|
2785
|
-
|
|
2786
|
-
|
|
2729
|
+
* The type of gradient to show when there are no thumbnail urls
|
|
2730
|
+
*/
|
|
2787
2731
|
gradientBackground?: GradientNameType;
|
|
2788
2732
|
};
|
|
2789
|
-
declare const ThumbnailCollage: ({
|
|
2790
|
-
thumbnailUrls,
|
|
2791
|
-
gradientBackground,
|
|
2792
|
-
...props
|
|
2793
|
-
}: ThumbnailCollageProps) => JSX.Element;
|
|
2733
|
+
declare const ThumbnailCollage: ({ thumbnailUrls, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
|
|
2794
2734
|
//#endregion
|
|
2795
2735
|
//#region src/components/Toast/Toast.d.ts
|
|
2796
2736
|
type ToastVariants = "dangerous" | "error" | "success" | "warning";
|
|
2797
2737
|
type ToastProps = ComponentPropsWithoutRef<"div"> & {
|
|
2798
2738
|
/**
|
|
2799
|
-
|
|
2800
|
-
|
|
2739
|
+
* A function that will be invoked when the action button is clicked instead of the internal handler
|
|
2740
|
+
*/
|
|
2801
2741
|
actionInterceptor?: (() => void) | undefined;
|
|
2802
2742
|
/**
|
|
2803
|
-
|
|
2804
|
-
|
|
2743
|
+
* The text of the "action" button on the right
|
|
2744
|
+
*/
|
|
2805
2745
|
actionLabel?: string | undefined;
|
|
2806
2746
|
/**
|
|
2807
|
-
|
|
2808
|
-
|
|
2747
|
+
* A hex value that will override the color values defined by `variant`
|
|
2748
|
+
*/
|
|
2809
2749
|
colorOverride?: string | undefined;
|
|
2810
2750
|
/**
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2751
|
+
* @ignore
|
|
2752
|
+
* Avoids animation and positions Toast in normal flow for documentation/testing purposes
|
|
2753
|
+
*/
|
|
2814
2754
|
renderInPlace?: boolean;
|
|
2815
2755
|
/**
|
|
2816
|
-
|
|
2817
|
-
|
|
2756
|
+
* Determines whether Toast is displayed
|
|
2757
|
+
*/
|
|
2818
2758
|
isOpen?: boolean;
|
|
2819
2759
|
/**
|
|
2820
|
-
|
|
2821
|
-
|
|
2760
|
+
* The message displayed in the toast
|
|
2761
|
+
*/
|
|
2822
2762
|
message: string;
|
|
2823
2763
|
/**
|
|
2824
|
-
|
|
2825
|
-
|
|
2764
|
+
* Callback that is invoked when toasts closes (via timeout or close button)
|
|
2765
|
+
*/
|
|
2826
2766
|
onClose: () => void;
|
|
2827
2767
|
/**
|
|
2828
|
-
|
|
2829
|
-
|
|
2768
|
+
* The time in ms before the Toast calls the onClose function
|
|
2769
|
+
*/
|
|
2830
2770
|
timeout?: number | undefined;
|
|
2831
2771
|
/**
|
|
2832
|
-
|
|
2833
|
-
|
|
2772
|
+
* The kind of Toast to display
|
|
2773
|
+
*/
|
|
2834
2774
|
variant?: ToastVariants | undefined;
|
|
2835
2775
|
};
|
|
2836
2776
|
declare const Toast: MemoExoticComponent<(props: ToastProps) => JSX.Element>;
|
|
@@ -2850,58 +2790,56 @@ type UseToastFn = (props: UseToastProps) => void;
|
|
|
2850
2790
|
declare const useToast: () => UseToastFn;
|
|
2851
2791
|
//#endregion
|
|
2852
2792
|
//#region src/components/Toast/ToastProvider.d.ts
|
|
2853
|
-
declare const ToastProvider: ({
|
|
2854
|
-
children
|
|
2855
|
-
}: {
|
|
2793
|
+
declare const ToastProvider: ({ children }: {
|
|
2856
2794
|
children: ReactNode;
|
|
2857
2795
|
}) => JSX.Element;
|
|
2858
2796
|
//#endregion
|
|
2859
2797
|
//#region src/components/Tooltip/Tooltip.d.ts
|
|
2860
2798
|
type TooltipProps = Omit<ComponentPropsWithoutRef<"div">, "id"> & {
|
|
2861
2799
|
/**
|
|
2862
|
-
|
|
2863
|
-
|
|
2800
|
+
* The node that will be wrapped by the Tooltip
|
|
2801
|
+
*/
|
|
2864
2802
|
children: ReactNode;
|
|
2865
2803
|
/**
|
|
2866
|
-
|
|
2867
|
-
|
|
2804
|
+
* Where the tooltip should appear in relation to wrapped component
|
|
2805
|
+
*/
|
|
2868
2806
|
direction?: "bottom" | "left" | "right" | "top";
|
|
2869
2807
|
/**
|
|
2870
|
-
|
|
2871
|
-
|
|
2808
|
+
* Length of time to wait before dismissing Tooltip for click eventType
|
|
2809
|
+
*/
|
|
2872
2810
|
duration?: boolean | number | string;
|
|
2873
2811
|
/**
|
|
2874
|
-
|
|
2875
|
-
|
|
2812
|
+
* The type of event that triggers display of Tooltip
|
|
2813
|
+
*/
|
|
2876
2814
|
eventType?: "click" | "hover";
|
|
2877
2815
|
/**
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2816
|
+
* @ignore
|
|
2817
|
+
* Force a Tooltip to display it's content without user interaction (for debugging)
|
|
2818
|
+
*/
|
|
2881
2819
|
forceState?: "open" | undefined;
|
|
2882
2820
|
/**
|
|
2883
|
-
|
|
2884
|
-
|
|
2821
|
+
* ID for tooltip (automatically created if omitted)
|
|
2822
|
+
*/
|
|
2885
2823
|
id?: string | null | undefined;
|
|
2886
2824
|
/**
|
|
2887
|
-
|
|
2888
|
-
|
|
2825
|
+
* The content that will appear in the Tooltip popup
|
|
2826
|
+
*/
|
|
2889
2827
|
label: ReactNode;
|
|
2890
2828
|
/**
|
|
2891
|
-
|
|
2892
|
-
|
|
2829
|
+
* The maximum number of characters to display inside the Tooltip
|
|
2830
|
+
*/
|
|
2893
2831
|
maxChars?: number | null;
|
|
2894
2832
|
/**
|
|
2895
|
-
|
|
2896
|
-
|
|
2833
|
+
* Whether content within the label should wrap
|
|
2834
|
+
*/
|
|
2897
2835
|
shouldWrap?: boolean;
|
|
2898
2836
|
/**
|
|
2899
|
-
|
|
2900
|
-
|
|
2837
|
+
* Color to override background of the tooltip.
|
|
2838
|
+
*/
|
|
2901
2839
|
backgroundColorOverride?: string;
|
|
2902
2840
|
/**
|
|
2903
|
-
|
|
2904
|
-
|
|
2841
|
+
* Color to override font color of the tooltip.
|
|
2842
|
+
*/
|
|
2905
2843
|
fontColorOverride?: string;
|
|
2906
2844
|
};
|
|
2907
2845
|
declare const Tooltip: FC<TooltipProps>;
|
|
@@ -2909,20 +2847,20 @@ declare const Tooltip: FC<TooltipProps>;
|
|
|
2909
2847
|
//#region src/components/Truncate/Truncate.d.ts
|
|
2910
2848
|
type TruncateProps = {
|
|
2911
2849
|
/**
|
|
2912
|
-
|
|
2913
|
-
|
|
2850
|
+
* Prevent ellipsis from truncating mid-word
|
|
2851
|
+
*/
|
|
2914
2852
|
breakOnWords?: boolean;
|
|
2915
2853
|
/**
|
|
2916
|
-
|
|
2917
|
-
|
|
2854
|
+
* The string to be truncated
|
|
2855
|
+
*/
|
|
2918
2856
|
children: string | null | undefined;
|
|
2919
2857
|
/**
|
|
2920
|
-
|
|
2921
|
-
|
|
2858
|
+
* The maximum number of characters to display inside the Tooltip
|
|
2859
|
+
*/
|
|
2922
2860
|
maxChars: number;
|
|
2923
2861
|
/**
|
|
2924
|
-
|
|
2925
|
-
|
|
2862
|
+
* A string to append to the truncated string
|
|
2863
|
+
*/
|
|
2926
2864
|
terminator?: string;
|
|
2927
2865
|
};
|
|
2928
2866
|
declare const Truncate: FC<TruncateProps>;
|
|
@@ -2930,38 +2868,38 @@ declare const Truncate: FC<TruncateProps>;
|
|
|
2930
2868
|
//#region src/components/WistiaLogo/WistiaLogo.d.ts
|
|
2931
2869
|
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<"svg">, "href"> & {
|
|
2932
2870
|
/**
|
|
2933
|
-
|
|
2934
|
-
|
|
2871
|
+
* An optional accessible description for the logo
|
|
2872
|
+
*/
|
|
2935
2873
|
description?: string;
|
|
2936
2874
|
/**
|
|
2937
|
-
|
|
2938
|
-
|
|
2875
|
+
* Height, in pixels, of the logo
|
|
2876
|
+
*/
|
|
2939
2877
|
height?: number;
|
|
2940
2878
|
/**
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2879
|
+
* @ignore
|
|
2880
|
+
* Change the color when hovering over the logo
|
|
2881
|
+
*/
|
|
2944
2882
|
hoverColor?: string;
|
|
2945
2883
|
/**
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2884
|
+
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
2885
|
+
* note: there is no analogue to this because by brand guidelines, the
|
|
2886
|
+
* `Wistia` text must not be displayed without the "flags" iconography
|
|
2887
|
+
*/
|
|
2950
2888
|
iconOnly?: boolean;
|
|
2951
2889
|
/**
|
|
2952
|
-
|
|
2953
|
-
|
|
2890
|
+
* If provided, will wrap the logo in a link
|
|
2891
|
+
*/
|
|
2954
2892
|
href?: string;
|
|
2955
2893
|
/**
|
|
2956
|
-
|
|
2957
|
-
|
|
2894
|
+
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
2895
|
+
*/
|
|
2958
2896
|
title?: string;
|
|
2959
2897
|
/**
|
|
2960
|
-
|
|
2961
|
-
|
|
2898
|
+
* Style of the logo
|
|
2899
|
+
*/
|
|
2962
2900
|
variant?: "dark" | "light" | "standard";
|
|
2963
2901
|
};
|
|
2964
2902
|
declare const WistiaLogo: FC<WistiaLogoProps>;
|
|
2965
2903
|
//#endregion
|
|
2966
|
-
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$1 as Link, LinkButton, type LinkButtonProps, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuRadioGroup, 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, VHSProviderProps, type VHSTheme, WistiaLogo, type WistiaLogoProps, type WrapperProviderLinkType, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, useFormikContext, useTheme, useThemeColor, useToast };
|
|
2904
|
+
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$1 as Link, LinkButton, type LinkButtonProps, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuRadioGroup, Modal, ModalBase, type ModalBaseContentProps, ModalBody, ModalCloseButton, type ModalCloseButtonProps, ModalFooter, ModalHeader, type ModalProps, type NodeElementObject, type NodeLeafObject, type NodeObject, 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, VHSProviderProps, type VHSTheme, WistiaLogo, type WistiaLogoProps, type WrapperProviderLinkType, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, useFormikContext, useTheme, useThemeColor, useToast };
|
|
2967
2905
|
//# sourceMappingURL=index.d.ts.map
|