@chakra-ui/charts 3.32.0 → 3.34.0

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.
@@ -5,7 +5,6 @@
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var react = require('@chakra-ui/react');
7
7
  var React = require('react');
8
- var recharts = require('recharts');
9
8
  var useChart = require('../use-chart.cjs');
10
9
 
11
10
  const ChartContext = React.createContext({});
@@ -29,6 +28,10 @@ const baseCss = react.defineStyle({
29
28
  },
30
29
  "& svg": {
31
30
  overflow: "visible"
31
+ },
32
+ "& .recharts-wrapper": {
33
+ width: "100%",
34
+ height: "100%"
32
35
  }
33
36
  });
34
37
  function ChartRoot(props) {
@@ -40,7 +43,7 @@ function ChartRoot(props) {
40
43
  textStyle: "xs",
41
44
  css: [baseCss, css],
42
45
  ...rest,
43
- children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { children })
46
+ children
44
47
  }
45
48
  ) });
46
49
  }
@@ -3,11 +3,11 @@
3
3
 
4
4
  var useChart = require('./use-chart.cjs');
5
5
  var chart = require('./chart/chart.cjs');
6
- var namespace = require('./chart/namespace.cjs');
6
+ var namespace$2 = require('./chart/namespace.cjs');
7
7
  var barList = require('./bar-list/bar-list.cjs');
8
- var namespace$1 = require('./bar-list/namespace.cjs');
8
+ var namespace = require('./bar-list/namespace.cjs');
9
9
  var barSegment = require('./bar-segment/bar-segment.cjs');
10
- var namespace$2 = require('./bar-segment/namespace.cjs');
10
+ var namespace$1 = require('./bar-segment/namespace.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,7 +17,7 @@ exports.ChartLegend = chart.ChartLegend;
17
17
  exports.ChartRadialText = chart.ChartRadialText;
18
18
  exports.ChartRoot = chart.ChartRoot;
19
19
  exports.ChartTooltip = chart.ChartTooltip;
20
- exports.Chart = namespace;
20
+ exports.Chart = namespace$2;
21
21
  exports.BarListBar = barList.BarListBar;
22
22
  exports.BarListContent = barList.BarListContent;
23
23
  exports.BarListLabel = barList.BarListLabel;
@@ -25,7 +25,7 @@ exports.BarListRoot = barList.BarListRoot;
25
25
  exports.BarListTitle = barList.BarListTitle;
26
26
  exports.BarListTooltip = barList.BarListTooltip;
27
27
  exports.BarListValue = barList.BarListValue;
28
- exports.BarList = namespace$1;
28
+ exports.BarList = namespace;
29
29
  exports.BarSegmentBar = barSegment.BarSegmentBar;
30
30
  exports.BarSegmentContent = barSegment.BarSegmentContent;
31
31
  exports.BarSegmentLabel = barSegment.BarSegmentLabel;
@@ -33,4 +33,4 @@ exports.BarSegmentLegend = barSegment.BarSegmentLegend;
33
33
  exports.BarSegmentReference = barSegment.BarSegmentReference;
34
34
  exports.BarSegmentRoot = barSegment.BarSegmentRoot;
35
35
  exports.BarSegmentValue = barSegment.BarSegmentValue;
36
- exports.BarSegment = namespace$2;
36
+ exports.BarSegment = namespace$1;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { Stack, HStack, Box, FormatNumber, ColorSwatch, Text, Span, Flex } from '@chakra-ui/react';
4
+ import { Stack, HStack, Box, ColorSwatch, Text, Span, Flex, FormatNumber } from '@chakra-ui/react';
5
5
  import * as React from 'react';
6
6
 
7
7
  const ChartContext = React.createContext({});
@@ -2,8 +2,7 @@
2
2
  "use client";
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { defineStyle, Stack, Text, Flex, HStack, ColorSwatch, Span, Box, Separator } from '@chakra-ui/react';
5
- import { createContext, useContext, useMemo } from 'react';
6
- import { ResponsiveContainer } from 'recharts';
5
+ import { createContext, useMemo, useContext } from 'react';
7
6
  import { getProp } from '../use-chart.js';
8
7
 
9
8
  const ChartContext = createContext({});
@@ -27,6 +26,10 @@ const baseCss = defineStyle({
27
26
  },
28
27
  "& svg": {
29
28
  overflow: "visible"
29
+ },
30
+ "& .recharts-wrapper": {
31
+ width: "100%",
32
+ height: "100%"
30
33
  }
31
34
  });
32
35
  function ChartRoot(props) {
@@ -38,7 +41,7 @@ function ChartRoot(props) {
38
41
  textStyle: "xs",
39
42
  css: [baseCss, css],
40
43
  ...rest,
41
- children: /* @__PURE__ */ jsx(ResponsiveContainer, { children })
44
+ children
42
45
  }
43
46
  ) });
44
47
  }
package/dist/esm/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  export { useChart } from './use-chart.js';
3
3
  export { ChartGradient, ChartLegend, ChartRadialText, ChartRoot, ChartTooltip } from './chart/chart.js';
4
- import * as namespace from './chart/namespace.js';
5
- export { namespace as Chart };
4
+ import * as namespace$2 from './chart/namespace.js';
5
+ export { namespace$2 as Chart };
6
6
  export { BarListBar, BarListContent, BarListLabel, BarListRoot, BarListTitle, BarListTooltip, BarListValue } from './bar-list/bar-list.js';
7
- import * as namespace$1 from './bar-list/namespace.js';
8
- export { namespace$1 as BarList };
7
+ import * as namespace from './bar-list/namespace.js';
8
+ export { namespace as BarList };
9
9
  export { BarSegmentBar, BarSegmentContent, BarSegmentLabel, BarSegmentLegend, BarSegmentReference, BarSegmentRoot, BarSegmentValue } from './bar-segment/bar-segment.js';
10
- import * as namespace$2 from './bar-segment/namespace.js';
11
- export { namespace$2 as BarSegment };
10
+ import * as namespace$1 from './bar-segment/namespace.js';
11
+ export { namespace$1 as BarSegment };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakra-ui/charts",
3
- "version": "3.32.0",
3
+ "version": "3.34.0",
4
4
  "description": "Data visualization components for Chakra UI",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
@@ -43,10 +43,10 @@
43
43
  "./package.json": "./package.json"
44
44
  },
45
45
  "devDependencies": {
46
- "recharts": "^3.4.1",
46
+ "recharts": "^3.7.0",
47
47
  "react": "19.2.4",
48
48
  "react-dom": "19.2.4",
49
- "@chakra-ui/react": "3.32.0"
49
+ "@chakra-ui/react": "3.34.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@chakra-ui/react": ">=3",