diff --git a/.dumirc.ts b/.dumirc.ts index 98f3850..1b05f33 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -17,10 +17,10 @@ const nav: INavItem[] = [ const themeConfig: SiteThemeConfig = { actions: [ { - icon: 'Github', + github: true, link: homepage, openExternal: true, - text: 'Github', + text: 'GitHub', }, { link: '/components/area-chart', diff --git a/package.json b/package.json index fb45525..8c89bd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/charts", - "version": "1.12.0", + "version": "2.0.0", "description": "React modern charts components built on recharts", "keywords": [ "lobehub", @@ -70,53 +70,53 @@ ] }, "dependencies": { - "@lobehub/ui": "^1.162.0", + "@lobehub/ui": "^2.0.0", "ahooks": "^3.8.4", "antd-style": "^3.7.1", "chroma-js": "^3.1.2", - "date-fns": "^3.6.0", + "date-fns": "^4.1.0", "dayjs": "^1.11.13", "lucide-react": "^0.469.0", "polished": "^4.3.1", "react-layout-kit": "^1.9.1", - "recharts": "^2.15.0" + "recharts": "^2.15.2" }, "devDependencies": { - "@commitlint/cli": "^19.6.1", + "@commitlint/cli": "^19.8.0", "@icons-pack/react-simple-icons": "^9.7.0", - "@lobehub/lint": "^1.25.3", - "@testing-library/react": "^16.1.0", - "@types/chroma-js": "^3.1.0", + "@lobehub/lint": "^1.26.1", + "@testing-library/react": "^16.3.0", + "@types/chroma-js": "^3.1.1", "@types/pangu": "^4.0.2", - "@types/react": "^19.0.3", - "@types/react-dom": "^19.0.2", + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.2", "@vitest/coverage-v8": "~1.2.2", "babel-plugin-antd-style": "^1.0.4", "clean-package": "^2.2.0", - "commitlint": "^19.6.1", + "commitlint": "^19.8.0", "cross-env": "^7.0.3", "dpdm": "^3.14.0", - "dumi": "^2.4.17", - "dumi-theme-lobehub": "^1.12.0", + "dumi": "^2.4.20", + "dumi-theme-lobehub": "^2.0.0", "eslint": "^8.57.1", - "father": "^4.5.1", + "father": "^4.5.2", "husky": "^9.1.7", "jsdom": "^25.0.1", - "lint-staged": "^15.3.0", - "prettier": "^3.4.2", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "lint-staged": "^15.5.0", + "prettier": "^3.5.3", + "react": "^19.1.0", + "react-dom": "^19.1.0", "remark": "^15.0.1", "remark-cli": "^12.0.1", "semantic-release": "^21.1.2", "stylelint": "^15.11.0", - "typescript": "^5.7.2", + "typescript": "^5.8.3", "vitest": "~1.2.2" }, "peerDependencies": { "antd": "^5.23.0", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "publishConfig": { "access": "public", diff --git a/src/AreaChart/demos/index.tsx b/src/AreaChart/demos/index.tsx index 42ff6f5..62b1d25 100644 --- a/src/AreaChart/demos/index.tsx +++ b/src/AreaChart/demos/index.tsx @@ -1,5 +1,5 @@ import { AreaChart, AreaChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; import { FC } from 'react'; const data: AreaChartProps['data'] = [ diff --git a/src/BarChart/demos/index.tsx b/src/BarChart/demos/index.tsx index 294d7ef..01e96e3 100644 --- a/src/BarChart/demos/index.tsx +++ b/src/BarChart/demos/index.tsx @@ -1,5 +1,5 @@ import { BarChart, BarChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; import { FC } from 'react'; const data: BarChartProps['data'] = [ diff --git a/src/BarList/demos/index.tsx b/src/BarList/demos/index.tsx index e758bdf..3303466 100644 --- a/src/BarList/demos/index.tsx +++ b/src/BarList/demos/index.tsx @@ -1,5 +1,5 @@ import { BarList, BarListProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: BarListProps['data'] = [ { name: '/home', value: 456 }, diff --git a/src/DonutChart/demos/index.tsx b/src/DonutChart/demos/index.tsx index 3c6456c..cf7be78 100644 --- a/src/DonutChart/demos/index.tsx +++ b/src/DonutChart/demos/index.tsx @@ -1,5 +1,5 @@ import { DonutChart, DonutChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: DonutChartProps['data'] = [ { diff --git a/src/FunnelChart/demos/index.tsx b/src/FunnelChart/demos/index.tsx index 265871b..6693797 100644 --- a/src/FunnelChart/demos/index.tsx +++ b/src/FunnelChart/demos/index.tsx @@ -1,5 +1,5 @@ import { FunnelChart, FunnelChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: FunnelChartProps['data'] = [ { name: '1. Add credit Card', value: 89 }, diff --git a/src/Heatmaps/demos/index.tsx b/src/Heatmaps/demos/index.tsx index 94c5e66..b1c72c0 100644 --- a/src/Heatmaps/demos/index.tsx +++ b/src/Heatmaps/demos/index.tsx @@ -1,5 +1,5 @@ import { Heatmaps, HeatmapsProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; import { yearData } from './data'; diff --git a/src/Legend/LegendItem.tsx b/src/Legend/LegendItem.tsx index 3aa7016..3d81a46 100644 --- a/src/Legend/LegendItem.tsx +++ b/src/Legend/LegendItem.tsx @@ -60,7 +60,7 @@ const LegendItem = memo(({ label, name, color, onClick, activeL color={color} fill={color} icon={Circle} - size={{ fontSize: 10 }} + size={10} style={{ opacity: activeLegend && activeLegend !== name ? 0.4 : 1, }} diff --git a/src/LineChart/demos/index.tsx b/src/LineChart/demos/index.tsx index c3aa013..99f0b0c 100644 --- a/src/LineChart/demos/index.tsx +++ b/src/LineChart/demos/index.tsx @@ -1,5 +1,5 @@ import { LineChart, LineChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: LineChartProps['data'] = [ { diff --git a/src/ScatterChart/ScatterChartTooltip.tsx b/src/ScatterChart/ScatterChartTooltip.tsx index e2ec261..debd345 100644 --- a/src/ScatterChart/ScatterChartTooltip.tsx +++ b/src/ScatterChart/ScatterChartTooltip.tsx @@ -58,7 +58,7 @@ const ScatterChartTooltip = memo( paddingBlock={8} paddingInline={16} > - + {label} diff --git a/src/ScatterChart/demos/index.tsx b/src/ScatterChart/demos/index.tsx index 8b54b12..230760b 100644 --- a/src/ScatterChart/demos/index.tsx +++ b/src/ScatterChart/demos/index.tsx @@ -1,5 +1,5 @@ import { ScatterChart, ScatterChartProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: ScatterChartProps['data'] = [ { diff --git a/src/Tracker/demos/index.tsx b/src/Tracker/demos/index.tsx index 03238bb..e0fa576 100644 --- a/src/Tracker/demos/index.tsx +++ b/src/Tracker/demos/index.tsx @@ -1,5 +1,5 @@ import { Tracker, TrackerProps } from '@lobehub/charts'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; +import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook'; const data: TrackerProps['data'] = [ { color: 'success', tooltip: 'Tracker Info' }, diff --git a/src/common/ChartTooltip/ChartTooltipRow.tsx b/src/common/ChartTooltip/ChartTooltipRow.tsx index 14f4473..77ecf8f 100644 --- a/src/common/ChartTooltip/ChartTooltipRow.tsx +++ b/src/common/ChartTooltip/ChartTooltipRow.tsx @@ -24,7 +24,7 @@ const ChartTooltipRow = memo(({ value, name, color }) => { return ( - + {name}