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.
Files changed (145) hide show
  1. package/CHANGELOG.md +4 -2
  2. package/dist/victory-core.js +104 -107
  3. package/dist/victory-core.min.js +1 -1
  4. package/es/index.d.ts +17 -17
  5. package/es/types/callbacks.d.ts +36 -36
  6. package/es/types/prop-types.d.ts +129 -129
  7. package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
  8. package/es/victory-animation/util.d.ts +66 -66
  9. package/es/victory-animation/victory-animation.d.ts +34 -34
  10. package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
  11. package/es/victory-container/victory-container.d.ts +68 -68
  12. package/es/victory-label/victory-label.d.ts +58 -58
  13. package/es/victory-label/victory-label.js +1 -4
  14. package/es/victory-portal/portal-context.d.ts +11 -11
  15. package/es/victory-portal/portal.d.ts +20 -20
  16. package/es/victory-portal/victory-portal.d.ts +26 -26
  17. package/es/victory-primitives/arc.d.ts +14 -14
  18. package/es/victory-primitives/arc.js +2 -4
  19. package/es/victory-primitives/background.d.ts +13 -13
  20. package/es/victory-primitives/background.js +2 -4
  21. package/es/victory-primitives/border.d.ts +10 -10
  22. package/es/victory-primitives/border.js +2 -4
  23. package/es/victory-primitives/circle.d.ts +3 -3
  24. package/es/victory-primitives/clip-path.d.ts +7 -7
  25. package/es/victory-primitives/index.d.ts +14 -14
  26. package/es/victory-primitives/line-segment.d.ts +11 -11
  27. package/es/victory-primitives/line-segment.js +2 -4
  28. package/es/victory-primitives/line.d.ts +3 -3
  29. package/es/victory-primitives/path.d.ts +3 -3
  30. package/es/victory-primitives/point.d.ts +13 -13
  31. package/es/victory-primitives/point.js +2 -4
  32. package/es/victory-primitives/rect.d.ts +3 -3
  33. package/es/victory-primitives/text.d.ts +8 -8
  34. package/es/victory-primitives/tspan.d.ts +3 -3
  35. package/es/victory-primitives/types.d.ts +7 -7
  36. package/es/victory-primitives/whisker.d.ts +15 -15
  37. package/es/victory-primitives/whisker.js +2 -4
  38. package/es/victory-theme/grayscale.d.ts +2 -2
  39. package/es/victory-theme/material.d.ts +2 -2
  40. package/es/victory-theme/types.d.ts +238 -238
  41. package/es/victory-theme/victory-theme.d.ts +5 -5
  42. package/es/victory-transition/victory-transition.d.ts +53 -53
  43. package/es/victory-util/add-events.d.ts +126 -126
  44. package/es/victory-util/axis.d.ts +50 -50
  45. package/es/victory-util/collection.d.ts +15 -15
  46. package/es/victory-util/common-props.d.ts +79 -79
  47. package/es/victory-util/data.d.ts +74 -74
  48. package/es/victory-util/default-transitions.d.ts +4 -4
  49. package/es/victory-util/domain.d.ts +90 -90
  50. package/es/victory-util/events.d.ts +64 -64
  51. package/es/victory-util/helpers.d.ts +96 -96
  52. package/es/victory-util/hooks/index.d.ts +2 -2
  53. package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
  54. package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
  55. package/es/victory-util/immutable.d.ts +11 -11
  56. package/es/victory-util/index.d.ts +26 -26
  57. package/es/victory-util/label-helpers.d.ts +26 -26
  58. package/es/victory-util/line-helpers.d.ts +4 -4
  59. package/es/victory-util/log.d.ts +1 -1
  60. package/es/victory-util/point-path-helpers.d.ts +9 -9
  61. package/es/victory-util/scale.d.ts +9 -9
  62. package/es/victory-util/selection.d.ts +28 -28
  63. package/es/victory-util/style.d.ts +18 -18
  64. package/es/victory-util/textsize.d.ts +35 -35
  65. package/es/victory-util/timer-context.d.ts +11 -11
  66. package/es/victory-util/timer.d.ts +16 -16
  67. package/es/victory-util/transitions.d.ts +48 -48
  68. package/es/victory-util/type-helpers.d.ts +9 -9
  69. package/es/victory-util/user-props.d.ts +26 -26
  70. package/es/victory-util/wrapper.d.ts +33 -33
  71. package/lib/index.d.ts +17 -17
  72. package/lib/types/callbacks.d.ts +36 -36
  73. package/lib/types/prop-types.d.ts +129 -129
  74. package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
  75. package/lib/victory-animation/util.d.ts +66 -66
  76. package/lib/victory-animation/victory-animation.d.ts +34 -34
  77. package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
  78. package/lib/victory-container/victory-container.d.ts +68 -68
  79. package/lib/victory-label/victory-label.d.ts +58 -58
  80. package/lib/victory-label/victory-label.js +1 -4
  81. package/lib/victory-portal/portal-context.d.ts +11 -11
  82. package/lib/victory-portal/portal.d.ts +20 -20
  83. package/lib/victory-portal/victory-portal.d.ts +26 -26
  84. package/lib/victory-primitives/arc.d.ts +14 -14
  85. package/lib/victory-primitives/arc.js +2 -4
  86. package/lib/victory-primitives/background.d.ts +13 -13
  87. package/lib/victory-primitives/background.js +2 -4
  88. package/lib/victory-primitives/border.d.ts +10 -10
  89. package/lib/victory-primitives/border.js +2 -4
  90. package/lib/victory-primitives/circle.d.ts +3 -3
  91. package/lib/victory-primitives/clip-path.d.ts +7 -7
  92. package/lib/victory-primitives/index.d.ts +14 -14
  93. package/lib/victory-primitives/line-segment.d.ts +11 -11
  94. package/lib/victory-primitives/line-segment.js +2 -4
  95. package/lib/victory-primitives/line.d.ts +3 -3
  96. package/lib/victory-primitives/path.d.ts +3 -3
  97. package/lib/victory-primitives/point.d.ts +13 -13
  98. package/lib/victory-primitives/point.js +2 -4
  99. package/lib/victory-primitives/rect.d.ts +3 -3
  100. package/lib/victory-primitives/text.d.ts +8 -8
  101. package/lib/victory-primitives/tspan.d.ts +3 -3
  102. package/lib/victory-primitives/types.d.ts +7 -7
  103. package/lib/victory-primitives/whisker.d.ts +15 -15
  104. package/lib/victory-primitives/whisker.js +2 -4
  105. package/lib/victory-theme/grayscale.d.ts +2 -2
  106. package/lib/victory-theme/material.d.ts +2 -2
  107. package/lib/victory-theme/types.d.ts +238 -238
  108. package/lib/victory-theme/victory-theme.d.ts +5 -5
  109. package/lib/victory-transition/victory-transition.d.ts +53 -53
  110. package/lib/victory-util/add-events.d.ts +126 -126
  111. package/lib/victory-util/axis.d.ts +50 -50
  112. package/lib/victory-util/collection.d.ts +15 -15
  113. package/lib/victory-util/common-props.d.ts +79 -79
  114. package/lib/victory-util/data.d.ts +74 -74
  115. package/lib/victory-util/default-transitions.d.ts +4 -4
  116. package/lib/victory-util/domain.d.ts +90 -90
  117. package/lib/victory-util/events.d.ts +64 -64
  118. package/lib/victory-util/helpers.d.ts +96 -96
  119. package/lib/victory-util/hooks/index.d.ts +2 -2
  120. package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
  121. package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
  122. package/lib/victory-util/immutable.d.ts +11 -11
  123. package/lib/victory-util/index.d.ts +26 -26
  124. package/lib/victory-util/label-helpers.d.ts +26 -26
  125. package/lib/victory-util/line-helpers.d.ts +4 -4
  126. package/lib/victory-util/log.d.ts +1 -1
  127. package/lib/victory-util/point-path-helpers.d.ts +9 -9
  128. package/lib/victory-util/scale.d.ts +9 -9
  129. package/lib/victory-util/selection.d.ts +28 -28
  130. package/lib/victory-util/style.d.ts +18 -18
  131. package/lib/victory-util/textsize.d.ts +35 -35
  132. package/lib/victory-util/timer-context.d.ts +11 -11
  133. package/lib/victory-util/timer.d.ts +16 -16
  134. package/lib/victory-util/transitions.d.ts +48 -48
  135. package/lib/victory-util/type-helpers.d.ts +9 -9
  136. package/lib/victory-util/user-props.d.ts +26 -26
  137. package/lib/victory-util/wrapper.d.ts +33 -33
  138. package/package.json +5 -2
  139. package/src/victory-label/victory-label.tsx +1 -1
  140. package/src/victory-primitives/arc.tsx +3 -1
  141. package/src/victory-primitives/background.tsx +3 -1
  142. package/src/victory-primitives/border.tsx +3 -1
  143. package/src/victory-primitives/line-segment.tsx +3 -1
  144. package/src/victory-primitives/point.tsx +3 -1
  145. package/src/victory-primitives/whisker.tsx +3 -1
@@ -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,3 +1,4 @@
1
+ import _defaults from "lodash/defaults";
1
2
  import React from "react";
2
3
  import * as Helpers from "../victory-util/helpers";
3
4
  import { Line } from "./line";
@@ -31,10 +32,7 @@ const defaultProps = {
31
32
  shapeRendering: "auto"
32
33
  };
33
34
  export const LineSegment = initialProps => {
34
- const props = evaluateProps({
35
- ...defaultProps,
36
- ...initialProps
37
- });
35
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
38
36
  return /*#__PURE__*/React.cloneElement(props.lineComponent, {
39
37
  ...props.events,
40
38
  "aria-label": props.ariaLabel,
@@ -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,3 +1,4 @@
1
+ import _defaults from "lodash/defaults";
1
2
  import React from "react";
2
3
  import * as Helpers from "../victory-util/helpers";
3
4
  import * as pathHelpers from "../victory-util/point-path-helpers";
@@ -51,10 +52,7 @@ const defaultProps = {
51
52
  shapeRendering: "auto"
52
53
  };
53
54
  export const Point = initialProps => {
54
- const props = evaluateProps({
55
- ...defaultProps,
56
- ...initialProps
57
- });
55
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
58
56
  const userProps = UserProps.getSafeUserProps(props);
59
57
  return /*#__PURE__*/React.cloneElement(props.pathComponent, {
60
58
  ...props.events,
@@ -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,4 @@
1
+ import _defaults from "lodash/defaults";
1
2
  import React from "react";
2
3
  import * as Helpers from "../victory-util/helpers";
3
4
  import { Line } from "./line";
@@ -30,10 +31,7 @@ const defaultProps = {
30
31
  shapeRendering: "auto"
31
32
  };
32
33
  export const Whisker = initialProps => {
33
- const props = evaluateProps({
34
- ...defaultProps,
35
- ...initialProps
36
- });
34
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
37
35
  const {
38
36
  ariaLabel,
39
37
  groupComponent,
@@ -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