@ant-design/agentic-ui 2.30.33 → 2.31.1

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 (55) hide show
  1. package/dist/Components/Loading/style.js +16 -5
  2. package/dist/Components/Robot/lotties/BlowingWindLottie/index.js +16 -3
  3. package/dist/Components/Robot/lotties/BouncingLottie/index.js +16 -3
  4. package/dist/Components/Robot/lotties/DazingLottie/index.js +16 -3
  5. package/dist/Components/Robot/lotties/PeekLottie/index.js +16 -3
  6. package/dist/Components/Robot/lotties/ThinkingLottie/index.js +16 -3
  7. package/dist/Components/lotties/CreativeSparkLottie/index.js +16 -3
  8. package/dist/Components/lotties/DazingLottie/index.js +16 -3
  9. package/dist/Components/lotties/LoadingLottie/index.js +16 -3
  10. package/dist/Components/lotties/ThinkingLottie/index.js +16 -3
  11. package/dist/Components/lotties/ThreeThinkingLottie/index.js +7 -55
  12. package/dist/Components/lotties/bubble-actions/Copy/index.js +12 -3
  13. package/dist/Components/lotties/bubble-actions/Dislike/index.js +12 -3
  14. package/dist/Components/lotties/bubble-actions/Like/index.js +12 -3
  15. package/dist/Components/lotties/bubble-actions/More/index.js +12 -3
  16. package/dist/Components/lotties/bubble-actions/Play/index.js +12 -3
  17. package/dist/Components/lotties/bubble-actions/Quote/index.js +12 -3
  18. package/dist/Components/lotties/bubble-actions/Refresh/index.js +12 -3
  19. package/dist/Components/lotties/bubble-actions/Share/index.js +12 -3
  20. package/dist/Components/lotties/index.d.ts +1 -0
  21. package/dist/Components/lotties/index.js +1 -0
  22. package/dist/Components/lotties/useAsyncLottieData.d.ts +9 -0
  23. package/dist/Components/lotties/useAsyncLottieData.js +83 -0
  24. package/dist/Hooks/useLanguage.d.ts +1 -0
  25. package/dist/I18n/locales.d.ts +1 -0
  26. package/dist/I18n/locales.js +2 -0
  27. package/dist/Icons/animated/VoicePlayLottie/index.js +16 -3
  28. package/dist/Icons/animated/VoicingLottie/index.js +16 -3
  29. package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +10 -10
  30. package/dist/MarkdownEditor/style.js +7 -1
  31. package/dist/MarkdownInputField/BorderBeamAnimation.d.ts +1 -1
  32. package/dist/MarkdownInputField/BorderBeamAnimation.js +6 -3
  33. package/dist/Plugins/chart/AreaChart/index.js +10 -8
  34. package/dist/Plugins/chart/BarChart/index.js +10 -8
  35. package/dist/Plugins/chart/BoxPlotChart/index.d.ts +1 -1
  36. package/dist/Plugins/chart/BoxPlotChart/index.js +11 -8
  37. package/dist/Plugins/chart/DonutChart/index.js +14 -12
  38. package/dist/Plugins/chart/FunnelChart/index.js +10 -8
  39. package/dist/Plugins/chart/HistogramChart/index.d.ts +1 -1
  40. package/dist/Plugins/chart/HistogramChart/index.js +11 -8
  41. package/dist/Plugins/chart/LineChart/index.js +10 -8
  42. package/dist/Plugins/chart/RadarChart/index.js +14 -12
  43. package/dist/Plugins/chart/ScatterChart/index.js +14 -12
  44. package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +4 -2
  45. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +2 -0
  46. package/dist/Plugins/chart/components/ChartToolBar/style.js +2 -2
  47. package/dist/Plugins/chart/hooks/useChartTheme.d.ts +1 -1
  48. package/dist/Plugins/chart/hooks/useChartTheme.js +1 -1
  49. package/dist/Plugins/chart/hooks/useDetectTheme.d.ts +7 -8
  50. package/dist/Plugins/chart/hooks/useDetectTheme.js +81 -54
  51. package/dist/ThoughtChainList/style.js +14 -3
  52. package/dist/Workspace/File/FileComponent.js +15 -9
  53. package/dist/Workspace/File/FileTree/FileTreeComponent.js +6 -1
  54. package/dist/Workspace/File/PreviewComponent.js +23 -6
  55. package/package.json +4 -4
@@ -153,6 +153,7 @@ import { Chart } from "react-chartjs-2";
153
153
  import ChartStatistic from "../ChartStatistic";
154
154
  import { ChartContainer, ChartFilter, ChartToolBar, downloadChart } from "../components";
155
155
  import { defaultColorList } from "../const";
156
+ import { useDetectTheme } from "../hooks";
156
157
  import { hexToRgba, resolveCssVariable } from "../utils";
157
158
  import { useStyle } from "./style";
158
159
  var boxPlotChartComponentsRegistered = false;
@@ -223,7 +224,7 @@ var boxPlotChartComponentsRegistered = false;
223
224
  };
224
225
  }
225
226
  var BoxPlotChart = function BoxPlotChart(_0) {
226
- var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, style = _0.style, styles = _0.styles, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_showOutliers = _0.showOutliers, showOutliers = _0_showOutliers === void 0 ? true : _0_showOutliers, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
227
+ var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, style = _0.style, styles = _0.styles, dataTime = _0.dataTime, theme = _0.theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_showOutliers = _0.showOutliers, showOutliers = _0_showOutliers === void 0 ? true : _0_showOutliers, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
227
228
  "title",
228
229
  "data",
229
230
  "width",
@@ -445,7 +446,9 @@ var BoxPlotChart = function BoxPlotChart(_0) {
445
446
  color,
446
447
  showOutliers
447
448
  ]);
448
- var isLight = theme === 'light';
449
+ var detectedTheme = useDetectTheme();
450
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
451
+ var isLight = resolvedTheme === 'light';
449
452
  var axisTextColor = isLight ? 'rgba(0, 25, 61, 0.3255)' : 'rgba(255, 255, 255, 0.8)';
450
453
  var gridColor = isLight ? 'rgba(0,0,0,0.08)' : 'rgba(255,255,255,0.2)';
451
454
  // 图表配置选项
@@ -576,7 +579,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
576
579
  if (safeData.length === 0 || labels.length === 0) {
577
580
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
578
581
  baseClassName: classNames("".concat(prefixCls, "-container"), hashId),
579
- theme: theme,
582
+ theme: resolvedTheme,
580
583
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.root, className),
581
584
  isMobile: isMobile,
582
585
  variant: props.variant,
@@ -604,7 +607,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
604
607
  }
605
608
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
606
609
  baseClassName: classNames("".concat(prefixCls, "-container"), hashId),
607
- theme: theme,
610
+ theme: resolvedTheme,
608
611
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.root, className),
609
612
  isMobile: isMobile,
610
613
  variant: props.variant,
@@ -614,7 +617,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
614
617
  }, style, styles === null || styles === void 0 ? void 0 : styles.root)
615
618
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
616
619
  title: title || '箱线图',
617
- theme: theme,
620
+ theme: resolvedTheme,
618
621
  onDownload: handleDownload,
619
622
  extra: toolbarExtra,
620
623
  dataTime: dataTime,
@@ -628,7 +631,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
628
631
  selectedCustomSelection: selectedFilterLabel,
629
632
  onSelectionChange: setSelectedFilterLabel
630
633
  }), {
631
- theme: theme,
634
+ theme: resolvedTheme,
632
635
  variant: "compact"
633
636
  })) : undefined
634
637
  }), statistics && /*#__PURE__*/ React.createElement("div", {
@@ -638,7 +641,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
638
641
  return /*#__PURE__*/ React.createElement(ChartStatistic, _object_spread_props(_object_spread({
639
642
  key: index
640
643
  }, config), {
641
- theme: theme
644
+ theme: resolvedTheme
642
645
  }));
643
646
  })), !renderFilterInToolbar && filterOptions.length > 1 && /*#__PURE__*/ React.createElement(ChartFilter, _object_spread_props(_object_spread({
644
647
  filterOptions: filterOptions,
@@ -649,7 +652,7 @@ var BoxPlotChart = function BoxPlotChart(_0) {
649
652
  selectedCustomSelection: selectedFilterLabel,
650
653
  onSelectionChange: setSelectedFilterLabel
651
654
  }), {
652
- theme: theme
655
+ theme: resolvedTheme
653
656
  })), /*#__PURE__*/ React.createElement("div", {
654
657
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.wrapper, "".concat(prefixCls, "-wrapper")),
655
658
  style: _object_spread({
@@ -154,7 +154,7 @@ import { useLocale } from "../../../I18n";
154
154
  import { ChartContainer, ChartFilter, ChartStatistic, ChartToolBar, downloadChart } from "../components";
155
155
  import { defaultColorList } from "../const";
156
156
  import { isWindowDefined } from "../env";
157
- import { useChartTheme } from "../hooks";
157
+ import { useChartTheme, useDetectTheme } from "../hooks";
158
158
  import { resolveCssVariable } from "../utils";
159
159
  import { SINGLE_MODE_DESKTOP_CUTOUT, SINGLE_MODE_MOBILE_CUTOUT } from "./constants";
160
160
  import { useAutoCategory, useFilterLabels, useMobile, useResponsiveDimensions } from "./hooks";
@@ -199,7 +199,7 @@ import { useStyle } from "./style";
199
199
  *
200
200
  * @since 1.0.0
201
201
  */ var DonutChart = function DonutChart(_0) {
202
- var data = _0.data, configs = _0.configs, _0_width = _0.width, width = _0_width === void 0 ? 200 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 200 : _0_height, className = _0.className, classNamesProp = _0.classNames, title = _0.title, _0_showToolbar = _0.showToolbar, showToolbar = _0_showToolbar === void 0 ? true : _0_showToolbar, onDownload = _0.onDownload, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, dataTime = _0.dataTime, filterList = _0.filterList, selectedFilter = _0.selectedFilter, onFilterChange = _0.onFilterChange, _0_enableAutoCategory = _0.enableAutoCategory, enableAutoCategory = _0_enableAutoCategory === void 0 ? true : _0_enableAutoCategory, _0_singleMode = _0.singleMode, singleMode = _0_singleMode === void 0 ? false : _0_singleMode, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
202
+ var data = _0.data, configs = _0.configs, _0_width = _0.width, width = _0_width === void 0 ? 200 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 200 : _0_height, className = _0.className, classNamesProp = _0.classNames, title = _0.title, _0_showToolbar = _0.showToolbar, showToolbar = _0_showToolbar === void 0 ? true : _0_showToolbar, onDownload = _0.onDownload, theme = _0.theme, dataTime = _0.dataTime, filterList = _0.filterList, selectedFilter = _0.selectedFilter, onFilterChange = _0.onFilterChange, _0_enableAutoCategory = _0.enableAutoCategory, enableAutoCategory = _0_enableAutoCategory === void 0 ? true : _0_enableAutoCategory, _0_singleMode = _0.singleMode, singleMode = _0_singleMode === void 0 ? false : _0_singleMode, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
203
203
  "data",
204
204
  "configs",
205
205
  "width",
@@ -236,7 +236,9 @@ import { useStyle } from "./style";
236
236
  var _useMobile = useMobile(), isMobile = _useMobile.isMobile, windowWidth = _useMobile.windowWidth;
237
237
  var locale = useLocale();
238
238
  // 使用 useChartTheme hook 获取主题相关颜色
239
- var isLight = useChartTheme(theme).isLight;
239
+ var detectedTheme = useDetectTheme();
240
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
241
+ var isLight = useChartTheme(resolvedTheme).isLight;
240
242
  // 默认配置:当 configs 不传时,使用默认配置,showLegend 默认为 true
241
243
  var defaultConfigs = [
242
244
  {
@@ -376,7 +378,7 @@ import { useStyle } from "./style";
376
378
  var finalSelectedFilter = selectedFilter || internalSelectedCategory;
377
379
  var finalOnFilterChange = onFilterChange || handleInternalCategoryChange;
378
380
  // 使用组件级别的 theme prop,而不是从 configs 中获取
379
- var chartFilterTheme = theme;
381
+ var chartFilterTheme = resolvedTheme;
380
382
  var dimensions = useResponsiveDimensions(isMobile, windowWidth, width, height);
381
383
  var renderConfigs = singleMode && !configs ? Array.from({
382
384
  length: filteredData.length
@@ -394,13 +396,13 @@ import { useStyle } from "./style";
394
396
  baseClassName: baseClassName,
395
397
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.root, className),
396
398
  variant: props.variant,
397
- theme: theme,
399
+ theme: resolvedTheme,
398
400
  isMobile: isMobile,
399
401
  style: _object_spread(_define_property({}, '--donut-item-min-width', "".concat(dimensions.width, "px")), props.style, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root)
400
402
  }, showToolbar && /*#__PURE__*/ React.createElement(ChartContainer, {
401
403
  baseClassName: "".concat(baseClassName, "-toolbar-wrapper"),
402
404
  variant: "borderless",
403
- theme: theme,
405
+ theme: resolvedTheme,
404
406
  isMobile: isMobile
405
407
  }, title && /*#__PURE__*/ React.createElement(ChartToolBar, {
406
408
  title: title,
@@ -455,7 +457,7 @@ import { useStyle } from "./style";
455
457
  }))), /*#__PURE__*/ React.createElement(ChartContainer, {
456
458
  baseClassName: "".concat(baseClassName, "-content"),
457
459
  variant: "borderless",
458
- theme: theme,
460
+ theme: resolvedTheme,
459
461
  isMobile: isMobile
460
462
  }, renderConfigs.map(function(cfg, idx) {
461
463
  var _ref;
@@ -699,12 +701,12 @@ import { useStyle } from "./style";
699
701
  key: idx,
700
702
  baseClassName: "".concat(baseClassName, "-chart-wrapper"),
701
703
  variant: "borderless",
702
- theme: theme,
704
+ theme: resolvedTheme,
703
705
  isMobile: isMobile
704
706
  }, isSingleValueMode ? /*#__PURE__*/ React.createElement(ChartContainer, {
705
707
  baseClassName: "".concat(baseClassName, "-single"),
706
708
  variant: "borderless",
707
- theme: theme,
709
+ theme: resolvedTheme,
708
710
  isMobile: isMobile,
709
711
  style: _object_spread((_obj = {}, _define_property(_obj, '--donut-chart-height', "".concat(dimensions.height, "px")), _define_property(_obj, '--donut-chart-width', "".concat(dimensions.width, "px")), _define_property(_obj, "width", dimensions.width), _define_property(_obj, "height", dimensions.height), _define_property(_obj, "marginTop", '20px'), _obj), isMobile ? {
710
712
  margin: '0 auto'
@@ -723,7 +725,7 @@ import { useStyle } from "./style";
723
725
  })) : /*#__PURE__*/ React.createElement(ChartContainer, {
724
726
  baseClassName: "".concat(baseClassName, "-row"),
725
727
  variant: "borderless",
726
- theme: theme,
728
+ theme: resolvedTheme,
727
729
  isMobile: isMobile,
728
730
  style: _object_spread({}, isMobile ? {
729
731
  flexDirection: 'column',
@@ -732,7 +734,7 @@ import { useStyle } from "./style";
732
734
  }, /*#__PURE__*/ React.createElement(ChartContainer, {
733
735
  baseClassName: "".concat(baseClassName, "-chart"),
734
736
  variant: "borderless",
735
- theme: theme,
737
+ theme: resolvedTheme,
736
738
  isMobile: isMobile,
737
739
  style: (_obj1 = {}, _define_property(_obj1, '--donut-chart-width', "".concat(dimensions.chartWidth, "px")), _define_property(_obj1, '--donut-chart-height', "".concat(dimensions.chartHeight, "px")), _define_property(_obj1, "width", dimensions.chartWidth), _define_property(_obj1, "height", dimensions.chartHeight), _define_property(_obj1, "marginTop", '20px'), _obj1)
738
740
  }, /*#__PURE__*/ React.createElement(Doughnut, {
@@ -759,7 +761,7 @@ import { useStyle } from "./style";
759
761
  baseClassName: baseClassName,
760
762
  hashId: hashId,
761
763
  isMobile: isMobile,
762
- theme: theme
764
+ theme: resolvedTheme
763
765
  })));
764
766
  })));
765
767
  };
@@ -152,12 +152,12 @@ import { Bar } from "react-chartjs-2";
152
152
  import ChartStatistic from "../ChartStatistic";
153
153
  import { ChartContainer, ChartFilter, ChartToolBar, downloadChart } from "../components";
154
154
  import { defaultColorList } from "../const";
155
- import { useChartTheme } from "../hooks";
155
+ import { useChartTheme, useDetectTheme } from "../hooks";
156
156
  import { findDataPointByXValue, isXValueEqual, resolveCssVariable, toNumber } from "../utils";
157
157
  import { useStyle } from "./style";
158
158
  var funnelChartComponentsRegistered = false;
159
159
  var FunnelChart = function FunnelChart(_0) {
160
- var title = _0.title, data = _0.data, color = _0.color, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showPercent = _0.showPercent, showPercent = _0_showPercent === void 0 ? true : _0_showPercent, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, _0_bottomLayerMinWidth = _0.bottomLayerMinWidth, bottomLayerMinWidth = _0_bottomLayerMinWidth === void 0 ? 0 : _0_bottomLayerMinWidth, typeNames = _0.typeNames, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
160
+ var title = _0.title, data = _0.data, color = _0.color, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, theme = _0.theme, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showPercent = _0.showPercent, showPercent = _0_showPercent === void 0 ? true : _0_showPercent, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, _0_bottomLayerMinWidth = _0.bottomLayerMinWidth, bottomLayerMinWidth = _0_bottomLayerMinWidth === void 0 ? 0 : _0_bottomLayerMinWidth, typeNames = _0.typeNames, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
161
161
  "title",
162
162
  "data",
163
163
  "color",
@@ -510,7 +510,9 @@ var FunnelChart = function FunnelChart(_0) {
510
510
  filterLabels
511
511
  ]);
512
512
  // 使用 useChartTheme hook 获取主题相关颜色
513
- var _useChartTheme = useChartTheme(theme), axisTextColor = _useChartTheme.axisTextColor, isLight = _useChartTheme.isLight;
513
+ var detectedTheme = useDetectTheme();
514
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
515
+ var _useChartTheme = useChartTheme(resolvedTheme), axisTextColor = _useChartTheme.axisTextColor, isLight = _useChartTheme.isLight;
514
516
  var options = {
515
517
  responsive: true,
516
518
  maintainAspectRatio: false,
@@ -835,13 +837,13 @@ var FunnelChart = function FunnelChart(_0) {
835
837
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
836
838
  baseClassName: baseClassName,
837
839
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.root, className, containerClassName),
838
- theme: theme,
840
+ theme: resolvedTheme,
839
841
  isMobile: isMobile,
840
842
  variant: props.variant,
841
843
  style: _object_spread({}, containerStyle, props.style, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root)
842
844
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
843
845
  title: title,
844
- theme: theme,
846
+ theme: resolvedTheme,
845
847
  onDownload: handleDownload,
846
848
  dataTime: dataTime,
847
849
  extra: toolbarExtra,
@@ -857,7 +859,7 @@ var FunnelChart = function FunnelChart(_0) {
857
859
  selectedCustomSelection: selectedFilterLabel,
858
860
  onSelectionChange: setSelectedFilterLabel
859
861
  }), {
860
- theme: theme,
862
+ theme: resolvedTheme,
861
863
  variant: "compact"
862
864
  })) : undefined
863
865
  }), !renderFilterInToolbar && filterOptions && filterOptions.length > 1 && /*#__PURE__*/ React.createElement(ChartFilter, _object_spread_props(_object_spread({
@@ -869,7 +871,7 @@ var FunnelChart = function FunnelChart(_0) {
869
871
  selectedCustomSelection: selectedFilterLabel,
870
872
  onSelectionChange: setSelectedFilterLabel
871
873
  }), {
872
- theme: theme
874
+ theme: resolvedTheme
873
875
  })), statistics && /*#__PURE__*/ React.createElement("div", {
874
876
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.statisticContainer, "".concat(baseClassName, "-statistic-container")),
875
877
  style: (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.statisticContainer
@@ -877,7 +879,7 @@ var FunnelChart = function FunnelChart(_0) {
877
879
  return /*#__PURE__*/ React.createElement(ChartStatistic, _object_spread_props(_object_spread({
878
880
  key: index
879
881
  }, config), {
880
- theme: theme
882
+ theme: resolvedTheme
881
883
  }));
882
884
  })), /*#__PURE__*/ React.createElement("div", {
883
885
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.wrapper, "".concat(baseClassName, "-wrapper")),
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ChartContainerProps } from '../components';
3
- import { StatisticConfigType } from '../hooks/useChartStatistic';
3
+ import { StatisticConfigType } from '../hooks';
4
4
  import type { ChartClassNames, ChartStyles } from '../types/classNames';
5
5
  /**
6
6
  * 直方图数据项接口
@@ -152,6 +152,7 @@ import { Bar } from "react-chartjs-2";
152
152
  import ChartStatistic from "../ChartStatistic";
153
153
  import { ChartContainer, ChartFilter, ChartToolBar, downloadChart } from "../components";
154
154
  import { defaultColorList } from "../const";
155
+ import { useDetectTheme } from "../hooks";
155
156
  import { hexToRgba, resolveCssVariable } from "../utils";
156
157
  import { useStyle } from "./style";
157
158
  var histogramChartComponentsRegistered = false;
@@ -216,7 +217,7 @@ var histogramChartComponentsRegistered = false;
216
217
  return "".concat(formatNum(start), " - ").concat(formatNum(end));
217
218
  }
218
219
  var HistogramChart = function HistogramChart(_0) {
219
- var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, style = _0.style, styles = _0.styles, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_stacked = _0.stacked, stacked = _0_stacked === void 0 ? true : _0_stacked, customBinCount = _0.binCount, _0_showFrequency = _0.showFrequency, showFrequency = _0_showFrequency === void 0 ? false : _0_showFrequency, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
220
+ var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, style = _0.style, styles = _0.styles, dataTime = _0.dataTime, theme = _0.theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_stacked = _0.stacked, stacked = _0_stacked === void 0 ? true : _0_stacked, customBinCount = _0.binCount, _0_showFrequency = _0.showFrequency, showFrequency = _0_showFrequency === void 0 ? false : _0_showFrequency, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
220
221
  "title",
221
222
  "data",
222
223
  "width",
@@ -523,7 +524,9 @@ var HistogramChart = function HistogramChart(_0) {
523
524
  color,
524
525
  stacked
525
526
  ]);
526
- var isLight = theme === 'light';
527
+ var detectedTheme = useDetectTheme();
528
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
529
+ var isLight = resolvedTheme === 'light';
527
530
  var axisTextColor = isLight ? 'rgba(0, 25, 61, 0.3255)' : 'rgba(255, 255, 255, 0.8)';
528
531
  var gridColor = isLight ? 'rgba(0,0,0,0.08)' : 'rgba(255,255,255,0.2)';
529
532
  // 图表配置选项
@@ -644,7 +647,7 @@ var HistogramChart = function HistogramChart(_0) {
644
647
  if (safeData.length === 0 || filteredData.length === 0) {
645
648
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
646
649
  baseClassName: classNames("".concat(prefixCls, "-container"), hashId),
647
- theme: theme,
650
+ theme: resolvedTheme,
648
651
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.root, className),
649
652
  isMobile: isMobile,
650
653
  variant: props.variant,
@@ -672,7 +675,7 @@ var HistogramChart = function HistogramChart(_0) {
672
675
  }
673
676
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
674
677
  baseClassName: classNames("".concat(prefixCls, "-container"), hashId),
675
- theme: theme,
678
+ theme: resolvedTheme,
676
679
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.root, className),
677
680
  isMobile: isMobile,
678
681
  variant: props.variant,
@@ -682,7 +685,7 @@ var HistogramChart = function HistogramChart(_0) {
682
685
  }, style, styles === null || styles === void 0 ? void 0 : styles.root)
683
686
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
684
687
  title: title || '直方图',
685
- theme: theme,
688
+ theme: resolvedTheme,
686
689
  onDownload: handleDownload,
687
690
  extra: toolbarExtra,
688
691
  dataTime: dataTime,
@@ -696,7 +699,7 @@ var HistogramChart = function HistogramChart(_0) {
696
699
  selectedCustomSelection: selectedFilterLabel,
697
700
  onSelectionChange: setSelectedFilterLabel
698
701
  }), {
699
- theme: theme,
702
+ theme: resolvedTheme,
700
703
  variant: "compact"
701
704
  })) : undefined
702
705
  }), statistics && /*#__PURE__*/ React.createElement("div", {
@@ -706,7 +709,7 @@ var HistogramChart = function HistogramChart(_0) {
706
709
  return /*#__PURE__*/ React.createElement(ChartStatistic, _object_spread_props(_object_spread({
707
710
  key: index
708
711
  }, config), {
709
- theme: theme
712
+ theme: resolvedTheme
710
713
  }));
711
714
  })), !renderFilterInToolbar && filterOptions.length > 1 && /*#__PURE__*/ React.createElement(ChartFilter, _object_spread_props(_object_spread({
712
715
  filterOptions: filterOptions,
@@ -717,7 +720,7 @@ var HistogramChart = function HistogramChart(_0) {
717
720
  selectedCustomSelection: selectedFilterLabel,
718
721
  onSelectionChange: setSelectedFilterLabel
719
722
  }), {
720
- theme: theme
723
+ theme: resolvedTheme
721
724
  })), /*#__PURE__*/ React.createElement("div", {
722
725
  className: classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.wrapper, "".concat(prefixCls, "-wrapper")),
723
726
  style: _object_spread({
@@ -117,11 +117,11 @@ import React, { useContext, useLayoutEffect, useMemo, useRef } from "react";
117
117
  import { Line } from "react-chartjs-2";
118
118
  import { ChartContainer, ChartFilter, ChartStatistic, ChartToolBar, downloadChart } from "../components";
119
119
  import { defaultColorList } from "../const";
120
- import { useChartDataFilter, useChartStatistics, useChartTheme, useResponsiveSize } from "../hooks";
120
+ import { useChartDataFilter, useChartStatistics, useChartTheme, useDetectTheme, useResponsiveSize } from "../hooks";
121
121
  import { extractAndSortXValues, findDataPointByXValue, hexToRgba, registerLineChartComponents, resolveCssVariable } from "../utils";
122
122
  import { useStyle } from "./style";
123
123
  var LineChart = function LineChart(_0) {
124
- var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, _0_xPosition = _0.xPosition, xPosition = _0_xPosition === void 0 ? 'bottom' : _0_xPosition, _0_yPosition = _0.yPosition, yPosition = _0_yPosition === void 0 ? 'left' : _0_yPosition, _0_hiddenX = _0.hiddenX, hiddenX = _0_hiddenX === void 0 ? false : _0_hiddenX, _0_hiddenY = _0.hiddenY, hiddenY = _0_hiddenY === void 0 ? false : _0_hiddenY, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
124
+ var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, theme = _0.theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, _0_xPosition = _0.xPosition, xPosition = _0_xPosition === void 0 ? 'bottom' : _0_xPosition, _0_yPosition = _0.yPosition, yPosition = _0_yPosition === void 0 ? 'left' : _0_yPosition, _0_hiddenX = _0.hiddenX, hiddenX = _0_hiddenX === void 0 ? false : _0_hiddenX, _0_hiddenY = _0.hiddenY, hiddenY = _0_hiddenY === void 0 ? false : _0_hiddenY, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
125
125
  "title",
126
126
  "data",
127
127
  "width",
@@ -161,7 +161,9 @@ var LineChart = function LineChart(_0) {
161
161
  // 数据筛选
162
162
  var _useChartDataFilter = useChartDataFilter(data), filteredData = _useChartDataFilter.filteredData, filterOptions = _useChartDataFilter.filterOptions, filterLabels = _useChartDataFilter.filterLabels, selectedFilter = _useChartDataFilter.selectedFilter, setSelectedFilter = _useChartDataFilter.setSelectedFilter, selectedFilterLabel = _useChartDataFilter.selectedFilterLabel, setSelectedFilterLabel = _useChartDataFilter.setSelectedFilterLabel, filteredDataByFilterLabel = _useChartDataFilter.filteredDataByFilterLabel;
163
163
  // 主题颜色
164
- var _useChartTheme = useChartTheme(theme), axisTextColor = _useChartTheme.axisTextColor, gridColor = _useChartTheme.gridColor, isLight = _useChartTheme.isLight;
164
+ var detectedTheme = useDetectTheme();
165
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
166
+ var _useChartTheme = useChartTheme(resolvedTheme), axisTextColor = _useChartTheme.axisTextColor, gridColor = _useChartTheme.gridColor, isLight = _useChartTheme.isLight;
165
167
  // 从数据中提取唯一的类型
166
168
  var types = useMemo(function() {
167
169
  return _to_consumable_array(new Set(filteredData.map(function(item) {
@@ -368,13 +370,13 @@ var LineChart = function LineChart(_0) {
368
370
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
369
371
  baseClassName: baseClassName,
370
372
  className: rootClassName,
371
- theme: theme,
373
+ theme: resolvedTheme,
372
374
  isMobile: isMobile,
373
375
  variant: props.variant,
374
376
  style: rootStyle
375
377
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
376
378
  title: title,
377
- theme: theme,
379
+ theme: resolvedTheme,
378
380
  className: toolbarClassName,
379
381
  style: toolbarStyle,
380
382
  onDownload: handleDownload,
@@ -390,7 +392,7 @@ var LineChart = function LineChart(_0) {
390
392
  selectedCustomSelection: selectedFilterLabel,
391
393
  onSelectionChange: setSelectedFilterLabel
392
394
  }), {
393
- theme: theme,
395
+ theme: resolvedTheme,
394
396
  variant: "compact"
395
397
  })) : undefined
396
398
  }), statistics && /*#__PURE__*/ React.createElement("div", {
@@ -399,7 +401,7 @@ var LineChart = function LineChart(_0) {
399
401
  return /*#__PURE__*/ React.createElement(ChartStatistic, _object_spread_props(_object_spread({
400
402
  key: index
401
403
  }, config), {
402
- theme: theme
404
+ theme: resolvedTheme
403
405
  }));
404
406
  })), !renderFilterInToolbar && filterOptions && filterOptions.length > 1 && /*#__PURE__*/ React.createElement(ChartFilter, _object_spread_props(_object_spread({
405
407
  filterOptions: filterOptions,
@@ -410,7 +412,7 @@ var LineChart = function LineChart(_0) {
410
412
  selectedCustomSelection: selectedFilterLabel,
411
413
  onSelectionChange: setSelectedFilterLabel
412
414
  }), {
413
- theme: theme
415
+ theme: resolvedTheme
414
416
  })), /*#__PURE__*/ React.createElement("div", {
415
417
  className: "".concat(baseClassName, "-wrapper"),
416
418
  style: {
@@ -144,12 +144,12 @@ import { Radar } from "react-chartjs-2";
144
144
  import ChartStatistic from "../ChartStatistic";
145
145
  import { ChartContainer, ChartFilter, ChartToolBar, downloadChart } from "../components";
146
146
  import { defaultColorList } from "../const";
147
- import { useChartTheme } from "../hooks";
147
+ import { useChartTheme, useDetectTheme } from "../hooks";
148
148
  import { hexToRgba, resolveCssVariable } from "../utils";
149
149
  import { useStyle } from "./style";
150
150
  var radarChartComponentsRegistered = false;
151
151
  var RadarChart = function RadarChart(_0) {
152
- var data = _0.data, title = _0.title, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
152
+ var data = _0.data, title = _0.title, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, theme = _0.theme, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
153
153
  "data",
154
154
  "title",
155
155
  "width",
@@ -180,7 +180,9 @@ var RadarChart = function RadarChart(_0) {
180
180
  var prefixCls = getPrefixCls('radar-chart');
181
181
  var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
182
182
  // 主题颜色 - 必须在所有条件返回之前调用
183
- var _useChartTheme = useChartTheme(theme), axisTextColor = _useChartTheme.axisTextColor, gridColor = _useChartTheme.gridColor, isLight = _useChartTheme.isLight;
183
+ var detectedTheme = useDetectTheme();
184
+ var resolvedTheme = theme !== null && theme !== void 0 ? theme : detectedTheme;
185
+ var _useChartTheme = useChartTheme(resolvedTheme), axisTextColor = _useChartTheme.axisTextColor, gridColor = _useChartTheme.gridColor, isLight = _useChartTheme.isLight;
184
186
  // 处理 ChartStatistic 组件配置
185
187
  var statistics = useMemo(function() {
186
188
  if (!statisticConfig) return null;
@@ -273,7 +275,7 @@ var RadarChart = function RadarChart(_0) {
273
275
  var _props_styles;
274
276
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
275
277
  baseClassName: classNames("".concat(prefixCls, "-container")),
276
- theme: theme,
278
+ theme: resolvedTheme,
277
279
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.root, hashId, className),
278
280
  isMobile: isMobile,
279
281
  variant: props.variant,
@@ -283,7 +285,7 @@ var RadarChart = function RadarChart(_0) {
283
285
  }, props.style, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root)
284
286
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
285
287
  title: title || '雷达图',
286
- theme: theme,
288
+ theme: resolvedTheme,
287
289
  onDownload: function onDownload() {},
288
290
  extra: toolbarExtra,
289
291
  dataTime: dataTime,
@@ -559,7 +561,7 @@ var RadarChart = function RadarChart(_0) {
559
561
  var _props_styles1;
560
562
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
561
563
  baseClassName: classNames("".concat(prefixCls, "-container")),
562
- theme: theme,
564
+ theme: resolvedTheme,
563
565
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.root, hashId, className),
564
566
  isMobile: isMobile,
565
567
  variant: props.variant,
@@ -569,7 +571,7 @@ var RadarChart = function RadarChart(_0) {
569
571
  }, props.style, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.root)
570
572
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
571
573
  title: title || '雷达图',
572
- theme: theme,
574
+ theme: resolvedTheme,
573
575
  onDownload: handleDownload,
574
576
  extra: toolbarExtra,
575
577
  dataTime: dataTime,
@@ -583,7 +585,7 @@ var RadarChart = function RadarChart(_0) {
583
585
  selectedCustomSelection: selectedFilterLabel,
584
586
  onSelectionChange: setSelectedFilterLabel
585
587
  }), {
586
- theme: theme,
588
+ theme: resolvedTheme,
587
589
  variant: "compact"
588
590
  })) : undefined
589
591
  }), !renderFilterInToolbar && filterEnum.length > 0 && /*#__PURE__*/ React.createElement(ChartFilter, _object_spread_props(_object_spread({
@@ -595,14 +597,14 @@ var RadarChart = function RadarChart(_0) {
595
597
  selectedCustomSelection: selectedFilterLabel,
596
598
  onSelectionChange: setSelectedFilterLabel
597
599
  }), {
598
- theme: theme
600
+ theme: resolvedTheme
599
601
  })), statistics && /*#__PURE__*/ React.createElement("div", {
600
602
  className: classNames("".concat(prefixCls, "-statistic-container"), hashId)
601
603
  }, statistics.map(function(config, index) {
602
604
  return /*#__PURE__*/ React.createElement(ChartStatistic, _object_spread_props(_object_spread({
603
605
  key: index
604
606
  }, config), {
605
- theme: theme
607
+ theme: resolvedTheme
606
608
  }));
607
609
  })), /*#__PURE__*/ React.createElement("div", {
608
610
  className: classNames("".concat(prefixCls, "-chart-wrapper"), hashId)
@@ -616,7 +618,7 @@ var RadarChart = function RadarChart(_0) {
616
618
  console.error('RadarChart 渲染错误:', error);
617
619
  return wrapSSR(/*#__PURE__*/ React.createElement(ChartContainer, {
618
620
  baseClassName: classNames("".concat(prefixCls, "-container")),
619
- theme: theme,
621
+ theme: resolvedTheme,
620
622
  className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.root, hashId, className),
621
623
  isMobile: isMobile,
622
624
  variant: props.variant,
@@ -626,7 +628,7 @@ var RadarChart = function RadarChart(_0) {
626
628
  }, props.style, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.root)
627
629
  }, /*#__PURE__*/ React.createElement(ChartToolBar, {
628
630
  title: title || '雷达图',
629
- theme: theme,
631
+ theme: resolvedTheme,
630
632
  onDownload: function onDownload() {},
631
633
  extra: toolbarExtra,
632
634
  dataTime: dataTime,