@yamada-ui/charts 2.0.0-next-20240820160301 → 2.0.0-next-20240908154823

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 (202) hide show
  1. package/README.md +7 -13
  2. package/dist/area-chart-split.js +4 -2
  3. package/dist/area-chart-split.js.map +1 -1
  4. package/dist/area-chart-split.mjs +1 -1
  5. package/dist/area-chart.d.mts +1 -2
  6. package/dist/area-chart.d.ts +1 -2
  7. package/dist/area-chart.js +57 -50
  8. package/dist/area-chart.js.map +1 -1
  9. package/dist/area-chart.mjs +12 -12
  10. package/dist/bar-chart.d.mts +1 -2
  11. package/dist/bar-chart.d.ts +1 -2
  12. package/dist/bar-chart.js +15 -9
  13. package/dist/bar-chart.js.map +1 -1
  14. package/dist/bar-chart.mjs +11 -11
  15. package/dist/chart-legend.mjs +3 -3
  16. package/dist/chart-tooltip.d.mts +3 -1
  17. package/dist/chart-tooltip.d.ts +3 -1
  18. package/dist/chart-tooltip.js +9 -1
  19. package/dist/chart-tooltip.js.map +1 -1
  20. package/dist/chart-tooltip.mjs +3 -3
  21. package/dist/chart.types.d.mts +12 -5
  22. package/dist/chart.types.d.ts +12 -5
  23. package/dist/chart.types.js.map +1 -1
  24. package/dist/{chunk-STBYN5JW.mjs → chunk-3AOICU4Q.mjs} +2 -2
  25. package/dist/chunk-3HQ2UC3I.mjs +45 -0
  26. package/dist/chunk-3HQ2UC3I.mjs.map +1 -0
  27. package/dist/{chunk-FALZDKAW.mjs → chunk-3VKCTSPC.mjs} +10 -11
  28. package/dist/chunk-3VKCTSPC.mjs.map +1 -0
  29. package/dist/{chunk-S5NKKKV5.mjs → chunk-5PSRSNGH.mjs} +7 -8
  30. package/dist/chunk-5PSRSNGH.mjs.map +1 -0
  31. package/dist/{chunk-F34FV5DY.mjs → chunk-6YUJLLGN.mjs} +59 -3
  32. package/dist/chunk-6YUJLLGN.mjs.map +1 -0
  33. package/dist/{chunk-KBBHISBO.mjs → chunk-BYL7HWNN.mjs} +13 -14
  34. package/dist/chunk-BYL7HWNN.mjs.map +1 -0
  35. package/dist/chunk-D5IRVU4W.mjs +46 -0
  36. package/dist/chunk-D5IRVU4W.mjs.map +1 -0
  37. package/dist/{chunk-DGOXJ373.mjs → chunk-EL2VTGFB.mjs} +2 -2
  38. package/dist/{chunk-6L73M52L.mjs → chunk-FPFCMFCJ.mjs} +7 -9
  39. package/dist/chunk-FPFCMFCJ.mjs.map +1 -0
  40. package/dist/{chunk-Q7CCSKX3.mjs → chunk-JTQ5QCML.mjs} +4 -4
  41. package/dist/chunk-JTQ5QCML.mjs.map +1 -0
  42. package/dist/chunk-KVE6VXTJ.mjs +37 -0
  43. package/dist/chunk-KVE6VXTJ.mjs.map +1 -0
  44. package/dist/{chunk-PNE3JG54.mjs → chunk-MGTMKKSH.mjs} +5 -3
  45. package/dist/chunk-MGTMKKSH.mjs.map +1 -0
  46. package/dist/chunk-PG7ZV76C.mjs +155 -0
  47. package/dist/chunk-PG7ZV76C.mjs.map +1 -0
  48. package/dist/{chunk-D7EZKGCJ.mjs → chunk-PPBHLDVN.mjs} +2 -2
  49. package/dist/{chunk-AODYT4HF.mjs → chunk-RKO6KM3T.mjs} +13 -14
  50. package/dist/chunk-RKO6KM3T.mjs.map +1 -0
  51. package/dist/chunk-SBPKRYF2.mjs +199 -0
  52. package/dist/chunk-SBPKRYF2.mjs.map +1 -0
  53. package/dist/{chunk-FCMP6QEZ.mjs → chunk-SWATR7CU.mjs} +14 -15
  54. package/dist/chunk-SWATR7CU.mjs.map +1 -0
  55. package/dist/{chunk-MT5JI4OR.mjs → chunk-T5DNDBW6.mjs} +11 -3
  56. package/dist/chunk-T5DNDBW6.mjs.map +1 -0
  57. package/dist/{chunk-5Q6O726L.mjs → chunk-TCSYDMC7.mjs} +2 -2
  58. package/dist/{chunk-UHQ6WE5D.mjs → chunk-TMHSYM3V.mjs} +17 -13
  59. package/dist/chunk-TMHSYM3V.mjs.map +1 -0
  60. package/dist/{chunk-AOGTJ4EN.mjs → chunk-VMBRDEM2.mjs} +2 -2
  61. package/dist/{chunk-XUAAKVRL.mjs → chunk-WMG5U5AU.mjs} +26 -13
  62. package/dist/chunk-WMG5U5AU.mjs.map +1 -0
  63. package/dist/{chunk-6BNJZIBK.mjs → chunk-X7XFG7TS.mjs} +10 -12
  64. package/dist/chunk-X7XFG7TS.mjs.map +1 -0
  65. package/dist/{chunk-MOFNE6PO.mjs → chunk-XRF3TNSQ.mjs} +6 -30
  66. package/dist/chunk-XRF3TNSQ.mjs.map +1 -0
  67. package/dist/{chunk-VK4VQQYY.mjs → chunk-YNJ423BR.mjs} +2 -2
  68. package/dist/{chunk-BGMNYKQY.mjs → chunk-ZQWVMOT6.mjs} +9 -7
  69. package/dist/chunk-ZQWVMOT6.mjs.map +1 -0
  70. package/dist/donut-chart.d.mts +3 -3
  71. package/dist/donut-chart.d.ts +3 -3
  72. package/dist/donut-chart.js +109 -58
  73. package/dist/donut-chart.js.map +1 -1
  74. package/dist/donut-chart.mjs +9 -8
  75. package/dist/index.d.mts +6 -2
  76. package/dist/index.d.ts +6 -2
  77. package/dist/index.js +599 -167
  78. package/dist/index.js.map +1 -1
  79. package/dist/index.mjs +30 -22
  80. package/dist/index.mjs.map +1 -1
  81. package/dist/line-chart.d.mts +1 -2
  82. package/dist/line-chart.d.ts +1 -2
  83. package/dist/line-chart.js +15 -10
  84. package/dist/line-chart.js.map +1 -1
  85. package/dist/line-chart.mjs +11 -11
  86. package/dist/pie-chart.d.mts +2 -3
  87. package/dist/pie-chart.d.ts +2 -3
  88. package/dist/pie-chart.js +13 -7
  89. package/dist/pie-chart.js.map +1 -1
  90. package/dist/pie-chart.mjs +8 -8
  91. package/dist/radar-chart.d.mts +3 -3
  92. package/dist/radar-chart.d.ts +3 -3
  93. package/dist/radar-chart.js +90 -70
  94. package/dist/radar-chart.js.map +1 -1
  95. package/dist/radar-chart.mjs +9 -8
  96. package/dist/radial-chart.d.mts +53 -0
  97. package/dist/radial-chart.d.ts +53 -0
  98. package/dist/radial-chart.js +767 -0
  99. package/dist/radial-chart.js.map +1 -0
  100. package/dist/radial-chart.mjs +18 -0
  101. package/dist/radial-chart.mjs.map +1 -0
  102. package/dist/rechart-properties.d.mts +5 -1
  103. package/dist/rechart-properties.d.ts +5 -1
  104. package/dist/rechart-properties.js +60 -1
  105. package/dist/rechart-properties.js.map +1 -1
  106. package/dist/rechart-properties.mjs +7 -1
  107. package/dist/use-area-chart.d.mts +1 -2
  108. package/dist/use-area-chart.d.ts +1 -2
  109. package/dist/use-area-chart.js +7 -9
  110. package/dist/use-area-chart.js.map +1 -1
  111. package/dist/use-area-chart.mjs +2 -2
  112. package/dist/use-bar-chart.d.mts +1 -2
  113. package/dist/use-bar-chart.d.ts +1 -2
  114. package/dist/use-bar-chart.js +4 -5
  115. package/dist/use-bar-chart.js.map +1 -1
  116. package/dist/use-bar-chart.mjs +2 -2
  117. package/dist/use-chart-axis.d.mts +0 -1
  118. package/dist/use-chart-axis.d.ts +0 -1
  119. package/dist/use-chart-axis.js.map +1 -1
  120. package/dist/use-chart-axis.mjs +2 -2
  121. package/dist/use-chart-grid.d.mts +0 -1
  122. package/dist/use-chart-grid.d.ts +0 -1
  123. package/dist/use-chart-grid.js.map +1 -1
  124. package/dist/use-chart-grid.mjs +2 -2
  125. package/dist/use-chart-label-list.d.mts +22 -0
  126. package/dist/use-chart-label-list.d.ts +22 -0
  127. package/dist/use-chart-label-list.js +93 -0
  128. package/dist/use-chart-label-list.js.map +1 -0
  129. package/dist/use-chart-label-list.mjs +10 -0
  130. package/dist/use-chart-label-list.mjs.map +1 -0
  131. package/dist/use-chart-label.d.mts +20 -0
  132. package/dist/use-chart-label.d.ts +20 -0
  133. package/dist/use-chart-label.js +82 -0
  134. package/dist/use-chart-label.js.map +1 -0
  135. package/dist/use-chart-label.mjs +10 -0
  136. package/dist/use-chart-label.mjs.map +1 -0
  137. package/dist/use-chart-legend.d.mts +0 -1
  138. package/dist/use-chart-legend.d.ts +0 -1
  139. package/dist/use-chart-legend.js.map +1 -1
  140. package/dist/use-chart-legend.mjs +2 -2
  141. package/dist/use-chart-reference-line.d.mts +0 -1
  142. package/dist/use-chart-reference-line.d.ts +0 -1
  143. package/dist/use-chart-reference-line.js +1 -1
  144. package/dist/use-chart-reference-line.js.map +1 -1
  145. package/dist/use-chart-reference-line.mjs +2 -2
  146. package/dist/use-chart-tooltip.d.mts +0 -1
  147. package/dist/use-chart-tooltip.d.ts +0 -1
  148. package/dist/use-chart-tooltip.js.map +1 -1
  149. package/dist/use-chart-tooltip.mjs +2 -2
  150. package/dist/use-chart.d.mts +0 -1
  151. package/dist/use-chart.d.ts +0 -1
  152. package/dist/use-chart.js.map +1 -1
  153. package/dist/use-chart.mjs +2 -2
  154. package/dist/use-line-chart.d.mts +1 -2
  155. package/dist/use-line-chart.d.ts +1 -2
  156. package/dist/use-line-chart.js +4 -6
  157. package/dist/use-line-chart.js.map +1 -1
  158. package/dist/use-line-chart.mjs +2 -2
  159. package/dist/use-pie-chart.d.mts +1 -2
  160. package/dist/use-pie-chart.d.ts +1 -2
  161. package/dist/use-pie-chart.js +3 -4
  162. package/dist/use-pie-chart.js.map +1 -1
  163. package/dist/use-pie-chart.mjs +2 -2
  164. package/dist/use-polar-grid.d.mts +24 -0
  165. package/dist/use-polar-grid.d.ts +24 -0
  166. package/dist/use-polar-grid.js +90 -0
  167. package/dist/use-polar-grid.js.map +1 -0
  168. package/dist/use-polar-grid.mjs +10 -0
  169. package/dist/use-polar-grid.mjs.map +1 -0
  170. package/dist/use-radar-chart.d.mts +3 -13
  171. package/dist/use-radar-chart.d.ts +3 -13
  172. package/dist/use-radar-chart.js +3 -35
  173. package/dist/use-radar-chart.js.map +1 -1
  174. package/dist/use-radar-chart.mjs +2 -2
  175. package/dist/use-radial-chart.d.mts +80 -0
  176. package/dist/use-radial-chart.d.ts +80 -0
  177. package/dist/use-radial-chart.js +228 -0
  178. package/dist/use-radial-chart.js.map +1 -0
  179. package/dist/use-radial-chart.mjs +10 -0
  180. package/dist/use-radial-chart.mjs.map +1 -0
  181. package/package.json +4 -4
  182. package/dist/chunk-6BNJZIBK.mjs.map +0 -1
  183. package/dist/chunk-6L73M52L.mjs.map +0 -1
  184. package/dist/chunk-AODYT4HF.mjs.map +0 -1
  185. package/dist/chunk-BGMNYKQY.mjs.map +0 -1
  186. package/dist/chunk-F34FV5DY.mjs.map +0 -1
  187. package/dist/chunk-FALZDKAW.mjs.map +0 -1
  188. package/dist/chunk-FCMP6QEZ.mjs.map +0 -1
  189. package/dist/chunk-KBBHISBO.mjs.map +0 -1
  190. package/dist/chunk-MOFNE6PO.mjs.map +0 -1
  191. package/dist/chunk-MT5JI4OR.mjs.map +0 -1
  192. package/dist/chunk-PNE3JG54.mjs.map +0 -1
  193. package/dist/chunk-Q7CCSKX3.mjs.map +0 -1
  194. package/dist/chunk-S5NKKKV5.mjs.map +0 -1
  195. package/dist/chunk-UHQ6WE5D.mjs.map +0 -1
  196. package/dist/chunk-XUAAKVRL.mjs.map +0 -1
  197. /package/dist/{chunk-STBYN5JW.mjs.map → chunk-3AOICU4Q.mjs.map} +0 -0
  198. /package/dist/{chunk-DGOXJ373.mjs.map → chunk-EL2VTGFB.mjs.map} +0 -0
  199. /package/dist/{chunk-D7EZKGCJ.mjs.map → chunk-PPBHLDVN.mjs.map} +0 -0
  200. /package/dist/{chunk-5Q6O726L.mjs.map → chunk-TCSYDMC7.mjs.map} +0 -0
  201. /package/dist/{chunk-AOGTJ4EN.mjs.map → chunk-VMBRDEM2.mjs.map} +0 -0
  202. /package/dist/{chunk-VK4VQQYY.mjs.map → chunk-YNJ423BR.mjs.map} +0 -0
package/README.md CHANGED
@@ -3,19 +3,13 @@
3
3
  ## Installation
4
4
 
5
5
  ```sh
6
- $ pnpm add @yamada-ui/charts
7
- ```
8
-
9
- or
10
-
11
- ```sh
12
- $ yarn add @yamada-ui/charts
13
- ```
14
-
15
- or
16
-
17
- ```sh
18
- $ npm install @yamada-ui/charts
6
+ pnpm add @yamada-ui/charts
7
+ # or
8
+ yarn add @yamada-ui/charts
9
+ # or
10
+ npm install @yamada-ui/charts
11
+ # or
12
+ bun add @yamada-ui/charts
19
13
  ```
20
14
 
21
15
  ## Contribution
@@ -24,14 +24,16 @@ __export(area_chart_split_exports, {
24
24
  AreaSplit: () => AreaSplit
25
25
  });
26
26
  module.exports = __toCommonJS(area_chart_split_exports);
27
+ var import_core = require("@yamada-ui/core");
27
28
  var import_jsx_runtime = require("react/jsx-runtime");
28
29
  var AreaSplit = ({ offset, id, fillOpacity }) => {
30
+ const { theme } = (0, import_core.useTheme)();
29
31
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
30
32
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31
33
  "stop",
32
34
  {
33
35
  offset,
34
- stopColor: "var(--ui-area-split-0)",
36
+ stopColor: (0, import_core.getVar)(`area-split-0`)(theme),
35
37
  stopOpacity: fillOpacity != null ? fillOpacity : 0.4
36
38
  }
37
39
  ),
@@ -39,7 +41,7 @@ var AreaSplit = ({ offset, id, fillOpacity }) => {
39
41
  "stop",
40
42
  {
41
43
  offset,
42
- stopColor: "var(--ui-area-split-1)",
44
+ stopColor: (0, import_core.getVar)(`area-split-1`)(theme),
43
45
  stopOpacity: fillOpacity != null ? fillOpacity : 0.4
44
46
  }
45
47
  )
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/area-chart-split.tsx"],"sourcesContent":["export type AreaSplitProps = {\n offset: number\n id?: string\n fillOpacity: number | string | undefined\n}\n\nexport const AreaSplit = ({ offset, id, fillOpacity }: AreaSplitProps) => {\n return (\n <linearGradient id={id} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop\n offset={offset}\n stopColor=\"var(--ui-area-split-0)\"\n stopOpacity={fillOpacity ?? 0.4}\n />\n <stop\n offset={offset}\n stopColor=\"var(--ui-area-split-1)\"\n stopOpacity={fillOpacity ?? 0.4}\n />\n </linearGradient>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQI;AAFG,IAAM,YAAY,CAAC,EAAE,QAAQ,IAAI,YAAY,MAAsB;AACxE,SACE,6CAAC,oBAAe,IAAQ,IAAG,KAAI,IAAG,KAAI,IAAG,KAAI,IAAG,KAC9C;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,aAAa,oCAAe;AAAA;AAAA,IAC9B;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,aAAa,oCAAe;AAAA;AAAA,IAC9B;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/area-chart-split.tsx"],"sourcesContent":["import { getVar, useTheme } from \"@yamada-ui/core\"\n\nexport type AreaSplitProps = {\n offset: number\n id?: string\n fillOpacity: number | string | undefined\n}\n\nexport const AreaSplit = ({ offset, id, fillOpacity }: AreaSplitProps) => {\n const { theme } = useTheme()\n\n return (\n <linearGradient id={id} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop\n offset={offset}\n stopColor={getVar(`area-split-0`)(theme)}\n stopOpacity={fillOpacity ?? 0.4}\n />\n <stop\n offset={offset}\n stopColor={getVar(`area-split-1`)(theme)}\n stopOpacity={fillOpacity ?? 0.4}\n />\n </linearGradient>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAY7B;AAJG,IAAM,YAAY,CAAC,EAAE,QAAQ,IAAI,YAAY,MAAsB;AACxE,QAAM,EAAE,MAAM,QAAI,sBAAS;AAE3B,SACE,6CAAC,oBAAe,IAAQ,IAAG,KAAI,IAAG,KAAI,IAAG,KAAI,IAAG,KAC9C;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,oBAAO,cAAc,EAAE,KAAK;AAAA,QACvC,aAAa,oCAAe;AAAA;AAAA,IAC9B;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,oBAAO,cAAc,EAAE,KAAK;AAAA,QACvC,aAAa,oCAAe;AAAA;AAAA,IAC9B;AAAA,KACF;AAEJ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AreaSplit
4
- } from "./chunk-PNE3JG54.mjs";
4
+ } from "./chunk-MGTMKKSH.mjs";
5
5
  export {
6
6
  AreaSplit
7
7
  };
@@ -15,7 +15,6 @@ import './area-chart-gradient.mjs';
15
15
  import 'react/jsx-runtime';
16
16
  import './area-chart-split.mjs';
17
17
  import './chart.types.mjs';
18
- import './rechart-properties.mjs';
19
18
 
20
19
  type AreaChartOptions = {
21
20
  /**
@@ -35,7 +34,7 @@ type AreaChartProps = HTMLUIProps<"div"> & ThemeProps<"AreaChart"> & AreaChartOp
35
34
  /**
36
35
  * `AreaChart` is a component for drawing area charts to compare multiple sets of data.
37
36
  *
38
- * @see Docs https://yamada-ui.com/components/feedback/area-chart
37
+ * @see Docs https://yamada-ui.com/components/data-display/area-chart
39
38
  */
40
39
  declare const AreaChart: _yamada_ui_core.Component<"div", AreaChartProps>;
41
40
 
@@ -15,7 +15,6 @@ import './area-chart-gradient.js';
15
15
  import 'react/jsx-runtime';
16
16
  import './area-chart-split.js';
17
17
  import './chart.types.js';
18
- import './rechart-properties.js';
19
18
 
20
19
  type AreaChartOptions = {
21
20
  /**
@@ -35,7 +34,7 @@ type AreaChartProps = HTMLUIProps<"div"> & ThemeProps<"AreaChart"> & AreaChartOp
35
34
  /**
36
35
  * `AreaChart` is a component for drawing area charts to compare multiple sets of data.
37
36
  *
38
- * @see Docs https://yamada-ui.com/components/feedback/area-chart
37
+ * @see Docs https://yamada-ui.com/components/data-display/area-chart
39
38
  */
40
39
  declare const AreaChart: _yamada_ui_core.Component<"div", AreaChartProps>;
41
40
 
@@ -24,7 +24,7 @@ __export(area_chart_exports, {
24
24
  AreaChart: () => AreaChart
25
25
  });
26
26
  module.exports = __toCommonJS(area_chart_exports);
27
- var import_core10 = require("@yamada-ui/core");
27
+ var import_core11 = require("@yamada-ui/core");
28
28
  var import_utils11 = require("@yamada-ui/utils");
29
29
  var import_react8 = require("react");
30
30
  var import_recharts = require("recharts");
@@ -48,14 +48,16 @@ var AreaGradient = ({
48
48
  };
49
49
 
50
50
  // src/area-chart-split.tsx
51
+ var import_core = require("@yamada-ui/core");
51
52
  var import_jsx_runtime2 = require("react/jsx-runtime");
52
53
  var AreaSplit = ({ offset, id, fillOpacity }) => {
54
+ const { theme } = (0, import_core.useTheme)();
53
55
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
54
56
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
55
57
  "stop",
56
58
  {
57
59
  offset,
58
- stopColor: "var(--ui-area-split-0)",
60
+ stopColor: (0, import_core.getVar)(`area-split-0`)(theme),
59
61
  stopOpacity: fillOpacity != null ? fillOpacity : 0.4
60
62
  }
61
63
  ),
@@ -63,7 +65,7 @@ var AreaSplit = ({ offset, id, fillOpacity }) => {
63
65
  "stop",
64
66
  {
65
67
  offset,
66
- stopColor: "var(--ui-area-split-1)",
68
+ stopColor: (0, import_core.getVar)(`area-split-1`)(theme),
67
69
  stopOpacity: fillOpacity != null ? fillOpacity : 0.4
68
70
  }
69
71
  )
@@ -71,20 +73,20 @@ var AreaSplit = ({ offset, id, fillOpacity }) => {
71
73
  };
72
74
 
73
75
  // src/chart-legend.tsx
74
- var import_core3 = require("@yamada-ui/core");
76
+ var import_core4 = require("@yamada-ui/core");
75
77
  var import_utils3 = require("@yamada-ui/utils");
76
78
 
77
79
  // src/use-chart.ts
78
- var import_core2 = require("@yamada-ui/core");
80
+ var import_core3 = require("@yamada-ui/core");
79
81
  var import_utils2 = require("@yamada-ui/utils");
80
82
  var import_react = require("react");
81
83
 
82
84
  // src/chart-utils.ts
83
- var import_core = require("@yamada-ui/core");
85
+ var import_core2 = require("@yamada-ui/core");
84
86
  var import_utils = require("@yamada-ui/utils");
85
87
  var getClassName = (...styles) => (theme) => (0, import_utils.cx)(
86
88
  ...styles.map(
87
- (style) => (0, import_utils.isString)(style) ? style : (0, import_core.getCSS)(style)(theme)
89
+ (style) => (0, import_utils.isString)(style) ? style : (0, import_core2.getCSS)(style)(theme)
88
90
  )
89
91
  );
90
92
  var getComponentProps = ([obj, keys], ...props) => (theme, isContain) => {
@@ -336,7 +338,7 @@ var [ChartProvider, useChartContext] = (0, import_utils2.createContext)({
336
338
  errorMessage: `useChartContext returned is 'undefined'. Seems you forgot to wrap the components in "<LineChart />" or "<BarChart />" etc.`
337
339
  });
338
340
  var useChart = ({ containerProps = {} }) => {
339
- const { theme } = (0, import_core2.useTheme)();
341
+ const { theme } = (0, import_core3.useTheme)();
340
342
  const [reChartsProps, propClassName] = getComponentProps([
341
343
  containerProps,
342
344
  containerProperties
@@ -369,13 +371,13 @@ var useTooltip = ({} = {}) => {
369
371
 
370
372
  // src/chart-legend.tsx
371
373
  var import_jsx_runtime3 = require("react/jsx-runtime");
372
- var ChartLegend = (0, import_core3.forwardRef)(
374
+ var ChartLegend = (0, import_core4.forwardRef)(
373
375
  ({ className, payload = [], onHighlight, ...rest }, ref) => {
374
376
  const { styles } = useLegend();
375
377
  const items = payload.map(({ dataKey, value: valueProp, color }, index) => {
376
378
  const value = dataKey != null ? dataKey : valueProp;
377
379
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
378
- import_core3.ui.div,
380
+ import_core4.ui.div,
379
381
  {
380
382
  className: "ui-chart__legend-item",
381
383
  onMouseEnter: () => onHighlight(value),
@@ -383,21 +385,21 @@ var ChartLegend = (0, import_core3.forwardRef)(
383
385
  __css: styles.legendItem,
384
386
  children: [
385
387
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
386
- import_core3.ui.div,
388
+ import_core4.ui.div,
387
389
  {
388
390
  className: "ui-chart__legend-swatch",
389
391
  background: color,
390
392
  __css: styles.legendSwatch
391
393
  }
392
394
  ),
393
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.ui.span, { className: "ui-chart__legend-label", children: value })
395
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core4.ui.span, { className: "ui-chart__legend-label", children: value })
394
396
  ]
395
397
  },
396
398
  `legend-${index}`
397
399
  );
398
400
  });
399
401
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
400
- import_core3.ui.div,
402
+ import_core4.ui.div,
401
403
  {
402
404
  ref,
403
405
  className: (0, import_utils3.cx)("ui-chart__legend", className),
@@ -410,24 +412,32 @@ var ChartLegend = (0, import_core3.forwardRef)(
410
412
  );
411
413
 
412
414
  // src/chart-tooltip.tsx
413
- var import_core4 = require("@yamada-ui/core");
415
+ var import_core5 = require("@yamada-ui/core");
414
416
  var import_utils4 = require("@yamada-ui/utils");
415
417
  var import_jsx_runtime4 = require("react/jsx-runtime");
416
- var ChartTooltip = (0, import_core4.forwardRef)(
418
+ var ChartTooltip = (0, import_core5.forwardRef)(
417
419
  ({
418
420
  label,
421
+ dataKey = "value",
419
422
  className,
420
423
  payload = [],
421
424
  valueFormatter,
422
425
  labelFormatter,
423
426
  unit,
427
+ isRadialChart,
424
428
  ...rest
425
429
  }, ref) => {
426
430
  var _a;
427
431
  const { styles } = useTooltip();
428
432
  const items = payload.map(
429
- ({ color: colorProp, name, value: valueProp, payload: payload2 } = {}, index) => {
433
+ ({
434
+ color: colorProp,
435
+ name: nameProp,
436
+ [dataKey]: valueProp,
437
+ payload: payload2
438
+ } = {}, index) => {
430
439
  var _a2;
440
+ const name = isRadialChart ? payload2 == null ? void 0 : payload2.name : nameProp;
431
441
  const color = colorProp != null ? colorProp : payload2 == null ? void 0 : payload2.color;
432
442
  let value;
433
443
  if ((0, import_utils4.isArray)(valueProp)) {
@@ -439,13 +449,13 @@ var ChartTooltip = (0, import_core4.forwardRef)(
439
449
  value = (_a2 = valueFormatter == null ? void 0 : valueFormatter(valueProp)) != null ? _a2 : valueProp;
440
450
  }
441
451
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
442
- import_core4.ui.div,
452
+ import_core5.ui.div,
443
453
  {
444
454
  className: "ui-chart__tooltip-item",
445
455
  __css: styles.tooltipItem,
446
456
  children: [
447
457
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
448
- import_core4.ui.div,
458
+ import_core5.ui.div,
449
459
  {
450
460
  className: "ui-chart__tooltip-swatch",
451
461
  background: color,
@@ -453,7 +463,7 @@ var ChartTooltip = (0, import_core4.forwardRef)(
453
463
  }
454
464
  ),
455
465
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
456
- import_core4.ui.span,
466
+ import_core5.ui.span,
457
467
  {
458
468
  className: "ui-chart__tooltip-label",
459
469
  __css: styles.tooltipLabel,
@@ -461,7 +471,7 @@ var ChartTooltip = (0, import_core4.forwardRef)(
461
471
  }
462
472
  ),
463
473
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
464
- import_core4.ui.span,
474
+ import_core5.ui.span,
465
475
  {
466
476
  className: "ui-chart__tooltip-value",
467
477
  __css: styles.tooltipValue,
@@ -478,15 +488,15 @@ var ChartTooltip = (0, import_core4.forwardRef)(
478
488
  }
479
489
  );
480
490
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
481
- import_core4.ui.div,
491
+ import_core5.ui.div,
482
492
  {
483
493
  ref,
484
494
  className: (0, import_utils4.cx)("ui-chart__tooltip", className),
485
495
  __css: styles.tooltip,
486
496
  ...rest,
487
497
  children: [
488
- label ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.ui.p, { className: "ui-chart__tooltip-title", __css: styles.tooltipTitle, children: (_a = labelFormatter == null ? void 0 : labelFormatter(label)) != null ? _a : label }) : null,
489
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.ui.div, { className: "ui-chart__tooltip-list", __css: styles.tooltipList, children: items })
498
+ label ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core5.ui.p, { className: "ui-chart__tooltip-title", __css: styles.tooltipTitle, children: (_a = labelFormatter == null ? void 0 : labelFormatter(label)) != null ? _a : label }) : null,
499
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core5.ui.div, { className: "ui-chart__tooltip-list", __css: styles.tooltipList, children: items })
490
500
  ]
491
501
  }
492
502
  );
@@ -494,7 +504,7 @@ var ChartTooltip = (0, import_core4.forwardRef)(
494
504
  );
495
505
 
496
506
  // src/use-area-chart.ts
497
- var import_core5 = require("@yamada-ui/core");
507
+ var import_core6 = require("@yamada-ui/core");
498
508
  var import_utils5 = require("@yamada-ui/utils");
499
509
  var import_react2 = require("react");
500
510
  var useAreaChart = ({
@@ -520,7 +530,7 @@ var useAreaChart = ({
520
530
  }) => {
521
531
  var _a;
522
532
  const uuid = (0, import_react2.useId)();
523
- const { theme } = (0, import_core5.useTheme)();
533
+ const { theme } = (0, import_core6.useTheme)();
524
534
  const [highlightedArea, setHighlightedArea] = (0, import_react2.useState)(null);
525
535
  const splitId = `${uuid}-split`;
526
536
  const stacked = type === "stacked" || type === "percent";
@@ -535,7 +545,6 @@ var useAreaChart = ({
535
545
  } = (_a = rest.areaProps) != null ? _a : {};
536
546
  const areaColors = (0, import_react2.useMemo)(
537
547
  () => series.map(({ color }, index) => ({
538
- __prefix: "ui",
539
548
  name: `area-${index}`,
540
549
  token: "colors",
541
550
  value: color != null ? color : "transparent"
@@ -544,7 +553,6 @@ var useAreaChart = ({
544
553
  );
545
554
  const areaSplitColors = (0, import_react2.useMemo)(
546
555
  () => splitColors.map((color, index) => ({
547
- __prefix: "ui",
548
556
  name: `area-split-${index}`,
549
557
  token: "colors",
550
558
  value: color != null ? color : "transparent"
@@ -553,7 +561,6 @@ var useAreaChart = ({
553
561
  );
554
562
  const referenceLineColors = (0, import_react2.useMemo)(
555
563
  () => referenceLineProps ? referenceLineProps.map(({ color }, index) => ({
556
- __prefix: "ui",
557
564
  name: `reference-line-${index}`,
558
565
  token: "colors",
559
566
  value: color != null ? color : "transparent"
@@ -565,9 +572,10 @@ var useAreaChart = ({
565
572
  ...areaColors,
566
573
  ...areaSplitColors,
567
574
  ...referenceLineColors,
568
- { __prefix: "ui", name: "fill-opacity", value: fillOpacity }
575
+ { name: "fill-opacity", value: fillOpacity }
569
576
  ];
570
577
  }, [areaColors, areaSplitColors, referenceLineColors, fillOpacity]);
578
+ const fillOpacityVar = (0, import_react2.useMemo)(() => (0, import_core6.getVar)("fill-opacity")(theme), [theme]);
571
579
  const [chartProps, areaChartClassName] = (0, import_react2.useMemo)(
572
580
  () => {
573
581
  var _a2;
@@ -635,7 +643,7 @@ var useAreaChart = ({
635
643
  ...computedProps
636
644
  } = props;
637
645
  const id = `${uuid}-${dataKey}`;
638
- const color = `var(--ui-area-${index})`;
646
+ const color = (0, import_core6.getVar)(`area-${index}`)(theme);
639
647
  const dimmed = shouldHighlight && highlightedArea !== dataKey;
640
648
  const computedDimArea = { ...dimAreaProps, ...dimArea2 };
641
649
  const resolvedProps = {
@@ -751,10 +759,10 @@ var useAreaChart = ({
751
759
  (props = {}) => ({
752
760
  id: splitId,
753
761
  offset: splitOffset != null ? splitOffset : defaultSplitOffset,
754
- fillOpacity: "var(--ui-fill-opacity)",
762
+ fillOpacity: fillOpacityVar,
755
763
  ...props
756
764
  }),
757
- [defaultSplitOffset, splitId, splitOffset]
765
+ [defaultSplitOffset, splitId, splitOffset, fillOpacityVar]
758
766
  );
759
767
  const getAreaProps = (0, import_react2.useCallback)(
760
768
  ({ index, className: classNameProp, ...props }, ref = null) => {
@@ -801,10 +809,10 @@ var useAreaChart = ({
801
809
  const getAreaGradientProps = (0, import_react2.useCallback)(
802
810
  (props = {}) => ({
803
811
  withGradient,
804
- fillOpacity: "var(--ui-fill-opacity)",
812
+ fillOpacity: fillOpacityVar,
805
813
  ...props
806
814
  }),
807
- [withGradient]
815
+ [withGradient, fillOpacityVar]
808
816
  );
809
817
  return {
810
818
  getAreaChartProps,
@@ -817,7 +825,7 @@ var useAreaChart = ({
817
825
  };
818
826
 
819
827
  // src/use-chart-axis.ts
820
- var import_core6 = require("@yamada-ui/core");
828
+ var import_core7 = require("@yamada-ui/core");
821
829
  var import_utils6 = require("@yamada-ui/utils");
822
830
  var import_react3 = require("react");
823
831
  var useChartAxis = ({
@@ -837,7 +845,7 @@ var useChartAxis = ({
837
845
  ...rest
838
846
  }) => {
839
847
  var _a, _b, _c, _d;
840
- const { theme } = (0, import_core6.useTheme)();
848
+ const { theme } = (0, import_core7.useTheme)();
841
849
  const xAxisKey = (0, import_react3.useMemo)(
842
850
  () => layoutType === "vertical" ? { type: "number" } : { dataKey },
843
851
  [dataKey, layoutType]
@@ -958,7 +966,7 @@ var valueToPercent = (value) => {
958
966
  };
959
967
 
960
968
  // src/use-chart-grid.ts
961
- var import_core7 = require("@yamada-ui/core");
969
+ var import_core8 = require("@yamada-ui/core");
962
970
  var import_utils7 = require("@yamada-ui/utils");
963
971
  var import_react4 = require("react");
964
972
  var useChartGrid = ({
@@ -967,7 +975,7 @@ var useChartGrid = ({
967
975
  strokeDasharray = "5 5",
968
976
  styles
969
977
  }) => {
970
- const { theme } = (0, import_core7.useTheme)();
978
+ const { theme } = (0, import_core8.useTheme)();
971
979
  const [reChartsProps, propClassName] = getComponentProps(
972
980
  [gridProps, gridProperties],
973
981
  styles.grid
@@ -1012,22 +1020,22 @@ var useChartLegend = ({
1012
1020
  };
1013
1021
 
1014
1022
  // src/use-chart-reference-line.ts
1015
- var import_core8 = require("@yamada-ui/core");
1023
+ var import_core9 = require("@yamada-ui/core");
1016
1024
  var import_utils9 = require("@yamada-ui/utils");
1017
1025
  var import_react6 = require("react");
1018
1026
  var useChartReferenceLine = ({
1019
1027
  referenceLineProps = [],
1020
1028
  styles
1021
1029
  }) => {
1022
- const { theme } = (0, import_core8.useTheme)();
1023
- const styleClassName = (0, import_core8.getCSS)(styles.referenceLine)(theme);
1030
+ const { theme } = (0, import_core9.useTheme)();
1031
+ const styleClassName = (0, import_core9.getCSS)(styles.referenceLine)(theme);
1024
1032
  const propList = (0, import_react6.useMemo)(
1025
1033
  () => referenceLineProps.map((props, index) => {
1026
1034
  const [{ label: labelProp, ...rest }, propClassName] = getComponentProps(
1027
1035
  [props, referenceLineProperties],
1028
1036
  styleClassName
1029
1037
  )(theme);
1030
- const color = `var(--ui-reference-line-${index})`;
1038
+ const color = (0, import_core9.getVar)(`reference-line-${index}`)(theme);
1031
1039
  const label = {
1032
1040
  value: labelProp,
1033
1041
  fill: color,
@@ -1056,7 +1064,7 @@ var useChartReferenceLine = ({
1056
1064
  };
1057
1065
 
1058
1066
  // src/use-chart-tooltip.ts
1059
- var import_core9 = require("@yamada-ui/core");
1067
+ var import_core10 = require("@yamada-ui/core");
1060
1068
  var import_utils10 = require("@yamada-ui/utils");
1061
1069
  var import_react7 = require("react");
1062
1070
  var useChartTooltip = ({
@@ -1064,7 +1072,7 @@ var useChartTooltip = ({
1064
1072
  tooltipAnimationDuration = 0,
1065
1073
  styles
1066
1074
  }) => {
1067
- const { theme } = (0, import_core9.useTheme)();
1075
+ const { theme } = (0, import_core10.useTheme)();
1068
1076
  const { cursor, ...rest } = _tooltipProps;
1069
1077
  const cursorClassName = (0, import_react7.useMemo)(
1070
1078
  () => getClassName({ ...styles.cursor, ...cursor })(theme),
@@ -1092,8 +1100,8 @@ var useChartTooltip = ({
1092
1100
 
1093
1101
  // src/area-chart.tsx
1094
1102
  var import_jsx_runtime5 = require("react/jsx-runtime");
1095
- var AreaChart = (0, import_core10.forwardRef)((props, ref) => {
1096
- const [styles, mergedProps] = (0, import_core10.useMultiComponentStyle)("AreaChart", props);
1103
+ var AreaChart = (0, import_core11.forwardRef)((props, ref) => {
1104
+ const [styles, mergedProps] = (0, import_core11.useMultiComponentStyle)("AreaChart", props);
1097
1105
  const {
1098
1106
  className,
1099
1107
  series,
@@ -1138,7 +1146,7 @@ var AreaChart = (0, import_core10.forwardRef)((props, ref) => {
1138
1146
  splitOffset,
1139
1147
  syncId,
1140
1148
  ...rest
1141
- } = (0, import_core10.omitThemeProps)(mergedProps);
1149
+ } = (0, import_core11.omitThemeProps)(mergedProps);
1142
1150
  const {
1143
1151
  getAreaChartProps,
1144
1152
  getAreaSplitProps,
@@ -1238,12 +1246,11 @@ var AreaChart = (0, import_core10.forwardRef)((props, ref) => {
1238
1246
  [getReferenceLineProps, referenceLineProps]
1239
1247
  );
1240
1248
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChartProvider, { value: { styles }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1241
- import_core10.ui.div,
1249
+ import_core11.ui.div,
1242
1250
  {
1243
1251
  ref,
1244
1252
  className: (0, import_utils11.cx)("ui-area-chart", className),
1245
- var: areaVars,
1246
- __css: { ...styles.container },
1253
+ __css: { maxW: "full", vars: areaVars, ...styles.container },
1247
1254
  ...rest,
1248
1255
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1249
1256
  import_recharts.ResponsiveContainer,