victory-native
Advanced tools
Comparing version 35.0.1 to 35.3.0
# VictoryNative Changelog | ||
## 35.3.0 (2020-11-02) | ||
Updates all `victory-*` components and adds `accessibleLabel` attributes to primitive components that match `aria-label` props. | ||
## 35.0.1 (2020-07-29) | ||
@@ -4,0 +8,0 @@ |
@@ -136,3 +136,7 @@ import React from "react"; | ||
> | ||
<Svg {...svgProps} style={dimensions}> | ||
<Svg {...svgProps} style={dimensions} | ||
accessible={props["aria-labelledby"] && title ? true : undefined} | ||
accessibilityLabel={props["aria-labelledby"] && title ? title : undefined} | ||
accessibilityHint={props["aria-describedby"] && desc ? desc : undefined} | ||
> | ||
{title ? <title id="title">{title}</title> : null} | ||
@@ -139,0 +143,0 @@ {desc ? <desc id="desc">{desc}</desc> : null} |
@@ -6,4 +6,6 @@ import React from "react"; | ||
const NativeBackground = (props) => <Background circleComponent={<Circle/>} rectComponent={<Rect/>} {...props} />; | ||
const NativeBackground = (props) => ( | ||
<Background circleComponent={<Circle/>} rectComponent={<Rect/>} {...props} /> | ||
); | ||
export default NativeBackground; |
@@ -7,5 +7,14 @@ import React from "react"; | ||
const VCircle = props => { | ||
const { style, ...rest } = props; | ||
const { "aria-label": accessibilityLabel, desc, style, ...rest } = props; | ||
const nativeStyle = useGetNativeStyle(style); | ||
return <Circle vectorEffect="non-scaling-stroke" {...rest} {...nativeStyle} />; | ||
return ( | ||
<Circle | ||
vectorEffect="non-scaling-stroke" | ||
accessible={accessibilityLabel || undefined} | ||
accessibilityLabel={accessibilityLabel} | ||
accessibilityHint={accessibilityLabel && desc ? desc : undefined} | ||
{...rest} | ||
{...nativeStyle} | ||
/> | ||
); | ||
}; | ||
@@ -16,2 +25,3 @@ | ||
VCircle.propTypes = { | ||
"aria-label": PropTypes.string, | ||
className: PropTypes.string, | ||
@@ -21,2 +31,3 @@ clipPath: PropTypes.string, | ||
cy: PropTypes.number, | ||
desc: PropTypes.string, | ||
events: PropTypes.object, | ||
@@ -23,0 +34,0 @@ r: PropTypes.number, |
@@ -7,5 +7,14 @@ import React from "react"; | ||
const VLine = props => { | ||
const { style, ...rest } = props; | ||
const { "aria-label": accessibilityLabel, desc, style, ...rest } = props; | ||
const nativeStyle = useGetNativeStyle(style); | ||
return <Line vectorEffect="non-scaling-stroke" {...rest} {...nativeStyle} />; | ||
return ( | ||
<Line | ||
vectorEffect="non-scaling-stroke" | ||
accessible={accessibilityLabel || undefined} | ||
accessibilityLabel={accessibilityLabel} | ||
accessibilityHint={accessibilityLabel && desc ? desc : undefined} | ||
{...rest} | ||
{...nativeStyle} | ||
/> | ||
); | ||
}; | ||
@@ -16,4 +25,6 @@ | ||
VLine.propTypes = { | ||
"aria=label": PropTypes.string, | ||
className: PropTypes.string, | ||
clipPath: PropTypes.string, | ||
desc: PropTypes.string, | ||
events: PropTypes.object, | ||
@@ -20,0 +31,0 @@ role: PropTypes.string, |
@@ -7,5 +7,13 @@ import React from "react"; | ||
const VPath = props => { | ||
const { style, ...rest } = props; | ||
const { "aria-label": accessibilityLabel, desc, style, ...rest } = props; | ||
const nativeStyle = useGetNativeStyle(style); | ||
return <Path {...rest} {...nativeStyle} />; | ||
return ( | ||
<Path | ||
accessible={accessibilityLabel || undefined} | ||
accessibilityLabel={accessibilityLabel} | ||
accessibilityHint={accessibilityLabel && desc ? desc : undefined} | ||
{...rest} | ||
{...nativeStyle} | ||
/> | ||
); | ||
}; | ||
@@ -16,5 +24,7 @@ | ||
VPath.propTypes = { | ||
"aria-label": PropTypes.string, | ||
className: PropTypes.string, | ||
clipPath: PropTypes.string, | ||
d: PropTypes.string, | ||
desc: PropTypes.string, | ||
events: PropTypes.object, | ||
@@ -21,0 +31,0 @@ role: PropTypes.string, |
@@ -7,5 +7,14 @@ import React from "react"; | ||
const VRect = props => { | ||
const { style, ...rest } = props; | ||
const { "aria-label": accessibilityLabel, desc, style, ...rest } = props; | ||
const nativeStyle = useGetNativeStyle(style); | ||
return <Rect vectorEffect="non-scaling-stroke" {...rest} {...nativeStyle} />; | ||
return ( | ||
<Rect | ||
vectorEffect="non-scaling-stroke" | ||
accessible={accessibilityLabel || undefined} | ||
accessibilityLabel={accessibilityLabel} | ||
accessibilityHint={accessibilityLabel && desc ? desc : undefined} | ||
{...rest} | ||
{...nativeStyle} | ||
/> | ||
); | ||
}; | ||
@@ -16,4 +25,6 @@ | ||
VRect.propTypes = { | ||
"aria-label": PropTypes.string, | ||
className: PropTypes.string, | ||
clipPath: PropTypes.string, | ||
desc: PropTypes.string, | ||
events: PropTypes.object, | ||
@@ -20,0 +31,0 @@ height: PropTypes.number, |
@@ -7,8 +7,15 @@ import React from "react"; | ||
const VText = props => { | ||
const { style, ...rest } = props; | ||
const { "aria-label": accessibilityLabel, children, desc, style, ...rest } = props; | ||
const nativeStyle = useGetNativeStyle(style); | ||
return ( | ||
<Text {...rest} {...nativeStyle}> | ||
{props.children} | ||
<Text | ||
accessible={accessibilityLabel || undefined} | ||
accessibilityLabel={accessibilityLabel} | ||
accessibilityHint={accessibilityLabel && desc ? desc : undefined} | ||
{...rest} | ||
{...nativeStyle} | ||
> | ||
{children} | ||
</Text> | ||
); | ||
@@ -18,4 +25,6 @@ }; | ||
VText.propTypes = { | ||
"aria-label": PropTypes.string, | ||
children: PropTypes.node, | ||
className: PropTypes.string, | ||
desc: PropTypes.string, | ||
direction: PropTypes.oneOf(["ltr", "rtl", "inherit"]), | ||
@@ -22,0 +31,0 @@ dx: PropTypes.number, |
{ | ||
"name": "victory-native", | ||
"version": "35.0.1", | ||
"version": "35.3.0", | ||
"description": "Shared libraries and components for Victory", | ||
@@ -60,30 +60,30 @@ "main": "lib/index.js", | ||
"react-fast-compare": "^2.0.0", | ||
"victory": "^35.0.7", | ||
"victory-area": "^35.0.7", | ||
"victory-axis": "^35.0.7", | ||
"victory-bar": "^35.0.7", | ||
"victory-box-plot": "^35.0.7", | ||
"victory-brush-container": "^35.0.7", | ||
"victory-brush-line": "^35.0.7", | ||
"victory-candlestick": "^35.0.7", | ||
"victory-chart": "^35.0.7", | ||
"victory-core": "^35.0.7", | ||
"victory-create-container": "^35.0.7", | ||
"victory-cursor-container": "^35.0.7", | ||
"victory-errorbar": "^35.0.7", | ||
"victory-group": "^35.0.7", | ||
"victory-histogram": "^35.0.7", | ||
"victory-legend": "^35.0.7", | ||
"victory-line": "^35.0.7", | ||
"victory-pie": "^35.0.7", | ||
"victory-polar-axis": "^35.0.7", | ||
"victory-scatter": "^35.0.7", | ||
"victory-selection-container": "^35.0.7", | ||
"victory-shared-events": "^35.0.7", | ||
"victory-stack": "^35.0.7", | ||
"victory-tooltip": "^35.0.7", | ||
"victory-voronoi": "^35.0.7", | ||
"victory-voronoi-container": "^35.0.7", | ||
"victory-zoom-container": "^35.0.7" | ||
"victory": "^35.3.3", | ||
"victory-area": "^35.3.3", | ||
"victory-axis": "^35.3.3", | ||
"victory-bar": "^35.3.3", | ||
"victory-box-plot": "^35.3.3", | ||
"victory-brush-container": "^35.3.3", | ||
"victory-brush-line": "^35.3.3", | ||
"victory-candlestick": "^35.3.3", | ||
"victory-chart": "^35.3.3", | ||
"victory-core": "^35.3.3", | ||
"victory-create-container": "^35.3.3", | ||
"victory-cursor-container": "^35.3.3", | ||
"victory-errorbar": "^35.3.3", | ||
"victory-group": "^35.3.3", | ||
"victory-histogram": "^35.3.3", | ||
"victory-legend": "^35.3.3", | ||
"victory-line": "^35.3.3", | ||
"victory-pie": "^35.3.3", | ||
"victory-polar-axis": "^35.3.3", | ||
"victory-scatter": "^35.3.3", | ||
"victory-selection-container": "^35.3.3", | ||
"victory-shared-events": "^35.3.3", | ||
"victory-stack": "^35.3.3", | ||
"victory-tooltip": "^35.3.3", | ||
"victory-voronoi": "^35.3.3", | ||
"victory-voronoi-container": "^35.3.3", | ||
"victory-zoom-container": "^35.3.3" | ||
} | ||
} |
81929
1394
Updatedvictory@^35.3.3
Updatedvictory-area@^35.3.3
Updatedvictory-axis@^35.3.3
Updatedvictory-bar@^35.3.3
Updatedvictory-box-plot@^35.3.3
Updatedvictory-brush-line@^35.3.3
Updatedvictory-candlestick@^35.3.3
Updatedvictory-chart@^35.3.3
Updatedvictory-core@^35.3.3
Updatedvictory-errorbar@^35.3.3
Updatedvictory-group@^35.3.3
Updatedvictory-histogram@^35.3.3
Updatedvictory-legend@^35.3.3
Updatedvictory-line@^35.3.3
Updatedvictory-pie@^35.3.3
Updatedvictory-polar-axis@^35.3.3
Updatedvictory-scatter@^35.3.3
Updatedvictory-stack@^35.3.3
Updatedvictory-tooltip@^35.3.3
Updatedvictory-voronoi@^35.3.3