@lobehub/charts 4.0.0 → 4.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 (54) hide show
  1. package/es/AccuracyBarChart/index.js +11 -17
  2. package/es/AccuracyBarChart/styles.d.ts +11 -11
  3. package/es/AccuracyBarChart/styles.js +8 -8
  4. package/es/AreaChart/index.js +9 -13
  5. package/es/AreaChart/styles.d.ts +6 -6
  6. package/es/AreaChart/styles.js +6 -6
  7. package/es/BarChart/index.js +9 -13
  8. package/es/BarChart/styles.d.ts +6 -6
  9. package/es/BarChart/styles.js +6 -6
  10. package/es/BarList/index.js +3 -5
  11. package/es/BarList/styles.d.ts +10 -10
  12. package/es/BarList/styles.js +10 -10
  13. package/es/DataBars/CategoryBar.js +4 -10
  14. package/es/DataBars/DeltaBar.js +5 -8
  15. package/es/DataBars/MarkerBar.js +5 -8
  16. package/es/DataBars/ProgressBar.js +4 -7
  17. package/es/DataBars/styles.d.ts +7 -7
  18. package/es/DataBars/styles.js +6 -6
  19. package/es/DonutChart/index.js +7 -11
  20. package/es/DonutChart/styles.d.ts +6 -6
  21. package/es/DonutChart/styles.js +6 -6
  22. package/es/FunnelChart/index.js +8 -12
  23. package/es/FunnelChart/styles.d.ts +6 -6
  24. package/es/FunnelChart/styles.js +6 -6
  25. package/es/Heatmaps/Calendar.js +133 -50
  26. package/es/Heatmaps/ChartLabels.js +95 -42
  27. package/es/Heatmaps/Footer.js +95 -50
  28. package/es/Heatmaps/index.js +124 -84
  29. package/es/Heatmaps/styles.d.ts +7 -7
  30. package/es/Heatmaps/styles.js +4 -4
  31. package/es/Legend/LegendItem.js +6 -11
  32. package/es/Legend/index.js +2 -5
  33. package/es/LineChart/index.js +7 -11
  34. package/es/LineChart/styles.d.ts +6 -6
  35. package/es/LineChart/styles.js +6 -6
  36. package/es/ScatterChart/ScatterChartTooltip.js +5 -10
  37. package/es/ScatterChart/ScatterChartTooltipRow.js +4 -7
  38. package/es/ScatterChart/index.js +5 -9
  39. package/es/ScatterChart/styles.d.ts +6 -6
  40. package/es/ScatterChart/styles.js +6 -6
  41. package/es/SparkChart/SparkAreaChart.js +4 -8
  42. package/es/SparkChart/SparkBarChart.js +2 -6
  43. package/es/SparkChart/SparkLineChart.js +2 -6
  44. package/es/Tracker/TrackerBlock.js +7 -11
  45. package/es/Tracker/index.js +2 -4
  46. package/es/Tracker/styles.d.ts +5 -5
  47. package/es/Tracker/styles.js +5 -5
  48. package/es/common/ChartTooltip/ChartTooltipFrame.d.ts +3 -3
  49. package/es/common/ChartTooltip/ChartTooltipFrame.js +4 -6
  50. package/es/common/ChartTooltip/ChartTooltipRow.js +4 -6
  51. package/es/common/ChartTooltip/index.js +5 -9
  52. package/es/common/CustomYAxisTick.js +2 -3
  53. package/es/common/NoData.js +3 -4
  54. package/package.json +4 -3
@@ -16,7 +16,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
17
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
18
18
  import { Flexbox } from '@lobehub/ui';
19
- import { createStyles } from 'antd-style';
19
+ import { createStaticStyles, cx } from 'antd-style';
20
20
  import { ChevronLeft, ChevronRight } from 'lucide-react';
21
21
  import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
22
22
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
@@ -24,7 +24,7 @@ import LegendItem from "./LegendItem";
24
24
  import ScrollButton from "./ScrollButton";
25
25
  import { jsx as _jsx } from "react/jsx-runtime";
26
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
27
- var useStyles = createStyles(function (_ref) {
27
+ var styles = createStaticStyles(function (_ref) {
28
28
  var css = _ref.css;
29
29
  return {
30
30
  container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n "]))),
@@ -33,9 +33,6 @@ var useStyles = createStyles(function (_ref) {
33
33
  };
34
34
  });
35
35
  var Legend = /*#__PURE__*/forwardRef(function (props, ref) {
36
- var _useStyles = useStyles(),
37
- cx = _useStyles.cx,
38
- styles = _useStyles.styles;
39
36
  var themeColorRange = useThemeColorRange();
40
37
  var customCategories = props.customCategories,
41
38
  categories = props.categories,
@@ -19,7 +19,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
20
  import { Flexbox } from '@lobehub/ui';
21
21
  import { Skeleton } from 'antd';
22
- import { css } from 'antd-style';
22
+ import { css, cssVar, cx } from 'antd-style';
23
23
  import { Fragment, forwardRef, useMemo, useState } from 'react';
24
24
  import { CartesianGrid, Dot, Label, Legend, Line, LineChart as ReChartsLineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
25
25
  import ChartLegend from "../common/ChartLegend";
@@ -30,14 +30,10 @@ import { constructCategoryColors, getYAxisDomain, hasOnlyOneValueForThisKey } fr
30
30
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
31
31
  import { defaultValueFormatter } from "../utils";
32
32
  import { getMaxLabelLength } from "../utils/getMaxLabelLength";
33
- import { useStyles } from "./styles";
33
+ import { styles } from "./styles";
34
34
  import { jsx as _jsx } from "react/jsx-runtime";
35
35
  import { jsxs as _jsxs } from "react/jsx-runtime";
36
36
  var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
37
- var _useStyles = useStyles(),
38
- cx = _useStyles.cx,
39
- theme = _useStyles.theme,
40
- styles = _useStyles.styles;
41
37
  var themeColorRange = useThemeColorRange();
42
38
  var _props$data = props.data,
43
39
  data = _props$data === void 0 ? [] : _props$data,
@@ -263,7 +259,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
263
259
  payload: payload === null || payload === void 0 ? void 0 : payload.map(function (payloadItem) {
264
260
  var _categoryColors$get;
265
261
  return _objectSpread(_objectSpread({}, payloadItem), {}, {
266
- color: (_categoryColors$get = categoryColors.get(payloadItem.dataKey)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary
262
+ color: (_categoryColors$get = categoryColors.get(payloadItem.dataKey)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary
267
263
  });
268
264
  }),
269
265
  valueFormatter: valueFormatter
@@ -277,7 +273,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
277
273
  });
278
274
  } : undefined,
279
275
  cursor: {
280
- stroke: theme.colorTextSecondary,
276
+ stroke: cssVar.colorTextSecondary,
281
277
  strokeWidth: 1
282
278
  },
283
279
  isAnimationActive: false,
@@ -311,7 +307,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
311
307
  strokeWidth = props.strokeWidth,
312
308
  dataKey = props.dataKey;
313
309
  return /*#__PURE__*/_jsx(Dot, {
314
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(dataKey)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : theme.colorPrimary)),
310
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(dataKey)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : cssVar.colorPrimary)),
315
311
  cx: dotCx,
316
312
  cy: dotCy,
317
313
  fill: "",
@@ -326,7 +322,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
326
322
  });
327
323
  },
328
324
  animationDuration: animationDuration,
329
- className: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(category)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : theme.colorPrimary)),
325
+ className: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(category)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : cssVar.colorPrimary)),
330
326
  connectNulls: connectNulls,
331
327
  dataKey: category,
332
328
  dot: function dot(props) {
@@ -341,7 +337,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
341
337
  if (hasOnlyOneValueForThisKey(data, category) && !(activeDot || activeLegend && activeLegend !== category) || (activeDot === null || activeDot === void 0 ? void 0 : activeDot.index) === index && (activeDot === null || activeDot === void 0 ? void 0 : activeDot.dataKey) === category) {
342
338
  var _categoryColors$get4;
343
339
  return /*#__PURE__*/_jsx(Dot, {
344
- className: cx(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get4 = categoryColors.get(dataKey)) !== null && _categoryColors$get4 !== void 0 ? _categoryColors$get4 : theme.colorPrimary)),
340
+ className: cx(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get4 = categoryColors.get(dataKey)) !== null && _categoryColors$get4 !== void 0 ? _categoryColors$get4 : cssVar.colorPrimary)),
345
341
  cx: dotCx,
346
342
  cy: dotCy,
347
343
  fill: "",
@@ -1,6 +1,6 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- emphasis: import("antd-style").SerializedStyles;
3
- gridLines: import("antd-style").SerializedStyles;
4
- label: import("antd-style").SerializedStyles;
5
- strongLabel: import("antd-style").SerializedStyles;
6
- }>;
1
+ export declare const styles: {
2
+ emphasis: string;
3
+ gridLines: string;
4
+ label: string;
5
+ strongLabel: string;
6
+ };
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
8
  emphasis: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
9
- gridLines: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n stroke-width: 1;\n "])), token.colorBorderSecondary),
10
- label: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), token.colorTextDescription),
11
- strongLabel: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), token.colorTextSecondary)
9
+ gridLines: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n stroke-width: 1;\n "])), cssVar.colorBorderSecondary),
10
+ label: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextDescription),
11
+ strongLabel: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextSecondary)
12
12
  };
13
13
  });
@@ -2,7 +2,7 @@ var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox, Icon } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
- import { createStyles } from 'antd-style';
5
+ import { createStaticStyles, cssVar, cx } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import React, { memo } from 'react';
8
8
  import { ChartTooltipFrame } from "../common/ChartTooltip/ChartTooltipFrame";
@@ -10,11 +10,10 @@ import { defaultValueFormatter } from "../utils";
10
10
  import ScatterChartTooltipRow from "./ScatterChartTooltipRow";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- var useStyles = createStyles(function (_ref) {
14
- var css = _ref.css,
15
- token = _ref.token;
13
+ var styles = createStaticStyles(function (_ref) {
14
+ var css = _ref.css;
16
15
  return {
17
- header: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n font-weight: 500;\n "])), token.colorBorderSecondary)
16
+ header: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n font-weight: 500;\n "])), cssVar.colorBorderSecondary)
18
17
  };
19
18
  });
20
19
  var ScatterChartTooltip = /*#__PURE__*/memo(function (_ref2) {
@@ -27,11 +26,7 @@ var ScatterChartTooltip = /*#__PURE__*/memo(function (_ref2) {
27
26
  axis = _ref2.axis,
28
27
  category = _ref2.category,
29
28
  categoryColors = _ref2.categoryColors;
30
- var _useStyles = useStyles(),
31
- cx = _useStyles.cx,
32
- theme = _useStyles.theme,
33
- styles = _useStyles.styles;
34
- var color = category ? (_categoryColors$get = categoryColors.get(payload === null || payload === void 0 || (_payload$ = payload[0]) === null || _payload$ === void 0 ? void 0 : _payload$.payload[category])) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary : theme.colorPrimary;
29
+ var color = category ? (_categoryColors$get = categoryColors.get(payload === null || payload === void 0 || (_payload$ = payload[0]) === null || _payload$ === void 0 ? void 0 : _payload$.payload[category])) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary : cssVar.colorPrimary;
35
30
  if (active && payload) {
36
31
  return /*#__PURE__*/_jsxs(ChartTooltipFrame, {
37
32
  children: [/*#__PURE__*/_jsxs(Flexbox, {
@@ -2,23 +2,20 @@ var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
- import { createStyles } from 'antd-style';
5
+ import { createStaticStyles, cssVar } from 'antd-style';
6
6
  import React, { memo } from 'react';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
- var useStyles = createStyles(function (_ref) {
10
- var css = _ref.css,
11
- token = _ref.token;
9
+ var styles = createStaticStyles(function (_ref) {
10
+ var css = _ref.css;
12
11
  return {
13
12
  number: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: 500;\n "]))),
14
- title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextSecondary)
13
+ title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), cssVar.colorTextSecondary)
15
14
  };
16
15
  });
17
16
  var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
18
17
  var value = _ref2.value,
19
18
  name = _ref2.name;
20
- var _useStyles = useStyles(),
21
- styles = _useStyles.styles;
22
19
  return /*#__PURE__*/_jsxs(Flexbox, {
23
20
  align: 'center',
24
21
  gap: 32,
@@ -19,7 +19,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
20
  import { Flexbox } from '@lobehub/ui';
21
21
  import { Skeleton } from 'antd';
22
- import { css } from 'antd-style';
22
+ import { css, cssVar, cx } from 'antd-style';
23
23
  import { forwardRef, useMemo, useState } from 'react';
24
24
  import { CartesianGrid, Label, Legend, ScatterChart as ReChartsScatterChart, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';
25
25
  import { renderShape } from "./renderShape";
@@ -31,14 +31,10 @@ import { defaultValueFormatter } from "../utils";
31
31
  import { getMaxLabelLength } from "../utils/getMaxLabelLength";
32
32
  import NoData from "../common/NoData";
33
33
  import ScatterChartTooltip from "./ScatterChartTooltip";
34
- import { useStyles } from "./styles";
34
+ import { styles } from "./styles";
35
35
  import { jsx as _jsx } from "react/jsx-runtime";
36
36
  import { jsxs as _jsxs } from "react/jsx-runtime";
37
37
  var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
38
- var _useStyles = useStyles(),
39
- cx = _useStyles.cx,
40
- theme = _useStyles.theme,
41
- styles = _useStyles.styles;
42
38
  var themeColorRange = useThemeColorRange();
43
39
  var _props$data = props.data,
44
40
  data = _props$data === void 0 ? [] : _props$data,
@@ -276,7 +272,7 @@ var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
276
272
  payload: payload === null || payload === void 0 ? void 0 : payload.map(function (payloadItem) {
277
273
  var _categoryColors$get;
278
274
  return _objectSpread(_objectSpread({}, payloadItem), {}, {
279
- color: (_categoryColors$get = categoryColors.get(color)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary
275
+ color: (_categoryColors$get = categoryColors.get(color)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary
280
276
  });
281
277
  }),
282
278
  valueFormatter: valueFormatter
@@ -296,7 +292,7 @@ var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
296
292
  });
297
293
  } : undefined,
298
294
  cursor: {
299
- stroke: theme.colorTextSecondary,
295
+ stroke: cssVar.colorTextSecondary,
300
296
  strokeWidth: 1
301
297
  },
302
298
  isAnimationActive: false,
@@ -312,7 +308,7 @@ var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
312
308
  var _categoryColors$get2, _categoryColors$get3;
313
309
  return /*#__PURE__*/_jsx(Scatter, {
314
310
  animationDuration: animationDuration,
315
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(cat)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : theme.colorPrimary), showOpacity && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(cat)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : theme.colorPrimary)),
311
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(cat)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : cssVar.colorPrimary), showOpacity && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(cat)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : cssVar.colorPrimary)),
316
312
  data: category ? data.filter(function (d) {
317
313
  return d[category] === cat;
318
314
  }) : data,
@@ -1,6 +1,6 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- emphasis: import("antd-style").SerializedStyles;
3
- gridLines: import("antd-style").SerializedStyles;
4
- label: import("antd-style").SerializedStyles;
5
- strongLabel: import("antd-style").SerializedStyles;
6
- }>;
1
+ export declare const styles: {
2
+ emphasis: string;
3
+ gridLines: string;
4
+ label: string;
5
+ strongLabel: string;
6
+ };
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
8
  emphasis: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
9
- gridLines: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n stroke-width: 1;\n "])), token.colorBorderSecondary),
10
- label: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), token.colorTextDescription),
11
- strongLabel: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), token.colorTextSecondary)
9
+ gridLines: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n stroke: ", ";\n stroke-width: 1;\n "])), cssVar.colorBorderSecondary),
10
+ label: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextDescription),
11
+ strongLabel: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextSecondary)
12
12
  };
13
13
  });
@@ -13,19 +13,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
14
  import { Flexbox } from '@lobehub/ui';
15
15
  import { Skeleton } from 'antd';
16
- import { css } from 'antd-style';
16
+ import { css, cssVar, cx } from 'antd-style';
17
17
  import { forwardRef } from 'react';
18
18
  import { Area, AreaChart as ReChartsAreaChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
- import { useStyles } from "../AreaChart/styles";
20
19
  import NoData from "../common/NoData";
21
20
  import { constructCategoryColors, getYAxisDomain } from "../common/utils";
22
21
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
23
22
  import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
24
  var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
26
- var _useStyles = useStyles(),
27
- cx = _useStyles.cx,
28
- theme = _useStyles.theme;
29
25
  var themeColorRange = useThemeColorRange();
30
26
  var _props$data = props.data,
31
27
  data = _props$data === void 0 ? [] : _props$data,
@@ -98,7 +94,7 @@ var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
98
94
  var _categoryColors$get, _categoryColors$get2;
99
95
  return /*#__PURE__*/_jsx("defs", {
100
96
  children: showGradient ? /*#__PURE__*/_jsxs("linearGradient", {
101
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary)),
97
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary)),
102
98
  id: categoryColors.get(category),
103
99
  x1: "0",
104
100
  x2: "0",
@@ -114,7 +110,7 @@ var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
114
110
  stopOpacity: 0
115
111
  })]
116
112
  }) : /*#__PURE__*/_jsx("linearGradient", {
117
- className: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(category)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : theme.colorPrimary)),
113
+ className: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), (_categoryColors$get2 = categoryColors.get(category)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : cssVar.colorPrimary)),
118
114
  id: categoryColors.get(category),
119
115
  x1: "0",
120
116
  x2: "0",
@@ -130,7 +126,7 @@ var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
130
126
  var _categoryColors$get3;
131
127
  return /*#__PURE__*/_jsx(Area, {
132
128
  animationDuration: animationDuration,
133
- className: cx(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(category)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : theme.colorPrimary)),
129
+ className: cx(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get3 = categoryColors.get(category)) !== null && _categoryColors$get3 !== void 0 ? _categoryColors$get3 : cssVar.colorPrimary)),
134
130
  connectNulls: connectNulls,
135
131
  dataKey: category,
136
132
  dot: false,
@@ -13,19 +13,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
14
  import { Flexbox } from '@lobehub/ui';
15
15
  import { Skeleton } from 'antd';
16
- import { css } from 'antd-style';
16
+ import { css, cssVar, cx } from 'antd-style';
17
17
  import { forwardRef } from 'react';
18
18
  import { Bar, BarChart as ReChartsBarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
- import { useStyles } from "../BarChart/styles";
20
19
  import NoData from "../common/NoData";
21
20
  import { constructCategoryColors, getYAxisDomain } from "../common/utils";
22
21
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
23
22
  import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
24
  var SparkBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
26
- var _useStyles = useStyles(),
27
- cx = _useStyles.cx,
28
- theme = _useStyles.theme;
29
25
  var themeColorRange = useThemeColorRange();
30
26
  var _props$data = props.data,
31
27
  data = _props$data === void 0 ? [] : _props$data,
@@ -95,7 +91,7 @@ var SparkBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
95
91
  var _categoryColors$get;
96
92
  return /*#__PURE__*/_jsx(Bar, {
97
93
  animationDuration: animationDuration,
98
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary)),
94
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary)),
99
95
  dataKey: category,
100
96
  fill: "",
101
97
  isAnimationActive: showAnimation,
@@ -13,19 +13,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
14
  import { Flexbox } from '@lobehub/ui';
15
15
  import { Skeleton } from 'antd';
16
- import { css } from 'antd-style';
16
+ import { css, cssVar, cx } from 'antd-style';
17
17
  import { forwardRef } from 'react';
18
18
  import { Line, LineChart as ReChartsLineChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
- import { useStyles } from "../LineChart/styles";
20
19
  import NoData from "../common/NoData";
21
20
  import { constructCategoryColors, getYAxisDomain } from "../common/utils";
22
21
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
23
22
  import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
24
  var SparkLineChart = /*#__PURE__*/forwardRef(function (props, ref) {
26
- var _useStyles = useStyles(),
27
- cx = _useStyles.cx,
28
- theme = _useStyles.theme;
29
25
  var themeColorRange = useThemeColorRange();
30
26
  var _props$data = props.data,
31
27
  data = _props$data === void 0 ? [] : _props$data,
@@ -94,7 +90,7 @@ var SparkLineChart = /*#__PURE__*/forwardRef(function (props, ref) {
94
90
  var _categoryColors$get;
95
91
  return /*#__PURE__*/_jsx(Line, {
96
92
  animationDuration: animationDuration,
97
- className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary)),
93
+ className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary)),
98
94
  connectNulls: connectNulls,
99
95
  dataKey: category,
100
96
  dot: false,
@@ -12,14 +12,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
12
12
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
14
14
  import { Flexbox, Tooltip } from '@lobehub/ui';
15
- import { createStyles } from 'antd-style';
15
+ import { createStaticStyles, cssVar } from 'antd-style';
16
16
  import { forwardRef, useMemo } from 'react';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
- var useStyles = createStyles(function (_ref) {
19
- var css = _ref.css,
20
- token = _ref.token;
18
+ var styles = createStaticStyles(function (_ref) {
19
+ var css = _ref.css;
21
20
  return {
22
- block: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n\n &:hover {\n opacity: 0.5;\n }\n "])), token.colorFill, token.borderRadiusSM, token.borderRadiusSM, token.borderRadiusSM, token.borderRadiusSM)
21
+ block: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n }\n\n &:last-child {\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n }\n\n &:hover {\n opacity: 0.5;\n }\n "])), cssVar.colorFill, cssVar.borderRadiusSM, cssVar.borderRadiusSM, cssVar.borderRadiusSM, cssVar.borderRadiusSM)
23
22
  };
24
23
  });
25
24
  var TrackerBlock = /*#__PURE__*/forwardRef(function (_ref2, ref) {
@@ -28,22 +27,19 @@ var TrackerBlock = /*#__PURE__*/forwardRef(function (_ref2, ref) {
28
27
  width = _ref2.width,
29
28
  style = _ref2.style,
30
29
  rest = _objectWithoutProperties(_ref2, _excluded);
31
- var _useStyles = useStyles(),
32
- styles = _useStyles.styles,
33
- theme = _useStyles.theme;
34
30
  var blockColor = useMemo(function () {
35
31
  switch (color) {
36
32
  case 'success':
37
33
  {
38
- return theme.colorSuccess;
34
+ return cssVar.colorSuccess;
39
35
  }
40
36
  case 'warning':
41
37
  {
42
- return theme.colorWarning;
38
+ return cssVar.colorWarning;
43
39
  }
44
40
  case 'error':
45
41
  {
46
- return theme.colorError;
42
+ return cssVar.colorError;
47
43
  }
48
44
  default:
49
45
  {
@@ -10,9 +10,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
10
10
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
12
  import { Flexbox } from '@lobehub/ui';
13
+ import { cx } from 'antd-style';
13
14
  import { forwardRef } from 'react';
14
15
  import TrackerBlock from "./TrackerBlock";
15
- import { useStyles } from "./styles";
16
+ import { styles } from "./styles";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
19
  var Tracker = /*#__PURE__*/forwardRef(function (props, ref) {
@@ -34,9 +35,6 @@ var Tracker = /*#__PURE__*/forwardRef(function (props, ref) {
34
35
  rightLabel = props.rightLabel,
35
36
  style = props.style,
36
37
  rest = _objectWithoutProperties(props, _excluded);
37
- var _useStyles = useStyles(),
38
- styles = _useStyles.styles,
39
- cx = _useStyles.cx;
40
38
  var content = data.map(function (item, idx) {
41
39
  var _item$key;
42
40
  return /*#__PURE__*/_jsx(TrackerBlock, {
@@ -1,5 +1,5 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- emphasis: import("antd-style").SerializedStyles;
3
- label: import("antd-style").SerializedStyles;
4
- strongLabel: import("antd-style").SerializedStyles;
5
- }>;
1
+ export declare const styles: {
2
+ emphasis: string;
3
+ label: string;
4
+ strongLabel: string;
5
+ };
@@ -1,12 +1,12 @@
1
1
  var _templateObject, _templateObject2, _templateObject3;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
8
  emphasis: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
9
- label: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n color: ", ";\n "])), token.colorTextDescription),
10
- strongLabel: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), token.colorTextSecondary)
9
+ label: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n color: ", ";\n "])), cssVar.colorTextDescription),
10
+ strongLabel: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextSecondary)
11
11
  };
12
12
  });
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
3
- container: import("antd-style").SerializedStyles;
4
- }>;
2
+ export declare const styles: {
3
+ container: string;
4
+ };
5
5
  export declare const ChartTooltipFrame: import("react").NamedExoticComponent<import("@lobehub/ui").FlexBasicProps>;
6
6
  export default ChartTooltipFrame;
@@ -10,21 +10,19 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
12
  import { Flexbox } from '@lobehub/ui';
13
- import { createStyles } from 'antd-style';
13
+ import { createStaticStyles } from 'antd-style';
14
14
  import { memo } from 'react';
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
- export var useStyles = createStyles(function (_ref) {
16
+ export var styles = createStaticStyles(function (_ref) {
17
17
  var css = _ref.css,
18
- token = _ref.token;
18
+ cssVar = _ref.cssVar;
19
19
  return {
20
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n\n background: ", ";\n box-shadow: ", ";\n "])), token.colorBorderSecondary, token.borderRadiusLG, token.colorBgElevated, token.boxShadow)
20
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n\n border: 1px solid ", ";\n border-radius: ", ";\n\n background: ", ";\n box-shadow: ", ";\n "])), cssVar.colorBorderSecondary, cssVar.borderRadiusLG, cssVar.colorBgElevated, cssVar.boxShadow)
21
21
  };
22
22
  });
23
23
  export var ChartTooltipFrame = /*#__PURE__*/memo(function (_ref2) {
24
24
  var children = _ref2.children,
25
25
  rest = _objectWithoutProperties(_ref2, _excluded);
26
- var _useStyles = useStyles(),
27
- styles = _useStyles.styles;
28
26
  return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
29
27
  className: styles.container
30
28
  }, rest), {}, {
@@ -2,25 +2,23 @@ var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox, Icon } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
- import { createStyles } from 'antd-style';
5
+ import { createStaticStyles } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import { memo } from 'react';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- var useStyles = createStyles(function (_ref) {
10
+ var styles = createStaticStyles(function (_ref) {
11
11
  var css = _ref.css,
12
- token = _ref.token;
12
+ cssVar = _ref.cssVar;
13
13
  return {
14
14
  number: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: 500;\n "]))),
15
- title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextSecondary)
15
+ title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), cssVar.colorTextSecondary)
16
16
  };
17
17
  });
18
18
  var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
19
19
  var value = _ref2.value,
20
20
  name = _ref2.name,
21
21
  color = _ref2.color;
22
- var _useStyles = useStyles(),
23
- styles = _useStyles.styles;
24
22
  return /*#__PURE__*/_jsxs(Flexbox, {
25
23
  align: 'center',
26
24
  gap: 32,
@@ -2,16 +2,16 @@ var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
- import { createStyles } from 'antd-style';
5
+ import { createStaticStyles, cssVar, cx } from 'antd-style';
6
6
  import ChartTooltipFrame from "./ChartTooltipFrame";
7
7
  import ChartTooltipRow from "./ChartTooltipRow";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- var useStyles = createStyles(function (_ref) {
10
+ var styles = createStaticStyles(function (_ref) {
11
11
  var css = _ref.css,
12
- token = _ref.token;
12
+ cssVar = _ref.cssVar;
13
13
  return {
14
- header: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n font-weight: 500;\n "])), token.colorBorderSecondary)
14
+ header: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n font-weight: 500;\n "])), cssVar.colorBorderSecondary)
15
15
  };
16
16
  });
17
17
  var ChartTooltip = function ChartTooltip(_ref2) {
@@ -22,10 +22,6 @@ var ChartTooltip = function ChartTooltip(_ref2) {
22
22
  valueFormatter = _ref2.valueFormatter,
23
23
  customCategories = _ref2.customCategories,
24
24
  footer = _ref2.footer;
25
- var _useStyles = useStyles(),
26
- cx = _useStyles.cx,
27
- theme = _useStyles.theme,
28
- styles = _useStyles.styles;
29
25
  if (active && payload) {
30
26
  var filteredPayload = payload.filter(function (item) {
31
27
  return item.type !== 'none';
@@ -55,7 +51,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
55
51
  var value = _ref3.value,
56
52
  name = _ref3.name;
57
53
  return /*#__PURE__*/_jsx(ChartTooltipRow, {
58
- color: (_categoryColors$get = categoryColors.get(name)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : theme.colorPrimary,
54
+ color: (_categoryColors$get = categoryColors.get(name)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary,
59
55
  name: (customCategories === null || customCategories === void 0 ? void 0 : customCategories[name]) || name,
60
56
  value: valueFormatter(value)
61
57
  }, "id-".concat(idx));