@react-aria/label
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -6,2 +6,7 @@ var { | ||
/** | ||
* Provides the accessibility implementation for labels and their associated elements. | ||
* Labels provide context for user inputs. | ||
* @param props - The props for labels and fields. | ||
*/ | ||
function useLabel(props) { | ||
@@ -8,0 +13,0 @@ let { |
import { useId, useLabels } from "@react-aria/utils"; | ||
/** | ||
* Provides the accessibility implementation for labels and their associated elements. | ||
* Labels provide context for user inputs. | ||
* @param props - The props for labels and fields. | ||
*/ | ||
export function useLabel(props) { | ||
@@ -3,0 +9,0 @@ let { |
import { AriaLabelingProps, DOMProps, LabelableProps } from "@react-types/shared"; | ||
import { ElementType, HTMLAttributes, LabelHTMLAttributes } from "react"; | ||
interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps { | ||
/** | ||
* The HTML element used to render the label, e.g. 'label', or 'span'. | ||
* @default 'label' | ||
*/ | ||
labelElementType?: ElementType; | ||
} | ||
interface LabelAria { | ||
/** Props to apply to the label container element */ | ||
labelProps: LabelHTMLAttributes<HTMLLabelElement>; | ||
/** Props to apply to the field container element being labeled */ | ||
fieldProps: HTMLAttributes<HTMLElement>; | ||
} | ||
/** | ||
* Provides the accessibility implementation for labels and their associated elements. | ||
* Labels provide context for user inputs. | ||
* @param props - The props for labels and fields. | ||
*/ | ||
export function useLabel(props: LabelAriaProps): LabelAria; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-aria/label", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,5 +21,5 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/utils": "^3.0.1", | ||
"@react-types/label": "^3.0.1", | ||
"@react-types/shared": "^3.0.1" | ||
"@react-aria/utils": "^3.0.2", | ||
"@react-types/label": "^3.0.2", | ||
"@react-types/shared": "^3.0.2" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "ac0b7a7ba0edccd1c9ab4f849022ad6d2ccd19ed" | ||
"gitHead": "05003506f02a0ec173f3448f1801cbdf12b47bc7" | ||
} |
@@ -18,2 +18,6 @@ /* | ||
interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps { | ||
/** | ||
* The HTML element used to render the label, e.g. 'label', or 'span'. | ||
* @default 'label' | ||
*/ | ||
labelElementType?: ElementType | ||
@@ -23,6 +27,13 @@ } | ||
interface LabelAria { | ||
/** Props to apply to the label container element */ | ||
labelProps: LabelHTMLAttributes<HTMLLabelElement>, | ||
/** Props to apply to the field container element being labeled */ | ||
fieldProps: HTMLAttributes<HTMLElement> | ||
} | ||
/** | ||
* Provides the accessibility implementation for labels and their associated elements. | ||
* Labels provide context for user inputs. | ||
* @param props - The props for labels and fields. | ||
*/ | ||
export function useLabel(props: LabelAriaProps): LabelAria { | ||
@@ -29,0 +40,0 @@ let { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25625
174
209
+ Added@swc/helpers@0.5.13(transitive)
- Removed@swc/helpers@0.5.15(transitive)
Updated@react-aria/utils@^3.0.2
Updated@react-types/label@^3.0.2
Updated@react-types/shared@^3.0.2