diff --git a/packages/react-charts/.gitignore b/packages/react-charts/.gitignore new file mode 100644 index 00000000000..3e0402f878e --- /dev/null +++ b/packages/react-charts/.gitignore @@ -0,0 +1,4 @@ +/deprecated +/echarts +/next +/victory diff --git a/packages/react-charts/README.md b/packages/react-charts/README.md index b249e79b697..ddbd5732424 100644 --- a/packages/react-charts/README.md +++ b/packages/react-charts/README.md @@ -27,7 +27,7 @@ import '@patternfly/react-core/dist/styles/base.css'; #### Example Component Usage ```js -import { Area } from '@patternfly/react-charts'; +import { Area } from '@patternfly/react-charts/victory'; export default ; diff --git a/packages/react-charts/package.json b/packages/react-charts/package.json index d5c31480a44..d4ccb4526fd 100644 --- a/packages/react-charts/package.json +++ b/packages/react-charts/package.json @@ -5,6 +5,13 @@ "main": "dist/js/index.js", "module": "dist/esm/index.js", "types": "dist/esm/index.d.ts", + "typesVersions": { + "*": { + "victory": [ + "dist/esm/victory/index.d.ts" + ] + } + }, "patternfly:src": "src/", "sideEffects": [ "*.css", @@ -33,7 +40,11 @@ "@patternfly/react-tokens": "workspace:^", "hoist-non-react-statics": "^3.3.2", "lodash": "^4.17.21", - "tslib": "^2.7.0", + "tslib": "^2.7.0" + }, + "peerDependencies": { + "react": "^17 || ^18", + "react-dom": "^17 || ^18", "victory-area": "^37.1.1", "victory-axis": "^37.1.1", "victory-bar": "^37.1.1", @@ -52,13 +63,10 @@ "victory-voronoi-container": "^37.1.1", "victory-zoom-container": "^37.1.1" }, - "peerDependencies": { - "react": "^17 || ^18", - "react-dom": "^17 || ^18" - }, "scripts": { - "clean": "rimraf dist", - "build:single:packages": "node ../../scripts/build-single-packages.mjs --config single-packages.config.json" + "clean": "rimraf dist echarts victory", + "build:single:packages": "node ../../scripts/build-single-packages.mjs --config single-packages.config.json", + "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json" }, "devDependencies": { "@types/lodash": "^4.17.9", diff --git a/packages/react-charts/src/components/Chart/Chart.test.tsx b/packages/react-charts/src/victory/components/Chart/Chart.test.tsx similarity index 100% rename from packages/react-charts/src/components/Chart/Chart.test.tsx rename to packages/react-charts/src/victory/components/Chart/Chart.test.tsx diff --git a/packages/react-charts/src/components/Chart/Chart.tsx b/packages/react-charts/src/victory/components/Chart/Chart.tsx similarity index 100% rename from packages/react-charts/src/components/Chart/Chart.tsx rename to packages/react-charts/src/victory/components/Chart/Chart.tsx diff --git a/packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap b/packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap rename to packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartArea/ChartArea.test.tsx b/packages/react-charts/src/victory/components/ChartArea/ChartArea.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartArea/ChartArea.test.tsx rename to packages/react-charts/src/victory/components/ChartArea/ChartArea.test.tsx diff --git a/packages/react-charts/src/components/ChartArea/ChartArea.tsx b/packages/react-charts/src/victory/components/ChartArea/ChartArea.tsx similarity index 100% rename from packages/react-charts/src/components/ChartArea/ChartArea.tsx rename to packages/react-charts/src/victory/components/ChartArea/ChartArea.tsx diff --git a/packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap b/packages/react-charts/src/victory/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartArea/examples/ChartArea.md b/packages/react-charts/src/victory/components/ChartArea/examples/ChartArea.md similarity index 98% rename from packages/react-charts/src/components/ChartArea/examples/ChartArea.md rename to packages/react-charts/src/victory/components/ChartArea/examples/ChartArea.md index 85ed87fa48b..ca653b02301 100644 --- a/packages/react-charts/src/components/ChartArea/examples/ChartArea.md +++ b/packages/react-charts/src/victory/components/ChartArea/examples/ChartArea.md @@ -12,7 +12,7 @@ propComponents: [ hideDarkMode: true --- -import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThreshold, ChartThemeColor, ChartLegendTooltip, ChartVoronoiContainer, createContainer } from '@patternfly/react-charts'; +import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThreshold, ChartThemeColor, ChartLegendTooltip, ChartVoronoiContainer, createContainer } from '@patternfly/react-charts/victory'; import { getResizeObserver } from '@patternfly/react-core'; ## Introduction @@ -24,7 +24,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s ### Basic with right aligned legend ```js import React from 'react'; -import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; // import '@patternfly/patternfly/patternfly-charts.css'; // Required for mix-blend-mode CSS property
@@ -89,7 +89,7 @@ This demonstrates how to combine cursor and voronoi containers to display toolti ```js import React from 'react'; -import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartLegendTooltip, createContainer } from '@patternfly/react-charts'; +import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartLegendTooltip, createContainer } from '@patternfly/react-charts/victory'; // import '@patternfly/patternfly/patternfly-charts.css'; // Required for mix-blend-mode CSS property class BottomAlignedLegend extends React.Component { @@ -173,7 +173,7 @@ class BottomAlignedLegend extends React.Component { ### Multi-color (unordered) bottom-left aligned legend and responsive container ```js import React from 'react'; -import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; import { getResizeObserver } from '@patternfly/react-core'; // import '@patternfly/patternfly/patternfly-charts.css'; // Required for mix-blend-mode CSS property diff --git a/packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx b/packages/react-charts/src/victory/components/ChartAxis/ChartAxis.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx rename to packages/react-charts/src/victory/components/ChartAxis/ChartAxis.test.tsx diff --git a/packages/react-charts/src/components/ChartAxis/ChartAxis.tsx b/packages/react-charts/src/victory/components/ChartAxis/ChartAxis.tsx similarity index 100% rename from packages/react-charts/src/components/ChartAxis/ChartAxis.tsx rename to packages/react-charts/src/victory/components/ChartAxis/ChartAxis.tsx diff --git a/packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap b/packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartBar/ChartBar.test.tsx b/packages/react-charts/src/victory/components/ChartBar/ChartBar.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartBar/ChartBar.test.tsx rename to packages/react-charts/src/victory/components/ChartBar/ChartBar.test.tsx diff --git a/packages/react-charts/src/components/ChartBar/ChartBar.tsx b/packages/react-charts/src/victory/components/ChartBar/ChartBar.tsx similarity index 100% rename from packages/react-charts/src/components/ChartBar/ChartBar.tsx rename to packages/react-charts/src/victory/components/ChartBar/ChartBar.tsx diff --git a/packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap b/packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartBar/examples/ChartBar.md b/packages/react-charts/src/victory/components/ChartBar/examples/ChartBar.md similarity index 98% rename from packages/react-charts/src/components/ChartBar/examples/ChartBar.md rename to packages/react-charts/src/victory/components/ChartBar/examples/ChartBar.md index 5b09528bd97..bdeed8c426b 100644 --- a/packages/react-charts/src/components/ChartBar/examples/ChartBar.md +++ b/packages/react-charts/src/victory/components/ChartBar/examples/ChartBar.md @@ -5,7 +5,7 @@ propComponents: ['Chart', 'ChartAxis', 'ChartBar', 'ChartGroup', 'ChartLabel', ' hideDarkMode: true --- -import { Chart, ChartAxis, ChartBar, ChartGroup, ChartLabel, ChartThemeColor, ChartTooltip, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartBar, ChartGroup, ChartLabel, ChartThemeColor, ChartTooltip, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; import { VictoryZoomContainer } from 'victory-zoom-container'; import t_global_color_status_danger_100 from '@patternfly/react-tokens/dist/esm/t_global_color_status_danger_100'; import t_global_color_status_info_100 from '@patternfly/react-tokens/dist/esm/t_global_color_status_info_100'; @@ -23,7 +23,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s ```js import React from 'react'; -import { Chart, ChartAxis, ChartBar, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartBar, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
@@ -237,7 +237,7 @@ import { VictoryZoomContainer } from 'victory-zoom-container'; ```js import React from 'react'; -import { Chart, ChartBar, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartBar, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
@@ -392,7 +392,7 @@ This demonstrates custom theme properties, which may be applied across multiple ```js import React from 'react'; -import { Chart, ChartBar, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer, getCustomTheme } from '@patternfly/react-charts'; +import { Chart, ChartBar, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer, getCustomTheme } from '@patternfly/react-charts/victory'; import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; import chart_color_green_300 from '@patternfly/react-tokens/dist/esm/chart_color_green_300'; import chart_color_teal_300 from '@patternfly/react-tokens/dist/esm/chart_color_teal_300'; diff --git a/packages/react-charts/src/components/ChartTheme/styles/box-plot-tooltip-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/box-plot-tooltip-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/box-plot-tooltip-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/box-plot-tooltip-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/bullet-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/bullet-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/bullet-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/bullet-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/common-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/common-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/common-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/common-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/donut-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/donut-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/donut-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/donut-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/donut-utilization-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/donut-utilization-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/donut-utilization-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/donut-utilization-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/legend-tooltip-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/legend-tooltip-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/legend-tooltip-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/legend-tooltip-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/styles/scatter-styles.ts b/packages/react-charts/src/victory/components/ChartTheme/styles/scatter-styles.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/styles/scatter-styles.ts rename to packages/react-charts/src/victory/components/ChartTheme/styles/scatter-styles.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/base-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/base-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/color-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/color-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/color-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/color-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/blue-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/blue-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/blue-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/blue-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/gray-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/gray-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/gray-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/gray-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/green-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/green-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/green-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/green-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/multi-ordered-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/multi-ordered-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/multi-ordered-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/multi-ordered-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/multi-unordered-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/multi-unordered-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/multi-unordered-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/multi-unordered-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/orange-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/orange-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/orange-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/orange-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/purple-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/purple-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/purple-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/purple-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/skeleton-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/skeleton-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/skeleton-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/skeleton-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/teal-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/teal-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/teal-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/teal-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/colors/yellow-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/colors/yellow-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/colors/yellow-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/colors/yellow-theme.ts diff --git a/packages/react-charts/src/components/ChartTheme/themes/skeleton-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/skeleton-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartTheme/themes/skeleton-theme.ts rename to packages/react-charts/src/victory/components/ChartTheme/themes/skeleton-theme.ts diff --git a/packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx b/packages/react-charts/src/victory/components/ChartThreshold/ChartThreshold.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx rename to packages/react-charts/src/victory/components/ChartThreshold/ChartThreshold.test.tsx diff --git a/packages/react-charts/src/components/ChartThreshold/ChartThreshold.tsx b/packages/react-charts/src/victory/components/ChartThreshold/ChartThreshold.tsx similarity index 100% rename from packages/react-charts/src/components/ChartThreshold/ChartThreshold.tsx rename to packages/react-charts/src/victory/components/ChartThreshold/ChartThreshold.tsx diff --git a/packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap b/packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartThreshold/examples/ChartThreshold.md b/packages/react-charts/src/victory/components/ChartThreshold/examples/ChartThreshold.md similarity index 98% rename from packages/react-charts/src/components/ChartThreshold/examples/ChartThreshold.md rename to packages/react-charts/src/victory/components/ChartThreshold/examples/ChartThreshold.md index efe5fb1a30a..b76b8781ca7 100644 --- a/packages/react-charts/src/components/ChartThreshold/examples/ChartThreshold.md +++ b/packages/react-charts/src/victory/components/ChartThreshold/examples/ChartThreshold.md @@ -20,7 +20,7 @@ import { ChartThreshold, ChartThemeColor, ChartVoronoiContainer -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import { getResizeObserver } from '@patternfly/react-core'; import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; @@ -45,7 +45,7 @@ import { ChartThreshold, ChartThemeColor, ChartVoronoiContainer -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import { getResizeObserver } from '@patternfly/react-core'; import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; diff --git a/packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx b/packages/react-charts/src/victory/components/ChartTooltip/ChartTooltip.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx rename to packages/react-charts/src/victory/components/ChartTooltip/ChartTooltip.test.tsx diff --git a/packages/react-charts/src/components/ChartTooltip/ChartTooltip.tsx b/packages/react-charts/src/victory/components/ChartTooltip/ChartTooltip.tsx similarity index 100% rename from packages/react-charts/src/components/ChartTooltip/ChartTooltip.tsx rename to packages/react-charts/src/victory/components/ChartTooltip/ChartTooltip.tsx diff --git a/packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap b/packages/react-charts/src/victory/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap diff --git a/packages/react-charts/src/components/ChartTooltip/examples/ChartTooltip.md b/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md similarity index 98% rename from packages/react-charts/src/components/ChartTooltip/examples/ChartTooltip.md rename to packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md index b7dabf72630..eceab742288 100644 --- a/packages/react-charts/src/components/ChartTooltip/examples/ChartTooltip.md +++ b/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md @@ -31,7 +31,7 @@ import { ChartVoronoiContainer, createContainer, getCustomTheme -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import './chart-tooltip.css'; ## Introduction @@ -46,7 +46,7 @@ This demonstrates how to use a voronoi container to display tooltips. ```js import React from 'react'; -import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
@@ -840,7 +840,7 @@ This demonstrates an alternate way of applying tooltips by wrapping charts with ```js import React from 'react'; -import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts'; +import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/victory'; import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core'; class TooltipChart extends React.Component { diff --git a/packages/react-charts/src/components/ChartTooltip/examples/chart-tooltip.css b/packages/react-charts/src/victory/components/ChartTooltip/examples/chart-tooltip.css similarity index 100% rename from packages/react-charts/src/components/ChartTooltip/examples/chart-tooltip.css rename to packages/react-charts/src/victory/components/ChartTooltip/examples/chart-tooltip.css diff --git a/packages/react-charts/src/components/ChartUtils/chart-container.tsx b/packages/react-charts/src/victory/components/ChartUtils/chart-container.tsx similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-container.tsx rename to packages/react-charts/src/victory/components/ChartUtils/chart-container.tsx diff --git a/packages/react-charts/src/components/ChartUtils/chart-domain.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-domain.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-domain.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-domain.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-helpers.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-helpers.ts similarity index 87% rename from packages/react-charts/src/components/ChartUtils/chart-helpers.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-helpers.ts index 0f68f6ccfec..d73f7b17c6b 100644 --- a/packages/react-charts/src/components/ChartUtils/chart-helpers.ts +++ b/packages/react-charts/src/victory/components/ChartUtils/chart-helpers.ts @@ -11,7 +11,7 @@ interface ChartClassNameInterface { export const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); /** - * Returns the class name that will be applied to the outer-most div rendered by the chart's container + * Returns the class name that will be applied to the outermost div rendered by the chart's container * @private */ export const getClassName = ({ className }: ChartClassNameInterface) => { diff --git a/packages/react-charts/src/components/ChartUtils/chart-interactive-legend.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-interactive-legend.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-interactive-legend.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-interactive-legend.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-label.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-label.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-label.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-label.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-legend.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-legend.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-legend.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-legend.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-origin.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-origin.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-origin.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-origin.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-padding.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-padding.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-padding.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-padding.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-patterns.tsx b/packages/react-charts/src/victory/components/ChartUtils/chart-patterns.tsx similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-patterns.tsx rename to packages/react-charts/src/victory/components/ChartUtils/chart-patterns.tsx diff --git a/packages/react-charts/src/components/ChartUtils/chart-theme-types.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-theme-types.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-theme-types.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-theme-types.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-theme.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-theme.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-theme.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-theme.ts diff --git a/packages/react-charts/src/components/ChartUtils/chart-tooltip.ts b/packages/react-charts/src/victory/components/ChartUtils/chart-tooltip.ts similarity index 100% rename from packages/react-charts/src/components/ChartUtils/chart-tooltip.ts rename to packages/react-charts/src/victory/components/ChartUtils/chart-tooltip.ts diff --git a/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx b/packages/react-charts/src/victory/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx similarity index 100% rename from packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx rename to packages/react-charts/src/victory/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx diff --git a/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx b/packages/react-charts/src/victory/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx similarity index 99% rename from packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx rename to packages/react-charts/src/victory/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx index 1c8f1040ba6..8ba01f5ed74 100644 --- a/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx +++ b/packages/react-charts/src/victory/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx @@ -43,7 +43,7 @@ export interface ChartVoronoiContainerProps extends VictoryVoronoiContainerProps */ children?: React.ReactElement | React.ReactElement[]; /** - * The className prop specifies a className that will be applied to the outer-most div rendered by the container + * The className prop specifies a className that will be applied to the outermost div rendered by the container */ className?: string; /** diff --git a/packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap b/packages/react-charts/src/victory/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap similarity index 100% rename from packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap rename to packages/react-charts/src/victory/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap diff --git a/packages/react-charts/src/components/Patterns/examples/patterns.md b/packages/react-charts/src/victory/components/Patterns/examples/patterns.md similarity index 98% rename from packages/react-charts/src/components/Patterns/examples/patterns.md rename to packages/react-charts/src/victory/components/Patterns/examples/patterns.md index f4ee30f25aa..22b8200dd75 100644 --- a/packages/react-charts/src/components/Patterns/examples/patterns.md +++ b/packages/react-charts/src/victory/components/Patterns/examples/patterns.md @@ -39,7 +39,7 @@ import { createContainer, getInteractiveLegendEvents, getInteractiveLegendItemStyles -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import { getResizeObserver } from '@patternfly/react-core'; import chart_color_black_500 from '@patternfly/react-tokens/dist/esm/chart_color_black_500'; import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; @@ -57,7 +57,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s ### Basic pie chart ```js import React from 'react'; -import { ChartPie } from '@patternfly/react-charts'; +import { ChartPie } from '@patternfly/react-charts/victory';
{ @@ -119,7 +119,7 @@ export const ChartAreaSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartBar, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { Chart, ChartBar, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; export const ChartBarSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -175,8 +175,8 @@ export const ChartBarSkeleton: React.FunctionComponent = () => { ### Box plot chart ```js import React from 'react'; -import { Switch } from '@patternfly/react-charts' -import { Chart, ChartAxis, ChartBoxPlot } from '@patternfly/react-charts'; +import { Switch } from '@patternfly/react-charts/victory' +import { Chart, ChartAxis, ChartBoxPlot } from '@patternfly/react-charts/victory'; export const ChartBoxPlotSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -234,7 +234,7 @@ export const ChartBoxPlotSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartAxis, ChartBullet, ChartLegend } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartBullet, ChartLegend } from '@patternfly/react-charts/victory'; export const ChartBulletSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -288,7 +288,7 @@ export const ChartBulletSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartAxis, ChartDonut } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartDonut } from '@patternfly/react-charts/victory'; export const ChartDonutSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -327,7 +327,7 @@ export const ChartDonutSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartAxis, ChartDonutUtilization } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartDonutUtilization } from '@patternfly/react-charts/victory'; export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -376,7 +376,7 @@ export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartAxis, ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/victory'; export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -420,7 +420,7 @@ export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartLine } from '@patternfly/react-charts'; +import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartLine } from '@patternfly/react-charts/victory'; export const ChartLineSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -510,7 +510,7 @@ export const ChartLineSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartAxis, ChartPie } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartPie } from '@patternfly/react-charts/victory'; export const ChartPieSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -558,7 +558,7 @@ export const ChartPieSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartScatter } from '@patternfly/react-charts'; +import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartScatter } from '@patternfly/react-charts/victory'; export const ChartScatterSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -615,7 +615,7 @@ export const ChartScatterSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartVoronoiContainer, ChartAxis, ChartStack, ChartBar } from '@patternfly/react-charts'; +import { Chart, ChartVoronoiContainer, ChartAxis, ChartStack, ChartBar } from '@patternfly/react-charts/victory'; export const ChartStackSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); @@ -671,7 +671,8 @@ export const ChartStackSkeleton: React.FunctionComponent = () => { ```js import React from 'react'; import { Switch } from '@patternfly/react-core'; -import { Chart, ChartVoronoiContainer, ChartLegend, ChartAxis, ChartThreshold, ChartGroup, ChartArea } from '@patternfly/react-charts';import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; +import { Chart, ChartVoronoiContainer, ChartLegend, ChartAxis, ChartThreshold, ChartGroup, ChartArea } from '@patternfly/react-charts/victory'; +import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; export const ChartThresholdSkeleton: React.FunctionComponent = () => { const [isChecked, setIsChecked] = React.useState(true); diff --git a/packages/react-charts/src/components/Sparkline/examples/sparkline.css b/packages/react-charts/src/victory/components/Sparkline/examples/sparkline.css similarity index 100% rename from packages/react-charts/src/components/Sparkline/examples/sparkline.css rename to packages/react-charts/src/victory/components/Sparkline/examples/sparkline.css diff --git a/packages/react-charts/src/components/Sparkline/examples/sparkline.md b/packages/react-charts/src/victory/components/Sparkline/examples/sparkline.md similarity index 97% rename from packages/react-charts/src/components/Sparkline/examples/sparkline.md rename to packages/react-charts/src/victory/components/Sparkline/examples/sparkline.md index ca9bc2b6f9c..468489ce5a6 100644 --- a/packages/react-charts/src/components/Sparkline/examples/sparkline.md +++ b/packages/react-charts/src/victory/components/Sparkline/examples/sparkline.md @@ -11,7 +11,7 @@ propComponents: [ hideDarkMode: true --- -import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; import './sparkline.css'; ## Introduction @@ -23,7 +23,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s ### Basic ```js import React from 'react'; -import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
@@ -59,7 +59,7 @@ This demonstrates an alternate way of applying tooltips using CSS overflow ```js import React from 'react'; -import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
diff --git a/packages/react-charts/src/components/index.ts b/packages/react-charts/src/victory/components/index.ts similarity index 100% rename from packages/react-charts/src/components/index.ts rename to packages/react-charts/src/victory/components/index.ts diff --git a/packages/react-charts/src/index.ts b/packages/react-charts/src/victory/index.ts similarity index 100% rename from packages/react-charts/src/index.ts rename to packages/react-charts/src/victory/index.ts diff --git a/packages/react-charts/src/typings/hoist.d.ts b/packages/react-charts/src/victory/typings/hoist.d.ts similarity index 100% rename from packages/react-charts/src/typings/hoist.d.ts rename to packages/react-charts/src/victory/typings/hoist.d.ts diff --git a/packages/react-charts/src/typings/victory.d.ts b/packages/react-charts/src/victory/typings/victory.d.ts similarity index 100% rename from packages/react-charts/src/typings/victory.d.ts rename to packages/react-charts/src/victory/typings/victory.d.ts diff --git a/packages/react-charts/subpaths.config.json b/packages/react-charts/subpaths.config.json new file mode 100644 index 00000000000..5c5e5d1baff --- /dev/null +++ b/packages/react-charts/subpaths.config.json @@ -0,0 +1,4 @@ +{ + "packageName": "@patternfly/react-charts", + "paths": ["victory"] +} diff --git a/packages/react-core/src/demos/CardDemos.md b/packages/react-core/src/demos/CardDemos.md index a921d351e33..cd7eae207c0 100644 --- a/packages/react-core/src/demos/CardDemos.md +++ b/packages/react-core/src/demos/CardDemos.md @@ -9,7 +9,7 @@ import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-ic import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; import { CheckCircleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, BellIcon } from '@patternfly/react-icons'; import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table'; -import { Chart, ChartAxis, ChartGroup, ChartVoronoiContainer, ChartStack, ChartBar, ChartTooltip, ChartDonutThreshold, ChartDonutUtilization, ChartArea, ChartContainer, ChartLabel } from '@patternfly/react-charts'; +import { Chart, ChartAxis, ChartGroup, ChartVoronoiContainer, ChartStack, ChartBar, ChartTooltip, ChartDonutThreshold, ChartDonutUtilization, ChartArea, ChartContainer, ChartLabel } from '@patternfly/react-charts/victory'; import chart_color_yellow_100 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_100'; import chart_color_yellow_300 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_300'; import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; diff --git a/packages/react-core/src/demos/examples/Card/CardNested.tsx b/packages/react-core/src/demos/examples/Card/CardNested.tsx index 604546ff220..f4d213a77ea 100644 --- a/packages/react-core/src/demos/examples/Card/CardNested.tsx +++ b/packages/react-core/src/demos/examples/Card/CardNested.tsx @@ -13,7 +13,7 @@ import { Flex, FlexItem } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; import sizing from '@patternfly/react-styles/css/utilities/Sizing/sizing'; import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/accessibility'; diff --git a/packages/react-core/src/demos/examples/Card/CardTrendDemo1.tsx b/packages/react-core/src/demos/examples/Card/CardTrendDemo1.tsx index 0e99bcc424d..dcaee1a9e97 100644 --- a/packages/react-core/src/demos/examples/Card/CardTrendDemo1.tsx +++ b/packages/react-core/src/demos/examples/Card/CardTrendDemo1.tsx @@ -15,7 +15,7 @@ import { MenuToggle, MenuToggleElement } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; export const CardTrendDemo1: React.FunctionComponent = () => { const [isOpen, setIsOpen] = React.useState(false); diff --git a/packages/react-core/src/demos/examples/Card/CardTrendDemo2.tsx b/packages/react-core/src/demos/examples/Card/CardTrendDemo2.tsx index 3bc91c36162..160dacc007d 100644 --- a/packages/react-core/src/demos/examples/Card/CardTrendDemo2.tsx +++ b/packages/react-core/src/demos/examples/Card/CardTrendDemo2.tsx @@ -10,7 +10,7 @@ import { Flex, FlexItem } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; export const CardTrendDemo2: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo1.tsx b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo1.tsx index 89754365ec6..13efe081dd1 100644 --- a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo1.tsx +++ b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo1.tsx @@ -12,7 +12,7 @@ import { Stack, Divider } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; export const CardUtilizationDemo1: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo2.tsx b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo2.tsx index be3933ea43f..ff89b835f40 100644 --- a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo2.tsx +++ b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo2.tsx @@ -12,7 +12,7 @@ import { Stack, Divider } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; export const CardUtilizationDemo2: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo3.tsx b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo3.tsx index fe39cf4a942..16f50a3ac5d 100644 --- a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo3.tsx +++ b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo3.tsx @@ -19,7 +19,7 @@ import { Icon } from '@patternfly/react-core'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import { Chart, ChartStack, ChartBar, ChartTooltip } from '@patternfly/react-charts'; +import { Chart, ChartStack, ChartBar, ChartTooltip } from '@patternfly/react-charts/victory'; import chart_color_yellow_100 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_100'; import chart_color_yellow_300 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_300'; import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; diff --git a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo4.tsx b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo4.tsx index d114e3afdbb..f3d01ac5a95 100644 --- a/packages/react-core/src/demos/examples/Card/CardUtilizationDemo4.tsx +++ b/packages/react-core/src/demos/examples/Card/CardUtilizationDemo4.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Card, CardTitle, CardBody, CardFooter, Title, Gallery, GalleryItem } from '@patternfly/react-core'; -import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts'; +import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/victory'; export const CardUtilizationDemo4: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/demos/examples/Card/CardWithAccordion.tsx b/packages/react-core/src/demos/examples/Card/CardWithAccordion.tsx index 14f24556174..f7a2cd653b1 100644 --- a/packages/react-core/src/demos/examples/Card/CardWithAccordion.tsx +++ b/packages/react-core/src/demos/examples/Card/CardWithAccordion.tsx @@ -15,7 +15,7 @@ import { Flex, FlexItem } from '@patternfly/react-core'; -import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts'; +import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory'; import sizing from '@patternfly/react-styles/css/utilities/Sizing/sizing'; import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/accessibility'; diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 0f3df3a904e..07d624fc883 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -32,10 +32,11 @@ "@patternfly/react-styles": "workspace:^", "@patternfly/react-table": "workspace:^", "@patternfly/react-templates": "workspace:^", - "@patternfly/react-tokens": "workspace:^" + "@patternfly/react-tokens": "workspace:^", + "victory": "^37.1.1" }, "devDependencies": { - "@patternfly/documentation-framework": "^6.0.0-alpha.105", + "@patternfly/documentation-framework": "^6.0.0-alpha.106", "@patternfly/patternfly-a11y": "4.3.1" }, "keywords": [ diff --git a/packages/react-docs/patternfly-docs/patternfly-docs.source.js b/packages/react-docs/patternfly-docs/patternfly-docs.source.js index 44dd34bf0b9..4d5914b5a5f 100644 --- a/packages/react-docs/patternfly-docs/patternfly-docs.source.js +++ b/packages/react-docs/patternfly-docs/patternfly-docs.source.js @@ -39,8 +39,11 @@ module.exports = (baseSourceMD, sourceProps) => { sourceMD(path.join(reactTablePath, '/deprecated/components/**/examples/*.md'), 'react-deprecated'); sourceMD(path.join(reactTablePath, '/**/demos/*.md'), 'react-demos'); - // Charts MD (no demos yet) - sourceMD(path.join(reactChartsPath, '/**/examples/*.md'), 'react'); + // Charts MD + sourceMD(path.join(reactChartsPath, '/echarts/components/**/examples/*.md'), 'react'); + sourceMD(path.join(reactChartsPath, '/next/echarts/components/**/examples/*.md'), 'react-next'); + sourceMD(path.join(reactChartsPath, '/next/victory/components/**/examples/*.md'), 'react-next'); + sourceMD(path.join(reactChartsPath, '/victory/components/**/examples/*.md'), 'react'); // Code Editor MD sourceMD(path.join(reactCodeEditorPath, '/**/examples/*.md'), 'react'); diff --git a/yarn.lock b/yarn.lock index a95029b5857..4d07318fdd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3037,7 +3037,7 @@ __metadata: languageName: node linkType: hard -"@patternfly/ast-helpers@npm:^1.4.0-alpha.94": +"@patternfly/ast-helpers@npm:^1.4.0-alpha.95": version: 1.23.0 resolution: "@patternfly/ast-helpers@npm:1.23.0" dependencies: @@ -3050,15 +3050,15 @@ __metadata: languageName: node linkType: hard -"@patternfly/documentation-framework@npm:^6.0.0-alpha.105": - version: 6.0.0-alpha.105 - resolution: "@patternfly/documentation-framework@npm:6.0.0-alpha.105" +"@patternfly/documentation-framework@npm:^6.0.0-alpha.106": + version: 6.0.0-alpha.106 + resolution: "@patternfly/documentation-framework@npm:6.0.0-alpha.106" dependencies: "@babel/core": "npm:^7.24.3" "@babel/preset-env": "npm:^7.24.3" "@babel/preset-react": "npm:^7.24.1" "@mdx-js/util": "npm:1.6.16" - "@patternfly/ast-helpers": "npm:^1.4.0-alpha.94" + "@patternfly/ast-helpers": "npm:^1.4.0-alpha.95" "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9" autoprefixer: "npm:9.8.6" babel-loader: "npm:^9.1.3" @@ -3125,7 +3125,7 @@ __metadata: react-dom: ^17.0.0 || ^18.0.0 bin: pf-docs-framework: scripts/cli/cli.js - checksum: 10c0/f417444318e8d74d44bf53b463de1241154f0dedc7c73d3cd1757333e8a4f211e3d0c6d2f1b9f82c34dc284e5824662c65bbae3caddb70772cd64671b4de155a + checksum: 10c0/d27771bcca8b7207bf5692b6f4dd9f5de1e15dcd7e0cc6d0b24db155c57478470a5ddbd193e13e4982185daf1549efca3994043b6982317b043a2e7c0a1b9d05 languageName: node linkType: hard @@ -3165,26 +3165,26 @@ __metadata: hoist-non-react-statics: "npm:^3.3.2" lodash: "npm:^4.17.21" tslib: "npm:^2.7.0" - victory-area: "npm:^37.1.1" - victory-axis: "npm:^37.1.1" - victory-bar: "npm:^37.1.1" - victory-box-plot: "npm:^37.1.1" - victory-chart: "npm:^37.1.1" - victory-core: "npm:^37.1.1" - victory-create-container: "npm:^37.1.1" - victory-cursor-container: "npm:^37.1.1" - victory-group: "npm:^37.1.1" - victory-legend: "npm:^37.1.1" - victory-line: "npm:^37.1.1" - victory-pie: "npm:^37.1.1" - victory-scatter: "npm:^37.1.1" - victory-stack: "npm:^37.1.1" - victory-tooltip: "npm:^37.1.1" - victory-voronoi-container: "npm:^37.1.1" - victory-zoom-container: "npm:^37.1.1" peerDependencies: react: ^17 || ^18 react-dom: ^17 || ^18 + victory-area: ^37.1.1 + victory-axis: ^37.1.1 + victory-bar: ^37.1.1 + victory-box-plot: ^37.1.1 + victory-chart: ^37.1.1 + victory-core: ^37.1.1 + victory-create-container: ^37.1.1 + victory-cursor-container: ^37.1.1 + victory-group: ^37.1.1 + victory-legend: ^37.1.1 + victory-line: ^37.1.1 + victory-pie: ^37.1.1 + victory-scatter: ^37.1.1 + victory-stack: ^37.1.1 + victory-tooltip: ^37.1.1 + victory-voronoi-container: ^37.1.1 + victory-zoom-container: ^37.1.1 languageName: unknown linkType: soft @@ -3229,7 +3229,7 @@ __metadata: version: 0.0.0-use.local resolution: "@patternfly/react-docs@workspace:packages/react-docs" dependencies: - "@patternfly/documentation-framework": "npm:^6.0.0-alpha.105" + "@patternfly/documentation-framework": "npm:^6.0.0-alpha.106" "@patternfly/patternfly": "npm:6.0.0-prerelease.13" "@patternfly/patternfly-a11y": "npm:4.3.1" "@patternfly/react-charts": "workspace:^" @@ -3241,6 +3241,7 @@ __metadata: "@patternfly/react-table": "workspace:^" "@patternfly/react-templates": "workspace:^" "@patternfly/react-tokens": "workspace:^" + victory: "npm:^37.1.1" languageName: unknown linkType: soft @@ -8022,6 +8023,13 @@ __metadata: languageName: node linkType: hard +"d3-voronoi@npm:^1.1.4": + version: 1.1.4 + resolution: "d3-voronoi@npm:1.1.4" + checksum: 10c0/9fd4689323a8eed547dde44e9cae0b3e6a7333447cf37b069e278b8e899fc16e0251d099fe22d751c900a3a0b7a610a16e747224219538758afaf4561749047a + languageName: node + linkType: hard + "dargs@npm:^7.0.0": version: 7.0.0 resolution: "dargs@npm:7.0.0" @@ -20883,7 +20891,7 @@ __metadata: languageName: node linkType: hard -"victory-area@npm:^37.1.1": +"victory-area@npm:37.1.1": version: 37.1.1 resolution: "victory-area@npm:37.1.1" dependencies: @@ -20896,7 +20904,7 @@ __metadata: languageName: node linkType: hard -"victory-axis@npm:37.1.1, victory-axis@npm:^37.1.1": +"victory-axis@npm:37.1.1": version: 37.1.1 resolution: "victory-axis@npm:37.1.1" dependencies: @@ -20908,7 +20916,7 @@ __metadata: languageName: node linkType: hard -"victory-bar@npm:^37.1.1": +"victory-bar@npm:37.1.1": version: 37.1.1 resolution: "victory-bar@npm:37.1.1" dependencies: @@ -20921,7 +20929,7 @@ __metadata: languageName: node linkType: hard -"victory-box-plot@npm:^37.1.1": +"victory-box-plot@npm:37.1.1": version: 37.1.1 resolution: "victory-box-plot@npm:37.1.1" dependencies: @@ -20947,7 +20955,45 @@ __metadata: languageName: node linkType: hard -"victory-chart@npm:^37.1.1": +"victory-brush-line@npm:37.1.1": + version: 37.1.1 + resolution: "victory-brush-line@npm:37.1.1" + dependencies: + lodash: "npm:^4.17.19" + react-fast-compare: "npm:^3.2.0" + victory-core: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/3f2e1600fc39806d7ec3630bff32635809907d27d8cb699edcccd9bd092e8932a90a25153206fd41a0cfe8f977b156d81aad8083f5ae2fad99ebd7e4b1e33eb5 + languageName: node + linkType: hard + +"victory-candlestick@npm:37.1.1": + version: 37.1.1 + resolution: "victory-candlestick@npm:37.1.1" + dependencies: + lodash: "npm:^4.17.19" + victory-core: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/4cd4ef1167a078a5f7c64eddfdf63cd06fc7369c736cb628dde5806c9641df537a86c916047b9d6c734c942292db0322876180eda804696684f7f5ce6966b7da + languageName: node + linkType: hard + +"victory-canvas@npm:37.1.1": + version: 37.1.1 + resolution: "victory-canvas@npm:37.1.1" + dependencies: + lodash: "npm:^4.17.19" + victory-bar: "npm:37.1.1" + victory-core: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/eeb49895de9df354531660604ec94e1a4787f1f1c8c86c1251fdf24194eeadcf9d5dbff604fdb29fe8f07186a820d2e2f378ed327cb9ed7a65c144a2f730c944 + languageName: node + linkType: hard + +"victory-chart@npm:37.1.1": version: 37.1.1 resolution: "victory-chart@npm:37.1.1" dependencies: @@ -20963,7 +21009,7 @@ __metadata: languageName: node linkType: hard -"victory-core@npm:37.1.1, victory-core@npm:^37.1.1": +"victory-core@npm:37.1.1": version: 37.1.1 resolution: "victory-core@npm:37.1.1" dependencies: @@ -20976,7 +21022,7 @@ __metadata: languageName: node linkType: hard -"victory-create-container@npm:^37.1.1": +"victory-create-container@npm:37.1.1": version: 37.1.1 resolution: "victory-create-container@npm:37.1.1" dependencies: @@ -20993,7 +21039,7 @@ __metadata: languageName: node linkType: hard -"victory-cursor-container@npm:37.1.1, victory-cursor-container@npm:^37.1.1": +"victory-cursor-container@npm:37.1.1": version: 37.1.1 resolution: "victory-cursor-container@npm:37.1.1" dependencies: @@ -21005,7 +21051,19 @@ __metadata: languageName: node linkType: hard -"victory-group@npm:^37.1.1": +"victory-errorbar@npm:37.1.1": + version: 37.1.1 + resolution: "victory-errorbar@npm:37.1.1" + dependencies: + lodash: "npm:^4.17.19" + victory-core: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/b8c0cf5bc90bcb0122247720a927e0c0756e37fd8fa601f1e74d595766bf8068dde278e7dba63cb9c118540005d1d0161e33a66e52cbc2b16c3692c425aad9fe + languageName: node + linkType: hard + +"victory-group@npm:37.1.1": version: 37.1.1 resolution: "victory-group@npm:37.1.1" dependencies: @@ -21019,7 +21077,22 @@ __metadata: languageName: node linkType: hard -"victory-legend@npm:^37.1.1": +"victory-histogram@npm:37.1.1": + version: 37.1.1 + resolution: "victory-histogram@npm:37.1.1" + dependencies: + lodash: "npm:^4.17.19" + react-fast-compare: "npm:^3.2.0" + victory-bar: "npm:37.1.1" + victory-core: "npm:37.1.1" + victory-vendor: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/6fa0636af35ddd020d2d3e016e05fd1cbddfa8549c3255bfabdf7af4eea83c4ec72da276f6d0ad870edbc0089e7cd01d1697e14ac47ee29b0f9665fbfc255ae1 + languageName: node + linkType: hard + +"victory-legend@npm:37.1.1": version: 37.1.1 resolution: "victory-legend@npm:37.1.1" dependencies: @@ -21031,7 +21104,7 @@ __metadata: languageName: node linkType: hard -"victory-line@npm:^37.1.1": +"victory-line@npm:37.1.1": version: 37.1.1 resolution: "victory-line@npm:37.1.1" dependencies: @@ -21044,7 +21117,7 @@ __metadata: languageName: node linkType: hard -"victory-pie@npm:^37.1.1": +"victory-pie@npm:37.1.1": version: 37.1.1 resolution: "victory-pie@npm:37.1.1" dependencies: @@ -21069,7 +21142,7 @@ __metadata: languageName: node linkType: hard -"victory-scatter@npm:^37.1.1": +"victory-scatter@npm:37.1.1": version: 37.1.1 resolution: "victory-scatter@npm:37.1.1" dependencies: @@ -21107,7 +21180,7 @@ __metadata: languageName: node linkType: hard -"victory-stack@npm:^37.1.1": +"victory-stack@npm:37.1.1": version: 37.1.1 resolution: "victory-stack@npm:37.1.1" dependencies: @@ -21121,7 +21194,7 @@ __metadata: languageName: node linkType: hard -"victory-tooltip@npm:37.1.1, victory-tooltip@npm:^37.1.1": +"victory-tooltip@npm:37.1.1": version: 37.1.1 resolution: "victory-tooltip@npm:37.1.1" dependencies: @@ -21155,7 +21228,7 @@ __metadata: languageName: node linkType: hard -"victory-voronoi-container@npm:37.1.1, victory-voronoi-container@npm:^37.1.1": +"victory-voronoi-container@npm:37.1.1": version: 37.1.1 resolution: "victory-voronoi-container@npm:37.1.1" dependencies: @@ -21170,7 +21243,20 @@ __metadata: languageName: node linkType: hard -"victory-zoom-container@npm:37.1.1, victory-zoom-container@npm:^37.1.1": +"victory-voronoi@npm:37.1.1": + version: 37.1.1 + resolution: "victory-voronoi@npm:37.1.1" + dependencies: + d3-voronoi: "npm:^1.1.4" + lodash: "npm:^4.17.19" + victory-core: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/9345a0ba71ba15eda09641906f04960258a5acedc1f4eaeae86fb1984a4b7bb63e9319349d0c3abca11da8ba2076fc1a46eab6c70cd69ae5298d9fef71554706 + languageName: node + linkType: hard + +"victory-zoom-container@npm:37.1.1": version: 37.1.1 resolution: "victory-zoom-container@npm:37.1.1" dependencies: @@ -21182,6 +21268,43 @@ __metadata: languageName: node linkType: hard +"victory@npm:^37.1.1": + version: 37.1.1 + resolution: "victory@npm:37.1.1" + dependencies: + victory-area: "npm:37.1.1" + victory-axis: "npm:37.1.1" + victory-bar: "npm:37.1.1" + victory-box-plot: "npm:37.1.1" + victory-brush-container: "npm:37.1.1" + victory-brush-line: "npm:37.1.1" + victory-candlestick: "npm:37.1.1" + victory-canvas: "npm:37.1.1" + victory-chart: "npm:37.1.1" + victory-core: "npm:37.1.1" + victory-create-container: "npm:37.1.1" + victory-cursor-container: "npm:37.1.1" + victory-errorbar: "npm:37.1.1" + victory-group: "npm:37.1.1" + victory-histogram: "npm:37.1.1" + victory-legend: "npm:37.1.1" + victory-line: "npm:37.1.1" + victory-pie: "npm:37.1.1" + victory-polar-axis: "npm:37.1.1" + victory-scatter: "npm:37.1.1" + victory-selection-container: "npm:37.1.1" + victory-shared-events: "npm:37.1.1" + victory-stack: "npm:37.1.1" + victory-tooltip: "npm:37.1.1" + victory-voronoi: "npm:37.1.1" + victory-voronoi-container: "npm:37.1.1" + victory-zoom-container: "npm:37.1.1" + peerDependencies: + react: ">=16.6.0" + checksum: 10c0/068c7da7c2a95013c79703ed3e85c199acbb998e8d7c6e39fb12b3cd175c343cfc13a64a5b38b6dbc15a82aa0db673a000382caa3ebbf3cd267c3229b151c9dc + languageName: node + linkType: hard + "vite@npm:^5.4.8": version: 5.4.8 resolution: "vite@npm:5.4.8"