victory-area 36.7.0 → 36.8.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.
package/es/area.js CHANGED
@@ -80,13 +80,19 @@ var evaluateProps = function (props) {
80
80
  tabIndex: tabIndex
81
81
  });
82
82
  };
83
+
84
+ var defaultProps = {
85
+ groupComponent: /*#__PURE__*/React.createElement("g", null),
86
+ pathComponent: /*#__PURE__*/React.createElement(Path, null),
87
+ role: "presentation",
88
+ shapeRendering: "auto"
89
+ };
83
90
  /**
84
91
  * The area primitive used by VictoryArea
85
92
  */
86
93
 
87
-
88
94
  export var Area = function (props) {
89
- props = evaluateProps(props);
95
+ props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
90
96
  var _props = props,
91
97
  ariaLabel = _props.ariaLabel,
92
98
  role = _props.role,
@@ -144,10 +150,4 @@ Area.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}
144
150
  groupComponent: PropTypes.element,
145
151
  interpolation: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
146
152
  pathComponent: PropTypes.element
147
- });
148
- Area.defaultProps = {
149
- groupComponent: /*#__PURE__*/React.createElement("g", null),
150
- pathComponent: /*#__PURE__*/React.createElement(Path, null),
151
- role: "presentation",
152
- shapeRendering: "auto"
153
- };
153
+ });
@@ -114,7 +114,7 @@ export declare const VictoryArea: {
114
114
  cacheValues(obj: any): void;
115
115
  getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
116
116
  getAllEvents(props: any): any;
117
- getComponentProps(component: any, type: any, index: any): any;
117
+ getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
118
118
  renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
119
119
  animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
120
120
  renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
package/lib/area.js CHANGED
@@ -104,13 +104,19 @@ var evaluateProps = function (props) {
104
104
  tabIndex: tabIndex
105
105
  });
106
106
  };
107
+
108
+ var defaultProps = {
109
+ groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
110
+ pathComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Path, null),
111
+ role: "presentation",
112
+ shapeRendering: "auto"
113
+ };
107
114
  /**
108
115
  * The area primitive used by VictoryArea
109
116
  */
110
117
 
111
-
112
118
  var Area = function (props) {
113
- props = evaluateProps(props);
119
+ props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
114
120
  var _props = props,
115
121
  ariaLabel = _props.ariaLabel,
116
122
  role = _props.role,
@@ -175,10 +181,4 @@ Area.propTypes = _objectSpread(_objectSpread({}, _victoryCore.CommonProps.primit
175
181
  groupComponent: _propTypes.default.element,
176
182
  interpolation: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
177
183
  pathComponent: _propTypes.default.element
178
- });
179
- Area.defaultProps = {
180
- groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
181
- pathComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Path, null),
182
- role: "presentation",
183
- shapeRendering: "auto"
184
- };
184
+ });
@@ -114,7 +114,7 @@ export declare const VictoryArea: {
114
114
  cacheValues(obj: any): void;
115
115
  getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
116
116
  getAllEvents(props: any): any;
117
- getComponentProps(component: any, type: any, index: any): any;
117
+ getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
118
118
  renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
119
119
  animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
120
120
  renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-area",
3
- "version": "36.7.0",
3
+ "version": "36.8.2",
4
4
  "description": "Area Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
24
  "prop-types": "^15.8.1",
25
- "victory-core": "^36.7.0",
26
- "victory-vendor": "^36.7.0"
25
+ "victory-core": "^36.8.2",
26
+ "victory-vendor": "^36.8.2"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": ">=16.6.0"
package/src/area.tsx CHANGED
@@ -92,11 +92,18 @@ const evaluateProps = (props: AreaProps) => {
92
92
  return assign({}, props, { ariaLabel, desc, id, style, tabIndex });
93
93
  };
94
94
 
95
+ const defaultProps = {
96
+ groupComponent: <g />,
97
+ pathComponent: <Path />,
98
+ role: "presentation",
99
+ shapeRendering: "auto",
100
+ };
101
+
95
102
  /**
96
103
  * The area primitive used by VictoryArea
97
104
  */
98
105
  export const Area: React.FC<AreaProps> = (props) => {
99
- props = evaluateProps(props);
106
+ props = evaluateProps({ ...defaultProps, ...props });
100
107
  const {
101
108
  ariaLabel,
102
109
  role,
@@ -177,13 +184,6 @@ Area.propTypes = {
177
184
  pathComponent: PropTypes.element,
178
185
  };
179
186
 
180
- Area.defaultProps = {
181
- groupComponent: <g />,
182
- pathComponent: <Path />,
183
- role: "presentation",
184
- shapeRendering: "auto",
185
- };
186
-
187
187
  export interface AreaProps extends VictoryCommonPrimitiveProps {
188
188
  horizontal?: VictoryCommonThemeProps["horizontal"];
189
189
  groupComponent?: React.ReactElement;