victory-core 37.0.1-next.2 → 37.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -2
- package/dist/victory-core.js +104 -107
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +17 -17
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +129 -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 +68 -68
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-label/victory-label.js +1 -4
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/arc.js +2 -4
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/background.js +2 -4
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/border.js +2 -4
- 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-segment.js +2 -4
- 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/point.js +2 -4
- 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-primitives/whisker.js +2 -4
- 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 +26 -26
- 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/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 +17 -17
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +129 -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 +68 -68
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-label/victory-label.js +1 -4
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/arc.js +2 -4
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/background.js +2 -4
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/border.js +2 -4
- 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-segment.js +2 -4
- 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/point.js +2 -4
- 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-primitives/whisker.js +2 -4
- 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 +26 -26
- 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/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 +5 -2
- package/src/victory-label/victory-label.tsx +1 -1
- package/src/victory-primitives/arc.tsx +3 -1
- package/src/victory-primitives/background.tsx +3 -1
- package/src/victory-primitives/border.tsx +3 -1
- package/src/victory-primitives/line-segment.tsx +3 -1
- package/src/victory-primitives/point.tsx +3 -1
- package/src/victory-primitives/whisker.tsx +3 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface VictoryAccessibleGroupProps {
|
|
3
|
-
desc?: string;
|
|
4
|
-
"aria-describedby"?: string;
|
|
5
|
-
"aria-label"?: string;
|
|
6
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
-
className?: string;
|
|
8
|
-
tabIndex?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const VictoryAccessibleGroup: ({ desc, children, tabIndex, className, ...props }: VictoryAccessibleGroupProps) => JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface VictoryAccessibleGroupProps {
|
|
3
|
+
desc?: string;
|
|
4
|
+
"aria-describedby"?: string;
|
|
5
|
+
"aria-label"?: string;
|
|
6
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
+
className?: string;
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const VictoryAccessibleGroup: ({ desc, children, tabIndex, className, ...props }: VictoryAccessibleGroupProps) => JSX.Element;
|
|
11
11
|
//# sourceMappingURL=victory-accessible-group.d.ts.map
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
export declare const isInterpolatable: (obj: any) => boolean;
|
|
2
|
-
/**
|
|
3
|
-
* Interpolate immediately to the end value at the given step `when`.
|
|
4
|
-
* Some nicer default behavior might be to jump at the halfway point or return
|
|
5
|
-
* `a` if `t` is 0 (instead of always returning `b`). But d3's default
|
|
6
|
-
* interpolator does not do these things:
|
|
7
|
-
*
|
|
8
|
-
* d3.interpolate('aaa', 'bbb')(0) === 'bbb'
|
|
9
|
-
*
|
|
10
|
-
* ...and things might get wonky if we don't replicate that behavior.
|
|
11
|
-
*
|
|
12
|
-
* @param {any} a - Start value.
|
|
13
|
-
* @param {any} b - End value.
|
|
14
|
-
* @param {Number} when - Step value (0 to 1) at which to jump to `b`.
|
|
15
|
-
* @returns {Function} An interpolation function.
|
|
16
|
-
*/
|
|
17
|
-
export declare const interpolateImmediate: (a: any, b: any, when?: number) => (t: any) => any;
|
|
18
|
-
/**
|
|
19
|
-
* Interpolate to or from a function. The interpolated value will be a function
|
|
20
|
-
* that calls `a` (if it's a function) and `b` (if it's a function) and calls
|
|
21
|
-
* `d3.interpolate` on the resulting values. Note that our function won't
|
|
22
|
-
* necessarily be called (that's up to the component this eventually gets
|
|
23
|
-
* passed to) - but if it does get called, it will return an appropriately
|
|
24
|
-
* interpolated value.
|
|
25
|
-
*
|
|
26
|
-
* @param {any} a - Start value.
|
|
27
|
-
* @param {any} b - End value.
|
|
28
|
-
* @returns {Function} An interpolation function.
|
|
29
|
-
*/
|
|
30
|
-
export declare const interpolateFunction: (a: any, b: any) => (t: any) => any;
|
|
31
|
-
/**
|
|
32
|
-
* Interpolate to or from an object. This method is a modification of the object interpolator in
|
|
33
|
-
* d3-interpolate https://github.com/d3/d3-interpolate/blob/master/src/object.js. This interpolator
|
|
34
|
-
* differs in that it uses our custom interpolators when interpolating the value of each property in
|
|
35
|
-
* an object. This allows the correct interpolation of nested objects, including styles
|
|
36
|
-
*
|
|
37
|
-
* @param {any} startValue - Start value.
|
|
38
|
-
* @param {any} endValue - End value.
|
|
39
|
-
* @returns {Function} An interpolation function.
|
|
40
|
-
*/
|
|
41
|
-
export declare const interpolateObject: (startValue: any, endValue: any) => (t: any) => {};
|
|
42
|
-
export declare const interpolateString: (a: any, b: any) => (t: number) => any;
|
|
43
|
-
/**
|
|
44
|
-
* By default, the list of interpolators used by `d3.interpolate` has a few
|
|
45
|
-
* downsides:
|
|
46
|
-
*
|
|
47
|
-
* - `null` values get turned into 0.
|
|
48
|
-
* - `undefined`, `function`, and some other value types get turned into NaN.
|
|
49
|
-
* - Boolean types get turned into numbers, which probably will be meaningless
|
|
50
|
-
* to whatever is consuming them.
|
|
51
|
-
* - It tries to interpolate between identical start and end values, doing
|
|
52
|
-
* unnecessary calculations that sometimes result in floating point rounding
|
|
53
|
-
* errors.
|
|
54
|
-
*
|
|
55
|
-
* If only the default interpolators are used, `VictoryAnimation` will happily
|
|
56
|
-
* pass down NaN (and other bad) values as props to the wrapped component.
|
|
57
|
-
* The component will then either use the incorrect values or complain that it
|
|
58
|
-
* was passed props of the incorrect type. This custom interpolator is added
|
|
59
|
-
* using the `d3.interpolators` API, and prevents such cases from happening
|
|
60
|
-
* for most values.
|
|
61
|
-
*
|
|
62
|
-
* @param {any} a - Start value.
|
|
63
|
-
* @param {any} b - End value.
|
|
64
|
-
* @returns {Function|undefined} An interpolation function, if necessary.
|
|
65
|
-
*/
|
|
66
|
-
export declare const victoryInterpolator: <T>(a: T, b: T) => (t: number) => T;
|
|
1
|
+
export declare const isInterpolatable: (obj: any) => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Interpolate immediately to the end value at the given step `when`.
|
|
4
|
+
* Some nicer default behavior might be to jump at the halfway point or return
|
|
5
|
+
* `a` if `t` is 0 (instead of always returning `b`). But d3's default
|
|
6
|
+
* interpolator does not do these things:
|
|
7
|
+
*
|
|
8
|
+
* d3.interpolate('aaa', 'bbb')(0) === 'bbb'
|
|
9
|
+
*
|
|
10
|
+
* ...and things might get wonky if we don't replicate that behavior.
|
|
11
|
+
*
|
|
12
|
+
* @param {any} a - Start value.
|
|
13
|
+
* @param {any} b - End value.
|
|
14
|
+
* @param {Number} when - Step value (0 to 1) at which to jump to `b`.
|
|
15
|
+
* @returns {Function} An interpolation function.
|
|
16
|
+
*/
|
|
17
|
+
export declare const interpolateImmediate: (a: any, b: any, when?: number) => (t: any) => any;
|
|
18
|
+
/**
|
|
19
|
+
* Interpolate to or from a function. The interpolated value will be a function
|
|
20
|
+
* that calls `a` (if it's a function) and `b` (if it's a function) and calls
|
|
21
|
+
* `d3.interpolate` on the resulting values. Note that our function won't
|
|
22
|
+
* necessarily be called (that's up to the component this eventually gets
|
|
23
|
+
* passed to) - but if it does get called, it will return an appropriately
|
|
24
|
+
* interpolated value.
|
|
25
|
+
*
|
|
26
|
+
* @param {any} a - Start value.
|
|
27
|
+
* @param {any} b - End value.
|
|
28
|
+
* @returns {Function} An interpolation function.
|
|
29
|
+
*/
|
|
30
|
+
export declare const interpolateFunction: (a: any, b: any) => (t: any) => any;
|
|
31
|
+
/**
|
|
32
|
+
* Interpolate to or from an object. This method is a modification of the object interpolator in
|
|
33
|
+
* d3-interpolate https://github.com/d3/d3-interpolate/blob/master/src/object.js. This interpolator
|
|
34
|
+
* differs in that it uses our custom interpolators when interpolating the value of each property in
|
|
35
|
+
* an object. This allows the correct interpolation of nested objects, including styles
|
|
36
|
+
*
|
|
37
|
+
* @param {any} startValue - Start value.
|
|
38
|
+
* @param {any} endValue - End value.
|
|
39
|
+
* @returns {Function} An interpolation function.
|
|
40
|
+
*/
|
|
41
|
+
export declare const interpolateObject: (startValue: any, endValue: any) => (t: any) => {};
|
|
42
|
+
export declare const interpolateString: (a: any, b: any) => (t: number) => any;
|
|
43
|
+
/**
|
|
44
|
+
* By default, the list of interpolators used by `d3.interpolate` has a few
|
|
45
|
+
* downsides:
|
|
46
|
+
*
|
|
47
|
+
* - `null` values get turned into 0.
|
|
48
|
+
* - `undefined`, `function`, and some other value types get turned into NaN.
|
|
49
|
+
* - Boolean types get turned into numbers, which probably will be meaningless
|
|
50
|
+
* to whatever is consuming them.
|
|
51
|
+
* - It tries to interpolate between identical start and end values, doing
|
|
52
|
+
* unnecessary calculations that sometimes result in floating point rounding
|
|
53
|
+
* errors.
|
|
54
|
+
*
|
|
55
|
+
* If only the default interpolators are used, `VictoryAnimation` will happily
|
|
56
|
+
* pass down NaN (and other bad) values as props to the wrapped component.
|
|
57
|
+
* The component will then either use the incorrect values or complain that it
|
|
58
|
+
* was passed props of the incorrect type. This custom interpolator is added
|
|
59
|
+
* using the `d3.interpolators` API, and prevents such cases from happening
|
|
60
|
+
* for most values.
|
|
61
|
+
*
|
|
62
|
+
* @param {any} a - Start value.
|
|
63
|
+
* @param {any} b - End value.
|
|
64
|
+
* @returns {Function|undefined} An interpolation function, if necessary.
|
|
65
|
+
*/
|
|
66
|
+
export declare const victoryInterpolator: <T>(a: T, b: T) => (t: number) => T;
|
|
67
67
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import TimerContext from "../victory-util/timer-context";
|
|
3
|
-
/**
|
|
4
|
-
* Single animation object to interpolate
|
|
5
|
-
*/
|
|
6
|
-
export declare type AnimationStyle = {
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Animation styles to interpolate
|
|
11
|
-
*/
|
|
12
|
-
export declare type AnimationData = AnimationStyle | AnimationStyle[];
|
|
13
|
-
export declare type AnimationEasing = "back" | "backIn" | "backOut" | "backInOut" | "bounce" | "bounceIn" | "bounceOut" | "bounceInOut" | "circle" | "circleIn" | "circleOut" | "circleInOut" | "linear" | "linearIn" | "linearOut" | "linearInOut" | "cubic" | "cubicIn" | "cubicOut" | "cubicInOut" | "elastic" | "elasticIn" | "elasticOut" | "elasticInOut" | "exp" | "expIn" | "expOut" | "expInOut" | "poly" | "polyIn" | "polyOut" | "polyInOut" | "quad" | "quadIn" | "quadOut" | "quadInOut" | "sin" | "sinIn" | "sinOut" | "sinInOut";
|
|
14
|
-
export interface VictoryAnimationProps {
|
|
15
|
-
children: (style: AnimationStyle, info: AnimationInfo) => React.ReactElement;
|
|
16
|
-
duration?: number;
|
|
17
|
-
easing?: AnimationEasing;
|
|
18
|
-
delay?: number;
|
|
19
|
-
onEnd?: () => void;
|
|
20
|
-
data: AnimationData;
|
|
21
|
-
}
|
|
22
|
-
export interface VictoryAnimationState {
|
|
23
|
-
data: AnimationStyle;
|
|
24
|
-
animationInfo: AnimationInfo;
|
|
25
|
-
}
|
|
26
|
-
export interface AnimationInfo {
|
|
27
|
-
progress: number;
|
|
28
|
-
animating: boolean;
|
|
29
|
-
terminating?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface VictoryAnimation {
|
|
32
|
-
context: React.ContextType<typeof TimerContext>;
|
|
33
|
-
}
|
|
34
|
-
export declare const VictoryAnimation: ({ duration, easing, delay, data, children, onEnd, }: VictoryAnimationProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TimerContext from "../victory-util/timer-context";
|
|
3
|
+
/**
|
|
4
|
+
* Single animation object to interpolate
|
|
5
|
+
*/
|
|
6
|
+
export declare type AnimationStyle = {
|
|
7
|
+
[key: string]: string | number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Animation styles to interpolate
|
|
11
|
+
*/
|
|
12
|
+
export declare type AnimationData = AnimationStyle | AnimationStyle[];
|
|
13
|
+
export declare type AnimationEasing = "back" | "backIn" | "backOut" | "backInOut" | "bounce" | "bounceIn" | "bounceOut" | "bounceInOut" | "circle" | "circleIn" | "circleOut" | "circleInOut" | "linear" | "linearIn" | "linearOut" | "linearInOut" | "cubic" | "cubicIn" | "cubicOut" | "cubicInOut" | "elastic" | "elasticIn" | "elasticOut" | "elasticInOut" | "exp" | "expIn" | "expOut" | "expInOut" | "poly" | "polyIn" | "polyOut" | "polyInOut" | "quad" | "quadIn" | "quadOut" | "quadInOut" | "sin" | "sinIn" | "sinOut" | "sinInOut";
|
|
14
|
+
export interface VictoryAnimationProps {
|
|
15
|
+
children: (style: AnimationStyle, info: AnimationInfo) => React.ReactElement;
|
|
16
|
+
duration?: number;
|
|
17
|
+
easing?: AnimationEasing;
|
|
18
|
+
delay?: number;
|
|
19
|
+
onEnd?: () => void;
|
|
20
|
+
data: AnimationData;
|
|
21
|
+
}
|
|
22
|
+
export interface VictoryAnimationState {
|
|
23
|
+
data: AnimationStyle;
|
|
24
|
+
animationInfo: AnimationInfo;
|
|
25
|
+
}
|
|
26
|
+
export interface AnimationInfo {
|
|
27
|
+
progress: number;
|
|
28
|
+
animating: boolean;
|
|
29
|
+
terminating?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface VictoryAnimation {
|
|
32
|
+
context: React.ContextType<typeof TimerContext>;
|
|
33
|
+
}
|
|
34
|
+
export declare const VictoryAnimation: ({ duration, easing, delay, data, children, onEnd, }: VictoryAnimationProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
35
35
|
//# sourceMappingURL=victory-animation.d.ts.map
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BlockProps } from "../victory-theme/victory-theme";
|
|
3
|
-
import { OriginType } from "../victory-label/victory-label";
|
|
4
|
-
export interface VictoryClipContainerProps {
|
|
5
|
-
"aria-label"?: string;
|
|
6
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
-
circleComponent?: React.ReactElement;
|
|
8
|
-
className?: string;
|
|
9
|
-
clipHeight?: number;
|
|
10
|
-
clipId?: number | string;
|
|
11
|
-
clipPadding?: BlockProps;
|
|
12
|
-
clipPathComponent?: React.ReactElement;
|
|
13
|
-
clipWidth?: number;
|
|
14
|
-
events?: React.DOMAttributes<any>;
|
|
15
|
-
groupComponent?: React.ReactElement;
|
|
16
|
-
origin?: OriginType;
|
|
17
|
-
polar?: boolean;
|
|
18
|
-
radius?: number;
|
|
19
|
-
rectComponent?: React.ReactElement;
|
|
20
|
-
translateX?: number;
|
|
21
|
-
translateY?: number;
|
|
22
|
-
}
|
|
23
|
-
export declare class VictoryClipContainer extends React.Component<VictoryClipContainerProps> {
|
|
24
|
-
static displayName: string;
|
|
25
|
-
static role: string;
|
|
26
|
-
static defaultProps: {
|
|
27
|
-
circleComponent: JSX.Element;
|
|
28
|
-
rectComponent: JSX.Element;
|
|
29
|
-
clipPathComponent: JSX.Element;
|
|
30
|
-
groupComponent: JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
clipId: VictoryClipContainerProps["clipId"];
|
|
33
|
-
constructor(props: VictoryClipContainerProps);
|
|
34
|
-
calculateAttributes(props: any): {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
};
|
|
40
|
-
renderClippedGroup(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
41
|
-
renderGroup(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
42
|
-
renderClipComponent(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
43
|
-
getClipValue(props: any, axis: any): any;
|
|
44
|
-
getTranslateValue(props: any, axis: any): any;
|
|
45
|
-
render(): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BlockProps } from "../victory-theme/victory-theme";
|
|
3
|
+
import { OriginType } from "../victory-label/victory-label";
|
|
4
|
+
export interface VictoryClipContainerProps {
|
|
5
|
+
"aria-label"?: string;
|
|
6
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
+
circleComponent?: React.ReactElement;
|
|
8
|
+
className?: string;
|
|
9
|
+
clipHeight?: number;
|
|
10
|
+
clipId?: number | string;
|
|
11
|
+
clipPadding?: BlockProps;
|
|
12
|
+
clipPathComponent?: React.ReactElement;
|
|
13
|
+
clipWidth?: number;
|
|
14
|
+
events?: React.DOMAttributes<any>;
|
|
15
|
+
groupComponent?: React.ReactElement;
|
|
16
|
+
origin?: OriginType;
|
|
17
|
+
polar?: boolean;
|
|
18
|
+
radius?: number;
|
|
19
|
+
rectComponent?: React.ReactElement;
|
|
20
|
+
translateX?: number;
|
|
21
|
+
translateY?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class VictoryClipContainer extends React.Component<VictoryClipContainerProps> {
|
|
24
|
+
static displayName: string;
|
|
25
|
+
static role: string;
|
|
26
|
+
static defaultProps: {
|
|
27
|
+
circleComponent: JSX.Element;
|
|
28
|
+
rectComponent: JSX.Element;
|
|
29
|
+
clipPathComponent: JSX.Element;
|
|
30
|
+
groupComponent: JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
clipId: VictoryClipContainerProps["clipId"];
|
|
33
|
+
constructor(props: VictoryClipContainerProps);
|
|
34
|
+
calculateAttributes(props: any): {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
renderClippedGroup(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
41
|
+
renderGroup(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
42
|
+
renderClipComponent(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
43
|
+
getClipValue(props: any, axis: any): any;
|
|
44
|
+
getTranslateValue(props: any, axis: any): any;
|
|
45
|
+
render(): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=victory-clip-container.d.ts.map
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OriginType } from "../victory-label/victory-label";
|
|
3
|
-
import { D3Scale } from "../types/prop-types";
|
|
4
|
-
import { VictoryThemeDefinition } from "../victory-theme/types";
|
|
5
|
-
export interface VictoryContainerProps {
|
|
6
|
-
"aria-describedby"?: string;
|
|
7
|
-
"aria-labelledby"?: string;
|
|
8
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
-
className?: string;
|
|
10
|
-
containerId?: number | string;
|
|
11
|
-
containerRef?: React.Ref<HTMLElement>;
|
|
12
|
-
desc?: string;
|
|
13
|
-
events?: React.DOMAttributes<any>;
|
|
14
|
-
height?: number;
|
|
15
|
-
name?: string;
|
|
16
|
-
origin?: OriginType;
|
|
17
|
-
ouiaId?: number | string;
|
|
18
|
-
ouiaSafe?: boolean;
|
|
19
|
-
ouiaType?: string;
|
|
20
|
-
polar?: boolean;
|
|
21
|
-
portalComponent?: React.ReactElement;
|
|
22
|
-
portalZIndex?: number;
|
|
23
|
-
preserveAspectRatio?: string;
|
|
24
|
-
responsive?: boolean;
|
|
25
|
-
role?: string;
|
|
26
|
-
scale?: {
|
|
27
|
-
x?: D3Scale;
|
|
28
|
-
y?: D3Scale;
|
|
29
|
-
};
|
|
30
|
-
style?: React.CSSProperties;
|
|
31
|
-
tabIndex?: number;
|
|
32
|
-
theme?: VictoryThemeDefinition;
|
|
33
|
-
title?: string;
|
|
34
|
-
width?: number;
|
|
35
|
-
}
|
|
36
|
-
export declare class VictoryContainer<TProps extends VictoryContainerProps> extends React.Component<TProps> {
|
|
37
|
-
static displayName: string;
|
|
38
|
-
static role: string;
|
|
39
|
-
static defaultProps: {
|
|
40
|
-
className: string;
|
|
41
|
-
portalComponent: JSX.Element;
|
|
42
|
-
portalZIndex: number;
|
|
43
|
-
responsive: boolean;
|
|
44
|
-
role: string;
|
|
45
|
-
};
|
|
46
|
-
static contextType: React.Context<{
|
|
47
|
-
transitionTimer: import("..").Timer;
|
|
48
|
-
animationTimer: import("..").Timer;
|
|
49
|
-
}>;
|
|
50
|
-
private containerId;
|
|
51
|
-
private portalRef;
|
|
52
|
-
private containerRef;
|
|
53
|
-
private shouldHandleWheel;
|
|
54
|
-
constructor(props: TProps);
|
|
55
|
-
savePortalRef: (portal: any) => any;
|
|
56
|
-
portalUpdate: (key: any, el: any) => void;
|
|
57
|
-
portalRegister: () => number;
|
|
58
|
-
portalDeregister: (key: any) => void;
|
|
59
|
-
saveContainerRef: (container: HTMLElement) => HTMLElement;
|
|
60
|
-
handleWheel: (e: any) => any;
|
|
61
|
-
componentDidMount(): void;
|
|
62
|
-
componentWillUnmount(): void;
|
|
63
|
-
getIdForElement(elementName: any): string;
|
|
64
|
-
getChildren(props: any): any;
|
|
65
|
-
getOUIAProps(props: any): any;
|
|
66
|
-
renderContainer(props: any, svgProps: any, style: any): JSX.Element;
|
|
67
|
-
render(): JSX.Element;
|
|
68
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { OriginType } from "../victory-label/victory-label";
|
|
3
|
+
import { D3Scale } from "../types/prop-types";
|
|
4
|
+
import { VictoryThemeDefinition } from "../victory-theme/types";
|
|
5
|
+
export interface VictoryContainerProps {
|
|
6
|
+
"aria-describedby"?: string;
|
|
7
|
+
"aria-labelledby"?: string;
|
|
8
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
+
className?: string;
|
|
10
|
+
containerId?: number | string;
|
|
11
|
+
containerRef?: React.Ref<HTMLElement>;
|
|
12
|
+
desc?: string;
|
|
13
|
+
events?: React.DOMAttributes<any>;
|
|
14
|
+
height?: number;
|
|
15
|
+
name?: string;
|
|
16
|
+
origin?: OriginType;
|
|
17
|
+
ouiaId?: number | string;
|
|
18
|
+
ouiaSafe?: boolean;
|
|
19
|
+
ouiaType?: string;
|
|
20
|
+
polar?: boolean;
|
|
21
|
+
portalComponent?: React.ReactElement;
|
|
22
|
+
portalZIndex?: number;
|
|
23
|
+
preserveAspectRatio?: string;
|
|
24
|
+
responsive?: boolean;
|
|
25
|
+
role?: string;
|
|
26
|
+
scale?: {
|
|
27
|
+
x?: D3Scale;
|
|
28
|
+
y?: D3Scale;
|
|
29
|
+
};
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
tabIndex?: number;
|
|
32
|
+
theme?: VictoryThemeDefinition;
|
|
33
|
+
title?: string;
|
|
34
|
+
width?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare class VictoryContainer<TProps extends VictoryContainerProps> extends React.Component<TProps> {
|
|
37
|
+
static displayName: string;
|
|
38
|
+
static role: string;
|
|
39
|
+
static defaultProps: {
|
|
40
|
+
className: string;
|
|
41
|
+
portalComponent: JSX.Element;
|
|
42
|
+
portalZIndex: number;
|
|
43
|
+
responsive: boolean;
|
|
44
|
+
role: string;
|
|
45
|
+
};
|
|
46
|
+
static contextType: React.Context<{
|
|
47
|
+
transitionTimer: import("..").Timer;
|
|
48
|
+
animationTimer: import("..").Timer;
|
|
49
|
+
}>;
|
|
50
|
+
private containerId;
|
|
51
|
+
private portalRef;
|
|
52
|
+
private containerRef;
|
|
53
|
+
private shouldHandleWheel;
|
|
54
|
+
constructor(props: TProps);
|
|
55
|
+
savePortalRef: (portal: any) => any;
|
|
56
|
+
portalUpdate: (key: any, el: any) => void;
|
|
57
|
+
portalRegister: () => number;
|
|
58
|
+
portalDeregister: (key: any) => void;
|
|
59
|
+
saveContainerRef: (container: HTMLElement) => HTMLElement;
|
|
60
|
+
handleWheel: (e: any) => any;
|
|
61
|
+
componentDidMount(): void;
|
|
62
|
+
componentWillUnmount(): void;
|
|
63
|
+
getIdForElement(elementName: any): string;
|
|
64
|
+
getChildren(props: any): any;
|
|
65
|
+
getOUIAProps(props: any): any;
|
|
66
|
+
renderContainer(props: any, svgProps: any, style: any): JSX.Element;
|
|
67
|
+
render(): JSX.Element;
|
|
68
|
+
}
|
|
69
69
|
//# sourceMappingURL=victory-container.d.ts.map
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { NumberOrCallback, StringOrCallback, StringOrNumberOrCallback } from "../types/callbacks";
|
|
3
|
-
import { ValueOrAccessor } from "../types/prop-types";
|
|
4
|
-
import { PaddingProps, VerticalAnchorType, VictoryLabelStyleObject } from "../victory-theme/victory-theme";
|
|
5
|
-
export declare type TextAnchorType = "start" | "middle" | "end" | "inherit";
|
|
6
|
-
export declare type OriginType = {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
export declare type LabelOrientationType = "parallel" | "perpendicular" | "vertical";
|
|
11
|
-
export interface VictoryLabelProps {
|
|
12
|
-
angle?: StringOrNumberOrCallback;
|
|
13
|
-
ariaLabel?: StringOrCallback;
|
|
14
|
-
backgroundComponent?: React.ReactElement;
|
|
15
|
-
backgroundStyle?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
16
|
-
backgroundPadding?: PaddingProps | PaddingProps[];
|
|
17
|
-
capHeight?: StringOrNumberOrCallback;
|
|
18
|
-
children?: StringOrNumberOrCallback;
|
|
19
|
-
className?: string;
|
|
20
|
-
datum?: Record<string, any>;
|
|
21
|
-
data?: any[];
|
|
22
|
-
desc?: string;
|
|
23
|
-
direction?: string;
|
|
24
|
-
disableInlineStyles?: boolean;
|
|
25
|
-
events?: React.DOMAttributes<any>;
|
|
26
|
-
groupComponent?: React.ReactElement;
|
|
27
|
-
id?: StringOrNumberOrCallback;
|
|
28
|
-
inline?: boolean;
|
|
29
|
-
labelPlacement?: LabelOrientationType;
|
|
30
|
-
lineHeight?: StringOrNumberOrCallback | (string | number)[];
|
|
31
|
-
origin?: OriginType;
|
|
32
|
-
polar?: boolean;
|
|
33
|
-
renderInPortal?: boolean;
|
|
34
|
-
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
35
|
-
tabIndex?: NumberOrCallback;
|
|
36
|
-
text?: string[] | StringOrNumberOrCallback;
|
|
37
|
-
textComponent?: React.ReactElement;
|
|
38
|
-
textAnchor?: ValueOrAccessor<TextAnchorType>;
|
|
39
|
-
title?: string;
|
|
40
|
-
transform?: ValueOrAccessor<string | object>;
|
|
41
|
-
tspanComponent?: React.ReactElement;
|
|
42
|
-
verticalAnchor?: ValueOrAccessor<VerticalAnchorType>;
|
|
43
|
-
x?: number;
|
|
44
|
-
y?: number;
|
|
45
|
-
dx?: StringOrNumberOrCallback;
|
|
46
|
-
dy?: StringOrNumberOrCallback;
|
|
47
|
-
}
|
|
48
|
-
declare const defaultStyles: {
|
|
49
|
-
fill: string;
|
|
50
|
-
fontSize: number;
|
|
51
|
-
fontFamily: string;
|
|
52
|
-
stroke: string;
|
|
53
|
-
};
|
|
54
|
-
export declare const VictoryLabel: {
|
|
55
|
-
role: string;
|
|
56
|
-
defaultStyles: typeof defaultStyles;
|
|
57
|
-
} & React.FC<VictoryLabelProps>;
|
|
58
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NumberOrCallback, StringOrCallback, StringOrNumberOrCallback } from "../types/callbacks";
|
|
3
|
+
import { ValueOrAccessor } from "../types/prop-types";
|
|
4
|
+
import { PaddingProps, VerticalAnchorType, VictoryLabelStyleObject } from "../victory-theme/victory-theme";
|
|
5
|
+
export declare type TextAnchorType = "start" | "middle" | "end" | "inherit";
|
|
6
|
+
export declare type OriginType = {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
export declare type LabelOrientationType = "parallel" | "perpendicular" | "vertical";
|
|
11
|
+
export interface VictoryLabelProps {
|
|
12
|
+
angle?: StringOrNumberOrCallback;
|
|
13
|
+
ariaLabel?: StringOrCallback;
|
|
14
|
+
backgroundComponent?: React.ReactElement;
|
|
15
|
+
backgroundStyle?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
16
|
+
backgroundPadding?: PaddingProps | PaddingProps[];
|
|
17
|
+
capHeight?: StringOrNumberOrCallback;
|
|
18
|
+
children?: StringOrNumberOrCallback;
|
|
19
|
+
className?: string;
|
|
20
|
+
datum?: Record<string, any>;
|
|
21
|
+
data?: any[];
|
|
22
|
+
desc?: string;
|
|
23
|
+
direction?: string;
|
|
24
|
+
disableInlineStyles?: boolean;
|
|
25
|
+
events?: React.DOMAttributes<any>;
|
|
26
|
+
groupComponent?: React.ReactElement;
|
|
27
|
+
id?: StringOrNumberOrCallback;
|
|
28
|
+
inline?: boolean;
|
|
29
|
+
labelPlacement?: LabelOrientationType;
|
|
30
|
+
lineHeight?: StringOrNumberOrCallback | (string | number)[];
|
|
31
|
+
origin?: OriginType;
|
|
32
|
+
polar?: boolean;
|
|
33
|
+
renderInPortal?: boolean;
|
|
34
|
+
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
35
|
+
tabIndex?: NumberOrCallback;
|
|
36
|
+
text?: string[] | StringOrNumberOrCallback;
|
|
37
|
+
textComponent?: React.ReactElement;
|
|
38
|
+
textAnchor?: ValueOrAccessor<TextAnchorType>;
|
|
39
|
+
title?: string;
|
|
40
|
+
transform?: ValueOrAccessor<string | object>;
|
|
41
|
+
tspanComponent?: React.ReactElement;
|
|
42
|
+
verticalAnchor?: ValueOrAccessor<VerticalAnchorType>;
|
|
43
|
+
x?: number;
|
|
44
|
+
y?: number;
|
|
45
|
+
dx?: StringOrNumberOrCallback;
|
|
46
|
+
dy?: StringOrNumberOrCallback;
|
|
47
|
+
}
|
|
48
|
+
declare const defaultStyles: {
|
|
49
|
+
fill: string;
|
|
50
|
+
fontSize: number;
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
stroke: string;
|
|
53
|
+
};
|
|
54
|
+
export declare const VictoryLabel: {
|
|
55
|
+
role: string;
|
|
56
|
+
defaultStyles: typeof defaultStyles;
|
|
57
|
+
} & React.FC<VictoryLabelProps>;
|
|
58
|
+
export {};
|
|
59
59
|
//# sourceMappingURL=victory-label.d.ts.map
|
|
@@ -439,10 +439,7 @@ const defaultProps = {
|
|
|
439
439
|
lineHeight: 1
|
|
440
440
|
};
|
|
441
441
|
const VictoryLabel = initialProps => {
|
|
442
|
-
const props = evaluateProps({
|
|
443
|
-
...defaultProps,
|
|
444
|
-
...initialProps
|
|
445
|
-
});
|
|
442
|
+
const props = evaluateProps((0, _defaults2.default)({}, initialProps, defaultProps));
|
|
446
443
|
if (props.text === null || props.text === undefined) {
|
|
447
444
|
return null;
|
|
448
445
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface PortalContextValue {
|
|
3
|
-
portalRegister(): number;
|
|
4
|
-
portalUpdate(key: number, element: React.ReactElement): void;
|
|
5
|
-
portalDeregister(key: number): void;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The React context object consumers may use to access the context of the
|
|
9
|
-
* portal.
|
|
10
|
-
*/
|
|
11
|
-
export declare const PortalContext: React.Context<PortalContextValue>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PortalContextValue {
|
|
3
|
+
portalRegister(): number;
|
|
4
|
+
portalUpdate(key: number, element: React.ReactElement): void;
|
|
5
|
+
portalDeregister(key: number): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The React context object consumers may use to access the context of the
|
|
9
|
+
* portal.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PortalContext: React.Context<PortalContextValue>;
|
|
12
12
|
//# sourceMappingURL=portal-context.d.ts.map
|