victory-core 37.0.2 → 37.0.3-next.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/CHANGELOG.md +7 -0
- package/dist/victory-core.js +390 -350
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +18 -17
- package/es/index.js +2 -1
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +130 -129
- package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-container/victory-container.d.ts +62 -68
- package/es/victory-container/victory-container.js +134 -162
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-portal/portal-context.d.ts +12 -11
- package/es/victory-portal/portal-context.js +37 -6
- package/es/victory-portal/portal-outlet.d.ts +12 -0
- package/es/victory-portal/portal-outlet.js +16 -0
- package/es/victory-portal/portal.d.ts +9 -20
- package/es/victory-portal/portal.js +6 -32
- package/es/victory-portal/victory-portal.d.ts +9 -26
- package/es/victory-portal/victory-portal.js +27 -44
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/index.d.ts +14 -14
- package/es/victory-primitives/line-segment.d.ts +11 -11
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/collection.d.ts +15 -15
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/helpers.d.ts +96 -96
- package/es/victory-util/hooks/index.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/index.d.ts +27 -26
- package/es/victory-util/index.js +1 -0
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/merge-refs.d.ts +13 -0
- package/es/victory-util/merge-refs.js +23 -0
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/wrapper.d.ts +33 -33
- package/lib/index.d.ts +18 -17
- package/lib/index.js +16 -4
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +130 -129
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-container/victory-container.d.ts +62 -68
- package/lib/victory-container/victory-container.js +136 -163
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-portal/portal-context.d.ts +12 -11
- package/lib/victory-portal/portal-context.js +40 -7
- package/lib/victory-portal/portal-outlet.d.ts +12 -0
- package/lib/victory-portal/portal-outlet.js +24 -0
- package/lib/victory-portal/portal.d.ts +9 -20
- package/lib/victory-portal/portal.js +6 -33
- package/lib/victory-portal/victory-portal.d.ts +9 -26
- package/lib/victory-portal/victory-portal.js +27 -44
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/collection.d.ts +15 -15
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/helpers.d.ts +96 -96
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/index.d.ts +27 -26
- package/lib/victory-util/index.js +12 -0
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/merge-refs.d.ts +13 -0
- package/lib/victory-util/merge-refs.js +31 -0
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/wrapper.d.ts +33 -33
- package/package.json +2 -5
- package/src/index.ts +2 -1
- package/src/types/prop-types.ts +7 -0
- package/src/victory-container/victory-container.tsx +168 -196
- package/src/victory-portal/portal-context.tsx +69 -0
- package/src/victory-portal/portal-outlet.tsx +25 -0
- package/src/victory-portal/portal.tsx +5 -42
- package/src/victory-portal/victory-portal.tsx +34 -64
- package/src/victory-util/index.ts +1 -0
- package/src/victory-util/merge-refs.ts +26 -0
- package/src/victory-portal/portal-context.ts +0 -14
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface PortalContextValue {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PortalContextValue {
|
|
3
|
+
addChild: (id: string, node: React.ReactElement) => void;
|
|
4
|
+
removeChild: (id: string) => void;
|
|
5
|
+
children: Map<string, React.ReactElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const PortalContext: React.Context<PortalContextValue | undefined>;
|
|
8
|
+
export declare const usePortalContext: () => PortalContextValue;
|
|
9
|
+
export interface PortalProviderProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const PortalProvider: ({ children }: PortalProviderProps) => JSX.Element;
|
|
12
13
|
//# sourceMappingURL=portal-context.d.ts.map
|
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export const PortalContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
PortalContext.displayName = "PortalContext";
|
|
4
|
+
export const usePortalContext = () => {
|
|
5
|
+
const context = React.useContext(PortalContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
|
|
8
|
+
}
|
|
9
|
+
return context;
|
|
10
|
+
};
|
|
11
|
+
export const PortalProvider = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
15
|
+
const [portalChildren, setPortalChildren] = React.useState(new Map());
|
|
16
|
+
const addChild = React.useCallback((id, element) => {
|
|
17
|
+
setPortalChildren(prevChildren => {
|
|
18
|
+
const nextChildren = new Map(prevChildren);
|
|
19
|
+
nextChildren.set(id, element);
|
|
20
|
+
return nextChildren;
|
|
21
|
+
});
|
|
22
|
+
}, [setPortalChildren]);
|
|
23
|
+
const removeChild = React.useCallback(id => {
|
|
24
|
+
setPortalChildren(prevChildren => {
|
|
25
|
+
const nextChildren = new Map(prevChildren);
|
|
26
|
+
nextChildren.delete(id);
|
|
27
|
+
return nextChildren;
|
|
28
|
+
});
|
|
29
|
+
}, [setPortalChildren]);
|
|
30
|
+
const contextValue = React.useMemo(() => ({
|
|
31
|
+
addChild,
|
|
32
|
+
removeChild,
|
|
33
|
+
children: portalChildren
|
|
34
|
+
}), [addChild, removeChild, portalChildren]);
|
|
35
|
+
return /*#__PURE__*/React.createElement(PortalContext.Provider, {
|
|
36
|
+
value: contextValue
|
|
37
|
+
}, children);
|
|
38
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PortalOutletProps {
|
|
3
|
+
as: React.ReactElement;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
viewBox?: string;
|
|
7
|
+
preserveAspectRatio?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
children?: (children: React.ReactElement[]) => React.ReactNode | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const PortalOutlet: ({ as: portalComponent, ...props }: PortalOutletProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
//# sourceMappingURL=portal-outlet.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { usePortalContext } from "./portal-context";
|
|
3
|
+
export const PortalOutlet = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
as: portalComponent,
|
|
6
|
+
...props
|
|
7
|
+
} = _ref;
|
|
8
|
+
const portalContext = usePortalContext();
|
|
9
|
+
const children = Array.from(portalContext.children.entries()).map(_ref2 => {
|
|
10
|
+
let [key, node] = _ref2;
|
|
11
|
+
return !node.key ? /*#__PURE__*/React.cloneElement(node, {
|
|
12
|
+
key
|
|
13
|
+
}) : node;
|
|
14
|
+
});
|
|
15
|
+
return /*#__PURE__*/React.cloneElement(portalComponent, props, children);
|
|
16
|
+
};
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare class Portal extends React.Component<PortalProps> implements PortalContextValue {
|
|
11
|
-
static displayName: string;
|
|
12
|
-
private readonly map;
|
|
13
|
-
private index;
|
|
14
|
-
constructor(props: PortalProps);
|
|
15
|
-
portalRegister: () => number;
|
|
16
|
-
portalUpdate: (key: number, element: React.ReactElement) => void;
|
|
17
|
-
portalDeregister: (key: number) => void;
|
|
18
|
-
getChildren(): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
19
|
-
render(): JSX.Element;
|
|
20
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PortalProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
height?: number;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
viewBox?: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<SVGSVGElement>>;
|
|
21
10
|
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -1,33 +1,7 @@
|
|
|
1
|
+
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); }
|
|
1
2
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
this.index = 1;
|
|
8
|
-
}
|
|
9
|
-
portalRegister = () => {
|
|
10
|
-
return ++this.index;
|
|
11
|
-
};
|
|
12
|
-
portalUpdate = (key, element) => {
|
|
13
|
-
this.map[key] = element;
|
|
14
|
-
this.forceUpdate();
|
|
15
|
-
};
|
|
16
|
-
portalDeregister = key => {
|
|
17
|
-
delete this.map[key];
|
|
18
|
-
this.forceUpdate();
|
|
19
|
-
};
|
|
20
|
-
getChildren() {
|
|
21
|
-
return Object.keys(this.map).map(key => {
|
|
22
|
-
const el = this.map[key];
|
|
23
|
-
return el ? /*#__PURE__*/React.cloneElement(el, {
|
|
24
|
-
key
|
|
25
|
-
}) : el;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Overridden in victory-core-native
|
|
30
|
-
render() {
|
|
31
|
-
return /*#__PURE__*/React.createElement("svg", this.props, this.getChildren());
|
|
32
|
-
}
|
|
33
|
-
}
|
|
3
|
+
export const Portal = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
4
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
ref: ref
|
|
6
|
+
}, props));
|
|
7
|
+
});
|
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export declare class VictoryPortal extends React.Component<VictoryPortalProps> {
|
|
11
|
-
static displayName: string;
|
|
12
|
-
static role: string;
|
|
13
|
-
static defaultProps: {
|
|
14
|
-
groupComponent: JSX.Element;
|
|
15
|
-
};
|
|
16
|
-
static contextType: React.Context<import("./portal-context").PortalContextValue>;
|
|
17
|
-
private checkedContext;
|
|
18
|
-
private portalKey;
|
|
19
|
-
renderInPlace: boolean;
|
|
20
|
-
element: React.ReactElement;
|
|
21
|
-
componentDidMount(): void;
|
|
22
|
-
componentDidUpdate(): void;
|
|
23
|
-
componentWillUnmount(): void;
|
|
24
|
-
renderPortal(child: React.ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
25
|
-
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
26
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface VictoryPortalProps {
|
|
3
|
+
children: React.ReactElement;
|
|
4
|
+
groupComponent?: React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
export declare const VictoryPortal: {
|
|
7
|
+
(initialProps: VictoryPortalProps): null;
|
|
8
|
+
role: string;
|
|
9
|
+
};
|
|
27
10
|
//# sourceMappingURL=victory-portal.d.ts.map
|
|
@@ -2,57 +2,40 @@ import _defaults from "lodash/defaults";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import * as Log from "../victory-util/log";
|
|
4
4
|
import * as Helpers from "../victory-util/helpers";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { usePortalContext } from "./portal-context";
|
|
6
|
+
const defaultProps = {
|
|
7
|
+
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
8
|
+
};
|
|
9
|
+
export const VictoryPortal = initialProps => {
|
|
10
|
+
const props = {
|
|
11
|
+
...defaultProps,
|
|
12
|
+
...initialProps
|
|
11
13
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Log.warn(msg);
|
|
18
|
-
this.renderInPlace = true;
|
|
19
|
-
}
|
|
20
|
-
this.checkedContext = true;
|
|
21
|
-
}
|
|
22
|
-
this.forceUpdate();
|
|
14
|
+
const id = React.useId();
|
|
15
|
+
const portalContext = usePortalContext();
|
|
16
|
+
if (!portalContext) {
|
|
17
|
+
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
18
|
+
Log.warn(msg);
|
|
23
19
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.portalKey = this.portalKey || this.context.portalRegister();
|
|
27
|
-
this.context.portalUpdate(this.portalKey, this.element);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
componentWillUnmount() {
|
|
31
|
-
if (this.context && this.context.portalDeregister) {
|
|
32
|
-
this.context.portalDeregister(this.portalKey);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Overridden in victory-core-native
|
|
37
|
-
renderPortal(child) {
|
|
38
|
-
if (this.renderInPlace) {
|
|
39
|
-
return child;
|
|
40
|
-
}
|
|
41
|
-
this.element = child;
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
const children = Array.isArray(this.props.children) ? this.props.children[0] : this.props.children;
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
46
22
|
const {
|
|
47
23
|
groupComponent
|
|
48
|
-
} =
|
|
24
|
+
} = props;
|
|
49
25
|
const childProps = children && children.props || {};
|
|
50
26
|
const standardProps = childProps.groupComponent ? {
|
|
51
27
|
groupComponent,
|
|
52
28
|
standalone: false
|
|
53
29
|
} : {};
|
|
54
|
-
const newProps = _defaults(standardProps, childProps, Helpers.omit(
|
|
30
|
+
const newProps = _defaults(standardProps, childProps, Helpers.omit(props, ["children", "groupComponent"]));
|
|
55
31
|
const child = children && /*#__PURE__*/React.cloneElement(children, newProps);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
32
|
+
portalContext.addChild(id, child);
|
|
33
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
|
+
}, [props.children]);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
return () => portalContext.removeChild(id);
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
}, []);
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
VictoryPortal.role = "portal";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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
|
-
type?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Arc: (initialProps: ArcProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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
|
+
type?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Arc: (initialProps: ArcProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
15
15
|
//# sourceMappingURL=arc.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: BackgroundProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: BackgroundProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
14
14
|
//# sourceMappingURL=background.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: BorderProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: BorderProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
11
11
|
//# sourceMappingURL=border.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
-
export declare const Circle: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGCircleElement>>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
+
export declare const Circle: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGCircleElement>>;
|
|
4
4
|
//# sourceMappingURL=circle.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
-
export interface ClipPathProps extends VictoryCommonPrimitiveProps {
|
|
4
|
-
children?: React.ReactNode[] | React.ReactNode;
|
|
5
|
-
clipId?: number | string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ClipPath: (props: ClipPathProps) => JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
+
export interface ClipPathProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
children?: React.ReactNode[] | React.ReactNode;
|
|
5
|
+
clipId?: number | string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ClipPath: (props: ClipPathProps) => JSX.Element;
|
|
8
8
|
//# sourceMappingURL=clip-path.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
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";
|
|
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";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: LineSegmentProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: LineSegmentProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
12
12
|
//# sourceMappingURL=line-segment.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
-
export declare const Line: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGLineElement>>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
+
export declare const Line: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGLineElement>>;
|
|
4
4
|
//# sourceMappingURL=line.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
-
export declare const Path: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGPathElement>>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
+
export declare const Path: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGPathElement>>;
|
|
4
4
|
//# sourceMappingURL=path.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: PointProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
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: (initialProps: PointProps) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
14
14
|
//# sourceMappingURL=point.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
-
export declare const Rect: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGRectElement>>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryPrimitiveShapeProps } from "./types";
|
|
3
|
+
export declare const Rect: React.ForwardRefExoticComponent<VictoryPrimitiveShapeProps & React.RefAttributes<SVGRectElement>>;
|
|
4
4
|
//# sourceMappingURL=rect.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
-
export interface TextProps extends VictoryCommonPrimitiveProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
desc?: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const Text: (props: TextProps) => JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
+
export interface TextProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
desc?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Text: (props: TextProps) => JSX.Element;
|
|
9
9
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
-
export declare const TSpan: (props: VictoryCommonPrimitiveProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
+
export declare const TSpan: (props: VictoryCommonPrimitiveProps) => JSX.Element;
|
|
4
4
|
//# sourceMappingURL=tspan.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
2
|
-
export declare type ScatterSymbolType = "circle" | "cross" | "diamond" | "plus" | "minus" | "square" | "star" | "triangleDown" | "triangleUp";
|
|
3
|
-
export interface VictoryPrimitiveShapeProps extends VictoryCommonPrimitiveProps {
|
|
4
|
-
desc?: string;
|
|
5
|
-
rx?: number;
|
|
6
|
-
ry?: number;
|
|
7
|
-
}
|
|
1
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
2
|
+
export declare type ScatterSymbolType = "circle" | "cross" | "diamond" | "plus" | "minus" | "square" | "star" | "triangleDown" | "triangleUp";
|
|
3
|
+
export interface VictoryPrimitiveShapeProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
desc?: string;
|
|
5
|
+
rx?: number;
|
|
6
|
+
ry?: number;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
-
export declare type WhiskerAxes = {
|
|
4
|
-
x1?: number;
|
|
5
|
-
x2?: number;
|
|
6
|
-
y1?: number;
|
|
7
|
-
y2?: number;
|
|
8
|
-
};
|
|
9
|
-
export interface WhiskerProps extends VictoryCommonPrimitiveProps {
|
|
10
|
-
groupComponent?: React.ReactElement;
|
|
11
|
-
lineComponent?: React.ReactElement;
|
|
12
|
-
majorWhisker?: WhiskerAxes;
|
|
13
|
-
minorWhisker?: WhiskerAxes;
|
|
14
|
-
}
|
|
15
|
-
export declare const Whisker: (initialProps: WhiskerProps) => React.DetailedReactHTMLElement<{}, HTMLElement>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
|
|
3
|
+
export declare type WhiskerAxes = {
|
|
4
|
+
x1?: number;
|
|
5
|
+
x2?: number;
|
|
6
|
+
y1?: number;
|
|
7
|
+
y2?: number;
|
|
8
|
+
};
|
|
9
|
+
export interface WhiskerProps extends VictoryCommonPrimitiveProps {
|
|
10
|
+
groupComponent?: React.ReactElement;
|
|
11
|
+
lineComponent?: React.ReactElement;
|
|
12
|
+
majorWhisker?: WhiskerAxes;
|
|
13
|
+
minorWhisker?: WhiskerAxes;
|
|
14
|
+
}
|
|
15
|
+
export declare const Whisker: (initialProps: WhiskerProps) => React.DetailedReactHTMLElement<{}, HTMLElement>;
|
|
16
16
|
//# sourceMappingURL=whisker.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VictoryThemeDefinition } from "./types";
|
|
2
|
-
export declare const grayscale: VictoryThemeDefinition;
|
|
1
|
+
import { VictoryThemeDefinition } from "./types";
|
|
2
|
+
export declare const grayscale: VictoryThemeDefinition;
|
|
3
3
|
//# sourceMappingURL=grayscale.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VictoryThemeDefinition } from "./types";
|
|
2
|
-
export declare const material: VictoryThemeDefinition;
|
|
1
|
+
import { VictoryThemeDefinition } from "./types";
|
|
2
|
+
export declare const material: VictoryThemeDefinition;
|
|
3
3
|
//# sourceMappingURL=material.d.ts.map
|