victory-core 36.8.5 → 36.9.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/victory-core.js +75 -2350
  3. package/dist/victory-core.min.js +1 -1
  4. package/es/victory-accessible-group/victory-accessible-group.d.ts +0 -9
  5. package/es/victory-accessible-group/victory-accessible-group.js +0 -9
  6. package/es/victory-animation/victory-animation.d.ts +0 -9
  7. package/es/victory-animation/victory-animation.js +0 -9
  8. package/es/victory-clip-container/victory-clip-container.d.ts +1 -31
  9. package/es/victory-clip-container/victory-clip-container.js +0 -31
  10. package/es/victory-container/victory-container.d.ts +2 -33
  11. package/es/victory-container/victory-container.js +0 -32
  12. package/es/victory-label/victory-label.js +1 -52
  13. package/es/victory-portal/portal.d.ts +1 -9
  14. package/es/victory-portal/portal.js +1 -10
  15. package/es/victory-portal/victory-portal.d.ts +2 -7
  16. package/es/victory-portal/victory-portal.js +1 -6
  17. package/es/victory-primitives/arc.d.ts +2 -32
  18. package/es/victory-primitives/arc.js +1 -13
  19. package/es/victory-primitives/background.d.ts +1 -32
  20. package/es/victory-primitives/background.js +1 -13
  21. package/es/victory-primitives/border.d.ts +1 -29
  22. package/es/victory-primitives/border.js +1 -10
  23. package/es/victory-primitives/line-segment.d.ts +1 -30
  24. package/es/victory-primitives/line-segment.js +1 -11
  25. package/es/victory-primitives/point.d.ts +1 -31
  26. package/es/victory-primitives/point.js +1 -12
  27. package/es/victory-primitives/whisker.d.ts +1 -38
  28. package/es/victory-primitives/whisker.js +1 -19
  29. package/es/victory-transition/victory-transition.d.ts +0 -6
  30. package/es/victory-transition/victory-transition.js +0 -6
  31. package/es/victory-util/common-props.d.ts +0 -5
  32. package/es/victory-util/common-props.js +1 -132
  33. package/es/victory-util/index.d.ts +0 -1
  34. package/es/victory-util/index.js +0 -2
  35. package/lib/victory-accessible-group/victory-accessible-group.d.ts +0 -9
  36. package/lib/victory-accessible-group/victory-accessible-group.js +0 -10
  37. package/lib/victory-animation/victory-animation.d.ts +0 -9
  38. package/lib/victory-animation/victory-animation.js +0 -10
  39. package/lib/victory-clip-container/victory-clip-container.d.ts +1 -31
  40. package/lib/victory-clip-container/victory-clip-container.js +0 -33
  41. package/lib/victory-container/victory-container.d.ts +2 -33
  42. package/lib/victory-container/victory-container.js +0 -34
  43. package/lib/victory-label/victory-label.js +1 -54
  44. package/lib/victory-portal/portal.d.ts +1 -9
  45. package/lib/victory-portal/portal.js +1 -16
  46. package/lib/victory-portal/victory-portal.d.ts +2 -7
  47. package/lib/victory-portal/victory-portal.js +1 -7
  48. package/lib/victory-primitives/arc.d.ts +2 -32
  49. package/lib/victory-primitives/arc.js +1 -15
  50. package/lib/victory-primitives/background.d.ts +1 -32
  51. package/lib/victory-primitives/background.js +1 -15
  52. package/lib/victory-primitives/border.d.ts +1 -29
  53. package/lib/victory-primitives/border.js +1 -12
  54. package/lib/victory-primitives/line-segment.d.ts +1 -30
  55. package/lib/victory-primitives/line-segment.js +1 -13
  56. package/lib/victory-primitives/point.d.ts +1 -31
  57. package/lib/victory-primitives/point.js +1 -14
  58. package/lib/victory-primitives/whisker.d.ts +1 -38
  59. package/lib/victory-primitives/whisker.js +1 -21
  60. package/lib/victory-transition/victory-transition.d.ts +0 -6
  61. package/lib/victory-transition/victory-transition.js +0 -7
  62. package/lib/victory-util/common-props.d.ts +0 -5
  63. package/lib/victory-util/common-props.js +1 -148
  64. package/lib/victory-util/index.d.ts +0 -1
  65. package/lib/victory-util/index.js +1 -6
  66. package/package.json +2 -3
  67. package/src/victory-accessible-group/victory-accessible-group.tsx +0 -12
  68. package/src/victory-animation/victory-animation.tsx +0 -51
  69. package/src/victory-clip-container/victory-clip-container.tsx +1 -35
  70. package/src/victory-container/victory-container.tsx +4 -37
  71. package/src/victory-label/victory-label.tsx +0 -83
  72. package/src/victory-portal/portal.tsx +1 -10
  73. package/src/victory-portal/victory-portal.tsx +2 -8
  74. package/src/victory-primitives/arc.tsx +2 -17
  75. package/src/victory-primitives/background.tsx +1 -17
  76. package/src/victory-primitives/border.tsx +1 -14
  77. package/src/victory-primitives/line-segment.tsx +1 -15
  78. package/src/victory-primitives/point.tsx +1 -29
  79. package/src/victory-primitives/whisker.tsx +1 -23
  80. package/src/victory-transition/victory-transition.tsx +0 -7
  81. package/src/victory-util/common-props.tsx +0 -218
  82. package/src/victory-util/index.ts +0 -1
  83. package/es/victory-util/prop-types.d.ts +0 -51
  84. package/es/victory-util/prop-types.js +0 -241
  85. package/lib/victory-util/prop-types.d.ts +0 -51
  86. package/lib/victory-util/prop-types.js +0 -269
  87. package/src/victory-util/prop-types.ts +0 -254
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import { defaults } from "lodash";
4
3
  import * as Log from "../victory-util/log";
5
4
  import * as Helpers from "../victory-util/helpers";
@@ -19,20 +18,15 @@ export class VictoryPortal extends React.Component<VictoryPortalProps> {
19
18
 
20
19
  static role = "portal";
21
20
 
22
- static propTypes = {
23
- children: PropTypes.node,
24
- groupComponent: PropTypes.element,
25
- };
26
-
27
21
  static defaultProps = {
28
22
  groupComponent: <g />,
29
23
  };
30
24
 
31
25
  static contextType = PortalContext;
32
26
  private checkedContext!: boolean;
33
- private renderInPlace!: boolean;
34
- private element!: React.ReactElement;
35
27
  private portalKey!: number;
28
+ public renderInPlace!: boolean;
29
+ public element!: React.ReactElement;
36
30
 
37
31
  componentDidMount() {
38
32
  if (!this.checkedContext) {
@@ -1,11 +1,7 @@
1
1
  /* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 180] }]*/
2
2
  import React from "react";
3
- import PropTypes from "prop-types";
4
3
  import * as Helpers from "../victory-util/helpers";
5
- import {
6
- CommonProps,
7
- VictoryCommonPrimitiveProps,
8
- } from "../victory-util/common-props";
4
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
9
5
  import { Path } from "./path";
10
6
 
11
7
  export interface ArcProps extends VictoryCommonPrimitiveProps {
@@ -17,6 +13,7 @@ export interface ArcProps extends VictoryCommonPrimitiveProps {
17
13
  pathComponent?: React.ReactElement;
18
14
  r?: number;
19
15
  startAngle?: number;
16
+ type?: string;
20
17
  }
21
18
 
22
19
  const getArcPath = (props) => {
@@ -84,15 +81,3 @@ export const Arc = (initialProps: ArcProps) => {
84
81
  clipPath: props.clipPath,
85
82
  });
86
83
  };
87
-
88
- Arc.propTypes = {
89
- ...CommonProps.primitiveProps,
90
- closedPath: PropTypes.bool,
91
- cx: PropTypes.number,
92
- cy: PropTypes.number,
93
- datum: PropTypes.any,
94
- endAngle: PropTypes.number,
95
- pathComponent: PropTypes.element,
96
- r: PropTypes.number,
97
- startAngle: PropTypes.number,
98
- };
@@ -1,10 +1,6 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import * as Helpers from "../victory-util/helpers";
4
- import {
5
- CommonProps,
6
- VictoryCommonPrimitiveProps,
7
- } from "../victory-util/common-props";
3
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
8
4
  import { Rect } from "./rect";
9
5
  import { Circle } from "./circle";
10
6
 
@@ -64,15 +60,3 @@ export const Background = (initialProps: BackgroundProps) => {
64
60
  className: props.className,
65
61
  });
66
62
  };
67
-
68
- Background.propTypes = {
69
- ...CommonProps.primitiveProps,
70
- circleComponent: PropTypes.element,
71
- height: PropTypes.number,
72
- rectComponent: PropTypes.element,
73
- rx: PropTypes.number,
74
- ry: PropTypes.number,
75
- width: PropTypes.number,
76
- x: PropTypes.number,
77
- y: PropTypes.number,
78
- };
@@ -1,10 +1,6 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import * as Helpers from "../victory-util/helpers";
4
- import {
5
- CommonProps,
6
- VictoryCommonPrimitiveProps,
7
- } from "../victory-util/common-props";
3
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
8
4
  import { Rect } from "./rect";
9
5
 
10
6
  export interface BorderProps extends VictoryCommonPrimitiveProps {
@@ -62,12 +58,3 @@ export const Border = (initialProps: BorderProps) => {
62
58
  clipPath: props.clipPath,
63
59
  });
64
60
  };
65
-
66
- Border.propTypes = {
67
- ...CommonProps.primitiveProps,
68
- height: PropTypes.number,
69
- rectComponent: PropTypes.element,
70
- width: PropTypes.number,
71
- x: PropTypes.number,
72
- y: PropTypes.number,
73
- };
@@ -1,10 +1,6 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import * as Helpers from "../victory-util/helpers";
4
- import {
5
- CommonProps,
6
- VictoryCommonPrimitiveProps,
7
- } from "../victory-util/common-props";
3
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
8
4
  import { Line } from "./line";
9
5
 
10
6
  export interface LineSegmentProps extends VictoryCommonPrimitiveProps {
@@ -63,13 +59,3 @@ export const LineSegment = (initialProps: LineSegmentProps) => {
63
59
  clipPath: props.clipPath,
64
60
  });
65
61
  };
66
-
67
- LineSegment.propTypes = {
68
- ...CommonProps.primitiveProps,
69
- datum: PropTypes.any,
70
- lineComponent: PropTypes.element,
71
- x1: PropTypes.number,
72
- x2: PropTypes.number,
73
- y1: PropTypes.number,
74
- y2: PropTypes.number,
75
- };
@@ -1,11 +1,7 @@
1
- import PropTypes from "prop-types";
2
1
  import React from "react";
3
2
  import * as Helpers from "../victory-util/helpers";
4
3
  import * as pathHelpers from "../victory-util/point-path-helpers";
5
- import {
6
- CommonProps,
7
- VictoryCommonPrimitiveProps,
8
- } from "../victory-util/common-props";
4
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
9
5
  import * as UserProps from "../victory-util/user-props";
10
6
  import { Path } from "./path";
11
7
  import { ScatterSymbolType } from "./types";
@@ -90,27 +86,3 @@ export const Point = (initialProps: PointProps) => {
90
86
  ...userProps,
91
87
  });
92
88
  };
93
-
94
- Point.propTypes = {
95
- ...CommonProps.primitiveProps,
96
- datum: PropTypes.object,
97
- getPath: PropTypes.func,
98
- pathComponent: PropTypes.element,
99
- size: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
100
- symbol: PropTypes.oneOfType([
101
- PropTypes.oneOf([
102
- "circle",
103
- "cross",
104
- "diamond",
105
- "plus",
106
- "minus",
107
- "square",
108
- "star",
109
- "triangleDown",
110
- "triangleUp",
111
- ]),
112
- PropTypes.func,
113
- ]),
114
- x: PropTypes.number,
115
- y: PropTypes.number,
116
- };
@@ -1,10 +1,6 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import * as Helpers from "../victory-util/helpers";
4
- import {
5
- CommonProps,
6
- VictoryCommonPrimitiveProps,
7
- } from "../victory-util/common-props";
3
+ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";
8
4
  import { Line } from "./line";
9
5
 
10
6
  export type WhiskerAxes = {
@@ -95,21 +91,3 @@ export const Whisker = (initialProps: WhiskerProps) => {
95
91
  ),
96
92
  ]);
97
93
  };
98
-
99
- Whisker.propTypes = {
100
- ...CommonProps.primitiveProps,
101
- groupComponent: PropTypes.element,
102
- lineComponent: PropTypes.element,
103
- majorWhisker: PropTypes.shape({
104
- x1: PropTypes.number,
105
- x2: PropTypes.number,
106
- y1: PropTypes.number,
107
- y2: PropTypes.number,
108
- }),
109
- minorWhisker: PropTypes.shape({
110
- x1: PropTypes.number,
111
- x2: PropTypes.number,
112
- y1: PropTypes.number,
113
- y2: PropTypes.number,
114
- }),
115
- };
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import { VictoryAnimation } from "../victory-animation/victory-animation";
4
3
  import * as Collection from "../victory-util/collection";
5
4
  import * as Helpers from "../victory-util/helpers";
@@ -49,12 +48,6 @@ export class VictoryTransition extends React.Component<
49
48
  > {
50
49
  static displayName = "VictoryTransition";
51
50
 
52
- static propTypes = {
53
- animate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
54
- animationWhitelist: PropTypes.array,
55
- children: PropTypes.node,
56
- };
57
-
58
51
  static contextType = TimerContext;
59
52
  private continuous: boolean;
60
53
  private timer: Timer;
@@ -1,5 +1,3 @@
1
- import PropTypes from "prop-types";
2
- import * as CustomPropTypes from "./prop-types";
3
1
  import * as React from "react";
4
2
  import { OriginType } from "../victory-label/victory-label";
5
3
  import { PaddingProps, VictoryThemeDefinition } from "../victory-theme/types";
@@ -32,65 +30,6 @@ export interface VictoryDatableProps {
32
30
  y?: DataGetterPropType;
33
31
  y0?: DataGetterPropType;
34
32
  }
35
- const dataProps: React.WeakValidationMap<VictoryDatableProps> = {
36
- // @ts-expect-error TODO: synchronize the type with this PropTypes
37
- categories: PropTypes.oneOfType([
38
- PropTypes.arrayOf(PropTypes.string),
39
- PropTypes.shape({
40
- x: PropTypes.arrayOf(PropTypes.string),
41
- y: PropTypes.arrayOf(PropTypes.string),
42
- }),
43
- ]),
44
- // @ts-expect-error TODO: synchronize the type with this PropTypes
45
- data: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
46
- dataComponent: PropTypes.element,
47
- disableInlineStyles: PropTypes.bool,
48
- labelComponent: PropTypes.element,
49
- labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array]),
50
- samples: CustomPropTypes.nonNegative,
51
- sortKey: PropTypes.oneOfType([
52
- PropTypes.func,
53
- CustomPropTypes.allOfType([
54
- CustomPropTypes.integer,
55
- CustomPropTypes.nonNegative,
56
- ]),
57
- PropTypes.string,
58
- PropTypes.arrayOf(PropTypes.string.isRequired),
59
- ]),
60
- sortOrder: PropTypes.oneOf(["ascending", "descending"]),
61
- style: PropTypes.shape({
62
- parent: PropTypes.object,
63
- data: PropTypes.object,
64
- labels: PropTypes.object,
65
- }),
66
- x: PropTypes.oneOfType([
67
- PropTypes.func,
68
- CustomPropTypes.allOfType([
69
- CustomPropTypes.integer,
70
- CustomPropTypes.nonNegative,
71
- ]),
72
- PropTypes.string,
73
- PropTypes.arrayOf(PropTypes.string.isRequired),
74
- ]),
75
- y: PropTypes.oneOfType([
76
- PropTypes.func,
77
- CustomPropTypes.allOfType([
78
- CustomPropTypes.integer,
79
- CustomPropTypes.nonNegative,
80
- ]),
81
- PropTypes.string,
82
- PropTypes.arrayOf(PropTypes.string.isRequired),
83
- ]),
84
- y0: PropTypes.oneOfType([
85
- PropTypes.func,
86
- CustomPropTypes.allOfType([
87
- CustomPropTypes.integer,
88
- CustomPropTypes.nonNegative,
89
- ]),
90
- PropTypes.string,
91
- PropTypes.arrayOf(PropTypes.string.isRequired),
92
- ]),
93
- };
94
33
  export interface VictoryCommonThemeProps {
95
34
  animate?: boolean | AnimatePropTypeInterface;
96
35
  colorScale?: ColorScalePropType;
@@ -127,133 +66,6 @@ export interface VictoryCommonThemeProps {
127
66
  export interface VictoryCommonProps extends VictoryCommonThemeProps {
128
67
  theme?: VictoryThemeDefinition;
129
68
  }
130
- const baseProps: React.WeakValidationMap<VictoryCommonProps> = {
131
- animate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
132
- containerComponent: PropTypes.element,
133
- domain: PropTypes.oneOfType([
134
- CustomPropTypes.domain,
135
- PropTypes.shape({ x: CustomPropTypes.domain, y: CustomPropTypes.domain }),
136
- ]),
137
- // @ts-expect-error TODO: synchronize the type with this PropTypes
138
- maxDomain: PropTypes.oneOfType([
139
- PropTypes.number,
140
- PropTypes.instanceOf(Date),
141
- PropTypes.shape({
142
- x: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
143
- y: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
144
- }),
145
- ]),
146
- // @ts-expect-error TODO: synchronize the type with this PropTypes
147
- minDomain: PropTypes.oneOfType([
148
- PropTypes.number,
149
- PropTypes.instanceOf(Date),
150
- PropTypes.shape({
151
- x: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
152
- y: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
153
- }),
154
- ]),
155
- // @ts-expect-error TODO: synchronize the type with this PropTypes
156
- domainPadding: PropTypes.oneOfType([
157
- PropTypes.shape({
158
- x: PropTypes.oneOfType([
159
- PropTypes.number,
160
- PropTypes.arrayOf(PropTypes.number),
161
- ]),
162
- y: PropTypes.oneOfType([
163
- PropTypes.number,
164
- PropTypes.arrayOf(PropTypes.number),
165
- ]),
166
- }),
167
- PropTypes.number,
168
- PropTypes.arrayOf(PropTypes.number),
169
- ]),
170
- eventKey: PropTypes.oneOfType([
171
- PropTypes.func,
172
- CustomPropTypes.allOfType([
173
- CustomPropTypes.integer,
174
- CustomPropTypes.nonNegative,
175
- ]),
176
- PropTypes.string,
177
- ]),
178
- events: PropTypes.arrayOf(
179
- PropTypes.shape({
180
- target: PropTypes.oneOf(["data", "labels", "parent"]),
181
- eventKey: PropTypes.oneOfType([
182
- PropTypes.array,
183
- CustomPropTypes.allOfType([
184
- CustomPropTypes.integer,
185
- CustomPropTypes.nonNegative,
186
- ]),
187
- PropTypes.string,
188
- ]),
189
- eventHandlers: PropTypes.object,
190
- }),
191
- ),
192
- // @ts-expect-error TODO: synchronize the type with this PropTypes
193
- externalEventMutations: PropTypes.arrayOf(
194
- PropTypes.shape({
195
- callback: PropTypes.func,
196
- childName: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
197
- eventKey: PropTypes.oneOfType([
198
- PropTypes.array,
199
- CustomPropTypes.allOfType([
200
- CustomPropTypes.integer,
201
- CustomPropTypes.nonNegative,
202
- ]),
203
- PropTypes.string,
204
- ]),
205
- mutation: PropTypes.func,
206
- target: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
207
- }),
208
- ),
209
- groupComponent: PropTypes.element,
210
- height: CustomPropTypes.nonNegative,
211
- name: PropTypes.string,
212
- // @ts-expect-error TODO: synchronize the type with this PropTypes
213
- origin: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number }),
214
- // @ts-expect-error TODO: synchronize the type with this PropTypes
215
- padding: PropTypes.oneOfType([
216
- PropTypes.number,
217
- PropTypes.shape({
218
- top: PropTypes.number,
219
- bottom: PropTypes.number,
220
- left: PropTypes.number,
221
- right: PropTypes.number,
222
- }),
223
- ]),
224
- polar: PropTypes.bool,
225
- range: PropTypes.oneOfType([
226
- CustomPropTypes.domain,
227
- PropTypes.shape({
228
- x: CustomPropTypes.domain.isRequired,
229
- y: CustomPropTypes.domain.isRequired,
230
- }),
231
- ]),
232
- scale: PropTypes.oneOfType([
233
- CustomPropTypes.scale,
234
- PropTypes.shape({
235
- x: CustomPropTypes.scale.isRequired,
236
- y: CustomPropTypes.scale.isRequired,
237
- }),
238
- ]),
239
- // @ts-expect-error TODO: synchronize the type with this PropTypes
240
- sharedEvents: PropTypes.shape({
241
- events: PropTypes.array,
242
- getEventState: PropTypes.func,
243
- }),
244
- // @ts-expect-error TODO: synchronize the type with this PropTypes
245
- singleQuadrantDomainPadding: PropTypes.oneOfType([
246
- PropTypes.bool,
247
- PropTypes.shape({
248
- x: PropTypes.oneOfType([PropTypes.bool]),
249
- y: PropTypes.oneOfType([PropTypes.bool]),
250
- }),
251
- ]),
252
- standalone: PropTypes.bool,
253
- theme: PropTypes.object,
254
- width: CustomPropTypes.nonNegative,
255
- };
256
-
257
69
  export interface VictoryCommonPrimitiveProps {
258
70
  active?: boolean;
259
71
  ariaLabel?: StringOrCallback;
@@ -276,33 +88,3 @@ export interface VictoryCommonPrimitiveProps {
276
88
  tabIndex?: NumberOrCallback;
277
89
  transform?: string;
278
90
  }
279
- const primitiveProps: React.WeakValidationMap<VictoryCommonPrimitiveProps> = {
280
- active: PropTypes.bool,
281
- ariaLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
282
- className: PropTypes.string,
283
- clipPath: PropTypes.string,
284
- data: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
285
- desc: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
286
- disableInlineStyles: PropTypes.bool,
287
- events: PropTypes.object,
288
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
289
- index: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
290
- // @ts-expect-error TODO: synchronize the type with this PropTypes
291
- origin: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number }),
292
- polar: PropTypes.bool,
293
- role: PropTypes.string,
294
- scale: PropTypes.oneOfType([
295
- CustomPropTypes.scale,
296
- PropTypes.shape({ x: CustomPropTypes.scale, y: CustomPropTypes.scale }),
297
- ]),
298
- shapeRendering: PropTypes.string,
299
- style: PropTypes.object,
300
- tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
301
- transform: PropTypes.string,
302
- };
303
-
304
- export const CommonProps = {
305
- dataProps,
306
- baseProps,
307
- primitiveProps,
308
- };
@@ -13,7 +13,6 @@ export * as LabelHelpers from "./label-helpers";
13
13
  export * as LineHelpers from "./line-helpers";
14
14
  export * as Log from "./log";
15
15
  export * as PointPathHelpers from "./point-path-helpers";
16
- export * as PropTypes from "./prop-types";
17
16
  export * as Scale from "./scale";
18
17
  export * as Selection from "./selection";
19
18
  export type { SVGCoordinateType, SVGCoordinateBounds } from "./selection";
@@ -1,51 +0,0 @@
1
- import PropTypes from "prop-types";
2
- import { D3Scale, ScaleName } from "../types/prop-types";
3
- /**
4
- * Return a new validator based on `propType` but which logs a `console.error`
5
- * with `explanation` if used.
6
- * @param {Function} propType The old, deprecated propType.
7
- * @param {String} explanation The message to provide the user of the deprecated propType.
8
- * @returns {Function} Validator which logs usage of this propType
9
- */
10
- export declare function deprecated<T>(propType: PropTypes.Validator<T>, explanation: string): PropTypes.Validator<T>;
11
- /**
12
- * Return a new validator which returns true
13
- * if and only if all validators passed as arguments return true.
14
- * Like React.propTypes.oneOfType, except "all" instead of "any"
15
- * @param {Array} validators Validation functions.
16
- * @returns {Function} Combined validator function
17
- */
18
- export declare function allOfType<T>(validators: Array<PropTypes.Validator<T>>): PropTypes.Requireable<T | undefined>;
19
- /**
20
- * Check that the value is a non-negative number.
21
- */
22
- export declare const nonNegative: PropTypes.Requireable<number | undefined>;
23
- /**
24
- * Check that the value is an integer.
25
- */
26
- export declare const integer: PropTypes.Requireable<number | undefined>;
27
- /**
28
- * Check that the value is greater than zero.
29
- */
30
- export declare const greaterThanZero: PropTypes.Requireable<number | undefined>;
31
- /**
32
- * Check that the value is an Array of two unique values.
33
- */
34
- export declare const domain: PropTypes.Requireable<[number, number] | undefined>;
35
- /**
36
- * Check that the value looks like a d3 `scale` function.
37
- */
38
- export declare const scale: PropTypes.Requireable<ScaleName | D3Scale<any> | undefined>;
39
- /**
40
- * Check that an array contains items of the same type.
41
- */
42
- export declare const homogeneousArray: PropTypes.Requireable<unknown[] | undefined>;
43
- /**
44
- * Check that array prop length matches props.data.length
45
- */
46
- export declare const matchDataLength: PropTypes.Requireable<unknown[] | undefined>;
47
- /**
48
- * Check that the value is a regular expression
49
- */
50
- export declare const regExp: PropTypes.Requireable<RegExp | undefined>;
51
- //# sourceMappingURL=prop-types.d.ts.map