td-stylekit 29.0.0 → 30.0.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 (108) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/es/BarChart/BarChart.d.ts +2 -2
  3. package/dist/es/BarChart/BarChart.js +5 -15
  4. package/dist/es/ChartPrimitives/utils.d.ts +0 -10
  5. package/dist/es/ChartPrimitives/utils.js +7 -145
  6. package/dist/es/ComparisonChart/ComparisonChart.d.ts +2 -2
  7. package/dist/es/ComparisonChart/ComparisonChart.js +5 -16
  8. package/dist/es/DataGrid/elements.d.ts +2 -78
  9. package/dist/es/DataGrid/elements.js +29 -29
  10. package/dist/es/DateControl/elements.d.ts +13 -13
  11. package/dist/es/DropdownButton/DropdownButtonElements.d.ts +1 -1
  12. package/dist/es/DropdownButton/DropdownButtonElements.js +8 -8
  13. package/dist/es/GrowthRateChart/GrowthRateChart.d.ts +0 -76
  14. package/dist/es/GrowthRateChart/GrowthRateChart.js +2 -9
  15. package/dist/es/Heading/Heading.js +2 -2
  16. package/dist/es/Highlighter/Highlighter.js +2 -2
  17. package/dist/es/Icon/Icon.js +2 -2
  18. package/dist/es/Icon/staticTypes.d.ts +88 -418
  19. package/dist/es/Icon/types.js +1 -555
  20. package/dist/es/Logo/Logo.js +0 -12
  21. package/dist/es/Menu/MenuElements.js +3 -3
  22. package/dist/es/MultiSelect/elements.d.ts +1 -1
  23. package/dist/es/MultiSelect/elements.js +17 -17
  24. package/dist/es/SecondaryNavigation/elements/Item.js +7 -7
  25. package/dist/es/SecondaryNavigation/elements/Section.js +3 -3
  26. package/dist/es/SecondaryNavigation/elements/Title.js +3 -3
  27. package/dist/es/SecondaryNavigation/elements/Wrapper.js +3 -3
  28. package/dist/es/Section/elements.d.ts +1 -1
  29. package/dist/es/Select/utils.js +2 -2
  30. package/dist/es/Tagger/TaggerElements.js +11 -11
  31. package/dist/es/Tagger/components/PopupSelector.js +4 -4
  32. package/dist/es/Tagger/components/PopupSelectorElements.js +16 -16
  33. package/dist/es/ThemeProvider/ThemeProvider.d.ts +0 -205
  34. package/dist/es/ThemeProvider/ThemeProvider.js +1 -7
  35. package/dist/es/ThemeProvider/icons.d.ts +1 -1
  36. package/dist/es/ThemeProvider/icons.js +4 -46
  37. package/dist/es/ThemeProvider/index.d.ts +1 -1
  38. package/dist/es/ThemeProvider/index.js +0 -6
  39. package/dist/es/ThemeProvider/theme.d.ts +0 -76
  40. package/dist/es/ThemeProvider/theme.js +0 -82
  41. package/dist/es/ThemeProvider/types.d.ts +1 -1
  42. package/dist/es/TimeControl/elements.d.ts +13 -13
  43. package/dist/es/Toggle/Toggle.js +6 -7
  44. package/dist/es/UserAvatar/UserAvatar.js +7 -7
  45. package/dist/es/VolumeChart/VolumeChart.d.ts +2 -2
  46. package/dist/es/VolumeChart/VolumeChart.js +2 -13
  47. package/dist/es/mixins/border.d.ts +1 -1
  48. package/dist/es/mixins/border.js +3 -3
  49. package/dist/es/utils/globalcss.js +1 -1
  50. package/dist/es/utils/testingLibrary.d.ts +1 -3
  51. package/dist/es/utils/testingLibrary.js +13 -24
  52. package/package.json +1 -1
  53. package/dist/es/ThemeProvider/v4/Badge.d.ts +0 -10
  54. package/dist/es/ThemeProvider/v4/Badge.js +0 -57
  55. package/dist/es/ThemeProvider/v4/Button.d.ts +0 -161
  56. package/dist/es/ThemeProvider/v4/Button.js +0 -200
  57. package/dist/es/ThemeProvider/v4/Card.d.ts +0 -12
  58. package/dist/es/ThemeProvider/v4/Card.js +0 -24
  59. package/dist/es/ThemeProvider/v4/Checkbox.d.ts +0 -70
  60. package/dist/es/ThemeProvider/v4/Checkbox.js +0 -94
  61. package/dist/es/ThemeProvider/v4/CollapsibleToggle.d.ts +0 -31
  62. package/dist/es/ThemeProvider/v4/CollapsibleToggle.js +0 -46
  63. package/dist/es/ThemeProvider/v4/Color.d.ts +0 -12
  64. package/dist/es/ThemeProvider/v4/Color.js +0 -47
  65. package/dist/es/ThemeProvider/v4/DataGrid.d.ts +0 -72
  66. package/dist/es/ThemeProvider/v4/DataGrid.js +0 -182
  67. package/dist/es/ThemeProvider/v4/DatePicker.d.ts +0 -41
  68. package/dist/es/ThemeProvider/v4/DatePicker.js +0 -111
  69. package/dist/es/ThemeProvider/v4/DropdownButton.d.ts +0 -67
  70. package/dist/es/ThemeProvider/v4/DropdownButton.js +0 -99
  71. package/dist/es/ThemeProvider/v4/FormFieldAddon.d.ts +0 -16
  72. package/dist/es/ThemeProvider/v4/FormFieldAddon.js +0 -38
  73. package/dist/es/ThemeProvider/v4/FormLabel.d.ts +0 -11
  74. package/dist/es/ThemeProvider/v4/FormLabel.js +0 -28
  75. package/dist/es/ThemeProvider/v4/Icon.d.ts +0 -7
  76. package/dist/es/ThemeProvider/v4/Icon.js +0 -20
  77. package/dist/es/ThemeProvider/v4/Input.d.ts +0 -10
  78. package/dist/es/ThemeProvider/v4/Input.js +0 -50
  79. package/dist/es/ThemeProvider/v4/Link.d.ts +0 -20
  80. package/dist/es/ThemeProvider/v4/Link.js +0 -30
  81. package/dist/es/ThemeProvider/v4/Menu.d.ts +0 -36
  82. package/dist/es/ThemeProvider/v4/Menu.js +0 -60
  83. package/dist/es/ThemeProvider/v4/Modal.d.ts +0 -63
  84. package/dist/es/ThemeProvider/v4/Modal.js +0 -216
  85. package/dist/es/ThemeProvider/v4/MultiSelect.d.ts +0 -35
  86. package/dist/es/ThemeProvider/v4/MultiSelect.js +0 -126
  87. package/dist/es/ThemeProvider/v4/Popover.d.ts +0 -4
  88. package/dist/es/ThemeProvider/v4/Popover.js +0 -107
  89. package/dist/es/ThemeProvider/v4/Radio.d.ts +0 -17
  90. package/dist/es/ThemeProvider/v4/Radio.js +0 -69
  91. package/dist/es/ThemeProvider/v4/Section.d.ts +0 -33
  92. package/dist/es/ThemeProvider/v4/Section.js +0 -93
  93. package/dist/es/ThemeProvider/v4/Select.d.ts +0 -69
  94. package/dist/es/ThemeProvider/v4/Select.js +0 -198
  95. package/dist/es/ThemeProvider/v4/Shuttle.d.ts +0 -12
  96. package/dist/es/ThemeProvider/v4/Shuttle.js +0 -28
  97. package/dist/es/ThemeProvider/v4/Tagger.d.ts +0 -30
  98. package/dist/es/ThemeProvider/v4/Tagger.js +0 -64
  99. package/dist/es/ThemeProvider/v4/Toast.d.ts +0 -35
  100. package/dist/es/ThemeProvider/v4/Toast.js +0 -119
  101. package/dist/es/ThemeProvider/v4/Toggle.d.ts +0 -18
  102. package/dist/es/ThemeProvider/v4/Toggle.js +0 -93
  103. package/dist/es/ThemeProvider/v4/UserAvatar.d.ts +0 -15
  104. package/dist/es/ThemeProvider/v4/UserAvatar.js +0 -31
  105. package/dist/es/ThemeProvider/v4/View.d.ts +0 -9
  106. package/dist/es/ThemeProvider/v4/View.js +0 -21
  107. package/dist/es/ThemeProvider/v4/index.d.ts +0 -6
  108. package/dist/es/ThemeProvider/v4/index.js +0 -46
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # [30.0.0](https://github.com/treasure-data/td-stylekit/compare/v29.0.0...v30.0.0) (2024-09-18)
2
+
3
+
4
+ ### Code Refactoring
5
+
6
+ * **CON-16791:** Remove v4 theme ([#1606](https://github.com/treasure-data/td-stylekit/issues/1606)) ([7827e02](https://github.com/treasure-data/td-stylekit/commit/7827e02ccb916dbe388a97cb2ca94e1701525199)), closes [/github.com/treasure-data/td-stylekit/pull/1606/files#diff-9f7f950eeb101f410b8e0af8bae8386a88a565945932b0fb1ae41875c5ff1d95](https://github.com//github.com/treasure-data/td-stylekit/pull/1606/files/issues/diff-9f7f950eeb101f410b8e0af8bae8386a88a565945932b0fb1ae41875c5ff1d95) [/github.com/treasure-data/td-stylekit/pull/1606/files#diff-3b84b9cd1c7a0c0fa22d2c808c5d9c3c1158dda1e2209676610e3afdfb396fb6](https://github.com//github.com/treasure-data/td-stylekit/pull/1606/files/issues/diff-3b84b9cd1c7a0c0fa22d2c808c5d9c3c1158dda1e2209676610e3afdfb396fb6)
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * **CON-16791:** V4 theme is removed.
12
+
13
+ [CON-16791]:
14
+ https://treasure-data.atlassian.net/browse/CON-16791?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
15
+
1
16
  # [29.0.0](https://github.com/treasure-data/td-stylekit/compare/v28.44.1...v29.0.0) (2024-09-09)
2
17
 
3
18
 
@@ -76,12 +76,12 @@ export declare namespace BarChart {
76
76
  customizeTheme: (chartTheme: any) => any;
77
77
  };
78
78
  }
79
- declare const ThemedComponent: import("react").FC<Pick<Pick<BarChartProps, "data" | "animate" | "theme" | "height" | "width" | "padding" | "horizontal" | "detailed" | "grayscale" | "chartColors" | "isGrowthRateChart" | "barColor" | "barLabel" | "barRadius" | "barRatio" | "barWidth" | "domainPadding" | "gridStyle" | "xTickCount" | "xTickLabelTitle" | "xTickValues" | "yTickCount" | "yTickValues" | "domain" | "tooltipProps"> & {
79
+ declare const ThemedComponent: import("react").FC<Pick<Pick<BarChartProps, "data" | "animate" | "theme" | "height" | "width" | "padding" | "horizontal" | "chartColors" | "detailed" | "grayscale" | "isGrowthRateChart" | "barColor" | "barLabel" | "barRadius" | "barRatio" | "barWidth" | "domainPadding" | "gridStyle" | "xTickCount" | "xTickLabelTitle" | "xTickValues" | "yTickCount" | "yTickValues" | "domain" | "tooltipProps"> & {
80
80
  yTickLabel?: ((data: Datum['y']) => string) | undefined;
81
81
  customizeTheme?: ((chartTheme: ChartTheme, theme: Theme) => ChartTheme) | undefined;
82
82
  tooltipLabel?: ((data: Datum) => string | string[]) | undefined;
83
83
  xTickLabel?: ((data: Datum['x']) => string) | undefined;
84
- } & {}, "data" | "animate" | "height" | "width" | "padding" | "horizontal" | "detailed" | "grayscale" | "yTickLabel" | "chartColors" | "isGrowthRateChart" | "barColor" | "barLabel" | "barRadius" | "barRatio" | "barWidth" | "customizeTheme" | "domainPadding" | "gridStyle" | "tooltipLabel" | "xTickCount" | "xTickLabel" | "xTickLabelTitle" | "xTickValues" | "yTickCount" | "yTickValues" | "domain" | "tooltipProps"> & {
84
+ } & {}, "data" | "animate" | "height" | "width" | "padding" | "horizontal" | "chartColors" | "detailed" | "grayscale" | "isGrowthRateChart" | "yTickLabel" | "barColor" | "barLabel" | "barRadius" | "barRatio" | "barWidth" | "customizeTheme" | "domainPadding" | "gridStyle" | "tooltipLabel" | "xTickCount" | "xTickLabel" | "xTickLabelTitle" | "xTickValues" | "yTickCount" | "yTickValues" | "domain" | "tooltipProps"> & {
85
85
  theme?: import("@emotion/react").Theme | undefined;
86
86
  }>;
87
87
  export default ThemedComponent;
@@ -27,8 +27,8 @@ function BarChart(props) {
27
27
  var _props$animate = props.animate,
28
28
  animate = _props$animate === void 0 ? _ChartPrimitives.chartUtils.ANIMATE : _props$animate,
29
29
  _props$barColor = props.barColor,
30
- barColor = _props$barColor === void 0 ? function (_datum, theme) {
31
- return theme.color.Primary;
30
+ barColor = _props$barColor === void 0 ? function (_datum) {
31
+ return theme.palette.primary[2];
32
32
  } : _props$barColor,
33
33
  barLabel = props.barLabel,
34
34
  barRadius = props.barRadius,
@@ -74,7 +74,6 @@ function BarChart(props) {
74
74
  width = Math.max(width, 1);
75
75
  height = Math.max(height, 1);
76
76
  var providerTheme = (0, _react.useTheme)();
77
- var isV5 = providerTheme.name === 'v5';
78
77
  var BarLabel = function BarLabel(props) {
79
78
  var _chartTheme$_labelSty, _tooltipProps$labelSt, _chartTheme$_labelSty2, _tooltipProps$labelSt2, _chartTheme$_labelSty3, _tooltipProps$labelSt3;
80
79
  var tooltipProps = typeof restProps.tooltipProps === 'function' ? restProps.tooltipProps(props.datum || {
@@ -106,14 +105,14 @@ function BarChart(props) {
106
105
  labelStyle: [_objectSpread(_objectSpread({}, (_chartTheme$_labelSty = chartTheme._labelStyle) === null || _chartTheme$_labelSty === void 0 ? void 0 : _chartTheme$_labelSty[0]), tooltipProps === null || tooltipProps === void 0 ? void 0 : (_tooltipProps$labelSt = tooltipProps.labelStyle) === null || _tooltipProps$labelSt === void 0 ? void 0 : _tooltipProps$labelSt[0]), _objectSpread(_objectSpread({}, (_chartTheme$_labelSty2 = chartTheme._labelStyle) === null || _chartTheme$_labelSty2 === void 0 ? void 0 : _chartTheme$_labelSty2[1]), {}, {
107
106
  fill: function fill(_ref2) {
108
107
  var datum = _ref2.datum;
109
- return isV5 ? (0, _color["default"])(barColor(datum, theme)).darken(0.5) : barColor(datum, theme);
108
+ return (0, _color["default"])(barColor(datum, theme)).darken(0.5);
110
109
  }
111
110
  }, tooltipProps === null || tooltipProps === void 0 ? void 0 : (_tooltipProps$labelSt2 = tooltipProps.labelStyle) === null || _tooltipProps$labelSt2 === void 0 ? void 0 : _tooltipProps$labelSt2[1]), _objectSpread(_objectSpread({}, (_chartTheme$_labelSty3 = chartTheme._labelStyle) === null || _chartTheme$_labelSty3 === void 0 ? void 0 : _chartTheme$_labelSty3[0]), tooltipProps === null || tooltipProps === void 0 ? void 0 : (_tooltipProps$labelSt3 = tooltipProps.labelStyle) === null || _tooltipProps$labelSt3 === void 0 ? void 0 : _tooltipProps$labelSt3[0])],
112
111
  isGrouped: false
113
112
  }))]
114
113
  });
115
114
  };
116
- var chartTheme = isV5 ? customizeTheme(_ChartPrimitives.chartUtils.getV5Theme({
115
+ var chartTheme = customizeTheme(_ChartPrimitives.chartUtils.getV5Theme({
117
116
  chartColors: chartColors,
118
117
  width: width,
119
118
  height: height,
@@ -124,17 +123,8 @@ function BarChart(props) {
124
123
  yAxisLabel: undefined,
125
124
  yTickLabel: yTickLabel,
126
125
  theme: theme
127
- }), theme) : customizeTheme(_ChartPrimitives.chartUtils.getTheme({
128
- width: width,
129
- height: height,
130
- detailed: detailed,
131
- data: data,
132
- grayscale: grayscale,
133
- yAxisLabel: undefined,
134
- yTickLabel: yTickLabel,
135
- theme: theme
136
126
  }), theme);
137
- var shouldRenderBackground = isV5 && width > 1 && height > 1;
127
+ var shouldRenderBackground = width > 1 && height > 1;
138
128
  var yDomain = _ChartPrimitives.chartUtils.findYMax(data);
139
129
 
140
130
  // The y domain is [0, 0] so force it to [-100, 100] so that the
@@ -57,16 +57,6 @@ export type ChartTheme = VictoryThemeDefinition & {
57
57
  [key: string]: any;
58
58
  };
59
59
  };
60
- export declare function getTheme({ width, height, detailed, grayscale, yAxisLabel, yTickLabel, data, theme }: {
61
- width: number;
62
- height: number;
63
- detailed?: boolean;
64
- grayscale?: boolean;
65
- data: Datum[];
66
- yAxisLabel?: string;
67
- yTickLabel?: (d: any) => string;
68
- theme: Theme;
69
- }): ChartTheme;
70
60
  export declare function getV5Theme({ chartColors, width, height, detailed, grayscale, isGrowthRateChart, yAxisLabel, yTickLabel, data, theme }: {
71
61
  chartColors: string[] | string;
72
62
  width: number;
@@ -11,7 +11,6 @@ exports.findLongestYLabel = findLongestYLabel;
11
11
  exports.findYMax = findYMax;
12
12
  exports.findYMinMax = findYMinMax;
13
13
  exports.getChartColor = getChartColor;
14
- exports.getTheme = getTheme;
15
14
  exports.getV5Theme = getV5Theme;
16
15
  exports.truncateLabelText = truncateLabelText;
17
16
  var _dateFns = require("date-fns");
@@ -123,154 +122,17 @@ maxWidth) {
123
122
  }
124
123
  return truncated;
125
124
  }
126
- function getTheme(_ref) {
127
- var width = _ref.width,
125
+ function getV5Theme(_ref) {
126
+ var chartColors = _ref.chartColors,
127
+ width = _ref.width,
128
128
  height = _ref.height,
129
129
  detailed = _ref.detailed,
130
130
  grayscale = _ref.grayscale,
131
+ isGrowthRateChart = _ref.isGrowthRateChart,
131
132
  yAxisLabel = _ref.yAxisLabel,
132
133
  yTickLabel = _ref.yTickLabel,
133
134
  data = _ref.data,
134
135
  theme = _ref.theme;
135
- var fontStyles = {
136
- fontSize: (0, _utils.remToPx)(theme.fontSize[1]),
137
- fill: theme.color.Zorba,
138
- stroke: 'transparent',
139
- fontStyle: 'normal',
140
- fontWeight: 'normal'
141
- };
142
- var longestYLabel = findLongestYLabel(data, yTickLabel);
143
- var _calculateLabelSize = calculateLabelSize([longestYLabel], fontStyles),
144
- _calculateLabelSize2 = _slicedToArray(_calculateLabelSize, 1),
145
- axisLabelWidth = _calculateLabelSize2[0];
146
-
147
- // Here we have a 1x fontSize difference which is the space between
148
- // the axis label and the tick labels
149
- var yAxisLabelPadding = axisLabelWidth + fontStyles.fontSize * 2;
150
- var leftPadding = yAxisLabelPadding + (axisLabelWidth > 0 ? fontStyles.fontSize : 0);
151
- var chartPadding = detailed ? {
152
- left: yAxisLabel ? leftPadding : leftPadding - fontStyles.fontSize * 2,
153
- bottom: fontStyles.fontSize * 2,
154
- right: 6,
155
- // room for scatter circles at edge of chart
156
- top: 6 // room for scatter circles at top of chart
157
- } : 0;
158
- var strokeLinecap = 'round';
159
- var strokeLinejoin = 'round';
160
- return {
161
- chart: {
162
- padding: chartPadding,
163
- width: width,
164
- height: height
165
- },
166
- group: {
167
- padding: chartPadding,
168
- width: width,
169
- height: height
170
- },
171
- axis: {
172
- style: {
173
- axis: {
174
- stroke: theme.color.LightDividerNew
175
- },
176
- axisLabel: _objectSpread(_objectSpread({}, fontStyles), {}, {
177
- fill: theme.color.Flint,
178
- padding: yAxisLabelPadding
179
- }),
180
- tickLabels: _objectSpread(_objectSpread({}, fontStyles), {}, {
181
- padding: (0, _utils.remToPx)(theme.space[2])
182
- }),
183
- grid: {
184
- fill: 'none',
185
- stroke: 'none',
186
- pointerEvents: 'painted'
187
- }
188
- }
189
- },
190
- dependentAxis: {
191
- style: {
192
- grid: {
193
- stroke: detailed && !grayscale ? theme.color.LightDividerNew : 'none'
194
- },
195
- axis: {
196
- stroke: 'none'
197
- },
198
- axisLabel: _objectSpread(_objectSpread({}, fontStyles), {}, {
199
- fill: theme.color.Flint,
200
- padding: yAxisLabelPadding
201
- }),
202
- tickLabels: _objectSpread(_objectSpread({}, fontStyles), {}, {
203
- padding: (0, _utils.remToPx)(theme.space[2])
204
- })
205
- }
206
- },
207
- area: {
208
- style: {
209
- data: {
210
- fill: _Defs["default"].BLUE_GRADIENT,
211
- opacity: 0.4,
212
- stroke: theme.color.CuriousBlue,
213
- strokeWidth: 3,
214
- strokeLinejoin: strokeLinejoin,
215
- strokeLinecap: strokeLinecap
216
- }
217
- }
218
- },
219
- scatter: {
220
- style: {
221
- data: {
222
- fill: theme.color.Maya,
223
- stroke: theme.color.CuriousBlue,
224
- strokeWidth: 2
225
- }
226
- }
227
- },
228
- line: {
229
- style: {
230
- data: {
231
- strokeWidth: 3,
232
- opacity: 0.8,
233
- strokeLinejoin: strokeLinejoin,
234
- strokeLinecap: strokeLinecap
235
- }
236
- }
237
- },
238
- // Non-standard keys on the VictoryTheme. They're still style objects in
239
- // the format Victory expects, because we assign them to the the style prop
240
- // manually when needed.
241
- // We use theme._labelStyle to calculate tooltip sizes.
242
- _labelStyle: [_objectSpread(_objectSpread({}, fontStyles), {}, {
243
- fill: theme.color.Black
244
- }), _objectSpread(_objectSpread({}, fontStyles), {}, {
245
- fill: theme.color.CuriousBlue
246
- })],
247
- // Victory bug: flyoutStyle isn't being assigned through the theme
248
- // See: https://github.com/FormidableLabs/victory/issues/1156
249
- _flyoutStyle: {
250
- stroke: theme.color.BokaraGrey,
251
- strokeWidth: 1,
252
- fill: theme.color.LightBackground,
253
- pointerEvents: 'none',
254
- padding: (0, _utils.remToPx)(theme.space[4]),
255
- lineHeight: theme.lineHeight[6],
256
- filter: _Defs["default"].DROP_SHADOW
257
- },
258
- _comparisonColors: [theme.color.Violet, theme.color.Emerald, theme.color.CuriousBlue, theme.color.Buckthorn],
259
- _axisLabelWidth: axisLabelWidth,
260
- _backgroundStyles: {}
261
- };
262
- }
263
- function getV5Theme(_ref2) {
264
- var chartColors = _ref2.chartColors,
265
- width = _ref2.width,
266
- height = _ref2.height,
267
- detailed = _ref2.detailed,
268
- grayscale = _ref2.grayscale,
269
- isGrowthRateChart = _ref2.isGrowthRateChart,
270
- yAxisLabel = _ref2.yAxisLabel,
271
- yTickLabel = _ref2.yTickLabel,
272
- data = _ref2.data,
273
- theme = _ref2.theme;
274
136
  var fontStyles = {
275
137
  fontSize: 10,
276
138
  fill: theme.palette.neutral[9],
@@ -280,9 +142,9 @@ function getV5Theme(_ref2) {
280
142
  fontFamily: theme.fontFamily.body
281
143
  };
282
144
  var longestYLabel = findLongestYLabel(data, yTickLabel);
283
- var _calculateLabelSize3 = calculateLabelSize([longestYLabel], fontStyles),
284
- _calculateLabelSize4 = _slicedToArray(_calculateLabelSize3, 1),
285
- axisLabelWidth = _calculateLabelSize4[0];
145
+ var _calculateLabelSize = calculateLabelSize([longestYLabel], fontStyles),
146
+ _calculateLabelSize2 = _slicedToArray(_calculateLabelSize, 1),
147
+ axisLabelWidth = _calculateLabelSize2[0];
286
148
 
287
149
  // Here we have a 1x fontSize difference which is the space between
288
150
  // the axis label and the tick labels
@@ -51,11 +51,11 @@ declare const ThemedChart: import("react").FC<Pick<Pick<VictoryChartProps & {
51
51
  tooltipLabel?: ((d: Datum) => undefined | string) | undefined;
52
52
  } & {
53
53
  theme: Theme;
54
- }, "data" | "detailed" | "grayscale" | "yAxisLabel" | "yTickLabel" | "chartColors" | "xTickValues" | keyof VictoryChartProps | "xAxisLabel"> & {
54
+ }, "data" | "chartColors" | "detailed" | "grayscale" | "yAxisLabel" | "yTickLabel" | "xTickValues" | keyof VictoryChartProps | "xAxisLabel"> & {
55
55
  tooltipLabel?: ((d: Datum) => undefined | string) | undefined;
56
56
  xTickLabel?: ((data: chartUtils.Datum['x']) => string) | undefined;
57
57
  tooltipTitle?: ((d: Datum) => undefined | string) | undefined;
58
- } & {}, "data" | "style" | "animate" | "children" | "height" | "width" | "padding" | "name" | "scale" | "horizontal" | "origin" | "range" | "detailed" | "grayscale" | "yAxisLabel" | "yTickLabel" | "chartColors" | "groupComponent" | "events" | "backgroundComponent" | "polar" | "domainPadding" | "tooltipLabel" | "xTickLabel" | "xTickValues" | "domain" | "categories" | "defaultAxes" | "defaultPolarAxes" | "endAngle" | "eventKey" | "innerRadius" | "prependDefaultAxes" | "startAngle" | "colorScale" | "containerComponent" | "externalEventMutations" | "maxDomain" | "minDomain" | "sharedEvents" | "singleQuadrantDomainPadding" | "standalone" | "xAxisLabel" | "tooltipTitle"> & {
58
+ } & {}, "data" | "style" | "animate" | "children" | "name" | "height" | "scale" | "width" | "padding" | "horizontal" | "origin" | "range" | "chartColors" | "detailed" | "grayscale" | "yAxisLabel" | "yTickLabel" | "groupComponent" | "events" | "backgroundComponent" | "polar" | "domainPadding" | "tooltipLabel" | "xTickLabel" | "xTickValues" | "domain" | "categories" | "defaultAxes" | "defaultPolarAxes" | "endAngle" | "eventKey" | "innerRadius" | "prependDefaultAxes" | "startAngle" | "colorScale" | "containerComponent" | "externalEventMutations" | "maxDomain" | "minDomain" | "sharedEvents" | "singleQuadrantDomainPadding" | "standalone" | "xAxisLabel" | "tooltipTitle"> & {
59
59
  theme?: import("@emotion/react").Theme | undefined;
60
60
  }>;
61
61
  export default ThemedChart;
@@ -55,9 +55,7 @@ function ComparisonChart(_ref) {
55
55
  return allData.concat(d);
56
56
  }, []);
57
57
  var Chart = detailed ? _victory.VictoryChart : _victory.VictoryGroup;
58
- var providerTheme = (0, _react.useTheme)();
59
- var isV5 = providerTheme.name === 'v5';
60
- var chartTheme = isV5 ? _ChartPrimitives.chartUtils.getV5Theme({
58
+ var chartTheme = _ChartPrimitives.chartUtils.getV5Theme({
61
59
  chartColors: chartColors,
62
60
  height: height,
63
61
  width: width,
@@ -67,17 +65,8 @@ function ComparisonChart(_ref) {
67
65
  yTickLabel: yTickLabel,
68
66
  theme: theme,
69
67
  grayscale: grayscale
70
- }) : _ChartPrimitives.chartUtils.getTheme({
71
- height: height,
72
- width: width,
73
- detailed: detailed,
74
- data: flatData,
75
- yAxisLabel: yAxisLabel,
76
- yTickLabel: yTickLabel,
77
- theme: theme,
78
- grayscale: grayscale
79
68
  });
80
- var shouldRenderBackground = isV5 && width > 1 && height > 1;
69
+ var shouldRenderBackground = width > 1 && height > 1;
81
70
  var minMaxY = _ChartPrimitives.chartUtils.findYMinMax(flatData);
82
71
  var padding = (minMaxY[1] - minMaxY[0]) / 100 * 15;
83
72
  var domain = {
@@ -93,7 +82,7 @@ function ComparisonChart(_ref) {
93
82
  var _chartTheme$_labelSty2;
94
83
  var color = getComparisonColor(i);
95
84
  labelStyles.push(_objectSpread(_objectSpread({}, (_chartTheme$_labelSty2 = chartTheme._labelStyle) === null || _chartTheme$_labelSty2 === void 0 ? void 0 : _chartTheme$_labelSty2[0]), {}, {
96
- fill: isV5 ? (0, _color["default"])(color).darken(0.4) : color
85
+ fill: (0, _color["default"])(color).darken(0.4)
97
86
  }));
98
87
  });
99
88
  function groupTooltipLabel(d) {
@@ -167,11 +156,11 @@ function ComparisonChart(_ref) {
167
156
  "data-gs": gs("src", "comparisonchart", "comparisonchart.tsx", "comparison-chart", "container", "chart", "victory-portal", "victory-group", "victory-scatter"),
168
157
  name: "scatters",
169
158
  data: data,
170
- style: isV5 ? {
159
+ style: {
171
160
  data: _objectSpread(_objectSpread({}, (_chartTheme$scatter = chartTheme.scatter) === null || _chartTheme$scatter === void 0 ? void 0 : (_chartTheme$scatter$s = _chartTheme$scatter.style) === null || _chartTheme$scatter$s === void 0 ? void 0 : _chartTheme$scatter$s.data), {}, {
172
161
  fill: getComparisonColor(i)
173
162
  })
174
- } : {},
163
+ },
175
164
  animate: animate,
176
165
  size: function size(_ref3) {
177
166
  var active = _ref3.active;
@@ -231,82 +231,6 @@ export declare const CategoryInput: typeof Input & StyledComponent<any, {}, {
231
231
  GlobalNav: number;
232
232
  Toast: number;
233
233
  };
234
- readonly color: {
235
- Dune: string;
236
- CuriousBlue: string;
237
- FlushMahogany: string;
238
- Maroon: string;
239
- PinkSwan: string;
240
- Matisse: string;
241
- HummingBird: string;
242
- Primary: string;
243
- PrimaryContrast: string;
244
- PrimaryFade: string;
245
- PrimaryLight: string;
246
- PrimaryLightFade: string;
247
- PrimaryLightHighlight: string;
248
- PrimaryAccent: string;
249
- DarkBackground: string;
250
- DarkBar: string;
251
- DarkHover: string;
252
- DarkPrimary: string;
253
- DarkSecondary: string;
254
- LightBackground: string;
255
- LightBar: string;
256
- LightDisabled: string;
257
- LightDivider: string;
258
- LightDividerNew: string;
259
- LightHint: string;
260
- LightHover: string;
261
- LightPrimary: string;
262
- LightSecondary: string;
263
- BorderGrey: string;
264
- Blue: string;
265
- BlueFade: string;
266
- Green: string;
267
- GreenFade: string;
268
- GreenBackground: string;
269
- Red: string;
270
- RedFade: string;
271
- Yellow: string;
272
- YellowFade: string;
273
- YellowHighlight: string;
274
- Orange: string;
275
- OrangeFill: string;
276
- OrangeBackground: string;
277
- Error: string;
278
- ErrorFade: string;
279
- ErrorBackground: string;
280
- DraggableDraggingBackground: string;
281
- Aquamarine: string;
282
- Azure: string;
283
- AzureNew: string;
284
- AzureFade: string;
285
- AzureHighlight: string;
286
- Silver: string;
287
- BlueNavy: string;
288
- Black: string;
289
- TurquoiseBlue: string;
290
- SummerSky: string;
291
- Mondo: string;
292
- HeavyMetal: string;
293
- BokaraGrey: string;
294
- Cyan: string;
295
- Eucalyptus: string;
296
- Flamingo: string;
297
- Zorba: string;
298
- Flint: string;
299
- Maya: string;
300
- Bondi: string;
301
- Emerald: string;
302
- Carissma: string;
303
- Solitude: string;
304
- WhiteSmoke: string;
305
- Violet: string;
306
- FireBrick: string;
307
- Purple: string;
308
- Buckthorn: string;
309
- };
310
234
  readonly gradient: {
311
235
  main: string;
312
236
  neutral: string;
@@ -517,14 +441,14 @@ export declare const CategoryInput: typeof Input & StyledComponent<any, {}, {
517
441
  Root: symbol;
518
442
  };
519
443
  } | undefined;
520
- name?: "v4" | "v5" | undefined;
444
+ name?: "v5" | undefined;
521
445
  icons?: {
522
446
  [name: string]: {
523
447
  [name: string]: string | number | symbol;
524
448
  };
525
449
  } | undefined;
526
450
  }>;
527
- export declare const CategoryCheckbox: StyledComponent<Pick<import("../Checkbox").CheckboxProps, "value" | "label" | "title" | "className" | "onChange" | "readOnly" | "name" | "wrapLabel"> & {
451
+ export declare const CategoryCheckbox: StyledComponent<Pick<import("../Checkbox").CheckboxProps, "value" | "label" | "title" | "className" | "onChange" | "name" | "wrapLabel" | "readOnly"> & {
528
452
  disabled?: boolean | undefined;
529
453
  'data-instrumentation'?: string | undefined;
530
454
  } & {} & {