@lobehub/charts 3.0.0 → 3.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 (38) hide show
  1. package/es/AccuracyBarChart/index.js +1 -1
  2. package/es/AreaChart/index.js +1 -1
  3. package/es/BarChart/index.js +1 -1
  4. package/es/BarList/index.js +2 -2
  5. package/es/DataBars/CategoryBar.d.ts +1 -1
  6. package/es/DataBars/CategoryBar.js +1 -2
  7. package/es/DataBars/DeltaBar.d.ts +1 -1
  8. package/es/DataBars/DeltaBar.js +1 -2
  9. package/es/DataBars/MarkerBar.d.ts +1 -1
  10. package/es/DataBars/MarkerBar.js +1 -2
  11. package/es/DataBars/ProgressBar.d.ts +1 -1
  12. package/es/DataBars/ProgressBar.js +1 -2
  13. package/es/DonutChart/DonutChartTooltip.js +1 -1
  14. package/es/DonutChart/index.js +1 -1
  15. package/es/FunnelChart/index.js +1 -1
  16. package/es/Heatmaps/index.d.ts +1 -1
  17. package/es/Heatmaps/index.js +1 -1
  18. package/es/Legend/LegendItem.js +1 -2
  19. package/es/Legend/index.d.ts +1 -1
  20. package/es/Legend/index.js +1 -1
  21. package/es/LineChart/index.js +1 -1
  22. package/es/ScatterChart/ScatterChartTooltip.js +1 -2
  23. package/es/ScatterChart/ScatterChartTooltipRow.js +1 -1
  24. package/es/ScatterChart/index.js +1 -1
  25. package/es/SparkChart/SparkAreaChart.js +1 -1
  26. package/es/SparkChart/SparkBarChart.js +1 -1
  27. package/es/SparkChart/SparkLineChart.js +1 -1
  28. package/es/Tracker/TrackerBlock.d.ts +1 -1
  29. package/es/Tracker/TrackerBlock.js +1 -2
  30. package/es/Tracker/index.d.ts +1 -1
  31. package/es/Tracker/index.js +1 -1
  32. package/es/common/ChartLegend.js +1 -1
  33. package/es/common/ChartTooltip/ChartTooltipFrame.d.ts +1 -2
  34. package/es/common/ChartTooltip/ChartTooltipFrame.js +1 -1
  35. package/es/common/ChartTooltip/ChartTooltipRow.js +1 -2
  36. package/es/common/ChartTooltip/index.js +1 -1
  37. package/es/common/NoData.js +1 -1
  38. package/package.json +5 -4
@@ -17,11 +17,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
20
21
  import { Skeleton } from 'antd';
21
22
  import { css } from 'antd-style';
22
23
  import { readableColor } from 'polished';
23
24
  import { forwardRef, useMemo, useState } from 'react';
24
- import { Flexbox } from 'react-layout-kit';
25
25
  import { Bar, CartesianGrid, ErrorBar, Label, LabelList, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
26
26
  import ChartLegend from "../common/ChartLegend";
27
27
  import ChartTooltip from "../common/ChartTooltip";
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
20
21
  import { Skeleton } from 'antd';
21
22
  import { css } from 'antd-style';
22
23
  import { Fragment, forwardRef, useMemo, useState } from 'react';
23
- import { Flexbox } from 'react-layout-kit';
24
24
  import { Area, CartesianGrid, Dot, Label, Legend, Line, AreaChart as ReChartsAreaChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
25
25
  import ChartLegend from "../common/ChartLegend";
26
26
  import ChartTooltip from "../common/ChartTooltip";
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
20
21
  import { Skeleton } from 'antd';
21
22
  import { css } from 'antd-style';
22
23
  import { forwardRef, useMemo, useState } from 'react';
23
- import { Flexbox } from 'react-layout-kit';
24
24
  import { Bar, CartesianGrid, Label, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
25
25
  import ChartLegend from "../common/ChartLegend";
26
26
  import ChartTooltip from "../common/ChartTooltip";
@@ -15,10 +15,10 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
15
15
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
16
  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; }
17
17
  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; }
18
- import A from '@lobehub/ui/es/A';
18
+ import { Flexbox } from '@lobehub/ui';
19
+ import { A } from '@lobehub/ui/es/A/index.mjs';
19
20
  import { Skeleton } from 'antd';
20
21
  import React, { forwardRef, useMemo } from 'react';
21
- import { Flexbox } from 'react-layout-kit';
22
22
  import NoData from "../common/NoData";
23
23
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
24
24
  import { defaultValueFormatter } from "../utils";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FlexboxProps } from 'react-layout-kit';
2
+ import { FlexboxProps } from '@lobehub/ui';
3
3
  import { ValueFormatter } from "../types/charts";
4
4
  export interface CategoryBarProps extends FlexboxProps {
5
5
  colors?: string[];
@@ -16,9 +16,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
17
17
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
18
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
- import { Tooltip } from '@lobehub/ui';
19
+ import { Flexbox, Tooltip } from '@lobehub/ui';
20
20
  import { forwardRef, memo, useMemo } from 'react';
21
- import { Flexbox } from 'react-layout-kit';
22
21
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
23
22
  import { defaultValueFormatter, sumNumericArray } from "../utils";
24
23
  import { useStyles } from "./styles";
@@ -1,5 +1,5 @@
1
+ import { FlexboxProps } from '@lobehub/ui';
1
2
  import { ReactNode } from 'react';
2
- import { FlexboxProps } from 'react-layout-kit';
3
3
  export interface DeltaBarProps extends FlexboxProps {
4
4
  bgColors?: string;
5
5
  color?: string;
@@ -9,9 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
- import { Tooltip } from '@lobehub/ui';
12
+ import { Flexbox, Tooltip } from '@lobehub/ui';
13
13
  import { forwardRef } from 'react';
14
- import { Flexbox } from 'react-layout-kit';
15
14
  import { DeltaTypes } from "../types/charts";
16
15
  import { mapInputsToDeltaType } from "../utils";
17
16
  import { useStyles } from "./styles";
@@ -1,5 +1,5 @@
1
+ import { FlexboxProps } from '@lobehub/ui';
1
2
  import { ReactNode } from 'react';
2
- import { FlexboxProps } from 'react-layout-kit';
3
3
  export interface MarkerBarProps extends FlexboxProps {
4
4
  bgColors?: string;
5
5
  color?: string;
@@ -9,9 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
- import { Tooltip } from '@lobehub/ui';
12
+ import { Flexbox, Tooltip } from '@lobehub/ui';
13
13
  import { forwardRef } from 'react';
14
- import { Flexbox } from 'react-layout-kit';
15
14
  import { useStyles } from "./styles";
16
15
  import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
+ import { FlexboxProps } from '@lobehub/ui';
1
2
  import { ReactNode } from 'react';
2
- import { FlexboxProps } from 'react-layout-kit';
3
3
  export interface ProgressBarProps extends FlexboxProps {
4
4
  bgColors?: string;
5
5
  color?: string;
@@ -9,9 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
- import { Tooltip } from '@lobehub/ui';
12
+ import { Flexbox, Tooltip } from '@lobehub/ui';
13
13
  import { forwardRef } from 'react';
14
- import { Flexbox } from 'react-layout-kit';
15
14
  import { useStyles } from "./styles";
16
15
  import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
+ import { Flexbox } from '@lobehub/ui';
1
2
  import React from 'react';
2
- import { Flexbox } from 'react-layout-kit';
3
3
  import ChartTooltipFrame from "../common/ChartTooltip/ChartTooltipFrame";
4
4
  import ChartTooltipRow from "../common/ChartTooltip/ChartTooltipRow";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -18,10 +18,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
18
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
19
  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; }
20
20
  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; }
21
+ import { Flexbox } from '@lobehub/ui';
21
22
  import { Skeleton } from 'antd';
22
23
  import { css, useThemeMode } from 'antd-style';
23
24
  import { forwardRef, useEffect, useState } from 'react';
24
- import { Flexbox } from 'react-layout-kit';
25
25
  import { Pie, PieChart as ReChartsDonutChart, ResponsiveContainer, Tooltip } from 'recharts';
26
26
  import NoData from "../common/NoData";
27
27
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
@@ -22,11 +22,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
22
22
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
23
23
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
24
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
25
+ import { Flexbox } from '@lobehub/ui';
25
26
  import { useSize } from 'ahooks';
26
27
  import { Skeleton } from 'antd';
27
28
  import { css } from 'antd-style';
28
29
  import { Fragment, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
29
- import { Flexbox } from 'react-layout-kit';
30
30
  import ArrowRightIcon from "./ArrowRightIcon";
31
31
  import ChartTooltip from "../common/ChartTooltip";
32
32
  import NoData from "../common/NoData";
@@ -1,6 +1,6 @@
1
+ import { FlexboxProps } from '@lobehub/ui';
1
2
  import type { Day as WeekDay } from 'date-fns';
2
3
  import { ReactNode } from 'react';
3
- import { FlexboxProps } from 'react-layout-kit';
4
4
  import { NoDataProps } from "../common/NoData";
5
5
  import type { Activity, Labels } from "../types/charts";
6
6
  export interface HeatmapsProps extends FlexboxProps {
@@ -9,10 +9,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
+ import { Flexbox } from '@lobehub/ui';
12
13
  import { useThemeMode } from 'antd-style';
13
14
  import { getYear, parseISO } from 'date-fns';
14
15
  import { forwardRef, useMemo } from 'react';
15
- import { Flexbox } from 'react-layout-kit';
16
16
  import NoData from "../common/NoData";
17
17
  import { usePrefersReducedMotion } from "../hooks/usePrefersReducedMotion";
18
18
  import { isOnSeverSide } from "../utils";
@@ -1,11 +1,10 @@
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 { Icon } from '@lobehub/ui';
3
+ import { Flexbox, Icon } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
5
  import { createStyles } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import { memo } from 'react';
8
- import { Flexbox } from 'react-layout-kit';
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  var useStyles = createStyles(function (_ref) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FlexboxProps } from 'react-layout-kit';
2
+ import { FlexboxProps } from '@lobehub/ui';
3
3
  export interface LegendProps extends FlexboxProps {
4
4
  activeLegend?: string;
5
5
  categories: string[];
@@ -15,10 +15,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
18
19
  import { createStyles } from 'antd-style';
19
20
  import { ChevronLeft, ChevronRight } from 'lucide-react';
20
21
  import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
21
- import { Flexbox } from 'react-layout-kit';
22
22
  import { useThemeColorRange } from "../hooks/useThemeColorRange";
23
23
  import LegendItem from "./LegendItem";
24
24
  import ScrollButton from "./ScrollButton";
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
20
21
  import { Skeleton } from 'antd';
21
22
  import { css } from 'antd-style';
22
23
  import { Fragment, forwardRef, useMemo, useState } from 'react';
23
- import { Flexbox } from 'react-layout-kit';
24
24
  import { CartesianGrid, Dot, Label, Legend, Line, LineChart as ReChartsLineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
25
25
  import ChartLegend from "../common/ChartLegend";
26
26
  import ChartTooltip from "../common/ChartTooltip";
@@ -1,11 +1,10 @@
1
1
  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
- import { Icon } from '@lobehub/ui';
3
+ import { Flexbox, Icon } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
5
  import { createStyles } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import React, { memo } from 'react';
8
- import { Flexbox } from 'react-layout-kit';
9
8
  import { ChartTooltipFrame } from "../common/ChartTooltip/ChartTooltipFrame";
10
9
  import { defaultValueFormatter } from "../utils";
11
10
  import ScatterChartTooltipRow from "./ScatterChartTooltipRow";
@@ -1,9 +1,9 @@
1
1
  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
+ import { Flexbox } from '@lobehub/ui';
3
4
  import { Typography } from 'antd';
4
5
  import { createStyles } from 'antd-style';
5
6
  import React, { memo } from 'react';
6
- import { Flexbox } from 'react-layout-kit';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  var useStyles = createStyles(function (_ref) {
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
20
21
  import { Skeleton } from 'antd';
21
22
  import { css } from 'antd-style';
22
23
  import { forwardRef, useMemo, useState } from 'react';
23
- import { Flexbox } from 'react-layout-kit';
24
24
  import { CartesianGrid, Label, Legend, ScatterChart as ReChartsScatterChart, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';
25
25
  import { renderShape } from "./renderShape";
26
26
  import ChartLegend from "../common/ChartLegend";
@@ -11,10 +11,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
14
15
  import { Skeleton } from 'antd';
15
16
  import { css } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
- import { Flexbox } from 'react-layout-kit';
18
18
  import { Area, AreaChart as ReChartsAreaChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
19
  import { useStyles } from "../AreaChart/styles";
20
20
  import NoData from "../common/NoData";
@@ -11,10 +11,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
14
15
  import { Skeleton } from 'antd';
15
16
  import { css } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
- import { Flexbox } from 'react-layout-kit';
18
18
  import { Bar, BarChart as ReChartsBarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
19
  import { useStyles } from "../BarChart/styles";
20
20
  import NoData from "../common/NoData";
@@ -11,10 +11,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
14
15
  import { Skeleton } from 'antd';
15
16
  import { css } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
- import { Flexbox } from 'react-layout-kit';
18
18
  import { Line, LineChart as ReChartsLineChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
19
19
  import { useStyles } from "../LineChart/styles";
20
20
  import NoData from "../common/NoData";
@@ -4,5 +4,5 @@ export interface TrackerBlockProps {
4
4
  key?: string | number;
5
5
  tooltip?: ReactNode;
6
6
  }
7
- declare const TrackerBlock: import("react").ForwardRefExoticComponent<Omit<TrackerBlockProps & import("react-layout-kit/lib/FlexBasic").FlexBasicProps & import("react-layout-kit").CommonProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ declare const TrackerBlock: import("react").ForwardRefExoticComponent<Omit<TrackerBlockProps & import("@lobehub/ui").FlexBasicProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
8
8
  export default TrackerBlock;
@@ -11,10 +11,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
11
11
  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; }
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
- import { Tooltip } from '@lobehub/ui';
14
+ import { Flexbox, Tooltip } from '@lobehub/ui';
15
15
  import { createStyles } from 'antd-style';
16
16
  import { forwardRef, useMemo } from 'react';
17
- import { Flexbox } from 'react-layout-kit';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
18
  var useStyles = createStyles(function (_ref) {
20
19
  var css = _ref.css,
@@ -1,5 +1,5 @@
1
+ import { FlexboxProps } from '@lobehub/ui';
1
2
  import { ReactNode } from 'react';
2
- import { FlexboxProps } from 'react-layout-kit';
3
3
  import { TrackerBlockProps } from './TrackerBlock';
4
4
  interface DataItem extends TrackerBlockProps {
5
5
  [key: string]: any;
@@ -9,8 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
+ import { Flexbox } from '@lobehub/ui';
12
13
  import { forwardRef } from 'react';
13
- import { Flexbox } from 'react-layout-kit';
14
14
  import TrackerBlock from "./TrackerBlock";
15
15
  import { useStyles } from "./styles";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
+ import { Flexbox } from '@lobehub/ui';
1
2
  import { useRef } from 'react';
2
- import { Flexbox } from 'react-layout-kit';
3
3
  import Legend from "../Legend";
4
4
  import { useOnWindowResize } from "../hooks/useOnWindowResize";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FlexboxProps } from 'react-layout-kit';
3
2
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
4
3
  container: import("antd-style").SerializedStyles;
5
4
  }>;
6
- export declare const ChartTooltipFrame: import("react").NamedExoticComponent<FlexboxProps>;
5
+ export declare const ChartTooltipFrame: import("react").NamedExoticComponent<import("@lobehub/ui").FlexBasicProps>;
7
6
  export default ChartTooltipFrame;
@@ -9,9 +9,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
9
9
  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; }
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
+ import { Flexbox } from '@lobehub/ui';
12
13
  import { createStyles } from 'antd-style';
13
14
  import { memo } from 'react';
14
- import { Flexbox } from 'react-layout-kit';
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  export var useStyles = createStyles(function (_ref) {
17
17
  var css = _ref.css,
@@ -1,11 +1,10 @@
1
1
  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
- import { Icon } from '@lobehub/ui';
3
+ import { Flexbox, Icon } from '@lobehub/ui';
4
4
  import { Typography } from 'antd';
5
5
  import { createStyles } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import { memo } from 'react';
8
- import { Flexbox } from 'react-layout-kit';
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  var useStyles = createStyles(function (_ref) {
@@ -1,8 +1,8 @@
1
1
  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
+ import { Flexbox } from '@lobehub/ui';
3
4
  import { Typography } from 'antd';
4
5
  import { createStyles } from 'antd-style';
5
- import { Flexbox } from 'react-layout-kit';
6
6
  import ChartTooltipFrame from "./ChartTooltipFrame";
7
7
  import ChartTooltipRow from "./ChartTooltipRow";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
+ import { Center, Flexbox } from '@lobehub/ui';
1
2
  import { Empty } from 'antd';
2
3
  import { useTheme } from 'antd-style';
3
4
  import { isValidElement, memo } from 'react';
4
- import { Center, Flexbox } from 'react-layout-kit';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  var NoData = /*#__PURE__*/memo(function (_ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -16,7 +16,9 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "author": "LobeHub <i@lobehub.com>",
19
- "sideEffects": false,
19
+ "sideEffects": [
20
+ "**/*.css"
21
+ ],
20
22
  "main": "es/index.js",
21
23
  "module": "es/index.js",
22
24
  "types": "es/index.d.ts",
@@ -24,7 +26,7 @@
24
26
  "es"
25
27
  ],
26
28
  "dependencies": {
27
- "@lobehub/ui": "^3.1.1",
29
+ "@lobehub/ui": "^3.4.5",
28
30
  "ahooks": "^3.9.6",
29
31
  "antd-style": "^3.7.1",
30
32
  "chroma-js": "^3.2.0",
@@ -32,7 +34,6 @@
32
34
  "dayjs": "^1.11.19",
33
35
  "lucide-react": "^0.562.0",
34
36
  "polished": "^4.3.1",
35
- "react-layout-kit": "^2.0.1",
36
37
  "recharts": "^2.15.4"
37
38
  },
38
39
  "peerDependencies": {