victory-core 36.4.1 → 36.5.0
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/dist/victory-core.js +874 -879
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +38 -941
- package/es/index.js +19 -28
- package/es/types.d.ts +33 -0
- package/es/types.js +1 -0
- package/es/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/es/victory-accessible-group/victory-accessible-group.js +8 -16
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +2 -1
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +59 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +15 -21
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +31 -31
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +13 -8
- package/es/victory-portal/portal-context.d.ts +11 -0
- package/es/victory-portal/portal-context.js +3 -4
- package/es/victory-portal/portal.d.ts +28 -0
- package/es/victory-portal/portal.js +25 -33
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +23 -22
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +3 -5
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +4 -6
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +3 -5
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +11 -8
- package/es/victory-primitives/clip-path.d.ts +14 -0
- package/es/victory-primitives/clip-path.js +6 -6
- package/es/victory-primitives/index.d.ts +14 -0
- package/es/victory-primitives/index.js +14 -0
- package/es/victory-primitives/line-segment.d.ts +19 -0
- package/es/victory-primitives/line-segment.js +3 -5
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +11 -8
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +9 -6
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +9 -19
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +11 -8
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +7 -6
- package/es/victory-primitives/tspan.d.ts +2 -0
- package/es/victory-primitives/tspan.js +7 -6
- package/es/victory-primitives/types.d.ts +7 -0
- package/es/victory-primitives/types.js +1 -0
- package/es/victory-primitives/whisker.d.ts +24 -0
- package/es/victory-primitives/whisker.js +3 -5
- package/es/victory-theme/grayscale.d.ts +2 -0
- package/es/victory-theme/grayscale.js +1 -1
- package/es/victory-theme/material.d.ts +2 -0
- package/es/victory-theme/material.js +1 -1
- package/es/victory-theme/victory-theme-definition.d.ts +244 -0
- package/es/victory-theme/victory-theme-definition.js +1 -0
- package/es/victory-theme/victory-theme.d.ts +5 -0
- package/es/victory-theme/victory-theme.js +6 -5
- package/es/victory-transition/victory-transition.d.ts +59 -0
- package/es/victory-transition/victory-transition.js +19 -23
- package/es/victory-util/add-events.js +6 -3
- package/es/victory-util/axis.js +0 -1
- package/es/victory-util/collection.js +0 -2
- package/es/victory-util/data.js +0 -2
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +0 -2
- package/es/victory-util/helpers.js +0 -2
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/log.js +0 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -0
- package/es/victory-util/point-path-helpers.js +59 -61
- package/es/victory-util/selection.d.ts +23 -0
- package/es/victory-util/selection.js +0 -2
- package/es/victory-util/style.js +0 -2
- package/es/victory-util/textsize.d.ts +8 -0
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +13 -8
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/lib/index.d.ts +38 -941
- package/lib/index.js +195 -193
- package/lib/types.d.ts +33 -0
- package/lib/types.js +1 -0
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/lib/victory-accessible-group/victory-accessible-group.js +9 -15
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +2 -1
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +60 -65
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +19 -22
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +34 -31
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +19 -13
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +3 -4
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +26 -31
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +24 -20
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +5 -6
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +7 -8
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +5 -6
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +11 -6
- package/lib/victory-primitives/clip-path.d.ts +14 -0
- package/lib/victory-primitives/clip-path.js +7 -5
- package/lib/victory-primitives/index.d.ts +14 -0
- package/lib/victory-primitives/index.js +187 -0
- package/lib/victory-primitives/line-segment.d.ts +19 -0
- package/lib/victory-primitives/line-segment.js +5 -6
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +11 -6
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +9 -4
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +13 -21
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +11 -6
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +8 -5
- package/lib/victory-primitives/tspan.d.ts +2 -0
- package/lib/victory-primitives/tspan.js +7 -4
- package/lib/victory-primitives/types.d.ts +7 -0
- package/lib/victory-primitives/types.js +1 -0
- package/lib/victory-primitives/whisker.d.ts +24 -0
- package/lib/victory-primitives/whisker.js +5 -6
- package/lib/victory-theme/grayscale.d.ts +2 -0
- package/lib/victory-theme/grayscale.js +3 -3
- package/lib/victory-theme/material.d.ts +2 -0
- package/lib/victory-theme/material.js +3 -3
- package/lib/victory-theme/victory-theme-definition.d.ts +244 -0
- package/lib/victory-theme/victory-theme-definition.js +1 -0
- package/lib/victory-theme/victory-theme.d.ts +5 -0
- package/lib/victory-theme/victory-theme.js +22 -8
- package/lib/victory-transition/victory-transition.d.ts +59 -0
- package/lib/victory-transition/victory-transition.js +21 -23
- package/lib/victory-util/add-events.js +8 -4
- package/lib/victory-util/collection.js +0 -2
- package/lib/victory-util/default-transitions.js +0 -1
- package/lib/victory-util/helpers.js +0 -2
- package/lib/victory-util/immutable.js +0 -2
- package/lib/victory-util/label-helpers.js +0 -2
- package/lib/victory-util/log.js +0 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -0
- package/lib/victory-util/point-path-helpers.js +86 -73
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +0 -2
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +13 -8
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/package.json +4 -4
- package/src/index.ts +42 -0
- package/src/types.ts +45 -0
- package/src/victory-accessible-group/{victory-accessible-group.js → victory-accessible-group.tsx} +10 -3
- package/src/victory-animation/{util.js → util.ts} +4 -3
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +89 -12
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +29 -5
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +71 -14
- package/src/victory-portal/portal-context.ts +14 -0
- package/src/victory-portal/{portal.js → portal.tsx} +23 -12
- package/src/victory-portal/{victory-portal.js → victory-portal.tsx} +21 -6
- package/src/victory-primitives/{arc.js → arc.tsx} +15 -5
- package/src/victory-primitives/{background.js → background.tsx} +17 -7
- package/src/victory-primitives/{border.js → border.tsx} +12 -5
- package/src/victory-primitives/{circle.js → circle.tsx} +4 -3
- package/src/victory-primitives/clip-path.tsx +25 -0
- package/src/victory-primitives/index.ts +14 -0
- package/src/victory-primitives/{line-segment.js → line-segment.tsx} +13 -5
- package/src/victory-primitives/{line.js → line.tsx} +4 -3
- package/src/victory-primitives/{path.js → path.tsx} +4 -3
- package/src/victory-primitives/{point.js → point.tsx} +25 -20
- package/src/victory-primitives/{rect.js → rect.tsx} +4 -2
- package/src/victory-primitives/{text.js → text.tsx} +9 -3
- package/src/victory-primitives/tspan.tsx +7 -0
- package/src/victory-primitives/types.ts +19 -0
- package/src/victory-primitives/{whisker.js → whisker.tsx} +20 -7
- package/src/victory-theme/{grayscale.js → grayscale.tsx} +2 -1
- package/src/victory-theme/{material.js → material.tsx} +2 -1
- package/src/victory-theme/victory-theme-definition.ts +261 -0
- package/src/victory-theme/victory-theme.tsx +5 -0
- package/src/victory-transition/{victory-transition.js → victory-transition.tsx} +68 -19
- package/src/victory-util/add-events.js +6 -1
- package/src/victory-util/axis.js +0 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/data.js +0 -1
- package/src/victory-util/default-transitions.js +0 -1
- package/src/victory-util/domain.js +0 -1
- package/src/victory-util/events.js +1 -1
- package/src/victory-util/helpers.js +0 -1
- package/src/victory-util/immutable.js +0 -1
- package/src/victory-util/label-helpers.js +0 -1
- package/src/victory-util/log.js +0 -1
- package/src/victory-util/point-path-helpers.ts +119 -0
- package/src/victory-util/prop-types.js +0 -1
- package/src/victory-util/scale.js +0 -1
- package/src/victory-util/selection.d.ts +23 -0
- package/src/victory-util/selection.js +0 -1
- package/src/victory-util/style.js +0 -1
- package/src/victory-util/textsize.d.ts +8 -0
- package/src/victory-util/{timer-context.js → timer-context.ts} +0 -0
- package/src/victory-util/{timer.js → timer.ts} +19 -4
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/wrapper.js +0 -1
- package/src/index.d.ts +0 -941
- package/src/index.js +0 -51
- package/src/victory-portal/portal-context.js +0 -10
- package/src/victory-primitives/clip-path.js +0 -18
- package/src/victory-primitives/tspan.js +0 -5
- package/src/victory-theme/victory-theme.js +0 -7
- package/src/victory-util/point-path-helpers.js +0 -121
|
@@ -8,7 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
8
8
|
|
|
9
9
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
10
|
|
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
12
|
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
|
|
@@ -18,25 +18,33 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
18
18
|
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
20
|
|
|
21
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
-
|
|
23
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
22
|
|
|
25
23
|
import React from "react";
|
|
26
24
|
import PropTypes from "prop-types";
|
|
27
25
|
import * as Log from "../victory-util/log";
|
|
28
26
|
import * as Helpers from "../victory-util/helpers";
|
|
29
|
-
import PortalContext from "./portal-context";
|
|
30
|
-
|
|
31
|
-
var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
27
|
+
import { PortalContext } from "./portal-context";
|
|
28
|
+
export var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
32
29
|
_inherits(VictoryPortal, _React$Component);
|
|
33
30
|
|
|
34
31
|
var _super = _createSuper(VictoryPortal);
|
|
35
32
|
|
|
36
33
|
function VictoryPortal() {
|
|
34
|
+
var _this;
|
|
35
|
+
|
|
37
36
|
_classCallCheck(this, VictoryPortal);
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
|
+
args[_key] = arguments[_key];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
|
+
_this.checkedContext = void 0;
|
|
44
|
+
_this.renderInPlace = void 0;
|
|
45
|
+
_this.element = void 0;
|
|
46
|
+
_this.portalKey = void 0;
|
|
47
|
+
return _this;
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
_createClass(VictoryPortal, [{
|
|
@@ -100,20 +108,13 @@ var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
|
100
108
|
|
|
101
109
|
return VictoryPortal;
|
|
102
110
|
}(React.Component);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
_defineProperty(VictoryPortal, "role", "portal");
|
|
107
|
-
|
|
108
|
-
_defineProperty(VictoryPortal, "propTypes", {
|
|
111
|
+
VictoryPortal.displayName = "VictoryPortal";
|
|
112
|
+
VictoryPortal.role = "portal";
|
|
113
|
+
VictoryPortal.propTypes = {
|
|
109
114
|
children: PropTypes.node,
|
|
110
115
|
groupComponent: PropTypes.element
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
_defineProperty(VictoryPortal, "defaultProps", {
|
|
116
|
+
};
|
|
117
|
+
VictoryPortal.defaultProps = {
|
|
114
118
|
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
_defineProperty(VictoryPortal, "contextType", PortalContext);
|
|
118
|
-
|
|
119
|
-
export { VictoryPortal as default };
|
|
119
|
+
};
|
|
120
|
+
VictoryPortal.contextType = PortalContext;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export interface ArcProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
closedPath?: boolean;
|
|
5
|
+
cx?: number;
|
|
6
|
+
cy?: number;
|
|
7
|
+
datum?: any;
|
|
8
|
+
endAngle?: number;
|
|
9
|
+
pathComponent?: React.ReactElement;
|
|
10
|
+
r?: number;
|
|
11
|
+
startAngle?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const Arc: {
|
|
14
|
+
(props: ArcProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
propTypes: any;
|
|
16
|
+
defaultProps: {
|
|
17
|
+
pathComponent: JSX.Element;
|
|
18
|
+
role: string;
|
|
19
|
+
shapeRendering: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -11,7 +11,7 @@ import React from "react";
|
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import * as Helpers from "../victory-util/helpers";
|
|
13
13
|
import * as CommonProps from "../victory-util/common-props";
|
|
14
|
-
import Path from "./path";
|
|
14
|
+
import { Path } from "./path";
|
|
15
15
|
|
|
16
16
|
var getArcPath = function (props) {
|
|
17
17
|
var cx = props.cx,
|
|
@@ -63,7 +63,7 @@ var evaluateProps = function (props) {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
var Arc = function (props) {
|
|
66
|
+
export var Arc = function (props) {
|
|
67
67
|
props = evaluateProps(props);
|
|
68
68
|
return /*#__PURE__*/React.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
69
69
|
"aria-label": props.ariaLabel,
|
|
@@ -78,7 +78,6 @@ var Arc = function (props) {
|
|
|
78
78
|
clipPath: props.clipPath
|
|
79
79
|
}));
|
|
80
80
|
};
|
|
81
|
-
|
|
82
81
|
Arc.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
83
82
|
closedPath: PropTypes.bool,
|
|
84
83
|
cx: PropTypes.number,
|
|
@@ -93,5 +92,4 @@ Arc.defaultProps = {
|
|
|
93
92
|
pathComponent: /*#__PURE__*/React.createElement(Path, null),
|
|
94
93
|
role: "presentation",
|
|
95
94
|
shapeRendering: "auto"
|
|
96
|
-
};
|
|
97
|
-
export default Arc;
|
|
95
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export interface BackgroundProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
circleComponent?: React.ReactElement;
|
|
5
|
+
height?: number;
|
|
6
|
+
rectComponent?: React.ReactElement;
|
|
7
|
+
rx?: number;
|
|
8
|
+
ry?: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
x?: number;
|
|
11
|
+
y?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const Background: {
|
|
14
|
+
(props: BackgroundProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
propTypes: any;
|
|
16
|
+
defaultProps: {
|
|
17
|
+
circleComponent: JSX.Element;
|
|
18
|
+
rectComponent: JSX.Element;
|
|
19
|
+
role: string;
|
|
20
|
+
shapeRendering: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -10,8 +10,8 @@ import React from "react";
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import * as Helpers from "../victory-util/helpers";
|
|
12
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
13
|
-
import Rect from "./rect";
|
|
14
|
-
import Circle from "./circle";
|
|
13
|
+
import { Rect } from "./rect";
|
|
14
|
+
import { Circle } from "./circle";
|
|
15
15
|
|
|
16
16
|
var evaluateProps = function (props) {
|
|
17
17
|
/**
|
|
@@ -24,7 +24,7 @@ var evaluateProps = function (props) {
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var Background = function (props) {
|
|
27
|
+
export var Background = function (props) {
|
|
28
28
|
props = evaluateProps(props);
|
|
29
29
|
return props.polar ? /*#__PURE__*/React.cloneElement(props.circleComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
30
30
|
style: props.style,
|
|
@@ -47,7 +47,6 @@ var Background = function (props) {
|
|
|
47
47
|
className: props.className
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
50
|
-
|
|
51
50
|
Background.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
52
51
|
circleComponent: PropTypes.element,
|
|
53
52
|
height: PropTypes.number,
|
|
@@ -63,5 +62,4 @@ Background.defaultProps = {
|
|
|
63
62
|
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
64
63
|
role: "presentation",
|
|
65
64
|
shapeRendering: "auto"
|
|
66
|
-
};
|
|
67
|
-
export default Background;
|
|
65
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export interface BorderProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
rectComponent?: React.ReactElement;
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const Border: {
|
|
11
|
+
(props: BorderProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
propTypes: any;
|
|
13
|
+
defaultProps: {
|
|
14
|
+
rectComponent: JSX.Element;
|
|
15
|
+
role: string;
|
|
16
|
+
shapeRendering: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -10,7 +10,7 @@ import React from "react";
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import * as Helpers from "../victory-util/helpers";
|
|
12
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
13
|
-
import Rect from "./rect";
|
|
13
|
+
import { Rect } from "./rect";
|
|
14
14
|
|
|
15
15
|
var evaluateProps = function (props) {
|
|
16
16
|
/**
|
|
@@ -37,7 +37,7 @@ var evaluateProps = function (props) {
|
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var Border = function (props) {
|
|
40
|
+
export var Border = function (props) {
|
|
41
41
|
props = evaluateProps(props);
|
|
42
42
|
return /*#__PURE__*/React.cloneElement(props.rectComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
43
43
|
"aria-label": props.ariaLabel,
|
|
@@ -55,7 +55,6 @@ var Border = function (props) {
|
|
|
55
55
|
clipPath: props.clipPath
|
|
56
56
|
}));
|
|
57
57
|
};
|
|
58
|
-
|
|
59
58
|
Border.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
60
59
|
height: PropTypes.number,
|
|
61
60
|
rectComponent: PropTypes.element,
|
|
@@ -67,5 +66,4 @@ Border.defaultProps = {
|
|
|
67
66
|
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
68
67
|
role: "presentation",
|
|
69
68
|
shapeRendering: "auto"
|
|
70
|
-
};
|
|
71
|
-
export default Border;
|
|
69
|
+
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
6
|
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
8
|
|
|
9
9
|
import React from "react";
|
|
10
|
-
|
|
11
|
-
var Circle = function (props) {
|
|
10
|
+
export var Circle = function (props) {
|
|
12
11
|
// eslint-disable-next-line react/prop-types
|
|
13
12
|
var desc = props.desc,
|
|
14
13
|
rest = _objectWithoutProperties(props, _excluded);
|
|
15
14
|
|
|
16
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("circle", _extends({
|
|
17
19
|
vectorEffect: "non-scaling-stroke"
|
|
18
|
-
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
20
|
+
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
23
|
+
React.createElement("circle", _extends({
|
|
19
24
|
vectorEffect: "non-scaling-stroke"
|
|
20
25
|
}, rest));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Circle;
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
4
|
+
export interface ClipPathProps extends VictoryCommonPrimitiveProps {
|
|
5
|
+
children?: React.ReactNode[] | React.ReactNode;
|
|
6
|
+
clipId?: number | string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ClipPath: {
|
|
9
|
+
(props: ClipPathProps): JSX.Element;
|
|
10
|
+
propTypes: {
|
|
11
|
+
children: PropTypes.Requireable<string | number | boolean | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
12
|
+
clipId: PropTypes.Requireable<string | number>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export var ClipPath = function (props) {
|
|
4
|
+
return /*#__PURE__*/React.createElement("defs", null,
|
|
5
|
+
/*#__PURE__*/
|
|
6
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
7
|
+
React.createElement("clipPath", {
|
|
6
8
|
id: props.clipId
|
|
7
9
|
}, props.children));
|
|
8
10
|
};
|
|
9
|
-
|
|
10
11
|
ClipPath.propTypes = {
|
|
11
12
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
12
13
|
clipId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
13
|
-
};
|
|
14
|
-
export default ClipPath;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./arc";
|
|
2
|
+
export * from "./background";
|
|
3
|
+
export * from "./border";
|
|
4
|
+
export * from "./circle";
|
|
5
|
+
export * from "./clip-path";
|
|
6
|
+
export * from "./line";
|
|
7
|
+
export * from "./line-segment";
|
|
8
|
+
export * from "./path";
|
|
9
|
+
export * from "./point";
|
|
10
|
+
export * from "./rect";
|
|
11
|
+
export * from "./text";
|
|
12
|
+
export * from "./tspan";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
export * from "./whisker";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./arc";
|
|
2
|
+
export * from "./background";
|
|
3
|
+
export * from "./border";
|
|
4
|
+
export * from "./circle";
|
|
5
|
+
export * from "./clip-path";
|
|
6
|
+
export * from "./line";
|
|
7
|
+
export * from "./line-segment";
|
|
8
|
+
export * from "./path";
|
|
9
|
+
export * from "./point";
|
|
10
|
+
export * from "./rect";
|
|
11
|
+
export * from "./text";
|
|
12
|
+
export * from "./tspan";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
export * from "./whisker";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export interface LineSegmentProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
datum?: any;
|
|
5
|
+
lineComponent?: React.ReactElement;
|
|
6
|
+
x1?: number;
|
|
7
|
+
x2?: number;
|
|
8
|
+
y1?: number;
|
|
9
|
+
y2?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const LineSegment: {
|
|
12
|
+
(props: LineSegmentProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
propTypes: any;
|
|
14
|
+
defaultProps: {
|
|
15
|
+
lineComponent: JSX.Element;
|
|
16
|
+
role: string;
|
|
17
|
+
shapeRendering: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -10,7 +10,7 @@ import React from "react";
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import * as Helpers from "../victory-util/helpers";
|
|
12
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
13
|
-
import Line from "./line";
|
|
13
|
+
import { Line } from "./line";
|
|
14
14
|
|
|
15
15
|
var evaluateProps = function (props) {
|
|
16
16
|
/**
|
|
@@ -37,7 +37,7 @@ var evaluateProps = function (props) {
|
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var LineSegment = function (props) {
|
|
40
|
+
export var LineSegment = function (props) {
|
|
41
41
|
props = evaluateProps(props);
|
|
42
42
|
return /*#__PURE__*/React.cloneElement(props.lineComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
43
43
|
"aria-label": props.ariaLabel,
|
|
@@ -55,7 +55,6 @@ var LineSegment = function (props) {
|
|
|
55
55
|
clipPath: props.clipPath
|
|
56
56
|
}));
|
|
57
57
|
};
|
|
58
|
-
|
|
59
58
|
LineSegment.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
60
59
|
datum: PropTypes.any,
|
|
61
60
|
lineComponent: PropTypes.element,
|
|
@@ -68,5 +67,4 @@ LineSegment.defaultProps = {
|
|
|
68
67
|
lineComponent: /*#__PURE__*/React.createElement(Line, null),
|
|
69
68
|
role: "presentation",
|
|
70
69
|
shapeRendering: "auto"
|
|
71
|
-
};
|
|
72
|
-
export default LineSegment;
|
|
70
|
+
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
6
|
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
8
|
|
|
9
9
|
import React from "react";
|
|
10
|
-
|
|
11
|
-
var Line = function (props) {
|
|
10
|
+
export var Line = function (props) {
|
|
12
11
|
// eslint-disable-next-line react/prop-types
|
|
13
12
|
var desc = props.desc,
|
|
14
13
|
rest = _objectWithoutProperties(props, _excluded);
|
|
15
14
|
|
|
16
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("line", _extends({
|
|
17
19
|
vectorEffect: "non-scaling-stroke"
|
|
18
|
-
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
20
|
+
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
23
|
+
React.createElement("line", _extends({
|
|
19
24
|
vectorEffect: "non-scaling-stroke"
|
|
20
25
|
}, rest));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Line;
|
|
26
|
+
};
|
|
@@ -5,13 +5,16 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
|
-
|
|
9
|
-
var Path = function (props) {
|
|
8
|
+
export var Path = function (props) {
|
|
10
9
|
// eslint-disable-next-line react/prop-types
|
|
11
10
|
var desc = props.desc,
|
|
12
11
|
rest = _objectWithoutProperties(props, _excluded);
|
|
13
12
|
|
|
14
|
-
return desc ?
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return desc ?
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
16
|
+
React.createElement("path", rest, /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
17
|
+
/*#__PURE__*/
|
|
18
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
19
|
+
React.createElement("path", rest);
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
import { ScatterSymbolType } from "./types";
|
|
4
|
+
export interface PointProps extends VictoryCommonPrimitiveProps {
|
|
5
|
+
datum?: any;
|
|
6
|
+
getPath?: (x: number, y: number, size: number) => string;
|
|
7
|
+
pathComponent?: React.ReactElement;
|
|
8
|
+
size?: number | Function;
|
|
9
|
+
symbol?: ScatterSymbolType | Function;
|
|
10
|
+
x?: number;
|
|
11
|
+
y?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const Point: {
|
|
14
|
+
(props: PointProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
propTypes: any;
|
|
16
|
+
defaultProps: {
|
|
17
|
+
pathComponent: JSX.Element;
|
|
18
|
+
role: string;
|
|
19
|
+
shapeRendering: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -6,12 +6,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
|
|
9
|
-
import React from "react";
|
|
10
9
|
import PropTypes from "prop-types";
|
|
10
|
+
import React from "react";
|
|
11
11
|
import * as Helpers from "../victory-util/helpers";
|
|
12
|
-
import pathHelpers from "../victory-util/point-path-helpers";
|
|
12
|
+
import * as pathHelpers from "../victory-util/point-path-helpers";
|
|
13
13
|
import * as CommonProps from "../victory-util/common-props";
|
|
14
|
-
import
|
|
14
|
+
import * as UserProps from "../victory-util/user-props";
|
|
15
|
+
import { Path } from "./path";
|
|
15
16
|
|
|
16
17
|
var getPath = function (props) {
|
|
17
18
|
var x = props.x,
|
|
@@ -23,17 +24,7 @@ var getPath = function (props) {
|
|
|
23
24
|
return props.getPath(x, y, size);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
var pathFunctions =
|
|
27
|
-
circle: pathHelpers.circle,
|
|
28
|
-
square: pathHelpers.square,
|
|
29
|
-
diamond: pathHelpers.diamond,
|
|
30
|
-
triangleDown: pathHelpers.triangleDown,
|
|
31
|
-
triangleUp: pathHelpers.triangleUp,
|
|
32
|
-
plus: pathHelpers.plus,
|
|
33
|
-
minus: pathHelpers.minus,
|
|
34
|
-
star: pathHelpers.star,
|
|
35
|
-
cross: pathHelpers.cross
|
|
36
|
-
};
|
|
27
|
+
var pathFunctions = pathHelpers;
|
|
37
28
|
var symbolFunction = typeof pathFunctions[symbol] === "function" ? pathFunctions[symbol] : pathFunctions.circle;
|
|
38
29
|
return symbolFunction(x, y, size);
|
|
39
30
|
};
|
|
@@ -67,8 +58,9 @@ var evaluateProps = function (props) {
|
|
|
67
58
|
});
|
|
68
59
|
};
|
|
69
60
|
|
|
70
|
-
var Point = function (props) {
|
|
61
|
+
export var Point = function (props) {
|
|
71
62
|
props = evaluateProps(props);
|
|
63
|
+
var userProps = UserProps.getSafeUserProps(props);
|
|
72
64
|
return /*#__PURE__*/React.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
73
65
|
"aria-label": props.ariaLabel,
|
|
74
66
|
d: getPath(props),
|
|
@@ -80,9 +72,8 @@ var Point = function (props) {
|
|
|
80
72
|
className: props.className,
|
|
81
73
|
transform: props.transform,
|
|
82
74
|
clipPath: props.clipPath
|
|
83
|
-
}));
|
|
75
|
+
}, userProps));
|
|
84
76
|
};
|
|
85
|
-
|
|
86
77
|
Point.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
87
78
|
datum: PropTypes.object,
|
|
88
79
|
getPath: PropTypes.func,
|
|
@@ -96,5 +87,4 @@ Point.defaultProps = {
|
|
|
96
87
|
pathComponent: /*#__PURE__*/React.createElement(Path, null),
|
|
97
88
|
role: "presentation",
|
|
98
89
|
shapeRendering: "auto"
|
|
99
|
-
};
|
|
100
|
-
export default Point;
|
|
90
|
+
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
6
|
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
8
|
|
|
9
9
|
import React from "react";
|
|
10
|
-
|
|
11
|
-
var Rect = function (props) {
|
|
10
|
+
export var Rect = function (props) {
|
|
12
11
|
// eslint-disable-next-line react/prop-types
|
|
13
12
|
var desc = props.desc,
|
|
14
13
|
rest = _objectWithoutProperties(props, _excluded);
|
|
15
14
|
|
|
16
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("rect", _extends({
|
|
17
19
|
vectorEffect: "non-scaling-stroke"
|
|
18
|
-
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
20
|
+
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
23
|
+
React.createElement("rect", _extends({
|
|
19
24
|
vectorEffect: "non-scaling-stroke"
|
|
20
25
|
}, rest));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Rect;
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
4
|
+
export interface TextProps extends VictoryCommonPrimitiveProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
desc?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Text: {
|
|
10
|
+
(props: TextProps): JSX.Element;
|
|
11
|
+
propTypes: {
|
|
12
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
+
desc: PropTypes.Requireable<string>;
|
|
14
|
+
title: PropTypes.Requireable<string>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -6,19 +6,20 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import PropTypes from "prop-types";
|
|
9
|
-
|
|
10
|
-
var Text = function (props) {
|
|
9
|
+
export var Text = function (props) {
|
|
11
10
|
var children = props.children,
|
|
12
11
|
title = props.title,
|
|
13
12
|
desc = props.desc,
|
|
14
13
|
rest = _objectWithoutProperties(props, _excluded);
|
|
15
14
|
|
|
16
|
-
return
|
|
15
|
+
return (
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("text", rest, title && /*#__PURE__*/React.createElement("title", null, title), desc && /*#__PURE__*/React.createElement("desc", null, desc), children)
|
|
19
|
+
);
|
|
17
20
|
};
|
|
18
|
-
|
|
19
21
|
Text.propTypes = {
|
|
20
22
|
children: PropTypes.node,
|
|
21
23
|
desc: PropTypes.string,
|
|
22
24
|
title: PropTypes.string
|
|
23
|
-
};
|
|
24
|
-
export default Text;
|
|
25
|
+
};
|