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,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
@@ -429,10 +429,7 @@ const defaultProps = {
429
429
  lineHeight: 1
430
430
  };
431
431
  export const VictoryLabel = initialProps => {
432
- const props = evaluateProps({
433
- ...defaultProps,
434
- ...initialProps
435
- });
432
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
436
433
  if (props.text === null || props.text === undefined) {
437
434
  return null;
438
435
  }
@@ -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
@@ -1,21 +1,21 @@
1
- import React from "react";
2
- import { PortalContextValue } from "./portal-context";
3
- export interface PortalProps {
4
- className?: string;
5
- height?: number;
6
- style?: React.CSSProperties;
7
- viewBox?: string;
8
- width?: number;
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
+ import { PortalContextValue } from "./portal-context";
3
+ export interface PortalProps {
4
+ className?: string;
5
+ height?: number;
6
+ style?: React.CSSProperties;
7
+ viewBox?: string;
8
+ width?: number;
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
+ }
21
21
  //# sourceMappingURL=portal.d.ts.map
@@ -1,27 +1,27 @@
1
- import React from "react";
2
- import { PortalContext } from "./portal-context";
3
- export interface VictoryPortalProps {
4
- children?: React.ReactElement;
5
- groupComponent?: React.ReactElement;
6
- }
7
- export interface VictoryPortal {
8
- context: React.ContextType<typeof PortalContext>;
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
+ import { PortalContext } from "./portal-context";
3
+ export interface VictoryPortalProps {
4
+ children?: React.ReactElement;
5
+ groupComponent?: React.ReactElement;
6
+ }
7
+ export interface VictoryPortal {
8
+ context: React.ContextType<typeof PortalContext>;
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
+ }
27
27
  //# sourceMappingURL=victory-portal.d.ts.map
@@ -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,3 +1,4 @@
1
+ import _defaults from "lodash/defaults";
1
2
  /* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 180] }]*/
2
3
  import React from "react";
3
4
  import * as Helpers from "../victory-util/helpers";
@@ -58,10 +59,7 @@ const defaultProps = {
58
59
  shapeRendering: "auto"
59
60
  };
60
61
  export const Arc = initialProps => {
61
- const props = evaluateProps({
62
- ...defaultProps,
63
- ...initialProps
64
- });
62
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
65
63
  return /*#__PURE__*/React.cloneElement(props.pathComponent, {
66
64
  ...props.events,
67
65
  "aria-label": props.ariaLabel,
@@ -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,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 { Rect } from "./rect";
@@ -19,10 +20,7 @@ const defaultProps = {
19
20
  shapeRendering: "auto"
20
21
  };
21
22
  export const Background = initialProps => {
22
- const props = evaluateProps({
23
- ...defaultProps,
24
- ...initialProps
25
- });
23
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
26
24
  return props.polar ? /*#__PURE__*/React.cloneElement(props.circleComponent, {
27
25
  ...props.events,
28
26
  style: props.style,
@@ -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,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 { Rect } from "./rect";
@@ -31,10 +32,7 @@ const defaultProps = {
31
32
  shapeRendering: "auto"
32
33
  };
33
34
  export const Border = initialProps => {
34
- const props = evaluateProps({
35
- ...defaultProps,
36
- ...initialProps
37
- });
35
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
38
36
  return /*#__PURE__*/React.cloneElement(props.rectComponent, {
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 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