@aws-amplify/ui-react 3.0.0 → 3.0.3

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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/dist/IconWarning-45c2c272.js +1 -0
  3. package/dist/esm/components/Authenticator/Authenticator.js +1 -1
  4. package/dist/esm/components/Authenticator/ConfirmSignIn/ConfirmSignIn.js +1 -1
  5. package/dist/esm/components/Authenticator/ConfirmSignUp/ConfirmSignUp.js +1 -1
  6. package/dist/esm/components/Authenticator/FederatedSignIn/FederatedSignIn.js +1 -1
  7. package/dist/esm/components/Authenticator/ForceNewPassword/ForceNewPassword.js +1 -1
  8. package/dist/esm/components/Authenticator/ResetPassword/ConfirmResetPassword.js +1 -1
  9. package/dist/esm/components/Authenticator/ResetPassword/ResetPassword.js +1 -1
  10. package/dist/esm/components/Authenticator/Router/Router.js +1 -1
  11. package/dist/esm/components/Authenticator/SetupTOTP/SetupTOTP.js +1 -1
  12. package/dist/esm/components/Authenticator/SignIn/SignIn.js +1 -1
  13. package/dist/esm/components/Authenticator/SignUp/SignUp.js +1 -1
  14. package/dist/esm/components/Authenticator/VerifyUser/ConfirmVerifyUser.js +1 -1
  15. package/dist/esm/components/Authenticator/VerifyUser/VerifyUser.js +1 -1
  16. package/dist/esm/components/Authenticator/hooks/useAuthenticator/index.js +1 -1
  17. package/dist/esm/components/Authenticator/shared/ValidationErrors.js +1 -1
  18. package/dist/esm/primitives/shared/constants.js +1 -1
  19. package/dist/esm/primitives-catalog.js +9 -0
  20. package/dist/index.js +1 -1
  21. package/dist/internal.js +1 -1
  22. package/dist/primitives.json +9 -0
  23. package/dist/styles.css +140 -1
  24. package/dist/types/components/Authenticator/Authenticator.d.ts +2 -2
  25. package/dist/types/components/Authenticator/ConfirmSignUp/ConfirmSignUp.d.ts +1 -1
  26. package/dist/types/components/Authenticator/Router/Router.d.ts +3 -1
  27. package/dist/types/components/Authenticator/hooks/useAuthenticator/index.d.ts +30 -31
  28. package/dist/types/components/Authenticator/hooks/useFormHandlers/useFormHandlers.d.ts +2 -2
  29. package/dist/types/components/Authenticator/shared/ValidationErrors.d.ts +1 -1
  30. package/dist/types/components/Authenticator/withAuthenticator.d.ts +2 -2
  31. package/dist/types/components/Geo/LocationSearch/index.d.ts +1 -1
  32. package/dist/types/components/Geo/MapView/index.d.ts +1 -1
  33. package/dist/types/hooks/useAuth.d.ts +0 -1
  34. package/dist/types/primitives/Alert/Alert.d.ts +1 -1
  35. package/dist/types/primitives/Badge/Badge.d.ts +1 -1
  36. package/dist/types/primitives/Button/Button.d.ts +1 -1
  37. package/dist/types/primitives/ButtonGroup/ButtonGroup.d.ts +1 -1
  38. package/dist/types/primitives/Card/Card.d.ts +1 -1
  39. package/dist/types/primitives/Checkbox/Checkbox.d.ts +1 -1
  40. package/dist/types/primitives/CheckboxField/CheckboxField.d.ts +1 -1
  41. package/dist/types/primitives/Divider/Divider.d.ts +1 -1
  42. package/dist/types/primitives/Expander/Expander.d.ts +1 -1
  43. package/dist/types/primitives/Expander/ExpanderItem.d.ts +1 -1
  44. package/dist/types/primitives/Field/FieldClearButton.d.ts +1 -1
  45. package/dist/types/primitives/FieldGroup/FieldGroup.d.ts +1 -1
  46. package/dist/types/primitives/FieldGroupIcon/FieldGroupIcon.d.ts +1 -1
  47. package/dist/types/primitives/FieldGroupIcon/FieldGroupIconButton.d.ts +1 -1
  48. package/dist/types/primitives/Flex/Flex.d.ts +1 -1
  49. package/dist/types/primitives/Grid/Grid.d.ts +1 -1
  50. package/dist/types/primitives/Heading/Heading.d.ts +1 -1
  51. package/dist/types/primitives/Icon/Icon.d.ts +1 -1
  52. package/dist/types/primitives/Image/Image.d.ts +1 -1
  53. package/dist/types/primitives/Input/Input.d.ts +1 -1
  54. package/dist/types/primitives/Label/Label.d.ts +1 -1
  55. package/dist/types/primitives/Link/Link.d.ts +1 -1
  56. package/dist/types/primitives/Loader/Loader.d.ts +1 -1
  57. package/dist/types/primitives/Menu/Menu.d.ts +1 -1
  58. package/dist/types/primitives/Pagination/Pagination.d.ts +1 -1
  59. package/dist/types/primitives/PasswordField/PasswordField.d.ts +1 -1
  60. package/dist/types/primitives/PasswordField/ShowPasswordButton.d.ts +1 -1
  61. package/dist/types/primitives/PhoneNumberField/CountryCodeSelect.d.ts +1 -1
  62. package/dist/types/primitives/PhoneNumberField/PhoneNumberField.d.ts +1 -1
  63. package/dist/types/primitives/Placeholder/Placeholder.d.ts +1 -1
  64. package/dist/types/primitives/Radio/Radio.d.ts +1 -1
  65. package/dist/types/primitives/RadioGroupField/RadioGroupField.d.ts +1 -1
  66. package/dist/types/primitives/Rating/Rating.d.ts +1 -1
  67. package/dist/types/primitives/ScrollView/ScrollView.d.ts +1 -1
  68. package/dist/types/primitives/SearchField/SearchField.d.ts +1 -1
  69. package/dist/types/primitives/SearchField/SearchFieldButton.d.ts +1 -1
  70. package/dist/types/primitives/Select/Select.d.ts +1 -1
  71. package/dist/types/primitives/SelectField/SelectField.d.ts +1 -1
  72. package/dist/types/primitives/SliderField/SliderField.d.ts +1 -1
  73. package/dist/types/primitives/StepperField/StepperField.d.ts +1 -1
  74. package/dist/types/primitives/SwitchField/SwitchField.d.ts +1 -1
  75. package/dist/types/primitives/Table/Table.d.ts +1 -1
  76. package/dist/types/primitives/Table/TableBody.d.ts +1 -1
  77. package/dist/types/primitives/Table/TableCell.d.ts +1 -1
  78. package/dist/types/primitives/Table/TableFoot.d.ts +1 -1
  79. package/dist/types/primitives/Table/TableHead.d.ts +1 -1
  80. package/dist/types/primitives/Table/TableRow.d.ts +1 -1
  81. package/dist/types/primitives/Tabs/Tabs.d.ts +2 -2
  82. package/dist/types/primitives/Text/Text.d.ts +1 -1
  83. package/dist/types/primitives/TextArea/TextArea.d.ts +1 -1
  84. package/dist/types/primitives/TextAreaField/TextAreaField.d.ts +1 -1
  85. package/dist/types/primitives/ToggleButton/ToggleButton.d.ts +1 -1
  86. package/dist/types/primitives/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
  87. package/dist/types/primitives/View/View.d.ts +2 -2
  88. package/dist/types/primitives/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  89. package/dist/types/primitives/shared/constants.d.ts +1 -1
  90. package/dist/types/primitives/types/alert.d.ts +6 -0
  91. package/dist/types/primitives/types/badge.d.ts +2 -0
  92. package/dist/types/primitives/types/base.d.ts +15 -0
  93. package/dist/types/primitives/types/button.d.ts +12 -2
  94. package/dist/types/primitives/types/card.d.ts +4 -0
  95. package/dist/types/primitives/types/checkbox.d.ts +8 -4
  96. package/dist/types/primitives/types/collection.d.ts +20 -2
  97. package/dist/types/primitives/types/divider.d.ts +7 -2
  98. package/dist/types/primitives/types/expander.d.ts +7 -0
  99. package/dist/types/primitives/types/field.d.ts +6 -1
  100. package/dist/types/primitives/types/fieldGroupIcon.d.ts +2 -0
  101. package/dist/types/primitives/types/flex.d.ts +8 -1
  102. package/dist/types/primitives/types/grid.d.ts +84 -0
  103. package/dist/types/primitives/types/heading.d.ts +4 -0
  104. package/dist/types/primitives/types/icon.d.ts +16 -9
  105. package/dist/types/primitives/types/image.d.ts +26 -9
  106. package/dist/types/primitives/types/input.d.ts +47 -22
  107. package/dist/types/primitives/types/label.d.ts +2 -0
  108. package/dist/types/primitives/types/link.d.ts +10 -0
  109. package/dist/types/primitives/types/loader.d.ts +7 -0
  110. package/dist/types/primitives/types/menu.d.ts +16 -3
  111. package/dist/types/primitives/types/pagination.d.ts +29 -6
  112. package/dist/types/primitives/types/passwordField.d.ts +22 -6
  113. package/dist/types/primitives/types/phoneNumberField.d.ts +25 -0
  114. package/dist/types/primitives/types/placeholder.d.ts +4 -1
  115. package/dist/types/primitives/types/radio.d.ts +1 -0
  116. package/dist/types/primitives/types/radioGroupField.d.ts +2 -0
  117. package/dist/types/primitives/types/rating.d.ts +7 -0
  118. package/dist/types/primitives/types/searchField.d.ts +9 -2
  119. package/dist/types/primitives/types/select.d.ts +52 -0
  120. package/dist/types/primitives/types/selectField.d.ts +1 -0
  121. package/dist/types/primitives/types/sliderField.d.ts +56 -0
  122. package/dist/types/primitives/types/stepperField.d.ts +39 -2
  123. package/dist/types/primitives/types/style.d.ts +387 -6
  124. package/dist/types/primitives/types/switchField.d.ts +13 -1
  125. package/dist/types/primitives/types/table.d.ts +12 -0
  126. package/dist/types/primitives/types/tabs.d.ts +8 -0
  127. package/dist/types/primitives/types/text.d.ts +3 -0
  128. package/dist/types/primitives/types/textArea.d.ts +34 -14
  129. package/dist/types/primitives/types/textField.d.ts +5 -0
  130. package/dist/types/primitives/types/toggleButton.d.ts +16 -0
  131. package/dist/types/primitives/types/toggleButtonGroup.d.ts +20 -0
  132. package/dist/types/primitives/types/view.d.ts +25 -0
  133. package/package.json +2 -2
  134. package/dist/IconWarning-3289842c.js +0 -1
@@ -3,22 +3,106 @@ import { ResponsiveStyle, CSSLayoutStyleProps } from './style';
3
3
  import { ViewProps } from './view';
4
4
  export declare type GridSpanType = number | string | 'auto';
5
5
  export interface GridContainerStyleProps extends CSSLayoutStyleProps {
6
+ /**
7
+ * @description
8
+ * Specifies the size of an implicitly-created grid column track or pattern of tracks.
9
+ * @see
10
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)
11
+ */
6
12
  autoColumns?: ResponsiveStyle<Property.GridAutoColumns>;
13
+ /**
14
+ * @description
15
+ * Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.
16
+ * @see
17
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)
18
+ */
7
19
  autoFlow?: ResponsiveStyle<Property.GridAutoFlow>;
20
+ /**
21
+ * @description
22
+ * Specifies the size of an implicitly-created grid row track or pattern of tracks.
23
+ * @see
24
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows)
25
+ */
8
26
  autoRows?: ResponsiveStyle<Property.GridAutoRows>;
27
+ /**
28
+ * @description
29
+ * specifies named grid areas, establishing the cells in the grid and assigning them names.
30
+ * @see
31
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)
32
+ */
9
33
  templateAreas?: ResponsiveStyle<Property.GridTemplateAreas>;
34
+ /**
35
+ * @description
36
+ * Defines the line names and track sizing functions of the grid columns.
37
+ * @see
38
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)
39
+ */
10
40
  templateColumns?: ResponsiveStyle<Property.GridTemplateColumns>;
41
+ /**
42
+ * @description
43
+ * Defines the line names and track sizing functions of the grid rows.
44
+ * @see
45
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)
46
+ */
11
47
  templateRows?: ResponsiveStyle<Property.GridTemplateRows>;
12
48
  }
13
49
  export interface GridItemStyleProps {
50
+ /**
51
+ * @description
52
+ * Specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area.
53
+ * @see
54
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)
55
+ */
14
56
  area?: ResponsiveStyle<Property.GridArea>;
57
+ /**
58
+ * @description
59
+ * Specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area.
60
+ * @see
61
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)
62
+ */
15
63
  column?: ResponsiveStyle<Property.GridColumn>;
64
+ /**
65
+ * @description
66
+ * Specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area.
67
+ * @see
68
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end)
69
+ */
16
70
  columnEnd?: ResponsiveStyle<Property.GridColumnEnd>;
71
+ /**
72
+ * @description
73
+ * Makes it possible for an element to span across all columns when its value is set to all.
74
+ * @see
75
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/column-span)
76
+ */
17
77
  columnSpan?: ResponsiveStyle<GridSpanType>;
78
+ /**
79
+ * @description
80
+ * Specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area.
81
+ * @see
82
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start)
83
+ */
18
84
  columnStart?: ResponsiveStyle<Property.GridColumnStart>;
85
+ /**
86
+ * @description
87
+ * Specifies a grid item's size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area.
88
+ * @see
89
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)
90
+ */
19
91
  row?: ResponsiveStyle<Property.GridRow>;
92
+ /**
93
+ * @description
94
+ * Specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area.
95
+ * @see
96
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end)
97
+ */
20
98
  rowEnd?: ResponsiveStyle<Property.GridRowEnd>;
21
99
  rowSpan?: ResponsiveStyle<GridSpanType>;
100
+ /**
101
+ * @description
102
+ * Specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area.
103
+ * @see
104
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start)
105
+ */
22
106
  rowStart?: ResponsiveStyle<Property.GridRowStart>;
23
107
  }
24
108
  export interface GridProps extends GridContainerStyleProps, ViewProps {
@@ -1,5 +1,9 @@
1
1
  import { TextProps } from './text';
2
2
  export declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3
3
  export interface HeadingProps extends TextProps {
4
+ /**
5
+ * @description
6
+ * Controls which semantic section heading element is rendered, <h1> through <h6>
7
+ */
4
8
  level?: HeadingLevel;
5
9
  }
@@ -2,43 +2,50 @@ import { Property } from 'csstype';
2
2
  import { ViewProps } from './view';
3
3
  import { Sizes } from './base';
4
4
  import * as React from 'react';
5
- export interface ViewBox {
5
+ export declare type ViewBox = {
6
6
  minX?: number;
7
7
  minY?: number;
8
8
  width?: number;
9
9
  height?: number;
10
- }
10
+ };
11
11
  export declare type IconSize = Sizes;
12
12
  export interface IconProps extends ViewProps {
13
13
  /**
14
+ * @description
14
15
  * This defines the shape of the <path> SVG element(the 'd' attribute).
15
- * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path
16
+ * @see
17
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path)
16
18
  */
17
19
  pathData?: string;
18
20
  /**
21
+ * @description
19
22
  * This is used to define a string that labels the current element.
20
- * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute
21
23
  */
22
24
  ariaLabel: string;
23
25
  /**
26
+ * @description
24
27
  * This defines the position and dimension, in user space, of an SVG viewport.
25
- * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
28
+ * @see
29
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox)
26
30
  */
27
31
  viewBox?: ViewBox;
28
32
  /**
29
- * By default this will be "currentColor" to match what is generally expected
30
- * of icons (they inherit their color from current font color).
31
- * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill
33
+ * @description
34
+ * By default this will be "currentColor" to match what is generally expected of icons (they inherit their color from current font color).
35
+ * @see
36
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill)
32
37
  */
33
38
  fill?: Property.Color;
34
39
  /**
40
+ * @description
35
41
  * You can pass SVG elements like <path> directly as children for more
36
42
  * flexibility and to allow for multiple paths.
37
43
  */
38
44
  children?: React.ReactNode;
39
45
  /**
46
+ * @description
40
47
  * Optionally pass an array of path-like objects which
41
48
  * the icon will map to <path> elements.
42
49
  */
43
- paths?: Array<React.SVGAttributes<SVGPathElement>>;
50
+ paths?: React.SVGAttributes<SVGPathElement>[];
44
51
  }
@@ -3,35 +3,52 @@ import { Property } from 'csstype';
3
3
  import { ViewProps } from './view';
4
4
  import { ResponsiveStyle } from './style';
5
5
  export interface ImageStyleProps {
6
+ /**
7
+ * @description
8
+ * Sets how the content of an <img> should be resized to fit its container
9
+ */
6
10
  objectFit?: ResponsiveStyle<Property.ObjectFit>;
11
+ /**
12
+ * @description
13
+ * Specifies the alignment of the selected replaced element's contents within the element's box
14
+ */
7
15
  objectPosition?: ResponsiveStyle<Property.ObjectPosition>;
8
16
  }
9
17
  export interface ImageOptions extends ImageStyleProps {
10
18
  /**
11
- * Alternative text description of the image (required)
12
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-alt
19
+ * @description
20
+ * Alternative text description of the image (required).
21
+ * @see
22
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-alt)
13
23
  */
14
24
  alt: React.ImgHTMLAttributes<HTMLImageElement>['alt'];
15
25
  /**
16
- * Set of image source sizes
17
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes
26
+ * @description
27
+ * Set of image source sizes.
28
+ * @see
29
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes)
18
30
  */
19
31
  sizes?: React.ImgHTMLAttributes<HTMLImageElement>['sizes'];
20
32
  /**
21
- * URl source for image (required)
33
+ * @description
34
+ * URl source for image (required).
22
35
  */
23
36
  src: React.ImgHTMLAttributes<HTMLImageElement>['src'];
24
37
  /**
25
- * Possible image sources for the browser to use
26
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-srcset
38
+ * @description
39
+ * Possible image sources for the browser to use.
40
+ * @see
41
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-srcset)
27
42
  */
28
43
  srcSet?: React.ImgHTMLAttributes<HTMLImageElement>['srcSet'];
29
44
  /**
30
- * Handles loading event on image
45
+ * @description
46
+ * Handles loading event on image.
31
47
  */
32
48
  onLoad?(event: React.SyntheticEvent<HTMLImageElement, Event>): void;
33
49
  /**
34
- * Handles error events on image
50
+ * @description
51
+ * Handles error events on image.
35
52
  */
36
53
  onError?(error: string | React.SyntheticEvent<HTMLImageElement, Event>): void;
37
54
  }
@@ -2,76 +2,101 @@ import * as React from 'react';
2
2
  import { Sizes } from './base';
3
3
  import { FieldVariations } from './field';
4
4
  import { ViewProps } from './view';
5
+ export declare type EnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
5
6
  export declare type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
6
7
  export declare type InputSizes = Sizes;
7
8
  export interface InputProps extends ViewProps {
8
9
  /**
9
- * Specifies permissions for browser UA to autocomplete field
10
- * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
10
+ * @description
11
+ * Specifies permissions for browser UA to autocomplete field.
12
+ * @see
13
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
11
14
  */
12
15
  autoComplete?: string;
13
16
  /**
14
- * If checked is provided, this will be a controlled checkbox or radio
17
+ * @description
18
+ * If checked is provided, this will be a controlled checkbox or radio.
15
19
  */
16
20
  checked?: boolean;
17
21
  /**
18
- * Use this to initialize an uncontrolled checkbox or radio
22
+ * @description
23
+ * Use this to initialize an uncontrolled checkbox or radio.
19
24
  */
20
25
  defaultChecked?: boolean;
21
26
  /**
22
- * Use this to provide a default value for an uncontrolled field
27
+ * @description
28
+ * Use this to provide a default value for an uncontrolled field.
23
29
  */
24
30
  defaultValue?: React.AllHTMLAttributes<'input'>['defaultValue'];
25
31
  /**
26
- * Indicates that Field is in error state
32
+ * @description
33
+ * Indicates that Field is in error state.
27
34
  */
28
35
  hasError?: boolean;
29
36
  /**
30
- * Provides hint for virtual keyboard shown
31
- * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
32
- * @default: "text"
37
+ * @description
38
+ * Defines what action label (or icon) to present for the enter key on virtual keyboards.
39
+ * @see
40
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)
41
+ */
42
+ enterKeyHint?: EnterKeyHint;
43
+ /**
44
+ * @description
45
+ * Provides hint for virtual keyboard shown
46
+ * @see
47
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)
48
+ * @default "text"
33
49
  */
34
50
  inputMode?: InputMode;
35
51
  /**
36
- * Determines whether field should be disabled
37
- * @default false
52
+ * @description
53
+ * Determines whether field should be disabled.
54
+ * @default
55
+ * false
38
56
  */
39
57
  isDisabled?: boolean;
40
58
  /**
41
- * Determines whether field should be immutable
42
- * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly
43
- * @default false
59
+ * @description
60
+ * Determines whether field should be immutable.
61
+ * @see
62
+ *[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly)
63
+ * @default
64
+ * false
44
65
  */
45
66
  isReadOnly?: boolean;
46
67
  /**
47
- * Whether field should be marked required
68
+ * @description
69
+ * Whether field should be marked required.
48
70
  */
49
71
  isRequired?: boolean;
50
72
  /**
73
+ * @description
51
74
  * Name of the field. Submitted with the form as part of a name/value pair.
52
75
  */
53
76
  name?: string;
54
77
  /**
55
- * Placeholder text shown when field is empty
56
- * Accessibility tip: avoid putting important instructions for
57
- * filling out the TextField in the placeholder. Use descriptiveText
58
- * for important instructions
78
+ * @description
79
+ * Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.
59
80
  */
60
81
  placeholder?: string;
61
82
  /**
83
+ * @description
62
84
  * Changes the font-size, padding, and height of the field.
63
85
  */
64
86
  size?: InputSizes;
65
87
  /**
66
- * Input field type
88
+ * @description
89
+ * Input field type.
67
90
  */
68
91
  type?: React.HTMLInputTypeAttribute;
69
92
  /**
70
- * If value is provided, this will be a controlled field
93
+ * @description
94
+ * If value is provided, this will be a controlled field.
71
95
  */
72
96
  value?: React.AllHTMLAttributes<'input'>['value'];
73
97
  /**
74
- * Variants
98
+ * @description
99
+ * Variants.
75
100
  */
76
101
  variation?: FieldVariations;
77
102
  }
@@ -2,10 +2,12 @@
2
2
  import { ViewProps } from './view';
3
3
  export interface LabelProps extends ViewProps {
4
4
  /**
5
+ * @description
5
6
  * Whether label should be visually hidden
6
7
  */
7
8
  visuallyHidden?: boolean;
8
9
  /**
10
+ * @description
9
11
  * Inner text of the label
10
12
  */
11
13
  children: React.ReactNode;
@@ -2,18 +2,28 @@ import * as React from 'react';
2
2
  import { ViewProps } from './view';
3
3
  export interface LinkOptions {
4
4
  /**
5
+ * @description
5
6
  * Children to be rendered inside the Link component
6
7
  */
7
8
  children: React.ReactNode;
8
9
  /**
10
+ * @description
9
11
  * Boolean value indicating an external link
10
12
  * sets the rel attribute to "noopener noreferrer"
11
13
  */
12
14
  isExternal?: boolean;
13
15
  /**
16
+ * @description
14
17
  * A string representation of the URL path
15
18
  */
16
19
  to?: string;
20
+ /**
21
+ * @description
22
+ * a stringifier that returns a string containing the whole URL, and allows the href to be updated.
23
+ * @see
24
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/href)
25
+ */
26
+ href?: string;
17
27
  }
18
28
  export interface LinkProps extends ViewProps, LinkOptions {
19
29
  }
@@ -6,30 +6,37 @@ export declare type LoaderSizes = Sizes;
6
6
  export declare type LoaderVariations = 'linear';
7
7
  export interface LoaderProps extends ViewProps {
8
8
  /**
9
+ * @description
9
10
  * This will set the size of Loader.
10
11
  */
11
12
  size?: LoaderSizes;
12
13
  /**
14
+ * @description
13
15
  * This will set the variation of Loader. Available options are linear and none(circular).
14
16
  */
15
17
  variation?: LoaderVariations;
16
18
  /**
19
+ * @description
17
20
  * This will set the filled color of Loader.
18
21
  */
19
22
  filledColor?: StyleToken<Property.Color>;
20
23
  /**
24
+ * @description
21
25
  * This will set the empty color of Loader.
22
26
  */
23
27
  emptyColor?: StyleToken<Property.Color>;
24
28
  /**
29
+ * @description
25
30
  * This will set the percentage of a determinate Loader.
26
31
  */
27
32
  percentage?: number;
28
33
  /**
34
+ * @description
29
35
  * This will mark the Loader as determinate.
30
36
  */
31
37
  isDeterminate?: boolean;
32
38
  /**
39
+ * @description
33
40
  * This will set the visibility of percentage text.
34
41
  */
35
42
  isPercentageTextHidden?: boolean;
@@ -4,34 +4,47 @@ import { FlexProps } from './flex';
4
4
  import { Sizes } from './base';
5
5
  export interface MenuProps extends FlexProps {
6
6
  /**
7
+ * @description
7
8
  * Alignment of menu against trigger
8
- * @default "start"
9
+ * @default
10
+ * "start"
9
11
  */
10
12
  menuAlign?: 'start' | 'center' | 'end';
11
13
  /**
14
+ * @description
12
15
  * Handle open and close event of menu
13
16
  */
14
17
  onOpenChange?: (isOpen: boolean) => void;
15
18
  /**
19
+ * @description
16
20
  * Default for controlled menu
17
21
  */
18
22
  isOpen?: boolean;
19
23
  /**
24
+ * @description
20
25
  * Size of Menu button and items
21
26
  */
22
27
  size?: Sizes;
23
28
  /**
29
+ * @description
24
30
  * Trigger node
25
- * @default MenuButton with IconMenu
26
- * @note Must forward refs to DOM element
31
+ * @default
32
+ * MenuButton with IconMenu
33
+ * @note
34
+ * Must forward refs to DOM element
27
35
  */
28
36
  trigger?: React.ReactNode;
29
37
  /**
38
+ * @description
30
39
  * ClassName to apply to default trigger button
31
40
  * Note: only applies if `trigger` prop is null
32
41
  */
33
42
  triggerClassName?: string;
34
43
  }
35
44
  export interface MenuItemProps extends ButtonProps {
45
+ /**
46
+ * @description
47
+ * Accepts any number of MenuItem components
48
+ */
36
49
  children?: React.ReactNode;
37
50
  }
@@ -6,52 +6,68 @@ export declare type PaginationCallbackType = 'onNext' | 'onPrevious' | 'onChange
6
6
  export declare type PaginationLabelType = 'pageLabel' | 'currentPageLabel' | 'previousLabel' | 'nextLabel';
7
7
  interface BasePaginationProps {
8
8
  /**
9
+ * @description
9
10
  * Index of the current page. (starting from 1)
10
11
  */
11
12
  currentPage?: number;
12
13
  /**
14
+ * @description
13
15
  * Total number of available pages.
14
16
  */
15
17
  totalPages: number;
16
18
  /**
19
+ * @description
17
20
  * The number of siblings on each side of current page.
18
21
  */
19
22
  siblingCount?: number;
20
23
  /**
24
+ * @description
21
25
  * Optionally indicates whether there are more pages after `totalPages`. Can be combined with `totalPages` to enable the next button when reaching the last page.
22
- * @default false
26
+ * @default
27
+ * false
23
28
  */
24
29
  hasMorePages?: boolean;
25
30
  /**
31
+ * @description
26
32
  * Set the invisible label for current page.
27
- * @default "Current Page:"
33
+ * @default
34
+ * "Current Page:"
28
35
  */
29
36
  currentPageLabel?: string;
30
37
  /**
38
+ * @description
31
39
  * Set the label text for each page button other than the current page.
32
40
  * It will be used to construct the `aria-label` for each page button. e.g, "Go to page 1" for page 1 button
33
- * @default "Go to page"
41
+ * @default
42
+ * "Go to page"
34
43
  */
35
44
  pageLabel?: string;
36
45
  /**
46
+ * @description
37
47
  * Set the `aria-label` for the left arrow button.
38
- * @default "Go to previous page"
48
+ * @default
49
+ * "Go to previous page"
39
50
  */
40
51
  previousLabel?: string;
41
52
  /**
53
+ * @description
42
54
  * Set the `aria-label` for the right arrow button.
43
- * @default "Go to next page"
55
+ * @default
56
+ * "Go to next page"
44
57
  */
45
58
  nextLabel?: string;
46
59
  /**
60
+ * @description
47
61
  * Callback function triggered when the next-page button is pressed
48
62
  */
49
63
  onNext?: () => void;
50
64
  /**
65
+ * @description
51
66
  * Callback function triggered when the prev-page button is pressed
52
67
  */
53
68
  onPrevious?: () => void;
54
69
  /**
70
+ * @description
55
71
  * Callback function triggered every time the page changes
56
72
  */
57
73
  onChange?: (newPageIndex: number, prevPageIndex: number) => void;
@@ -64,27 +80,34 @@ export interface UsePaginationResult extends Required<Omit<BasePaginationProps,
64
80
  }
65
81
  export interface PaginationItemProps extends BaseComponentProps, BaseStyleProps, AriaProps {
66
82
  /**
83
+ * @description
67
84
  * Available item type are 'page', 'next', 'previous' and 'ellipsis'.
68
85
  */
69
86
  type: PaginationItemType;
70
87
  /**
88
+ * @description
71
89
  * For 'page' item, this is the page number to be rendered.
72
90
  */
73
91
  page?: number;
74
92
  /**
93
+ * @description
75
94
  * The index of current page.
95
+ * @default
96
+ * "Current Page:"
76
97
  */
77
98
  currentPage?: number;
78
99
  /**
100
+ * @description
79
101
  * An item is not clickable if disabled
80
102
  */
81
103
  isDisabled?: boolean;
82
104
  /**
105
+ * @description
83
106
  * Set the invisible label for current page.
84
- * @default "Current Page:"
85
107
  */
86
108
  currentPageLabel?: string;
87
109
  /**
110
+ * @description
88
111
  * Triggered every time the item is clicked.
89
112
  */
90
113
  onClick?: (newPageIndex?: number, prevPageIndex?: number) => void;
@@ -3,41 +3,57 @@ import { ButtonProps } from './button';
3
3
  import { TextInputFieldProps } from './textField';
4
4
  export interface PasswordFieldProps extends TextInputFieldProps {
5
5
  /**
6
+ * @description
6
7
  * For password fields, will hide the "show password" button
7
8
  */
8
9
  hideShowPassword?: boolean;
9
10
  /**
11
+ * @description
10
12
  * Set the `aria-label` for hide password button
11
- * @default "Hide password"
13
+ * @default
14
+ * "Hide password"
12
15
  */
13
16
  hidePasswordButtonLabel?: string;
14
17
  /**
18
+ * @description
15
19
  * Set the `aria-label` for show password button
16
- * @default "Show password"
20
+ * @default
21
+ * "Show password"
17
22
  */
18
23
  showPasswordButtonLabel?: string;
19
24
  /**
25
+ * @description
20
26
  * Password autocomplete type
21
- * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
22
- * @default "current-password"
27
+ * @See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)
28
+ * @default
29
+ * "current-password"
23
30
  */
24
31
  autoComplete?: 'new-password' | 'current-password' | string;
25
32
  /**
33
+ * @description
26
34
  * Forwarded ref for access to show password button DOM element
27
35
  */
28
36
  showPasswordButtonRef?: React.Ref<HTMLButtonElement>;
29
37
  }
30
38
  export declare type PasswordFieldType = 'password' | 'text';
31
39
  export interface ShowPasswordButtonProps extends ButtonProps {
40
+ /**
41
+ * @description
42
+ * Determines whether the input is hidden or displayed. Options include 'password' or 'text'
43
+ */
32
44
  fieldType: PasswordFieldType;
33
45
  /**
46
+ * @description
34
47
  * Set the `aria-label` for hide password button
35
- * @default "Hide password"
48
+ * @default
49
+ * "Hide password"
36
50
  */
37
51
  hidePasswordButtonLabel?: string;
38
52
  /**
53
+ * @description
39
54
  * Set the `aria-label` for show password button
40
- * @default "Show password"
55
+ * @default
56
+ * "Show password"
41
57
  */
42
58
  showPasswordButtonLabel?: string;
43
59
  }