@react-types/label 3.4.0 → 3.5.2

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/label",
3
- "version": "3.4.0",
3
+ "version": "3.5.2",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.4.0"
12
+ "@react-types/shared": "^3.11.1"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "7f9dc7fa5144679d2dc733170cb5c1f40d0c5ee5"
20
+ "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
21
21
  }
package/src/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {Alignment, DOMProps, LabelPosition, NecessityIndicator, StyleProps} from '@react-types/shared';
13
+ import {Alignment, DOMProps, LabelPosition, NecessityIndicator, SpectrumHelpTextProps, StyleProps} from '@react-types/shared';
14
14
  import {ElementType, HTMLAttributes, ReactElement, ReactNode} from 'react';
15
15
 
16
16
  export interface LabelProps {
@@ -20,7 +20,7 @@ export interface LabelProps {
20
20
  elementType?: ElementType
21
21
  }
22
22
 
23
- export interface SpectrumLabelProps extends LabelProps, DOMProps, StyleProps, HTMLAttributes<HTMLElement> {
23
+ interface SpectrumLabelPropsBase extends LabelProps, DOMProps, StyleProps {
24
24
  labelPosition?: LabelPosition, // default top
25
25
  labelAlign?: Alignment, // default start
26
26
  isRequired?: boolean,
@@ -28,9 +28,13 @@ export interface SpectrumLabelProps extends LabelProps, DOMProps, StyleProps, HT
28
28
  includeNecessityIndicatorInAccessibilityName?: boolean
29
29
  }
30
30
 
31
- export interface SpectrumFieldProps extends SpectrumLabelProps {
31
+ export interface SpectrumLabelProps extends SpectrumLabelPropsBase, HTMLAttributes<HTMLElement> {}
32
+
33
+ export interface SpectrumFieldProps extends SpectrumLabelPropsBase, SpectrumHelpTextProps {
32
34
  children: ReactElement,
33
35
  label?: ReactNode,
34
36
  labelProps: HTMLAttributes<HTMLElement>,
37
+ descriptionProps?: HTMLAttributes<HTMLElement>,
38
+ errorMessageProps?: HTMLAttributes<HTMLElement>,
35
39
  wrapperClassName?: string
36
40
  }