victory-core 36.3.2 → 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 +15084 -15018
- 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 +35 -45
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +3 -2
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +92 -102
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +75 -82
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +97 -107
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +43 -31
- 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 +44 -50
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +38 -47
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +9 -9
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +12 -12
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +9 -9
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +17 -10
- 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 +9 -9
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +17 -10
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +15 -8
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +15 -23
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +17 -10
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +13 -8
- 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 +12 -12
- 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 +38 -44
- package/es/victory-util/add-events.js +328 -319
- package/es/victory-util/axis.js +12 -6
- package/es/victory-util/collection.js +7 -5
- package/es/victory-util/common-props.js +2 -2
- package/es/victory-util/data.js +8 -6
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +7 -5
- package/es/victory-util/events.js +8 -4
- package/es/victory-util/helpers.js +1 -3
- package/es/victory-util/hooks/use-animation-state.js +11 -5
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/line-helpers.js +1 -1
- 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/scale.js +19 -19
- 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/textsize.js +11 -7
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer-context.js +1 -1
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +16 -13
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/es/victory-util/user-props.js +44 -4
- package/es/victory-util/wrapper.js +18 -12
- package/lib/index.d.ts +38 -941
- package/lib/index.js +201 -189
- 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 +37 -45
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +4 -3
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +97 -102
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +81 -82
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +102 -107
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +49 -32
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +4 -5
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +49 -50
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +43 -47
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +13 -10
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +16 -13
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +13 -10
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +17 -8
- 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 +13 -10
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +17 -8
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +15 -6
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +21 -25
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +17 -8
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +14 -7
- 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 +16 -13
- 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 +43 -45
- package/lib/victory-util/add-events.js +326 -316
- package/lib/victory-util/axis.js +20 -11
- package/lib/victory-util/collection.js +10 -8
- package/lib/victory-util/common-props.js +6 -4
- package/lib/victory-util/data.js +13 -7
- package/lib/victory-util/default-transitions.js +1 -2
- package/lib/victory-util/domain.js +11 -5
- package/lib/victory-util/events.js +17 -11
- package/lib/victory-util/helpers.js +14 -16
- package/lib/victory-util/hooks/index.js +4 -4
- package/lib/victory-util/hooks/use-animation-state.js +14 -6
- package/lib/victory-util/immutable.js +3 -5
- package/lib/victory-util/label-helpers.js +6 -6
- package/lib/victory-util/line-helpers.js +4 -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/prop-types.js +5 -3
- package/lib/victory-util/scale.js +24 -21
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +5 -5
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/textsize.js +12 -8
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer-context.js +1 -1
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +16 -13
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/lib/victory-util/user-props.js +53 -6
- package/lib/victory-util/wrapper.js +31 -23
- package/package.json +6 -13
- 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} +5 -4
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +90 -13
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +32 -6
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +80 -19
- 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 +7 -5
- package/src/victory-util/axis.js +3 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/common-props.js +2 -2
- 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/line-helpers.js +1 -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 +18 -10
- 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} +20 -5
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/user-props.js +31 -1
- 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
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* The React context object consumers may use to access the context of the
|
|
4
5
|
* portal.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
PortalContext.displayName = "PortalContext";
|
|
9
|
-
export default PortalContext;
|
|
7
|
+
export var PortalContext = /*#__PURE__*/React.createContext({});
|
|
8
|
+
PortalContext.displayName = "PortalContext";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { PortalContextValue } from "./portal-context";
|
|
4
|
+
export interface PortalProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
height?: number;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
viewBox?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class Portal extends React.Component<PortalProps> implements PortalContextValue {
|
|
12
|
+
static displayName: string;
|
|
13
|
+
static propTypes: {
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
height: any;
|
|
16
|
+
style: PropTypes.Requireable<object>;
|
|
17
|
+
viewBox: PropTypes.Requireable<string>;
|
|
18
|
+
width: any;
|
|
19
|
+
};
|
|
20
|
+
private readonly map;
|
|
21
|
+
private index;
|
|
22
|
+
constructor(props: PortalProps);
|
|
23
|
+
portalRegister: () => number;
|
|
24
|
+
portalUpdate: (key: number, element: React.ReactElement) => void;
|
|
25
|
+
portalDeregister: (key: number) => void;
|
|
26
|
+
private getChildren;
|
|
27
|
+
render(): JSX.Element;
|
|
28
|
+
}
|
|
@@ -4,62 +4,68 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
4
4
|
|
|
5
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
6
|
|
|
7
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
8
|
|
|
9
|
-
function
|
|
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
|
|
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
|
+
|
|
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
|
+
|
|
15
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
12
16
|
|
|
13
17
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
14
18
|
|
|
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
|
+
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
+
|
|
15
23
|
import React from "react";
|
|
16
24
|
import PropTypes from "prop-types";
|
|
17
25
|
import * as CustomPropTypes from "../victory-util/prop-types";
|
|
18
|
-
|
|
19
|
-
var Portal =
|
|
20
|
-
/*#__PURE__*/
|
|
21
|
-
function (_React$Component) {
|
|
26
|
+
export var Portal = /*#__PURE__*/function (_React$Component) {
|
|
22
27
|
_inherits(Portal, _React$Component);
|
|
23
28
|
|
|
29
|
+
var _super = _createSuper(Portal);
|
|
30
|
+
|
|
24
31
|
function Portal(props) {
|
|
25
32
|
var _this;
|
|
26
33
|
|
|
27
34
|
_classCallCheck(this, Portal);
|
|
28
35
|
|
|
29
|
-
_this =
|
|
36
|
+
_this = _super.call(this, props);
|
|
37
|
+
_this.map = void 0;
|
|
38
|
+
_this.index = void 0;
|
|
39
|
+
|
|
40
|
+
_this.portalRegister = function () {
|
|
41
|
+
return ++_this.index;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
_this.portalUpdate = function (key, element) {
|
|
45
|
+
_this.map[key] = element;
|
|
46
|
+
|
|
47
|
+
_this.forceUpdate();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
_this.portalDeregister = function (key) {
|
|
51
|
+
delete _this.map[key];
|
|
52
|
+
|
|
53
|
+
_this.forceUpdate();
|
|
54
|
+
};
|
|
55
|
+
|
|
30
56
|
_this.map = {};
|
|
31
57
|
_this.index = 1;
|
|
32
|
-
_this.portalUpdate = _this.portalUpdate.bind(_assertThisInitialized(_this));
|
|
33
|
-
_this.portalRegister = _this.portalRegister.bind(_assertThisInitialized(_this));
|
|
34
|
-
_this.portalDeregister = _this.portalDeregister.bind(_assertThisInitialized(_this));
|
|
35
58
|
return _this;
|
|
36
59
|
}
|
|
37
60
|
|
|
38
61
|
_createClass(Portal, [{
|
|
39
|
-
key: "portalRegister",
|
|
40
|
-
value: function portalRegister() {
|
|
41
|
-
return ++this.index;
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
key: "portalUpdate",
|
|
45
|
-
value: function portalUpdate(key, element) {
|
|
46
|
-
this.map[key] = element;
|
|
47
|
-
this.forceUpdate();
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
key: "portalDeregister",
|
|
51
|
-
value: function portalDeregister(key) {
|
|
52
|
-
delete this.map[key];
|
|
53
|
-
this.forceUpdate();
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
62
|
key: "getChildren",
|
|
57
63
|
value: function getChildren() {
|
|
58
64
|
var _this2 = this;
|
|
59
65
|
|
|
60
66
|
return _keys(this.map).map(function (key) {
|
|
61
67
|
var el = _this2.map[key];
|
|
62
|
-
return el ? React.cloneElement(el, {
|
|
68
|
+
return el ? /*#__PURE__*/React.cloneElement(el, {
|
|
63
69
|
key: key
|
|
64
70
|
}) : el;
|
|
65
71
|
});
|
|
@@ -68,29 +74,17 @@ function (_React$Component) {
|
|
|
68
74
|
}, {
|
|
69
75
|
key: "render",
|
|
70
76
|
value: function render() {
|
|
71
|
-
return React.createElement("svg", this.props, this.getChildren());
|
|
77
|
+
return /*#__PURE__*/React.createElement("svg", this.props, this.getChildren());
|
|
72
78
|
}
|
|
73
79
|
}]);
|
|
74
80
|
|
|
75
81
|
return Portal;
|
|
76
82
|
}(React.Component);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
configurable: true,
|
|
86
|
-
enumerable: true,
|
|
87
|
-
writable: true,
|
|
88
|
-
value: {
|
|
89
|
-
className: PropTypes.string,
|
|
90
|
-
height: CustomPropTypes.nonNegative,
|
|
91
|
-
style: PropTypes.object,
|
|
92
|
-
viewBox: PropTypes.string,
|
|
93
|
-
width: CustomPropTypes.nonNegative
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
export { Portal as default };
|
|
83
|
+
Portal.displayName = "Portal";
|
|
84
|
+
Portal.propTypes = {
|
|
85
|
+
className: PropTypes.string,
|
|
86
|
+
height: CustomPropTypes.nonNegative,
|
|
87
|
+
style: PropTypes.object,
|
|
88
|
+
viewBox: PropTypes.string,
|
|
89
|
+
width: CustomPropTypes.nonNegative
|
|
90
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { PortalContext } from "./portal-context";
|
|
4
|
+
export interface VictoryPortalProps {
|
|
5
|
+
children?: React.ReactElement;
|
|
6
|
+
groupComponent?: React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export interface VictoryPortal {
|
|
9
|
+
context: React.ContextType<typeof PortalContext>;
|
|
10
|
+
}
|
|
11
|
+
export declare class VictoryPortal extends React.Component<VictoryPortalProps> {
|
|
12
|
+
static displayName: string;
|
|
13
|
+
static role: string;
|
|
14
|
+
static propTypes: {
|
|
15
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
|
+
groupComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
17
|
+
};
|
|
18
|
+
static defaultProps: {
|
|
19
|
+
groupComponent: JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
static contextType: React.Context<import("./portal-context").PortalContextValue>;
|
|
22
|
+
private checkedContext;
|
|
23
|
+
private renderInPlace;
|
|
24
|
+
private element;
|
|
25
|
+
private portalKey;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
componentDidUpdate(): void;
|
|
28
|
+
componentWillUnmount(): void;
|
|
29
|
+
renderPortal(child: React.ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
30
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
31
|
+
}
|
|
@@ -4,29 +4,47 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
4
4
|
|
|
5
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
6
|
|
|
7
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
8
|
|
|
9
|
-
function
|
|
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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
15
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
10
16
|
|
|
11
17
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
18
|
|
|
13
|
-
function
|
|
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
|
+
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
22
|
|
|
15
23
|
import React from "react";
|
|
16
24
|
import PropTypes from "prop-types";
|
|
17
25
|
import * as Log from "../victory-util/log";
|
|
18
26
|
import * as Helpers from "../victory-util/helpers";
|
|
19
|
-
import PortalContext from "./portal-context";
|
|
20
|
-
|
|
21
|
-
var VictoryPortal =
|
|
22
|
-
/*#__PURE__*/
|
|
23
|
-
function (_React$Component) {
|
|
27
|
+
import { PortalContext } from "./portal-context";
|
|
28
|
+
export var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
24
29
|
_inherits(VictoryPortal, _React$Component);
|
|
25
30
|
|
|
31
|
+
var _super = _createSuper(VictoryPortal);
|
|
32
|
+
|
|
26
33
|
function VictoryPortal() {
|
|
34
|
+
var _this;
|
|
35
|
+
|
|
27
36
|
_classCallCheck(this, VictoryPortal);
|
|
28
37
|
|
|
29
|
-
|
|
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;
|
|
30
48
|
}
|
|
31
49
|
|
|
32
50
|
_createClass(VictoryPortal, [{
|
|
@@ -83,47 +101,20 @@ function (_React$Component) {
|
|
|
83
101
|
|
|
84
102
|
var newProps = _defaults(standardProps, childProps, Helpers.omit(this.props, ["children", "groupComponent"]));
|
|
85
103
|
|
|
86
|
-
var child = children && React.cloneElement(children, newProps);
|
|
104
|
+
var child = children && /*#__PURE__*/React.cloneElement(children, newProps);
|
|
87
105
|
return this.renderPortal(child);
|
|
88
106
|
}
|
|
89
107
|
}]);
|
|
90
108
|
|
|
91
109
|
return VictoryPortal;
|
|
92
110
|
}(React.Component);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
writable: true,
|
|
104
|
-
value: "portal"
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(VictoryPortal, "propTypes", {
|
|
107
|
-
configurable: true,
|
|
108
|
-
enumerable: true,
|
|
109
|
-
writable: true,
|
|
110
|
-
value: {
|
|
111
|
-
children: PropTypes.node,
|
|
112
|
-
groupComponent: PropTypes.element
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
Object.defineProperty(VictoryPortal, "defaultProps", {
|
|
116
|
-
configurable: true,
|
|
117
|
-
enumerable: true,
|
|
118
|
-
writable: true,
|
|
119
|
-
value: {
|
|
120
|
-
groupComponent: React.createElement("g", null)
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
Object.defineProperty(VictoryPortal, "contextType", {
|
|
124
|
-
configurable: true,
|
|
125
|
-
enumerable: true,
|
|
126
|
-
writable: true,
|
|
127
|
-
value: PortalContext
|
|
128
|
-
});
|
|
129
|
-
export { VictoryPortal as default };
|
|
111
|
+
VictoryPortal.displayName = "VictoryPortal";
|
|
112
|
+
VictoryPortal.role = "portal";
|
|
113
|
+
VictoryPortal.propTypes = {
|
|
114
|
+
children: PropTypes.node,
|
|
115
|
+
groupComponent: PropTypes.element
|
|
116
|
+
};
|
|
117
|
+
VictoryPortal.defaultProps = {
|
|
118
|
+
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
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
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
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; }
|
|
6
8
|
|
|
@@ -9,7 +11,7 @@ import React from "react";
|
|
|
9
11
|
import PropTypes from "prop-types";
|
|
10
12
|
import * as Helpers from "../victory-util/helpers";
|
|
11
13
|
import * as CommonProps from "../victory-util/common-props";
|
|
12
|
-
import Path from "./path";
|
|
14
|
+
import { Path } from "./path";
|
|
13
15
|
|
|
14
16
|
var getArcPath = function (props) {
|
|
15
17
|
var cx = props.cx,
|
|
@@ -61,9 +63,9 @@ var evaluateProps = function (props) {
|
|
|
61
63
|
});
|
|
62
64
|
};
|
|
63
65
|
|
|
64
|
-
var Arc = function (props) {
|
|
66
|
+
export var Arc = function (props) {
|
|
65
67
|
props = evaluateProps(props);
|
|
66
|
-
return React.cloneElement(props.pathComponent, _objectSpread({}, props.events, {
|
|
68
|
+
return /*#__PURE__*/React.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
67
69
|
"aria-label": props.ariaLabel,
|
|
68
70
|
d: getArcPath(props),
|
|
69
71
|
style: props.style,
|
|
@@ -76,8 +78,7 @@ var Arc = function (props) {
|
|
|
76
78
|
clipPath: props.clipPath
|
|
77
79
|
}));
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
Arc.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
81
|
+
Arc.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
81
82
|
closedPath: PropTypes.bool,
|
|
82
83
|
cx: PropTypes.number,
|
|
83
84
|
cy: PropTypes.number,
|
|
@@ -88,8 +89,7 @@ Arc.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
88
89
|
startAngle: PropTypes.number
|
|
89
90
|
});
|
|
90
91
|
Arc.defaultProps = {
|
|
91
|
-
pathComponent: React.createElement(Path, null),
|
|
92
|
+
pathComponent: /*#__PURE__*/React.createElement(Path, null),
|
|
92
93
|
role: "presentation",
|
|
93
94
|
shapeRendering: "auto"
|
|
94
|
-
};
|
|
95
|
-
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
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
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; }
|
|
6
8
|
|
|
@@ -8,8 +10,8 @@ import React from "react";
|
|
|
8
10
|
import PropTypes from "prop-types";
|
|
9
11
|
import * as Helpers from "../victory-util/helpers";
|
|
10
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
11
|
-
import Rect from "./rect";
|
|
12
|
-
import Circle from "./circle";
|
|
13
|
+
import { Rect } from "./rect";
|
|
14
|
+
import { Circle } from "./circle";
|
|
13
15
|
|
|
14
16
|
var evaluateProps = function (props) {
|
|
15
17
|
/**
|
|
@@ -22,9 +24,9 @@ var evaluateProps = function (props) {
|
|
|
22
24
|
});
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
var Background = function (props) {
|
|
27
|
+
export var Background = function (props) {
|
|
26
28
|
props = evaluateProps(props);
|
|
27
|
-
return props.polar ? React.cloneElement(props.circleComponent, _objectSpread({}, props.events, {
|
|
29
|
+
return props.polar ? /*#__PURE__*/React.cloneElement(props.circleComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
28
30
|
style: props.style,
|
|
29
31
|
role: props.role,
|
|
30
32
|
shapeRendering: props.shapeRendering,
|
|
@@ -32,7 +34,7 @@ var Background = function (props) {
|
|
|
32
34
|
cy: props.y,
|
|
33
35
|
r: props.height,
|
|
34
36
|
className: props.className
|
|
35
|
-
})) : React.cloneElement(props.rectComponent, _objectSpread({}, props.events, {
|
|
37
|
+
})) : /*#__PURE__*/React.cloneElement(props.rectComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
36
38
|
style: props.style,
|
|
37
39
|
role: props.role,
|
|
38
40
|
shapeRendering: props.shapeRendering,
|
|
@@ -45,8 +47,7 @@ var Background = function (props) {
|
|
|
45
47
|
className: props.className
|
|
46
48
|
}));
|
|
47
49
|
};
|
|
48
|
-
|
|
49
|
-
Background.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
50
|
+
Background.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
50
51
|
circleComponent: PropTypes.element,
|
|
51
52
|
height: PropTypes.number,
|
|
52
53
|
rectComponent: PropTypes.element,
|
|
@@ -57,9 +58,8 @@ Background.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
57
58
|
y: PropTypes.number
|
|
58
59
|
});
|
|
59
60
|
Background.defaultProps = {
|
|
60
|
-
circleComponent: React.createElement(Circle, null),
|
|
61
|
-
rectComponent: React.createElement(Rect, null),
|
|
61
|
+
circleComponent: /*#__PURE__*/React.createElement(Circle, null),
|
|
62
|
+
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
62
63
|
role: "presentation",
|
|
63
64
|
shapeRendering: "auto"
|
|
64
|
-
};
|
|
65
|
-
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
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
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; }
|
|
6
8
|
|
|
@@ -8,7 +10,7 @@ import React from "react";
|
|
|
8
10
|
import PropTypes from "prop-types";
|
|
9
11
|
import * as Helpers from "../victory-util/helpers";
|
|
10
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
11
|
-
import Rect from "./rect";
|
|
13
|
+
import { Rect } from "./rect";
|
|
12
14
|
|
|
13
15
|
var evaluateProps = function (props) {
|
|
14
16
|
/**
|
|
@@ -35,9 +37,9 @@ var evaluateProps = function (props) {
|
|
|
35
37
|
});
|
|
36
38
|
};
|
|
37
39
|
|
|
38
|
-
var Border = function (props) {
|
|
40
|
+
export var Border = function (props) {
|
|
39
41
|
props = evaluateProps(props);
|
|
40
|
-
return React.cloneElement(props.rectComponent, _objectSpread({}, props.events, {
|
|
42
|
+
return /*#__PURE__*/React.cloneElement(props.rectComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
41
43
|
"aria-label": props.ariaLabel,
|
|
42
44
|
style: props.style,
|
|
43
45
|
desc: props.desc,
|
|
@@ -53,8 +55,7 @@ var Border = function (props) {
|
|
|
53
55
|
clipPath: props.clipPath
|
|
54
56
|
}));
|
|
55
57
|
};
|
|
56
|
-
|
|
57
|
-
Border.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
58
|
+
Border.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
58
59
|
height: PropTypes.number,
|
|
59
60
|
rectComponent: PropTypes.element,
|
|
60
61
|
width: PropTypes.number,
|
|
@@ -62,8 +63,7 @@ Border.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
62
63
|
y: PropTypes.number
|
|
63
64
|
});
|
|
64
65
|
Border.defaultProps = {
|
|
65
|
-
rectComponent: React.createElement(Rect, null),
|
|
66
|
+
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
66
67
|
role: "presentation",
|
|
67
68
|
shapeRendering: "auto"
|
|
68
|
-
};
|
|
69
|
-
export default Border;
|
|
69
|
+
};
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function
|
|
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
|
+
|
|
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; }
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import React from "react";
|
|
10
|
+
export var Circle = function (props) {
|
|
8
11
|
// eslint-disable-next-line react/prop-types
|
|
9
12
|
var desc = props.desc,
|
|
10
|
-
rest = _objectWithoutProperties(props,
|
|
13
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
11
14
|
|
|
12
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("circle", _extends({
|
|
13
19
|
vectorEffect: "non-scaling-stroke"
|
|
14
|
-
}, rest), 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({
|
|
15
24
|
vectorEffect: "non-scaling-stroke"
|
|
16
25
|
}, rest));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
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
|
+
};
|